Anpassung Menü

This commit is contained in:
2026-08-09 18:44:21 +02:00
parent b80e2d5a6c
commit 8ffbda875e
13 changed files with 365 additions and 58 deletions

View File

@@ -129,15 +129,156 @@ button.primary:disabled { opacity: .55; cursor: progress; }
.switch { margin: 1rem 0 0; text-align: center; font-size: .92rem; }
a { color: var(--accent); }
.bar {
/* ===================================================================
Kopfleiste mit Menü
=================================================================== */
.app-bar {
display: flex;
justify-content: space-between;
align-items: baseline;
gap: 1rem;
align-items: center;
gap: .75rem;
margin-bottom: 1rem;
font-size: .92rem;
min-height: 2.6rem;
}
/* Drei Bereiche mit festem Verhalten: links zurück, Mitte der Titel
(darf gekürzt werden), rechts das Menü. Vorher standen alle Einträge
nebeneinander und brachen unregelmäßig um. */
.bar-back {
flex: 0 0 auto;
background: none;
border: none;
padding: .4rem 0;
font: inherit;
font-size: .95rem;
color: var(--accent);
cursor: pointer;
white-space: nowrap;
}
.bar-title {
flex: 1 1 auto;
min-width: 0;
font-size: .95rem;
font-weight: 600;
color: var(--muted);
/* Ein langer Listenname darf die Leiste nicht sprengen. */
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: right;
}
.bar-back + .bar-title { text-align: right; }
.app-bar > span.bar-back + .bar-title { text-align: left; }
.bar-menu { position: relative; flex: 0 0 auto; }
button.burger {
display: flex;
align-items: center;
gap: .4rem;
background: var(--card);
border: 1px solid var(--line);
border-radius: var(--radius);
padding: .45rem .7rem;
font: inherit;
font-size: .9rem;
color: var(--fg);
cursor: pointer;
}
button.burger[aria-expanded="true"] {
background: color-mix(in srgb, var(--accent) 12%, transparent);
border-color: var(--accent);
}
/* Die drei Striche aus einem Element - spart drei weitere Knoten. */
.burger-lines {
width: 1.05rem;
height: 2px;
background: currentColor;
position: relative;
display: block;
}
.burger-lines::before,
.burger-lines::after {
content: "";
position: absolute;
left: 0;
width: 100%;
height: 2px;
background: currentColor;
}
.burger-lines::before { top: -.34rem; }
.burger-lines::after { top: .34rem; }
/* Auf sehr schmalen Geräten nur das Symbol. */
@media (max-width: 24rem) {
.burger-text { display: none; }
}
.bar-single {
flex: 0 0 auto;
background: none;
border: none;
padding: .4rem 0;
font: inherit;
font-size: .95rem;
color: var(--accent);
cursor: pointer;
white-space: nowrap;
text-decoration: underline;
text-underline-offset: 2px;
}
ul.menu-panel {
position: absolute;
z-index: 30;
top: calc(100% + .3rem);
right: 0;
min-width: 15rem;
max-width: min(20rem, calc(100vw - 2rem));
list-style: none;
margin: 0;
padding: .25rem;
background: var(--card);
border: 1px solid var(--line);
border-radius: var(--radius);
box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}
ul.menu-panel button,
ul.menu-panel a {
display: block;
width: 100%;
text-align: left;
background: none;
border: none;
border-radius: calc(var(--radius) - 2px);
/* Große Trefferfläche: Das Menü wird am Telefon mit dem Daumen
bedient. */
padding: .6rem .7rem;
font: inherit;
color: inherit;
text-decoration: none;
cursor: pointer;
}
ul.menu-panel button:hover,
ul.menu-panel a:hover,
ul.menu-panel button:focus-visible,
ul.menu-panel a:focus-visible {
background: color-mix(in srgb, var(--accent) 12%, transparent);
}
ul.menu-panel .danger { color: var(--error); }
.entry-label { display: block; font-weight: 600; }
.entry-hint { display: block; font-size: .78rem; color: var(--muted); }
.who { color: var(--muted); overflow-wrap: anywhere; }
.lists { list-style: none; margin: 0 0 1rem; padding: 0; }
@@ -460,7 +601,7 @@ li.sortable-row.dragging button.grip { color: var(--accent); }
body { background: #fff; color: #000; font-size: 11pt; }
#app { max-width: none; padding: 0; }
.bar, .add-row, .summary button, button.menu-toggle,
.app-bar, .bar, .add-row, .summary button, button.menu-toggle,
.item-menu, .offline-hint, .footnote, label, .row { display: none !important; }
.card, .market, .summary {
@@ -554,7 +695,8 @@ li.invite.expired .who-block .name {
li.invite.accepted .who-block .name { color: var(--muted); }
@media print {
.bar-actions, .member-actions, .share-list { display: none !important; }
.app-bar, .bar-actions, .member-actions, .share-list,
ul.menu-panel { display: none !important; }
}
/* ===================================================================