release nouri 0.4.0 templates suggestions and mobile sheet
This commit is contained in:
+44
-12
@@ -9,6 +9,7 @@
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
|
||||
<script defer src="{{ url_for('static', filename='js/theme.js') }}"></script>
|
||||
<script defer src="{{ url_for('static', filename='js/planner.js') }}"></script>
|
||||
<script defer src="{{ url_for('static', filename='js/ui.js') }}"></script>
|
||||
</head>
|
||||
<body class="{% if g.user %}has-mobile-nav{% endif %}">
|
||||
<div class="page-shell">
|
||||
@@ -27,11 +28,12 @@
|
||||
<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.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.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.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.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-layer-group"></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>
|
||||
|
||||
@@ -42,7 +44,7 @@
|
||||
<small>{{ role_labels[g.user.role] }}</small>
|
||||
</a>
|
||||
{% if g.user.role == 'admin' %}
|
||||
<a class="ghost-button" href="{{ url_for('admin.user_list') }}">Nutzer verwalten</a>
|
||||
<a class="ghost-button" href="{{ url_for('admin.user_list') }}">Nutzer</a>
|
||||
{% endif %}
|
||||
<form method="post" action="{{ url_for('auth.logout') }}">
|
||||
{{ csrf_input() }}
|
||||
@@ -50,9 +52,9 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<a class="mobile-profile-link" href="{{ url_for('main.more_view') }}" aria-label="Mehr">
|
||||
<span class="mobile-profile-avatar">{{ (g.user.display_name or g.user.username)[0]|upper }}</span>
|
||||
</a>
|
||||
<button class="mobile-profile-link ghost-button" type="button" data-mobile-sheet-open aria-label="Mehr öffnen">
|
||||
<span class="mobile-profile-avatar">{{ (g.user.display_name or g.user.username or 'N')[:1]|upper }}</span>
|
||||
</button>
|
||||
{% endif %}
|
||||
</header>
|
||||
|
||||
@@ -72,6 +74,36 @@
|
||||
</div>
|
||||
|
||||
{% if g.user %}
|
||||
<div class="mobile-sheet-backdrop" data-mobile-sheet-backdrop hidden></div>
|
||||
<aside class="mobile-more-sheet" data-mobile-sheet hidden aria-label="Mehr">
|
||||
<div class="mobile-sheet-head">
|
||||
<div>
|
||||
<strong>{{ g.user.display_name or g.user.username }}</strong>
|
||||
<small>{{ role_labels[g.user.role] }}</small>
|
||||
</div>
|
||||
<button class="ghost-button" type="button" data-mobile-sheet-close>Schließen</button>
|
||||
</div>
|
||||
<nav class="mobile-sheet-links">
|
||||
<a href="{{ url_for('main.item_list', kind='food') }}">Lebensmittel</a>
|
||||
<a href="{{ url_for('main.item_list', kind='meal') }}">Mahlzeiten</a>
|
||||
<a href="{{ url_for('main.home_view') }}">Zuhause</a>
|
||||
<a href="{{ url_for('main.archive_view') }}">Archiv</a>
|
||||
<a href="{{ url_for('main.template_library') }}">Vorlagen</a>
|
||||
<a href="{{ url_for('auth.profile') }}">Profil</a>
|
||||
{% if g.user.role == 'admin' %}
|
||||
<a href="{{ url_for('admin.user_list') }}">Nutzerverwaltung</a>
|
||||
<a href="{{ url_for('admin.category_settings') }}">Kategorien</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
<div class="mobile-sheet-actions">
|
||||
<button class="ghost-button" type="button" data-theme-toggle>Modus wechseln</button>
|
||||
<form method="post" action="{{ url_for('auth.logout') }}">
|
||||
{{ csrf_input() }}
|
||||
<button class="ghost-button" type="submit">Abmelden</button>
|
||||
</form>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<nav class="mobile-bottom-nav" aria-label="Mobile Navigation">
|
||||
<a href="{{ url_for('main.dashboard') }}" class="{{ 'active' if request.endpoint == 'main.dashboard' else '' }}">
|
||||
<span class="ui-icon icon-sparkles"></span>
|
||||
@@ -85,14 +117,14 @@
|
||||
<span class="ui-icon icon-calendar"></span>
|
||||
<span>Plan</span>
|
||||
</a>
|
||||
<a href="{{ url_for('main.home_view') }}" class="{{ 'active' if request.endpoint == 'main.home_view' else '' }}">
|
||||
<span class="ui-icon icon-house"></span>
|
||||
<span>Zuhause</span>
|
||||
<a href="{{ url_for('main.planner') }}" class="{{ 'active' if request.endpoint == 'main.planner' else '' }}">
|
||||
<span class="ui-icon icon-calendar-days"></span>
|
||||
<span>Woche</span>
|
||||
</a>
|
||||
<a href="{{ url_for('main.more_view') }}" class="{{ 'active' if request.endpoint == 'main.more_view' or request.endpoint == 'auth.profile' or (request.endpoint or '').startswith('admin.') else '' }}">
|
||||
<span class="ui-icon icon-archive"></span>
|
||||
<button type="button" class="mobile-nav-button" data-mobile-sheet-open>
|
||||
<span class="ui-icon icon-ellipsis"></span>
|
||||
<span>Mehr</span>
|
||||
</a>
|
||||
</button>
|
||||
</nav>
|
||||
{% endif %}
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user