Files
AirCardIOS/web/src/shell/shell.css
T
ClaudeandClaude Sonnet 5.5 25ff496548 feat(shell): Routen, Kopfzeile, Hell/Dunkel, Spenden-Banner
- Router: Routen home, gestalten, cards, community/<id>, reset; Umleitung
  /?karte=<id> nach /gestalten?karte=<id>; Titel je Route (titleFor);
  Hash-Ziele (/#community) scrollen den Anker ins Bild, nur-Hash-Wechsel
  bauen die Seite nicht neu auf.
- Kopfzeile: Navigation, Suche (Enter -> /?q=...#community), Spenden-Knopf,
  Hell/Dunkel-Schalter, Menue unter 900 px, Konto als Avatar-Kreis mit Menue.
- Theme: data-theme auf <html> (Skript im <head> gegen Aufblitzen), helle
  Tokens, danger-/warn-/ok-text-Tokens statt fester Farben.
- Spenden-Banner (schliessbar); ohne DONATE_URL bleiben Banner und Knopf weg.
- User.labels und isAdmin; Platzhalter fuer Startseite und Detailseite.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 13:39:09 +00:00

417 lines
7.0 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);
}
.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: 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 {
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;
}
.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;
}
}
/* Desktop mit wenig Platz (900–1099 px): alles etwas enger, damit die Zeile nicht umbricht */
@media (min-width: 900px) 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 900 px: Navigation hinter dem Menü-Knopf, Suchfeld als eigene Zeile darunter */
@media (max-width: 899px) {
#app-header {
padding: 10px 16px;
gap: 10px 8px;
}
.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;
der Spenden-Knopf wandert ins aufgeklappte Menü */
@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-donate {
display: none;
}
.nav-donate {
display: block;
color: var(--text);
}
}
/* 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-donate {
transition: none;
}
}