feat(mobile,pwa): implement responsive viewport, mobile drawer and pwa support
Deploy Development / deploy (push) Successful in 20s
Deploy Development / deploy (push) Successful in 20s
This commit is contained in:
1 parent
83177f31f8
commit
5c99ce6f22
11 files changed
+367
-12
No files matched your search
@@ -0,0 +1,8 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-300 11 290 290" width="512" height="512">
|
||||
<circle cx="-155" cy="156" r="142" fill="#1a1a1a"/>
|
||||
<circle cx="-155" cy="156" r="138" fill="none" stroke="#e41b1b" stroke-width="4"/>
|
||||
<g id="emblem">
|
||||
<path transform="matrix(2.7597,0,0,2.7597,-2559.1,-2310.8)" d="m889.8 927.81c3.2706-0.29307 6.868-1.2628 8.5108-4.3952 1.5107-1.2233-0.1487-4.5881 1.6857-4.8747 2.8031-0.14022 6.4278-0.48065 7.2812-3.7317 2.0351-4.9446 1.281-10.41 1.1584-15.609-0.59189-3.4897-1.6954-6.9124-1.4546-10.503 0.0597-3.6618-0.42792-7.9533-3.8957-10.026-2.8973-1.6072-6.4295-1.3778-9.6372-1.856-10.748-0.28444-16.077 0.68551-26.801 0.80615-3.5946-0.26156-12.703-0.77348-16.212-1.681-0.73019-2.9195-0.22814-6.1528-0.44946-9.193 0.49707-2.3022-0.51587-4.3898-2.9962-3.6834-2.7194 0.0629-5.4778-0.16957-8.1648 0.16713-1.2576 2.9302-0.28643 6.6583-0.6021 9.9069 0.0247 14.302-0.0775 28.605 0.0661 42.906 1.7992 2.5699 6.539 0.56903 9.5046 1.1919 3.9347 0.13346 1.4074-5.5572 2.1676-7.9772l0.0408-6.8157c3.1586 0.22789 3.7244 3.9363 5.2334 6.1008 0.89381 2.1894 3.2953 3.1175 4.7256 4.9118 3.559 2.0851 7.602 3.2912 11.244 5.2657 3.1422 1.5946 5.9347 3.7305 8.8507 5.6984 2.798 2.1026 6.0572 4.2709 9.7444 3.3923z" fill="#e41b1b" style="paint-order:normal"/>
|
||||
<path transform="matrix(2.7597,0,0,2.7597,-2582,-2319.5)" d="m898.11 930.96c3.2706-0.29307 6.868-1.2628 8.5108-4.3952 1.5107-1.2233-0.1487-4.5881 1.6857-4.8747 2.8031-0.14022 6.4278-0.48065 7.2812-3.7317 2.0351-4.9446 1.281-10.41 1.1584-15.609-0.59189-3.4897-1.6954-6.9124-1.4546-10.503 0.0597-3.6618-0.42792-7.9533-3.8957-10.026-2.8973-1.6072-6.4295-1.3778-9.6372-1.856-10.748-0.28444-16.077 0.68551-26.801 0.80615-3.5946-0.26156-12.703-0.77348-16.212-1.681-0.73019-2.9195-0.22814-6.1528-0.44946-9.193 0.49707-2.3022-0.51587-4.3898-2.9962-3.6834-2.7194 0.0629-5.4778-0.16957-8.1648 0.16713-1.2576 2.9302-0.28643 6.6583-0.6021 9.9069 0.0247 14.302-0.0775 28.605 0.0661 42.906 1.7992 2.5699 6.539 0.56903 9.5046 1.1919 3.9347 0.13346 1.4074-5.5572 2.1676-7.9772l0.0408-6.8157c3.1586 0.22789 3.7244 3.9363 5.2334 6.1008 0.89381 2.1894 3.2953 3.1175 4.7256 4.9118 3.559 2.0851 7.602 3.2912 11.244 5.2657 3.1422 1.5946 5.9347 3.7305 8.8507 5.6984 2.798 2.1026 6.0572 4.2709 9.7444 3.3923zm-4.2356-1.1075c-6.1238-2.6618-10.776-7.879-17.029-10.342-3.3417-1.392-5.7739-4.363-7.4412-7.4762-0.12545-1.2216-2.6781-5.7328-1.6073-2.0842 0.13833 2.1363 3.8761 5.7534 2.8197 6.831-2.5954-1.8107-5.408-3.7328-6.8081-6.6769-1.0133-2.5808-3.026-5.0697-5.5385-5.8434 0.0373-7.9015-0.0964-15.81 0.1078-23.706 7.5871 0.52138 15.028 1.5741 22.637 1.0397 8.4716-0.28456 17.161-1.1725 25.603-0.19474 2.9478 1.5673 4.155 5.3727 4.5621 8.5191 0.42706 7.133 1.1136 14.248 1.5932 21.376-0.3776 3.052 0.0234 7.9851-3.5213 9.057-1.8582 0.56377-3.4512-0.34482-5.0606-1.139-3.1474-1.1229-4.99-4.1978-7.2183-6.5083-0.58141-2.7425 1.9306-8.3926 4.5485-3.8126 0.14185 1.5896 3.7394 4.4858 2.1623 1.474-1.8492-2.5477-5.1467-5.637-3.1247-9.0141 1.0089-1.1572 3.1787-4.8696 0.35391-2.1259-2.6275 2.3217-6.9524-2.2485-4.5886-4.9414 0.25618-2.1959 3.7667-4.6121 3.4507-5.88-3.8156 1.5369-4.4773 5.9064-5.8983 9.2696-1.181 2.3121-1.8917 6.6449-3.8085 7.4723-0.88908-2.9678-0.64528-6.6367 1.0723-9.2898-0.50237-1.4173-3.1342 3.0579-2.8025 4.6344-0.67883 3.6991 1.635 6.853 4.1813 9.2403 2.6764 2.704 5.5864 5.4115 7.2321 8.8928-0.6237 1.9981-1.9586 4.5212-3.561 6.289-0.6896 0.89153-5.4004 4.48-1.9289 3.0074 2.4506-2.3167 4.9343-4.9218 5.8274-8.2414 0.98835 1.9414-0.0101 4.7647-0.71895 6.7867-0.97499 1.8456-3.1835 4.253-5.4964 3.3868zm2.9477-2.4335c1.3108-0.62375 3.5229-5.3532 0.96738-2.2975-0.72209 0.57619-3.5452 4.2067-0.96738 2.2975zm-12.164-4.9867c0.7369-2.9859 4.6779-2.8278 5.953-4.5216-2.6496-0.62817-7.766 2.7859-6.232 4.8665l0.27901-0.34488zm-5.1683-8.0926c0.18168-1.2358-1.3431-6.0456-1.3562-2.4478-0.18619 0.63534 0.91989 3.617 1.3562 2.4478zm2.8664-1.005c-1.041-1.5403 0.653-5.126-1.3116-5.1416-0.0494 1.4093-0.28059 5.3596 1.3116 5.1416zm6.5275-4.8398c-1.151-3.1035-1.99-6.3402-1.5867-9.6813-0.41496-2.5596 3.4546-5.5987 2.4808-7.4394-1.3363 0.34849-1.407 2.7405-2.2703 3.79-1.5876 3.2213-1.5408 7.0081-0.92116 10.456 0.41994 0.95697 0.83025 3.4502 2.2973 2.8743zm11.291-12.913c2.4566-2.2219 5.474-3.6566 7.9841-5.7513-2.0612 0.49018-5.61 2.1098-6.9641 4.0794-0.30561 0.33908-3.4938 2.462-1.02 1.6719zm-12.575-5.906c1.9614-2.2746 6.3902-2.8328 6.5289-6.3096-1.4836 2.2769-4.7065 3.4644-6.8512 5.4077-0.63275 0.28215-0.47734 1.5645 0.32223 0.90191zm11.684 40.038c0.32173-2.3899 2.732-6.4175 6.065-5.3006 2.0299 1.2505-2.014 5.6854-4.4188 5.25-0.54121 0.0647-1.1032 0.17422-1.6462 0.0506zm6.5901-6.6346c-1.6849-0.51716-5.2397 1.463-4.3067-1.5296-0.72901-3.464 3.5286-0.17472 4.9274 0.86822 0.11182 0.50575-0.0412 0.72503-0.62074 0.66133zm6.5789-3.2288c0.76509-3.0028 1.6914-6.1805 1.3417-9.3945-0.49588-5.1357-1.185-10.255-1.2778-15.425-0.35345-4.1456-0.22847-8.5594-2.2274-12.313 2.3552 0.36785 4.1547 3.9783 3.8482 6.5985-0.0954 3.8323 0.51278 7.5895 1.4682 11.289 0.90285 5.591 1.0886 11.514-0.56693 16.984-0.45032 0.93047-1.3162 2.6846-2.586 2.2606zm-64.881-0.50035c-0.47742-1.0484-0.0709-2.4628-0.20588-3.6531v-48.234c0.79529-0.86037 2.2166-0.20927 3.2844-0.41174h6.3687c0.8604 0.79526 0.20927 2.2166 0.41175 3.2844v48.809c-0.79528 0.86037-2.2166 0.20927-3.2844 0.41174h-6.3687l-0.13542-0.13542zm47.422-8.9154c-2.9342-1.6629-4.0207-5.1716-2.3101-8.1348 0.97121-5.1904 4.7965-0.18259 4.6889 2.6626 0.79363 1.556-0.85481 6.2062-2.3788 5.4721z" fill="#ffffff" style="paint-order:normal"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.4 KiB |
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "Goju-Kai Dojo – Karate-Wiki",
|
||||
"short_name": "Karate-Wiki",
|
||||
"description": "Internes Vereins-Wiki & Technik-Videothek des Goju-Kai Dojo Heilbronn e.V.",
|
||||
"start_url": "/index.php?title=Hauptseite",
|
||||
"scope": "/",
|
||||
"display": "standalone",
|
||||
"orientation": "any",
|
||||
"background_color": "#121314",
|
||||
"theme_color": "#1a1a1a",
|
||||
"lang": "de",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/resources/assets/icon.svg",
|
||||
"sizes": "any",
|
||||
"type": "image/svg+xml",
|
||||
"purpose": "any maskable"
|
||||
},
|
||||
{
|
||||
"src": "/resources/assets/favicon-32x32.png",
|
||||
"sizes": "32x32",
|
||||
"type": "image/png"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
// Karate-Wiki Service Worker (PWA Offline-Cache & App Lifecycle)
|
||||
const CACHE_NAME = 'karatewiki-cache-v1';
|
||||
const PRECACHE_ASSETS = [
|
||||
'/resources/assets/icon.svg',
|
||||
'/resources/assets/favicon-32x32.png',
|
||||
'/resources/assets/logo.svg',
|
||||
'/resources/assets/logo-light.svg',
|
||||
'/manifest.webmanifest'
|
||||
];
|
||||
|
||||
self.addEventListener('install', (event) => {
|
||||
self.skipWaiting();
|
||||
event.waitUntil(
|
||||
caches.open(CACHE_NAME).then((cache) => {
|
||||
return cache.addAll(PRECACHE_ASSETS).catch(() => {});
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
self.addEventListener('activate', (event) => {
|
||||
event.waitUntil(
|
||||
Promise.all([
|
||||
self.clients.claim(),
|
||||
caches.keys().then((keys) => {
|
||||
return Promise.all(
|
||||
keys.map((key) => {
|
||||
if (key !== CACHE_NAME) {
|
||||
return caches.delete(key);
|
||||
}
|
||||
})
|
||||
);
|
||||
})
|
||||
])
|
||||
);
|
||||
});
|
||||
|
||||
// Network-first Strategie fuer dynamische Wiki-Inhalte
|
||||
self.addEventListener('fetch', (event) => {
|
||||
const request = event.request;
|
||||
if (request.method !== 'GET') {
|
||||
return;
|
||||
}
|
||||
|
||||
// Fuer statische Assets (Icons, SVGs) Cache mit Fallback
|
||||
const url = new URL(request.url);
|
||||
if (url.pathname.startsWith('/resources/assets/') || url.pathname.endsWith('.webmanifest')) {
|
||||
event.respondWith(
|
||||
caches.match(request).then((cached) => {
|
||||
return (
|
||||
cached ||
|
||||
fetch(request).then((response) => {
|
||||
if (response && response.status === 200) {
|
||||
const clone = response.clone();
|
||||
caches.open(CACHE_NAME).then((cache) => cache.put(request, clone));
|
||||
}
|
||||
return response;
|
||||
})
|
||||
);
|
||||
})
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
// Fuer alle Wiki-Seiten: Direkt ueber Netzwerk
|
||||
event.respondWith(
|
||||
fetch(request).catch(() => {
|
||||
return caches.match(request);
|
||||
})
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user