fix desktop header rows for nouri

This commit is contained in:
2026-04-12 17:56:39 +02:00
parent a26d519cf2
commit b0d1cee5f5
2 changed files with 83 additions and 42 deletions
+42 -7
View File
@@ -165,10 +165,9 @@ button.secondary:hover,
.site-header { .site-header {
position: static; position: static;
z-index: 10; z-index: 10;
display: flex; display: grid;
flex-wrap: wrap;
gap: 1rem; gap: 1rem;
align-items: center; align-items: stretch;
padding: 1rem 1.2rem; padding: 1rem 1.2rem;
margin-bottom: 1.15rem; margin-bottom: 1.15rem;
background: var(--bg-elevated); background: var(--bg-elevated);
@@ -178,6 +177,11 @@ button.secondary:hover,
backdrop-filter: blur(26px) saturate(1.18); backdrop-filter: blur(26px) saturate(1.18);
} }
.desktop-header-main,
.desktop-header-sub {
min-width: 0;
}
.brand { .brand {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
@@ -224,7 +228,6 @@ h3,
flex-wrap: wrap; flex-wrap: wrap;
gap: 0.45rem; gap: 0.45rem;
justify-content: flex-start; justify-content: flex-start;
flex: 1 1 32rem;
min-width: 0; min-width: 0;
} }
@@ -252,10 +255,39 @@ h3,
align-items: center; align-items: center;
gap: 0.75rem; gap: 0.75rem;
justify-content: flex-end; justify-content: flex-end;
margin-left: auto;
flex-wrap: wrap; flex-wrap: wrap;
} }
@media (min-width: 1081px) {
.site-header {
grid-template-columns: 1fr;
row-gap: 0.9rem;
}
.desktop-header-main {
display: grid;
grid-template-columns: auto minmax(0, 1fr);
align-items: center;
gap: 1.4rem;
}
.desktop-header-sub {
display: flex;
justify-content: flex-start;
}
.desktop-nav {
width: 100%;
justify-content: flex-start;
}
.desktop-actions {
width: 100%;
justify-content: flex-start;
align-self: center;
}
}
.user-chip, .user-chip,
.mobile-profile-link { .mobile-profile-link {
display: inline-flex; display: inline-flex;
@@ -1295,7 +1327,6 @@ legend {
} }
@media (max-width: 1080px) { @media (max-width: 1080px) {
.site-header,
.hero, .hero,
.page-intro, .page-intro,
.panel-head, .panel-head,
@@ -1310,11 +1341,15 @@ legend {
.site-header { .site-header {
position: static; position: static;
grid-template-columns: 1fr auto;
width: 100%; width: 100%;
margin: 0 0 1.15rem; margin: 0 0 1.15rem;
} }
.desktop-header-main,
.desktop-header-sub {
display: contents;
}
.stats-grid, .stats-grid,
.two-column, .two-column,
.template-library-grid, .template-library-grid,
+41 -35
View File
@@ -24,43 +24,49 @@
<body class="{% if g.user %}has-mobile-nav{% endif %}"> <body class="{% if g.user %}has-mobile-nav{% endif %}">
<div class="page-shell"> <div class="page-shell">
<header class="site-header"> <header class="site-header">
<a class="brand" href="{{ url_for('main.dashboard') }}"> <div class="desktop-header-main">
<span class="brand-mark"> <a class="brand" href="{{ url_for('main.dashboard') }}">
<img src="{{ asset_url('brand/nouri-icon.svg') }}" alt=""> <span class="brand-mark">
</span> <img src="{{ asset_url('brand/nouri-icon.svg') }}" alt="">
<span class="brand-copy"> </span>
<strong>Nouri</strong> <span class="brand-copy">
<small>einfach essen planen</small> <strong>Nouri</strong>
</span> <small>einfach essen planen</small>
</a> </span>
</a>
{% if g.user %}
<nav class="site-nav desktop-nav">
<a href="{{ url_for('main.dashboard') }}" class="{{ 'active' if request.endpoint == 'main.dashboard' else '' }}"><span class="nav-link-inner"><span class="ui-icon icon-sparkles"></span><span>Heute</span></span></a>
<a href="{{ url_for('main.shopping_list') }}" class="{{ 'active' if request.endpoint == 'main.shopping_list' else '' }}"><span class="nav-link-inner"><span class="ui-icon icon-cart-shopping"></span><span>Einkauf</span></span></a>
<a href="{{ url_for('main.planner_day', date=today.isoformat()) }}" class="{{ 'active' if request.endpoint == 'main.planner_day' else '' }}"><span class="nav-link-inner"><span class="ui-icon icon-calendar"></span><span>Plan</span></span></a>
<a href="{{ url_for('main.planner') }}" class="{{ 'active' if request.endpoint == 'main.planner' else '' }}"><span class="nav-link-inner"><span class="ui-icon icon-calendar-days"></span><span>Woche</span></span></a>
<a href="{{ url_for('main.home_view') }}" class="{{ 'active' if request.endpoint == 'main.home_view' else '' }}"><span class="nav-link-inner"><span class="ui-icon icon-house"></span><span>Zuhause</span></span></a>
<a href="{{ url_for('main.item_list', kind='food') }}" class="{{ 'active' if request.endpoint == 'main.item_list' and request.view_args and request.view_args.get('kind') == 'food' else '' }}"><span class="nav-link-inner"><span class="ui-icon icon-utensils"></span><span>Lebensmittel</span></span></a>
<a href="{{ url_for('main.item_list', kind='meal') }}" class="{{ 'active' if request.endpoint == 'main.item_list' and request.view_args and request.view_args.get('kind') == 'meal' else '' }}"><span class="nav-link-inner"><span class="ui-icon icon-bowl-food"></span><span>Mahlzeiten</span></span></a>
<a href="{{ url_for('main.template_library') }}" class="{{ 'active' if (request.endpoint or '').startswith('main.day_template') or (request.endpoint or '').startswith('main.week_template') or (request.endpoint or '').startswith('main.item_set') or request.endpoint == 'main.template_library' else '' }}"><span class="nav-link-inner"><span class="ui-icon icon-leaf"></span><span>Vorlagen</span></span></a>
<a href="{{ url_for('main.archive_view') }}" class="{{ 'active' if request.endpoint == 'main.archive_view' else '' }}"><span class="nav-link-inner"><span class="ui-icon icon-archive"></span><span>Archiv</span></span></a>
</nav>
{% endif %}
</div>
{% if g.user %} {% if g.user %}
<nav class="site-nav desktop-nav"> <div class="desktop-header-sub">
<a href="{{ url_for('main.dashboard') }}" class="{{ 'active' if request.endpoint == 'main.dashboard' else '' }}"><span class="nav-link-inner"><span class="ui-icon icon-sparkles"></span><span>Heute</span></span></a> <div class="header-actions desktop-actions">
<a href="{{ url_for('main.shopping_list') }}" class="{{ 'active' if request.endpoint == 'main.shopping_list' else '' }}"><span class="nav-link-inner"><span class="ui-icon icon-cart-shopping"></span><span>Einkauf</span></span></a> <button class="theme-toggle ghost-button" type="button" data-theme-toggle>Hell</button>
<a href="{{ url_for('main.planner_day', date=today.isoformat()) }}" class="{{ 'active' if request.endpoint == 'main.planner_day' else '' }}"><span class="nav-link-inner"><span class="ui-icon icon-calendar"></span><span>Plan</span></span></a> <a class="ghost-button" href="{{ url_for('main.settings_view') }}">Optionen</a>
<a href="{{ url_for('main.planner') }}" class="{{ 'active' if request.endpoint == 'main.planner' else '' }}"><span class="nav-link-inner"><span class="ui-icon icon-calendar-days"></span><span>Woche</span></span></a> <a class="user-chip" href="{{ url_for('auth.profile') }}">
<a href="{{ url_for('main.home_view') }}" class="{{ 'active' if request.endpoint == 'main.home_view' else '' }}"><span class="nav-link-inner"><span class="ui-icon icon-house"></span><span>Zuhause</span></span></a> <span class="user-chip-title">{{ g.user.display_name or g.user.username }}</span>
<a href="{{ url_for('main.item_list', kind='food') }}" class="{{ 'active' if request.endpoint == 'main.item_list' and request.view_args and request.view_args.get('kind') == 'food' else '' }}"><span class="nav-link-inner"><span class="ui-icon icon-utensils"></span><span>Lebensmittel</span></span></a> <small>{{ role_labels[g.user.role] }}</small>
<a href="{{ url_for('main.item_list', kind='meal') }}" class="{{ 'active' if request.endpoint == 'main.item_list' and request.view_args and request.view_args.get('kind') == 'meal' else '' }}"><span class="nav-link-inner"><span class="ui-icon icon-bowl-food"></span><span>Mahlzeiten</span></span></a> </a>
<a href="{{ url_for('main.template_library') }}" class="{{ 'active' if (request.endpoint or '').startswith('main.day_template') or (request.endpoint or '').startswith('main.week_template') or (request.endpoint or '').startswith('main.item_set') or request.endpoint == 'main.template_library' else '' }}"><span class="nav-link-inner"><span class="ui-icon icon-leaf"></span><span>Vorlagen</span></span></a> {% if g.user.role == 'admin' %}
<a href="{{ url_for('main.archive_view') }}" class="{{ 'active' if request.endpoint == 'main.archive_view' else '' }}"><span class="nav-link-inner"><span class="ui-icon icon-archive"></span><span>Archiv</span></span></a> <a class="ghost-button" href="{{ url_for('admin.user_list') }}">Nutzer</a>
</nav> {% endif %}
<form method="post" action="{{ url_for('auth.logout') }}">
<div class="header-actions desktop-actions"> {{ csrf_input() }}
<button class="theme-toggle ghost-button" type="button" data-theme-toggle>Modus</button> <button class="ghost-button" type="submit">Abmelden</button>
<a class="ghost-button" href="{{ url_for('main.settings_view') }}">Optionen</a> </form>
<a class="user-chip" href="{{ url_for('auth.profile') }}"> </div>
<span class="user-chip-title">{{ g.user.display_name or g.user.username }}</span>
<small>{{ role_labels[g.user.role] }}</small>
</a>
{% if g.user.role == 'admin' %}
<a class="ghost-button" href="{{ url_for('admin.user_list') }}">Nutzer</a>
{% endif %}
<form method="post" action="{{ url_for('auth.logout') }}">
{{ csrf_input() }}
<button class="ghost-button" type="submit">Abmelden</button>
</form>
</div> </div>
<button class="mobile-profile-link ghost-button" type="button" data-mobile-sheet-open aria-label="Mehr öffnen"> <button class="mobile-profile-link ghost-button" type="button" data-mobile-sheet-open aria-label="Mehr öffnen">