Files
AirCardIOS/web/src/shell/shell.css
T
ClaudeandClaude Opus 5.5 e1fb632cdd feat(i18n): Deutsch/Englisch, Sprachknopf und GitHub-Link in der Kopfzeile
- i18n-Kern im gettext-Stil (t/msg, Wörterbuch en.ts); Startsprache aus localStorage, sonst Browsersprache;
  <html lang> setzt auch das Inline-Skript in index.html. Ein Test prüft t()/msg() und en.ts in beide Richtungen.
- Kopfzeile: GitHub-Link und Sprachknopf (Zielsprache, Beschriftung und lang in der Zielsprache), Fußzeile aus mountFooter,
  Banner und Seitentitel übersetzt, statisches index.html englisch.
- Sprachwechsel ohne Neuladen (main.ts): Kopfzeile, Banner, Konto-Menü und Fußzeile neu aufgebaut, rerender() des Routers baut
  die Seite neu auf, der Editor-Store bleibt; der Appwrite-Client bekommt die Sprache.
- Kopfzeile bleibt in einer Zeile: einzeilig ab 1000 px (vorher 900), GitHub-Text ab 1230 px, auf schmalen Telefonen steht
  „Anmelden“ neben der Suche.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 18:33:15 +00:00

508 lines
9.3 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* Rahmen der Seite: Spenden-Banner, Kopfzeile (Marke, Navigation, Suche, Knöpfe, Konto). */
/* Spenden-Banner */
.donate-banner {
position: relative;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
gap: 2px 14px;
padding: 8px 48px 8px 16px;
background: var(--primary);
color: var(--on-primary);
font-size: 0.95rem;
line-height: 1.35;
text-align: center;
}
.donate-banner-text {
margin: 0;
}
.donate-banner-link {
color: inherit;
font-weight: 800;
text-decoration: underline;
text-underline-offset: 3px;
white-space: nowrap;
}
.donate-banner-link:hover {
text-decoration-thickness: 2px;
}
.donate-banner :focus-visible {
outline-color: var(--on-primary);
}
.donate-banner-close {
appearance: none;
position: absolute;
top: 50%;
right: 6px;
display: grid;
place-items: center;
width: 40px;
height: 40px;
margin: -20px 0 0;
padding: 0;
border: 0;
border-radius: 12px;
background: transparent;
color: inherit;
font: inherit;
font-size: 1.6rem;
line-height: 1;
cursor: pointer;
}
.donate-banner-close:hover {
background: rgb(255 255 255 / 0.16);
}
/* Kopfzeile */
#app-header {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 10px 14px;
padding: 10px 20px;
background: var(--panel);
border-bottom: 1px solid var(--line);
}
.brand {
display: inline-flex;
align-items: center;
gap: 10px;
margin-right: 6px;
color: var(--text);
font-size: 1.35rem;
font-weight: 800;
letter-spacing: 0.01em;
text-decoration: none;
white-space: nowrap;
}
.brand img {
display: block;
flex: none;
width: 28px;
height: 28px;
}
.app-nav {
display: flex;
align-items: center;
gap: 2px;
}
.app-nav a {
padding: 8px 12px;
border-radius: 10px;
color: var(--muted);
font-weight: 600;
text-decoration: none;
white-space: nowrap;
}
.app-nav a:hover {
background: var(--panel-2);
color: var(--text);
}
/* GitHub- und Spenden-Link im Menü: erst unter 600 px sichtbar, wenn die Kopfzeile sie nicht mehr trägt */
.nav-github,
.nav-donate {
display: none;
}
/* Suche */
.header-search {
display: flex;
flex: 1 1 120px; /* kleine Basis: die Zeile bricht erst um, wenn auch das Suchfeld nicht mehr schrumpfen kann */
align-items: center;
max-width: 360px;
min-width: 0;
height: 42px;
border: 1px solid var(--line-strong);
border-radius: 999px;
background: var(--bg);
}
.header-search:focus-within {
border-color: var(--sel-line);
outline: 2px solid var(--sel-line);
outline-offset: 1px;
}
.header-search-input {
flex: 1;
min-width: 0;
height: 100%;
padding: 0 4px 0 16px;
border: 0;
background: transparent;
color: var(--text);
font: inherit;
font-size: 1rem; /* mindestens 16 px, sonst zoomt iOS beim Fokussieren */
outline: none;
appearance: none;
}
.header-search-input::placeholder {
color: var(--muted);
opacity: 1;
}
.header-search-input::-webkit-search-cancel-button {
appearance: none;
}
.header-search-btn {
appearance: none;
display: grid;
flex: none;
place-items: center;
width: 40px;
height: 100%;
margin: 0;
padding: 0;
border: 0;
border-radius: 0 999px 999px 0;
background: transparent;
color: var(--muted);
cursor: pointer;
}
.header-search-btn:hover {
color: var(--text);
}
/* Knöpfe rechts: GitHub, Sprache, Spenden, Hell/Dunkel, Menü */
.header-tools {
display: flex;
align-items: center;
gap: 8px;
margin-left: auto;
}
.header-btn {
appearance: none;
display: grid;
place-items: center;
width: 40px;
height: 40px;
margin: 0;
padding: 0;
border: 1px solid var(--line-strong);
border-radius: 12px;
background: transparent;
color: var(--text);
cursor: pointer;
transition: background-color 0.12s, border-color 0.12s;
}
.header-btn:hover {
border-color: var(--sel-line);
background: var(--panel-2);
}
.header-btn .icon,
.header-github .icon {
width: 20px;
height: 20px;
fill: none;
stroke: currentColor;
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
}
.header-search-btn .icon {
width: 18px;
height: 18px;
fill: none;
stroke: currentColor;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
}
/* Sonne im dunklen Theme (Klick = hell), Mond im hellen (Klick = dunkel); ohne Attribut gilt dunkel */
:root[data-theme='light'] .theme-icon-sun,
:root:not([data-theme='light']) .theme-icon-moon {
display: none;
}
.menu-btn {
display: none;
}
/* Sprachknopf: Globus und Kürzel der Zielsprache (EN bzw. DE); bleibt bei jeder Breite in der Kopfzeile */
.header-btn.lang-btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 5px;
width: auto;
padding: 0 9px;
font: inherit;
font-size: 0.85rem;
font-weight: 700;
letter-spacing: 0.02em;
}
.lang-btn .icon {
width: 18px;
height: 18px;
}
/* GitHub-Link: Zeichen und Text, im Stil der übrigen Knöpfe (der Spenden-Knopf bleibt der hervorgehobene) */
.header-github {
position: relative;
display: inline-flex;
align-items: center;
gap: 8px;
height: 40px;
padding: 0 14px;
border: 1px solid var(--line-strong);
border-radius: 12px;
color: var(--text);
font-weight: 700;
text-decoration: none;
white-space: nowrap;
transition: background-color 0.12s, border-color 0.12s;
}
.header-github:hover {
border-color: var(--sel-line);
background: var(--panel-2);
}
.header-donate {
position: relative;
display: inline-flex;
align-items: center;
gap: 8px;
height: 40px;
padding: 0 14px;
border: 1px solid var(--sel-line);
border-radius: 12px;
background: var(--sel-bg);
color: var(--text);
font-weight: 700;
text-decoration: none;
white-space: nowrap;
transition: background-color 0.12s;
}
.header-donate:hover {
background: var(--panel-2);
}
/* Konto-Slot */
#account-slot {
display: flex;
align-items: center;
min-width: 0;
}
/* Bis 1179 px zeigt der Spenden-Knopf nur die Tasse; der Text bleibt für Screenreader */
@media (max-width: 1179px) {
.header-donate {
justify-content: center;
width: 40px;
padding: 0;
}
.header-donate-text {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
border: 0;
}
}
/* Bis 1229 px zeigt auch der GitHub-Link nur das Zeichen: mit seinem Text und dem deutschen „Unterstützen“ braucht die Zeile
rund 1210 px, sonst rutscht „Anmelden“ in eine zweite Zeile */
@media (max-width: 1229px) {
.header-github {
justify-content: center;
width: 40px;
padding: 0;
}
.header-github-text {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
border: 0;
}
}
/* Desktop mit wenig Platz (1000–1099 px): alles etwas enger, damit die Zeile nicht umbricht */
@media (min-width: 1000px) and (max-width: 1099px) {
#app-header {
gap: 10px;
}
.brand {
margin-right: 0;
font-size: 1.2rem;
}
.app-nav a {
padding: 8px 9px;
font-size: 0.95rem;
}
}
/* Unter 1000 px: Navigation hinter dem Menü-Knopf, Suchfeld als eigene Zeile darunter
(früher unter 900 px; mit GitHub- und Sprachknopf passt die eine Zeile erst ab 1000 px) */
@media (max-width: 999px) {
#app-header {
padding: 10px 16px;
gap: 10px 8px;
}
.brand {
margin-right: 0;
}
.menu-btn {
display: grid;
}
.header-tools {
order: 1;
}
#account-slot {
order: 2;
}
.app-nav {
display: none;
flex-basis: 100%;
flex-direction: column;
align-items: stretch;
order: 3;
padding: 6px;
border: 1px solid var(--line);
border-radius: 14px;
background: var(--bg);
}
.app-nav.is-open {
display: flex;
}
.app-nav a {
padding: 12px 14px;
font-size: 1.05rem;
}
.header-search {
flex: 1 1 100%;
order: 4;
max-width: none;
}
}
/* Unter 600 px: Marke und Knöpfe etwas kleiner, damit „Anmelden“ noch in die erste Zeile passt;
GitHub- und Spenden-Knopf wandern ins aufgeklappte Menü, der Sprachknopf bleibt */
@media (max-width: 599px) {
#app-header {
gap: 10px 6px;
}
.brand {
gap: 8px;
margin-right: 0;
font-size: 1.2rem;
}
.brand img {
width: 24px;
height: 24px;
}
.header-tools {
gap: 6px;
}
.header-btn {
width: 38px;
height: 38px;
}
#account-slot .auth-btn-small {
min-height: 38px;
padding: 0 12px;
}
.header-github,
.header-donate {
display: none;
}
.nav-github,
.nav-donate {
display: block;
color: var(--text);
}
}
/* Schmale Telefone: reicht die erste Zeile nicht für Marke, Knöpfe und „Anmelden“, steht „Anmelden“ neben der Suche
statt allein in einer eigenen Zeile (die Suche braucht dafür weniger als die volle Breite); das aufgeklappte Menü
erscheint dann direkt unter der Markenzeile */
@media (max-width: 449px) {
.app-nav {
order: 2;
}
#account-slot {
order: 3;
}
.header-search {
flex-basis: 160px;
}
}
/* Sehr schmale Telefone */
@media (max-width: 379px) {
#app-header {
padding: 10px 12px;
}
.brand {
font-size: 1.1rem;
}
}
@media (prefers-reduced-motion: reduce) {
.header-btn,
.header-github,
.header-donate {
transition: none;
}
}