From 3688695ff2a8b1e0f880aa7f53ba36364184952b Mon Sep 17 00:00:00 2001 From: Harald Pansi Date: Mon, 28 Sep 2026 14:18:33 +0200 Subject: [PATCH] Initial commit: RhetorikMaster PWA Trainer & Klausur-Spickzettel --- .gitignore | 7 + README.md | 14 + www/favicon.ico | Bin 0 -> 450 bytes www/favicon.svg | 15 + www/icon-192.png | Bin 0 -> 450 bytes www/icon-512.png | Bin 0 -> 1820 bytes www/index.html | 1 + www/manifest.json | 28 + www/rhetorik_trainer_quiz.html | 1949 ++++++++++++++++++++++++++++++++ www/sw.js | 80 ++ 10 files changed, 2094 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 www/favicon.ico create mode 100644 www/favicon.svg create mode 100644 www/icon-192.png create mode 100644 www/icon-512.png create mode 120000 www/index.html create mode 100644 www/manifest.json create mode 100644 www/rhetorik_trainer_quiz.html create mode 100644 www/sw.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..356372e --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +# OS & Editor files +.DS_Store +Thumbs.db +*~ +*.swp +.idea/ +.vscode/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..d68ba37 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# RhetorikMaster + +Interaktiver Rhetorik-Trainer & Klausur-Spickzettel als Progressive Web App (PWA). + +## Features +- **Cheat Sheet / Klausur-Spickzettel**: Tabellarische Übersicht rhetorischer Stilmittel gegliedert nach Wirkungskategorien (Anschaulichkeit, Klang/Rhythmus, Nachdruck/Struktur, Emotion/Spannung, Argumentation/Logik). +- **Kernstoff & Zusatzinfo**: Filter für Kernstoff (häufig geprüfte Stilmittel) und Zusatzinfo. +- **Interaktiver Quiz-Modus**: Multiple-Choice-Fragen, Begriffs- und Beispielfragen, Sofort-Feedback mit Erklärung, Option "Nur Kernstoff abfragen". +- **PWA & Offline-Fähig**: Service Worker mit Network-First-Strategie und Fallback auf Cache. +- **Responsives Design**: Optimiert für Desktop und mobile Endgeräte (Smartphones wie z. B. Pixel). + +## Bereitstellung +- Web-Verzeichnis: `www/` +- Domain: `https://rhetorikmaster.pansi.eu/` diff --git a/www/favicon.ico b/www/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..4fe1075739317e994e1b48e467cacca74aaac793 GIT binary patch literal 450 zcmeAS@N?(olHy`uVBq!ia0y~yU^oE69Bd2>3_*8t*cliYJ3U<-Ln>~)y==(Kz`$|9 zV9%rn@~jC>{c@%oQYKzyj&J3VVBle3V_ + + + + + + + + + + + + + + diff --git a/www/icon-192.png b/www/icon-192.png new file mode 100644 index 0000000000000000000000000000000000000000..4fe1075739317e994e1b48e467cacca74aaac793 GIT binary patch literal 450 zcmeAS@N?(olHy`uVBq!ia0y~yU^oE69Bd2>3_*8t*cliYJ3U<-Ln>~)y==(Kz`$|9 zV9%rn@~jC>{c@%oQYKzyj&J3VVBle3V_*G>io1_n=8KbLh*2~7Z`W1qSJ literal 0 HcmV?d00001 diff --git a/www/index.html b/www/index.html new file mode 120000 index 0000000..d851a68 --- /dev/null +++ b/www/index.html @@ -0,0 +1 @@ +rhetorik_trainer_quiz.html \ No newline at end of file diff --git a/www/manifest.json b/www/manifest.json new file mode 100644 index 0000000..72f23ec --- /dev/null +++ b/www/manifest.json @@ -0,0 +1,28 @@ +{ + "name": "RhetorikMaster - Stilmittel Trainer & Quiz", + "short_name": "RhetorikMaster", + "description": "Interaktiver Trainer für rhetorische Stilmittel der Textanalyse mit Karteikarten, Quiz und Leitner-System", + "start_url": "/", + "display": "standalone", + "background_color": "#0f172a", + "theme_color": "#4f46e5", + "orientation": "portrait-primary", + "icons": [ + { + "src": "/favicon.svg", + "sizes": "any", + "type": "image/svg+xml", + "purpose": "any maskable" + }, + { + "src": "/icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/icon-512.png", + "sizes": "512x512", + "type": "image/png" + } + ] +} diff --git a/www/rhetorik_trainer_quiz.html b/www/rhetorik_trainer_quiz.html new file mode 100644 index 0000000..92054b0 --- /dev/null +++ b/www/rhetorik_trainer_quiz.html @@ -0,0 +1,1949 @@ + + + + + + + + + + + + + + + + + RhetorikMaster - Stilmittel Trainer, Quiz & Klausur-Spickzettel + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+ +
+
+
+ RhetorikMaster + Pro +
+ +
+
+ + +
+ + + + + + + + + + +
+ + 0 / 23 gelernt +
+
+
+ + + +
+
+ +
+ + + + +
+ +
+
+
+

+ Leitner-Karteikarten (5-Kasten-System) +

+

Wische nach links (wiederholen) oder rechts (gekonnt) oder tippe zum Wenden.

+
+ +
+ +
+ + +
+ + +
+ + +
+
+
+ + +
+ +
+ Auswahl: + + + + | + + + + +
+ + +
+ Kasten: + +
+
+
+ + +
+
+ Karte 1 von 17 (🌟 Kernstoff) +
+ Kasten 1 +
+ + + + + +
+
+
+
+
+
+
+ + +
+
+
+ + +
+
+ Karte 1 von 17 + Klangfigur +
+ + +
+
Rhetorisches Stilmittel
+
+ Alliteration +
+
+ Tippe oder drücke [Leertaste] zum Aufdecken +
+
+ +
+ + Antippen zum Wenden +
+
+ + +
+
+ + + Alliteration + + + 🌟 Kernstoff + +
+ + +
+
+ Definition & Wirkung +

+ Mehrere Wörter beginnen mit demselben Anlaut. +

+
+ +
+ Typische Phrasen & Zitate +

+ „Fischers Fritz fischt frische Fische.“ +

+
+ +
+ + Merkhilfe & Tipp + +

+
+
+ +
+ Klangfigur + Nochmal tippen +
+
+ +
+
+ + +
+ + +
+ + +
+ + +
+
+
+ + + + + + + + + + + + + + + + +
+ + + + + + + + + + +
+
+ + Fortschritt gespeichert! +
+
+ + + + \ No newline at end of file diff --git a/www/sw.js b/www/sw.js new file mode 100644 index 0000000..4a0bbb8 --- /dev/null +++ b/www/sw.js @@ -0,0 +1,80 @@ +const CACHE_NAME = 'rhetorikmaster-v5'; +const STATIC_ASSETS = [ + '/', + '/index.html', + '/rhetorik_trainer_quiz.html', + '/favicon.svg', + '/manifest.json', + '/icon-192.png', + '/icon-512.png', + 'https://cdn.tailwindcss.com', + 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css', + 'https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap' +]; + +self.addEventListener('install', (event) => { + event.waitUntil( + caches.open(CACHE_NAME).then((cache) => { + return cache.addAll(STATIC_ASSETS).catch((err) => { + console.warn('Precache partial failure:', err); + }); + }) + ); + self.skipWaiting(); +}); + +self.addEventListener('activate', (event) => { + event.waitUntil( + caches.keys().then((cacheNames) => { + return Promise.all( + cacheNames.map((name) => { + if (name !== CACHE_NAME) { + console.log('Cleaning old cache:', name); + return caches.delete(name); + } + }) + ); + }).then(() => self.clients.claim()) + ); +}); + +self.addEventListener('fetch', (event) => { + const request = event.request; + const isHtmlNavigation = request.mode === 'navigate' || + (request.method === 'GET' && request.headers.get('accept') && request.headers.get('accept').includes('text/html')); + + if (isHtmlNavigation) { + // Network-First for HTML/Navigation: Always fetch fresh HTML from server, fallback to cache if offline + event.respondWith( + fetch(request) + .then((networkResponse) => { + if (networkResponse && networkResponse.status === 200) { + const copy = networkResponse.clone(); + caches.open(CACHE_NAME).then((cache) => cache.put(request, copy)); + } + return networkResponse; + }) + .catch(() => { + return caches.match(request).then((cached) => cached || caches.match('/rhetorik_trainer_quiz.html') || caches.match('/')); + }) + ); + return; + } + + // Stale-While-Revalidate for other static assets (CSS, fonts, images) + event.respondWith( + caches.match(request).then((cachedResponse) => { + const fetchPromise = fetch(request).then((networkResponse) => { + if (networkResponse && networkResponse.status === 200) { + const responseToCache = networkResponse.clone(); + caches.open(CACHE_NAME).then((cache) => { + cache.put(request, responseToCache); + }); + } + return networkResponse; + }).catch(() => cachedResponse); + + return cachedResponse || fetchPromise; + }) + ); +});