jekyll build from Action fae93a92de

This commit is contained in:
2025-03-18 20:57:09 +00:00
parent b87af1c72c
commit 2c87d29b95
12 changed files with 582 additions and 326 deletions

View File

@@ -8085,4 +8085,19 @@ footer {
color: #888;
}
.mobile-tabs {
display: none;
}
/* Ab max. 992px (iPad Hochkant und kleiner) ändert sich das Layout */
@media screen and (max-width: 992px) {
.desktop-only {
display: none;
}
.mobile-tabs {
display: block;
background-color: transparent;
}
}
/*# sourceMappingURL=main.css.map */

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,59 @@
const CACHE_NAME = "cyberpunk-cache-v1";
const OFFLINE_URL = "/offline.html"; // Diese Seite wird angezeigt, wenn offline
const urlsToCache = [
"/",
"/offline.html",
/* CSS-Dateien */
"/assets/css/main.css",
"/assets/css/normalize.css",
"/assets/css/cyberpunk.css",
/* JS-Dateien */
"/assets/js/materialize.min.js",
"/assets/js/service-worker.js",
/* PWA-Dateien */
"/assets/manifest.json",
"/assets/img/icon-192.png",
"/assets/img/icon-512.png",
/* Bilder, Schriften, etc. */
"/assets/fonts/BlenderProBook.woff2",
"/assets/fonts/Cyberpunk.otf",
"/assets/fonts/Oxanium.woff2",
"/assets/img/Netrunner.png",
"/assets/img/Tech.png",
];
// Installations-Event: Dateien werden in den Cache geladen
self.addEventListener("install", (event) => {
event.waitUntil(
caches.open(CACHE_NAME).then((cache) => {
return cache.addAll(urlsToCache);
})
);
});
// Fetch-Event: Prüft, ob eine Datei im Cache ist, bevor sie aus dem Netz geladen wird
self.addEventListener("fetch", (event) => {
event.respondWith(
caches.match(event.request).then((response) => {
return response || fetch(event.request).catch(() => {
return caches.match(OFFLINE_URL); // Falls offline, lade offline.html
});
})
);
});
// Aktivierungs-Event: Löscht alten Cache, wenn sich Dateien geändert haben
self.addEventListener("activate", (event) => {
event.waitUntil(
caches.keys().then((cacheNames) => {
return Promise.all(
cacheNames.map((cache) => {
if (cache !== CACHE_NAME) {
return caches.delete(cache);
}
})
);
})
);
});

21
assets/manifest.json Normal file
View File

@@ -0,0 +1,21 @@
{
"name": "ThePhoenixDivision",
"short_name": "CPRED",
"start_url": "/cpred/",
"display": "standalone",
"background_color": "#f8ef02",
"theme_color": "#ff003c",
"icons": [
{
"src": "/cpred/assets/img/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/cpred/assets/img/icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}