From 1dd118eda2506fe5117c5f1eb9ec7835b6530725 Mon Sep 17 00:00:00 2001
From: maltejur <48161361+maltejur@users.noreply.github.com>
Date: Mon, 2 Nov 2020 17:42:51 +0100
Subject: [PATCH] rename hs to hertzschlag
---
data.json | 2 +-
modules/ausgabe.js | 22 ++++++++++++----------
modules/home.js | 4 ++--
modules/liste.js | 2 +-
modules/pdf.js | 2 +-
5 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/data.json b/data.json
index be92cf3..b0ed0a1 100644
--- a/data.json
+++ b/data.json
@@ -1,6 +1,6 @@
{
"baseUrl": "https://files.hertzschlag.eu/",
- "hs": [
+ "hertzschlag": [
{
"Ausgabe": "1",
"Thema": "Quo Vadis?",
diff --git a/modules/ausgabe.js b/modules/ausgabe.js
index 2193d56..b24dae3 100644
--- a/modules/ausgabe.js
+++ b/modules/ausgabe.js
@@ -6,14 +6,14 @@ export default async function Ausgabe(params) {
const response = await fetch("data.json");
const json = await response.json();
- const ausg = json.hs.find((i) => i["Ausgabe"] == params.id);
+ const ausg = json.hertzschlag.find((i) => i["Ausgabe"] == params.id);
ausg["Cover"] = ausg["Ausgabe"] + ".jpg";
let pagehtml = `
-
+
" + i + ": " + ausg[i] + "
"; } } - checkFile(`${json.baseUrl}hs/pdf/${ausg["Ausgabe"]}.pdf`).then((exists) => { - if (exists) { - ret.innerHTML += - // prettier-ignore - ` + checkFile(`${json.baseUrl}hertzschlag/pdf/${ausg["Ausgabe"]}.pdf`).then( + (exists) => { + if (exists) { + ret.innerHTML += + // prettier-ignore + ` PDF Anzeigen `; + } } - }); + ); ret.innerHTML = pagehtml; return ret; diff --git a/modules/home.js b/modules/home.js index 231f589..d7a64f6 100644 --- a/modules/home.js +++ b/modules/home.js @@ -6,10 +6,10 @@ export default async function Home() { const response = await fetch("data.json"); const json = await response.json(); - json.hs.forEach((i) => { + json.hertzschlag.forEach((i) => { html += ` -
+
| Ausgabe | Thema |
|---|---|