Tied in new homepage with the rest of the app.

This commit is contained in:
John Shaver 2018-07-26 12:55:31 -07:00 committed by AJ ONeal
parent 7af2671993
commit 34acb707ac
3 changed files with 18 additions and 3 deletions

View File

@ -7,7 +7,7 @@
<body hidden>
<div class="column-container wide">
<div class="column-row">
<img src="img/greenlock-146.png">
<img src="../img/greenlock-820x150.png">
</div>
<div class="column-row">
<h1>Get the green lock for your website</h1>

View File

@ -11,6 +11,7 @@
var apiUrl = 'https://acme-{{env}}.api.letsencrypt.org/directory';
function updateApiType() {
console.log("type updated");
var input = this || Array.prototype.filter.call(
$qsa('.js-acme-api-type'), function ($el) { return $el.checked; }
)[0];
@ -507,8 +508,22 @@
hideForms();
$qs('.js-acme-form-download').hidden = false;
}
steps[1]();
var params = new URLSearchParams(window.location.search);
var apiType = params.get('acme-api-type') || "staging-v02";
if(params.has('acme-domains')) {
console.log("acme-domains param: ", params.get('acme-domains'));
$qs('.js-acme-domains').value = params.get('acme-domains');
$qsa('.js-acme-api-type').forEach(function(ele) {
if(ele.value === apiType) {
ele.checked = true;
}
});
submitForm();
}
$qs('body').hidden = false;
}());

View File

@ -59,7 +59,7 @@
</label>
<label><input name="acme-api-type" type="radio" value="staging-v02" required>
Testing</label>
<input id="js-acme-api-url" name="acme-api-url" type="url" placeholder="ACME directory url">
<input id="js-acme-api-url" type="url" placeholder="ACME directory url">
<div>
<a href="https://git.coolaj86.com/coolaj86/greenlock.html">View Source</a> (git)
</div>