Update form copy

This commit is contained in:
Jeremy Thomas 2024-01-11 12:57:09 +00:00
parent 25d054e64b
commit 4301f50d06
6 changed files with 2367 additions and 1925 deletions

View File

@ -97,32 +97,34 @@ document.addEventListener("DOMContentLoaded", () => {
const $amis = document.getElementById("amis"); const $amis = document.getElementById("amis");
fetch("https://jgthms.com/amis.json") if ($amis) {
.then((response) => { fetch("https://jgthms.com/amis.json")
if (!response.ok) { .then((response) => {
throw new Error(`HTTP error! Status: ${response.status}`); if (!response.ok) {
} throw new Error(`HTTP error! Status: ${response.status}`);
}
return response.json(); return response.json();
}) })
.then((response) => { .then((response) => {
const { by_id, home } = response; const { by_id, home } = response;
home.forEach((id) => { home.forEach((id) => {
const ami = by_id[id]; const ami = by_id[id];
const { url, alt = "", width, height } = ami; const { url, alt = "", width, height } = ami;
const el = document.createElement("a"); const el = document.createElement("a");
el.className = "bd-sponsor-item bd-partner-sponsor"; el.className = "bd-sponsor-item bd-partner-sponsor";
el.href = "url"; el.href = url;
el.target = "_blank"; el.target = "_blank";
el.title = alt; el.title = alt;
const extension = ami.svg ? ".svg" : ".png"; const extension = ami.svg ? ".svg" : ".png";
const img = document.createElement("img"); const img = document.createElement("img");
img.src = `/images/amis/${id}${extension}`; img.src = `/images/amis/${id}${extension}`;
img.height = height; img.height = height;
img.width = width; img.width = width;
el.appendChild(img); el.appendChild(img);
$amis.appendChild(el); $amis.appendChild(el);
});
}); });
}); }
}); });

View File

@ -160,6 +160,13 @@
display: flex; display: flex;
width: 100%; width: 100%;
} }
.label em {
font-style: normal;
font-weight: normal;
opacity: 0.5;
font-size: 0.875em;
}
} }
.v1-tsp { .v1-tsp {

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -86,37 +86,39 @@ document.addEventListener("DOMContentLoaded", function () {
var $amis = document.getElementById("amis"); var $amis = document.getElementById("amis");
fetch("https://jgthms.com/amis.json").then(function (response) { if ($amis) {
if (!response.ok) { fetch("https://jgthms.com/amis.json").then(function (response) {
throw new Error("HTTP error! Status: " + response.status); if (!response.ok) {
} throw new Error("HTTP error! Status: " + response.status);
}
return response.json(); return response.json();
}).then(function (response) { }).then(function (response) {
var by_id = response.by_id, var by_id = response.by_id,
home = response.home; home = response.home;
home.forEach(function (id) { home.forEach(function (id) {
var ami = by_id[id]; var ami = by_id[id];
var url = ami.url, var url = ami.url,
_ami$alt = ami.alt, _ami$alt = ami.alt,
alt = _ami$alt === undefined ? "" : _ami$alt, alt = _ami$alt === undefined ? "" : _ami$alt,
width = ami.width, width = ami.width,
height = ami.height; height = ami.height;
var el = document.createElement("a"); var el = document.createElement("a");
el.className = "bd-sponsor-item bd-partner-sponsor"; el.className = "bd-sponsor-item bd-partner-sponsor";
el.href = "url"; el.href = url;
el.target = "_blank"; el.target = "_blank";
el.title = alt; el.title = alt;
var extension = ami.svg ? ".svg" : ".png"; var extension = ami.svg ? ".svg" : ".png";
var img = document.createElement("img"); var img = document.createElement("img");
img.src = "/images/amis/" + id + extension; img.src = "/images/amis/" + id + extension;
img.height = height; img.height = height;
img.width = width; img.width = width;
el.appendChild(img); el.appendChild(img);
$amis.appendChild(el); $amis.appendChild(el);
});
}); });
}); }
}); });

View File

@ -21,14 +21,14 @@ layout: playground
</div> </div>
<div class="block"> <div class="block">
<label class="label" for="name">Name</label> <label class="label" for="name">Name <em>(required)</em></label>
<div class="form-control"> <div class="form-control">
<input class="input" type="text" name="name" id="name"> <input class="input" type="text" name="name" id="name">
</div> </div>
</div> </div>
<div class="block"> <div class="block">
<label class="label" for="email">Email</label> <label class="label" for="email">Email <em>(required)</em></label>
<div class="form-control"> <div class="form-control">
<input class="input" type="email" name="email" id="email"> <input class="input" type="email" name="email" id="email">
</div> </div>
@ -43,6 +43,7 @@ layout: playground
<input type="hidden" name="list" value="cLsqDIbNTqfozYoXXXBLrw"> <input type="hidden" name="list" value="cLsqDIbNTqfozYoXXXBLrw">
<input type="hidden" name="subform" value="yes"> <input type="hidden" name="subform" value="yes">
<input class="button is-primary" type="submit" name="submit" id="submit"> <input class="button is-primary" type="submit" name="submit" id="submit">
<p class="v1-tsp">No spam. Just a few emails regarding gaining access and providing feedback.</p> <p class="v1-tsp">No spam. Just a few emails regarding gaining access and providing feedback.</p>