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/",
|
||||
"hs": [
|
||||
"hertzschlag": [
|
||||
{
|
||||
"Ausgabe": "1",
|
||||
"Thema": "Quo Vadis?",
|
||||
|
|
|
|||
|
|
@ -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 = `
|
||||
<a class="back" onclick="window.history.back()">
|
||||
<i class="fas fa-arrow-left"></i>
|
||||
</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>
|
||||
<h1>${ausg["Thema"]}</h1>
|
||||
`;
|
||||
|
|
@ -28,7 +28,8 @@ export default async function Ausgabe(params) {
|
|||
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(
|
||||
(exists) => {
|
||||
if (exists) {
|
||||
ret.innerHTML +=
|
||||
// prettier-ignore
|
||||
|
|
@ -39,17 +40,18 @@ export default async function Ausgabe(params) {
|
|||
<button>
|
||||
<i class="fas fa-download"></i>Download
|
||||
<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
|
||||
</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
|
||||
</a>
|
||||
</div>
|
||||
</button>
|
||||
`;
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
ret.innerHTML = pagehtml;
|
||||
return ret;
|
||||
|
|
|
|||
|
|
@ -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 += `
|
||||
<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">
|
||||
<h3>HS ${i.Ausgabe}</h3>
|
||||
<h2>${i.Thema}</h2>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ export default async function Liste() {
|
|||
|
||||
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>";
|
||||
json.hs.forEach((i) => {
|
||||
json.hertzschlag.forEach((i) => {
|
||||
listehtml =
|
||||
listehtml +
|
||||
"<tr onclick='window.location=\"#ausgabe/" +
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ export default async function Pdf(params) {
|
|||
ret.classList.add("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);
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue