🌎☎️ Checkpoint
./scripts/zines2025.json:69682263/9929 ./scripts/zines.js:69682263/28460
This commit is contained in:
@ -126,13 +126,6 @@ let zines = [
|
||||
format: "digital",
|
||||
blurb: "About severe disability with a bit extra on being a caregiver",
|
||||
},
|
||||
{
|
||||
name: "gup",
|
||||
site: "https://cyberpunk.gay/@glyph",
|
||||
format: "physical/digital",
|
||||
blurb:
|
||||
"fortune teller/ cootie catcher foldable. prefolded for physical, print and fold yourself for digital. decorated with hand carved stamps. black and white. i need to buy nice paper.",
|
||||
},
|
||||
];
|
||||
|
||||
function makeZine({ name, blurb, format, site, fedi }) {
|
||||
@ -162,27 +155,39 @@ function makeZine({ name, blurb, format, site, fedi }) {
|
||||
return zine;
|
||||
}
|
||||
|
||||
let zineContainer = document.getElementById("zine-container");
|
||||
function makeZinePage(zines) {
|
||||
let zineContainer = document.getElementById("zine-container");
|
||||
|
||||
for (let i = 0; i < zines.length; i++) {
|
||||
zineContainer.append(makeZine(zines[i]));
|
||||
for (let i = 0; i < zines.length; i++) {
|
||||
zineContainer.append(makeZine(zines[i]));
|
||||
}
|
||||
|
||||
let zineCounter = document.getElementById("zine-count");
|
||||
let total = zines.length;
|
||||
let physical = zines.filter(
|
||||
(zine) => zine.format == "physical" || zine.format == "physical/digital"
|
||||
).length;
|
||||
let digital = zines.filter(
|
||||
(zine) => zine.format == "digital" || zine.format == "physical/digital"
|
||||
).length;
|
||||
|
||||
let p = document.createElement("p");
|
||||
p.innerHTML =
|
||||
total +
|
||||
" artists. " +
|
||||
physical +
|
||||
" physical zines. " +
|
||||
digital +
|
||||
" digital zines.";
|
||||
zineCounter.append(p);
|
||||
}
|
||||
|
||||
let zineCounter = document.getElementById("zine-count");
|
||||
let total = zines.length;
|
||||
let physical = zines.filter(
|
||||
(zine) => zine.format == "physical" || zine.format == "physical/digital"
|
||||
).length;
|
||||
let digital = zines.filter(
|
||||
(zine) => zine.format == "digital" || zine.format == "physical/digital"
|
||||
).length;
|
||||
|
||||
let p = document.createElement("p");
|
||||
p.innerHTML =
|
||||
total +
|
||||
" artists. " +
|
||||
physical +
|
||||
" physical zines. " +
|
||||
digital +
|
||||
" digital zines.";
|
||||
zineCounter.append(p);
|
||||
fetch("./zines2025.json")
|
||||
.then((response) => {
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP error! Status: ${response.status}`);
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then((data) => makeZinePage(data))
|
||||
.catch((error) => console.error("Failed to fetch data:", error));
|
||||
|
||||
Reference in New Issue
Block a user