rename hs to hertzschlag
This commit is contained in:
parent
ebbdadf488
commit
1dd118eda2
5 changed files with 17 additions and 15 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"baseUrl": "https://files.hertzschlag.eu/",
|
"baseUrl": "https://files.hertzschlag.eu/",
|
||||||
"hs": [
|
"hertzschlag": [
|
||||||
{
|
{
|
||||||
"Ausgabe": "1",
|
"Ausgabe": "1",
|
||||||
"Thema": "Quo Vadis?",
|
"Thema": "Quo Vadis?",
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,14 @@ export default async function Ausgabe(params) {
|
||||||
|
|
||||||
const response = await fetch("data.json");
|
const response = await fetch("data.json");
|
||||||
const json = await response.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";
|
ausg["Cover"] = ausg["Ausgabe"] + ".jpg";
|
||||||
let pagehtml = `
|
let pagehtml = `
|
||||||
<a class="back" onclick="window.history.back()">
|
<a class="back" onclick="window.history.back()">
|
||||||
<i class="fas fa-arrow-left"></i>
|
<i class="fas fa-arrow-left"></i>
|
||||||
</a><br><br>
|
</a><br><br>
|
||||||
<img class="cover" src="${json.baseUrl}hs/images/${ausg["Cover"]}"></img>
|
<img class="cover" src="${json.baseUrl}hertzschlag/images/${ausg["Cover"]}"></img>
|
||||||
<h2>HertzSCHLAG ${ausg["Ausgabe"]}</h2>
|
<h2>HertzSCHLAG ${ausg["Ausgabe"]}</h2>
|
||||||
<h1>${ausg["Thema"]}</h1>
|
<h1>${ausg["Thema"]}</h1>
|
||||||
`;
|
`;
|
||||||
|
|
@ -28,28 +28,30 @@ export default async function Ausgabe(params) {
|
||||||
pagehtml = pagehtml + "<p><b>" + i + ":</b> " + ausg[i] + "</p>";
|
pagehtml = pagehtml + "<p><b>" + i + ":</b> " + ausg[i] + "</p>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
checkFile(`${json.baseUrl}hs/pdf/${ausg["Ausgabe"]}.pdf`).then((exists) => {
|
checkFile(`${json.baseUrl}hertzschlag/pdf/${ausg["Ausgabe"]}.pdf`).then(
|
||||||
if (exists) {
|
(exists) => {
|
||||||
ret.innerHTML +=
|
if (exists) {
|
||||||
// prettier-ignore
|
ret.innerHTML +=
|
||||||
`
|
// prettier-ignore
|
||||||
|
`
|
||||||
<a class="button" href="#pdf/compressed/${ausg["Ausgabe"]}.pdf">
|
<a class="button" href="#pdf/compressed/${ausg["Ausgabe"]}.pdf">
|
||||||
<i class="fas fa-file-pdf"></i>PDF Anzeigen
|
<i class="fas fa-file-pdf"></i>PDF Anzeigen
|
||||||
</a>
|
</a>
|
||||||
<button>
|
<button>
|
||||||
<i class="fas fa-download"></i>Download
|
<i class="fas fa-download"></i>Download
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<a href="${json.baseUrl}hs/pdf/compressed/${ausg["Ausgabe"]}.pdf" download="hs_${ausg["Ausgabe"]}_lq.pdf">
|
<a href="${json.baseUrl}hertzschlag/pdf/compressed/${ausg["Ausgabe"]}.pdf" download="hertzschlag_${ausg["Ausgabe"]}_lq.pdf">
|
||||||
<i class="fas fa-file-download"></i>Niedrige Qualität
|
<i class="fas fa-file-download"></i>Niedrige Qualität
|
||||||
</a>
|
</a>
|
||||||
<a href="${json.baseUrl}hs/pdf/${ausg["Ausgabe"]}.pdf" download="hs_${ausg["Ausgabe"]}_hq.pdf">
|
<a href="${json.baseUrl}hertzschlag/pdf/${ausg["Ausgabe"]}.pdf" download="hertzschlag_${ausg["Ausgabe"]}_hq.pdf">
|
||||||
<i class="fas fa-file-download"></i>Hohe Qualität
|
<i class="fas fa-file-download"></i>Hohe Qualität
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
`;
|
`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
|
|
||||||
ret.innerHTML = pagehtml;
|
ret.innerHTML = pagehtml;
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,10 @@ export default async function Home() {
|
||||||
const response = await fetch("data.json");
|
const response = await fetch("data.json");
|
||||||
const json = await response.json();
|
const json = await response.json();
|
||||||
|
|
||||||
json.hs.forEach((i) => {
|
json.hertzschlag.forEach((i) => {
|
||||||
html += `
|
html += `
|
||||||
<a class="module" href="#ausgabe/${i.Ausgabe}">
|
<a class="module" href="#ausgabe/${i.Ausgabe}">
|
||||||
<img src="${json.baseUrl}hs/images/${i.Ausgabe}.jpg" class="moduleImg"></img>
|
<img src="${json.baseUrl}hertzschlag/images/${i.Ausgabe}.jpg" class="moduleImg"></img>
|
||||||
<div class="moduleLabel">
|
<div class="moduleLabel">
|
||||||
<h3>HS ${i.Ausgabe}</h3>
|
<h3>HS ${i.Ausgabe}</h3>
|
||||||
<h2>${i.Thema}</h2>
|
<h2>${i.Thema}</h2>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ export default async function Liste() {
|
||||||
|
|
||||||
let listehtml =
|
let listehtml =
|
||||||
"<a class='back' onclick='window.history.back()'><i class='fas fa-arrow-left'></i></a><h1>Artikelliste</h1><table><tr><th>Ausgabe</th><th>Thema</th></tr>";
|
"<a class='back' onclick='window.history.back()'><i class='fas fa-arrow-left'></i></a><h1>Artikelliste</h1><table><tr><th>Ausgabe</th><th>Thema</th></tr>";
|
||||||
json.hs.forEach((i) => {
|
json.hertzschlag.forEach((i) => {
|
||||||
listehtml =
|
listehtml =
|
||||||
listehtml +
|
listehtml +
|
||||||
"<tr onclick='window.location=\"#ausgabe/" +
|
"<tr onclick='window.location=\"#ausgabe/" +
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ export default async function Pdf(params) {
|
||||||
ret.classList.add("iframe");
|
ret.classList.add("iframe");
|
||||||
|
|
||||||
const iframe = document.createElement("iframe");
|
const iframe = document.createElement("iframe");
|
||||||
iframe.src = `${json.baseUrl}hs/pdf/${params.src}`;
|
iframe.src = `${json.baseUrl}hertzschlag/pdf/${params.src}`;
|
||||||
|
|
||||||
ret.appendChild(iframe);
|
ret.appendChild(iframe);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue