feat: Add WFW-Aushang web app with PWA support, offline caching, and dark mode

- Created index.html for the main application interface with responsive design and dark mode support.
- Added manifest.webmanifest for PWA configuration, including app icons and display settings.
- Implemented service worker (sw.js) for offline caching of assets and network-first strategy for versioning.
- Introduced version.json to manage app versioning.
This commit is contained in:
thrhymes
2025-12-24 16:59:51 +01:00
parent 5577407f97
commit b049dded72
24 changed files with 4167 additions and 0 deletions

326
bibel-pwa/styles.css Normal file
View File

@@ -0,0 +1,326 @@
/* Grundlegende Styles für die BibelLernApp */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
:root {
/* Light mode Farben */
--background-color: #f8f9fa;
--header-bg: #ffffff;
--header-text: #333333;
--card-bg: #ffffff;
--card-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
--text-color: #333333;
--button-bg: #007acc;
--button-text: #ffffff;
--button-bg-secondary: #e0e0e0;
--button-text-secondary: #333333;
--accent-default: #cccccc;
}
body.dark {
/* Dark mode Farben */
--background-color: #121212;
--header-bg: #1f1f1f;
--header-text: #e0e0e0;
--card-bg: #2a2a2a;
--card-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
--text-color: #f0f0f0;
--button-bg: #005f8f;
--button-text: #ffffff;
--button-bg-secondary: #3a3a3a;
--button-text-secondary: #dddddd;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
background: var(--background-color);
color: var(--text-color);
min-height: 100vh;
display: flex;
flex-direction: column;
}
header {
background: var(--header-bg);
color: var(--header-text);
padding: 0.5rem 1rem;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
position: sticky;
top: 0;
z-index: 10;
}
header select {
margin-right: 0.5rem;
padding: 0.3rem 0.5rem;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 0.9rem;
appearance: none;
}
.dark-toggle {
display: flex;
align-items: center;
cursor: pointer;
font-size: 0.9rem;
margin-left: 1rem;
}
.dark-toggle input {
margin-right: 0.3rem;
}
#counter {
font-weight: bold;
margin-right: 1rem;
}
main {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
padding: 1rem;
}
.hints {
margin-bottom: 1rem;
display: flex;
gap: 1rem;
font-size: 0.9rem;
}
.hints input {
margin-right: 0.3rem;
}
#card-container {
width: 100%;
display: flex;
justify-content: center;
}
.card {
width: 90%;
max-width: 420px;
/* erhöht die Kartenhöhe um 25 % für mehr Platz bei langen Versen */
height: 325px;
perspective: 1000px;
margin-bottom: 1rem;
}
.card-inner {
width: 100%;
height: 100%;
transition: transform 0.6s;
transform-style: preserve-3d;
position: relative;
}
.card.flipped .card-inner {
transform: rotateY(180deg);
}
.card-front,
.card-back {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
border-radius: 16px;
background: var(--card-bg);
box-shadow: var(--card-shadow);
color: var(--text-color);
overflow: hidden;
}
.card-front {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
padding: 1rem;
border-top: 6px solid var(--accent-color, var(--accent-default));
}
.card-symbol {
position: absolute;
top: 0.5rem;
right: 0.5rem;
font-size: 3rem;
opacity: 0.8;
pointer-events: none;
}
.card-ref {
font-size: 1.6rem;
font-weight: bold;
margin-top: auto;
}
/* Kommentar unter dem Verweis */
.card-comment {
font-size: 0.9rem;
margin-top: 0.5rem;
color: var(--text-color);
opacity: 0.8;
}
.card-back {
transform: rotateY(180deg);
padding: 1rem;
border-top: 6px solid var(--accent-color, var(--accent-default));
/* Positioniert den Text am oberen Rand und lässt längeren Text scrollen */
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;
text-align: center;
overflow-y: auto;
}
/* Zähler pro Lernkarte auf der Rückseite */
.card-back .card-counter {
font-size: 0.9rem;
font-weight: bold;
margin-bottom: 0.5rem;
opacity: 0.8;
width: 100%;
text-align: left;
}
.card-back .card-text {
font-size: 1.1rem;
line-height: 1.4;
/* Lässt den Textbereich flexibel und scrollbar werden */
width: 100%;
max-height: 100%;
overflow-y: auto;
}
/* Stil für die Schlüsselwörter auf der Vorderseite der Karte */
.card-front .card-keywords {
font-size: 0.9rem;
opacity: 0.8;
margin-top: 0.4rem;
width: 100%;
word-break: break-word;
}
.buttons {
display: flex;
gap: 1rem;
justify-content: center;
margin-bottom: 2rem;
}
.buttons button {
padding: 0.6rem 1rem;
font-size: 1rem;
border: none;
border-radius: 4px;
cursor: pointer;
transition: background 0.2s;
}
.buttons .correct {
background: var(--button-bg);
color: var(--button-text);
}
.buttons .wrong {
background: var(--button-bg-secondary);
color: var(--button-text-secondary);
}
.buttons .correct:hover {
background: #005fa3;
}
.buttons .wrong:hover {
background: #c7c7c7;
}
/* Splash Screen Styles */
#splash-screen {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.6);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
#splash-screen.hidden {
display: none;
}
.splash-content {
background: var(--card-bg);
color: var(--text-color);
padding: 2rem;
border-radius: 12px;
box-shadow: var(--card-shadow);
text-align: center;
max-width: 320px;
}
.splash-content h1 {
margin-bottom: 0.5rem;
}
.splash-content p {
margin-bottom: 1rem;
}
.splash-buttons {
display: flex;
gap: 0.5rem;
justify-content: center;
}
.splash-buttons button {
flex: 1;
padding: 0.6rem;
border: none;
border-radius: 4px;
font-size: 1rem;
cursor: pointer;
}
.splash-buttons .install {
background: var(--button-bg);
color: var(--button-text);
}
.splash-buttons .secondary {
background: var(--button-bg-secondary);
color: var(--button-text-secondary);
}
/* Dienstklasse zum Ausblenden */
.hidden {
display: none !important;
}
/* Responsive Adjustments */
@media (min-width: 600px) {
.card {
height: 300px;
}
.card-symbol {
font-size: 3.5rem;
}
}