UI: Minimalistisches 5-Kachel-Menü, 1-seitiges Inhaltsverzeichnis & schlanker mobiler Einkaufslisten-Header
This commit is contained in:
+10
-8
@@ -326,9 +326,9 @@ async def cookbook_view(
|
||||
|
||||
# --- Seitenzahlen & Inhaltsverzeichnis (TOC) berechnen ---
|
||||
# Seite 1: Cover
|
||||
# TOC: 1 oder 2 Seiten (wenn > 20 Rezepte vorhanden sind)
|
||||
# TOC: 1 Seite (bis ca. 55 Rezepte passt alles wunderbar auf 1 A4-Seite in 2 Spalten), 2 Seiten erst bei sehr vielen Rezepten
|
||||
total_display_recipes = len(all_recipes)
|
||||
toc_page_count = 2 if total_display_recipes > 20 else (1 if total_display_recipes > 0 else 0)
|
||||
toc_page_count = 2 if total_display_recipes > 55 else (1 if total_display_recipes > 0 else 0)
|
||||
current_page = 1 + toc_page_count + 1
|
||||
|
||||
display_chapters_data = []
|
||||
@@ -349,23 +349,25 @@ async def cookbook_view(
|
||||
chap_copy["recipes"] = chap_recipes
|
||||
display_chapters_data.append(chap_copy)
|
||||
|
||||
# Inhaltsverzeichnis auf 2 Seiten aufteilen
|
||||
# Inhaltsverzeichnis aufteilen (falls 2 Seiten: gleichmäßige 50/50 Balance)
|
||||
active_chapters = [c for c in display_chapters_data if recipes_by_chapter.get(c["number"], [])]
|
||||
total_weight = sum(len(recipes_by_chapter.get(c["number"], [])) + 2 for c in active_chapters)
|
||||
half_weight = total_weight / 2
|
||||
|
||||
toc_p1 = []
|
||||
toc_p2 = []
|
||||
if toc_page_count == 2:
|
||||
accum = 0
|
||||
for c in display_chapters_data:
|
||||
for c in active_chapters:
|
||||
c_recs = recipes_by_chapter.get(c["number"], [])
|
||||
if not c_recs:
|
||||
continue
|
||||
item_weight = len(c_recs) + 2
|
||||
if accum < 28 or not toc_p1:
|
||||
if accum < half_weight or not toc_p1:
|
||||
toc_p1.append(c)
|
||||
accum += item_weight
|
||||
else:
|
||||
toc_p2.append(c)
|
||||
else:
|
||||
toc_p1 = [c for c in display_chapters_data if recipes_by_chapter.get(c["number"], [])]
|
||||
toc_p1 = active_chapters
|
||||
|
||||
# User Agent Check für Apple iOS
|
||||
user_agent = request.headers.get("user-agent", "").lower()
|
||||
|
||||
@@ -618,7 +618,7 @@
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<!-- TOC SEITE 2 (Seite 3 des Buchs, falls > 20 Rezepte) -->
|
||||
<!-- TOC SEITE 2 (Seite 3 des Buchs, falls > 55 Rezepte) -->
|
||||
{% if toc_page_count > 1 %}
|
||||
<div class="page toc-page" id="page-toc-2">
|
||||
<header class="toc-header">
|
||||
|
||||
+286
-447
@@ -2,507 +2,346 @@
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>What To Cook? – Hauptmenü</title>
|
||||
<link rel="stylesheet" href="/static/cookbook.css?v=4.5.4">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
|
||||
<title>What To Cook? – Menü</title>
|
||||
<link rel="stylesheet" href="/static/cookbook.css?v=4.6.0">
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🍽️</text></svg>">
|
||||
<style>
|
||||
/* Styling für das ausgeklappte Menü / Hub Dashboard */
|
||||
body.home-body {
|
||||
background-color: var(--grau-bg, #e6e2dc);
|
||||
background-image: radial-gradient(rgba(30, 77, 59, 0.06) 1px, transparent 1px);
|
||||
background-size: 20px 20px;
|
||||
min-height: 100vh;
|
||||
:root {
|
||||
--font-hand: 'Caveat', cursive, sans-serif;
|
||||
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||
--tannengruen: #1E4D3B;
|
||||
--altrosa: #D9A0A0;
|
||||
--creme: #FDFBF7;
|
||||
--schwarz: #222222;
|
||||
--gold: #D4AF37;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body.home-clean-body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
min-height: 100vh;
|
||||
min-height: 100dvh;
|
||||
background-color: var(--grau-bg, #ebe7e0);
|
||||
background-image:
|
||||
radial-gradient(circle at 50% 50%, rgba(30, 77, 59, 0.04) 1px, transparent 1px);
|
||||
background-size: 20px 20px;
|
||||
font-family: var(--font-sans);
|
||||
color: var(--schwarz);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.home-header {
|
||||
background-color: var(--creme);
|
||||
border-bottom: 2px solid var(--schwarz);
|
||||
padding: 12px 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
position: relative;
|
||||
padding: 24px 16px;
|
||||
}
|
||||
|
||||
.home-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
/* Dezenter Logout-Button oben rechts */
|
||||
.home-top-bar {
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
right: 18px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.home-brand-icon {
|
||||
font-size: 2rem;
|
||||
filter: drop-shadow(1px 2px 2px rgba(0,0,0,0.15));
|
||||
}
|
||||
|
||||
.home-brand-title {
|
||||
font-family: var(--font-hand);
|
||||
font-size: 1.85rem;
|
||||
font-weight: 700;
|
||||
color: var(--tannengruen);
|
||||
margin: 0;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.home-brand-sub {
|
||||
font-size: 0.82rem;
|
||||
color: #666;
|
||||
margin: 2px 0 0 0;
|
||||
}
|
||||
|
||||
.home-header-nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.home-header-badge {
|
||||
.home-logout-pill {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
background: rgba(30, 77, 59, 0.1);
|
||||
color: var(--tannengruen);
|
||||
padding: 6px 12px;
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
border: 1.5px solid rgba(34, 34, 34, 0.2);
|
||||
border-radius: 20px;
|
||||
font-size: 0.85rem;
|
||||
font-size: 0.82rem;
|
||||
font-weight: 600;
|
||||
color: #666;
|
||||
text-decoration: none;
|
||||
border: 1px solid rgba(30, 77, 59, 0.2);
|
||||
transition: all 0.15s ease;
|
||||
backdrop-filter: blur(4px);
|
||||
}
|
||||
|
||||
.home-logout-btn {
|
||||
color: #777;
|
||||
text-decoration: none;
|
||||
font-size: 0.85rem;
|
||||
padding: 6px 10px;
|
||||
border-radius: 6px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.home-logout-btn:hover {
|
||||
.home-logout-pill:hover {
|
||||
color: #b00;
|
||||
background: rgba(200, 0, 0, 0.08);
|
||||
border-color: #b00;
|
||||
background: #ffffff;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
/* Der eigentliche ausgeklappte Menü-Container */
|
||||
.home-container {
|
||||
max-width: 1080px;
|
||||
/* Kacheln Hauptcontainer */
|
||||
.home-hub {
|
||||
width: 100%;
|
||||
margin: 32px auto 48px auto;
|
||||
padding: 0 16px;
|
||||
box-sizing: border-box;
|
||||
flex: 1;
|
||||
max-width: 820px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 22px;
|
||||
margin: auto 0;
|
||||
}
|
||||
|
||||
/* Menü-Tafel Intro */
|
||||
.menu-board-intro {
|
||||
/* Das 5-Kachel-Grid */
|
||||
.tile-grid {
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
/* Wenn 5 Kacheln auf Desktop: Schöne Verteilung */
|
||||
@media (min-width: 768px) {
|
||||
.tile-grid {
|
||||
grid-template-columns: repeat(6, 1fr);
|
||||
}
|
||||
/* Obere Reihe: 3 Kacheln je 2 Spalten */
|
||||
.tile-card:nth-child(1) { grid-column: span 2; }
|
||||
.tile-card:nth-child(2) { grid-column: span 2; }
|
||||
.tile-card:nth-child(3) { grid-column: span 2; }
|
||||
/* Untere Reihe: 2 Kacheln je 3 Spalten (zentriert) */
|
||||
.tile-card:nth-child(4) { grid-column: 2 / span 2; }
|
||||
.tile-card:nth-child(5) { grid-column: 4 / span 2; }
|
||||
}
|
||||
|
||||
/* Einzelne interaktive Kachel */
|
||||
.tile-card {
|
||||
background: #FFFDF9;
|
||||
border: 2.5px solid var(--schwarz);
|
||||
border-radius: 16px;
|
||||
padding: 22px 18px;
|
||||
text-decoration: none;
|
||||
color: var(--schwarz);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
margin-bottom: 28px;
|
||||
gap: 10px;
|
||||
box-shadow: 4px 5px 0px rgba(34, 34, 34, 0.9);
|
||||
transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
|
||||
position: relative;
|
||||
user-select: none;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.menu-board-tagline {
|
||||
font-family: var(--font-hand);
|
||||
font-size: 1.35rem;
|
||||
color: var(--altrosa);
|
||||
margin: 0 0 4px 0;
|
||||
.tile-card:hover {
|
||||
transform: translateY(-3px);
|
||||
box-shadow: 5px 8px 0px rgba(34, 34, 34, 0.95);
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.menu-board-heading {
|
||||
.tile-card:active {
|
||||
transform: translate(2px, 3px);
|
||||
box-shadow: 1px 2px 0px rgba(34, 34, 34, 0.9);
|
||||
}
|
||||
|
||||
/* Icon Kreis */
|
||||
.tile-icon-box {
|
||||
width: 62px;
|
||||
height: 62px;
|
||||
border-radius: 50%;
|
||||
border: 2px solid var(--schwarz);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 2rem;
|
||||
box-shadow: 2px 2px 0px rgba(0,0,0,0.12);
|
||||
transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
}
|
||||
|
||||
.tile-card:hover .tile-icon-box {
|
||||
transform: scale(1.08) rotate(-4deg);
|
||||
}
|
||||
|
||||
/* Spezifische Akzentfarben pro Kachel */
|
||||
.tile-shuffle .tile-icon-box {
|
||||
background: #FFE885;
|
||||
}
|
||||
.tile-cookbook .tile-icon-box {
|
||||
background: #E8F2EC;
|
||||
}
|
||||
.tile-mealplan .tile-icon-box {
|
||||
background: #F8EFEA;
|
||||
}
|
||||
.tile-shopping .tile-icon-box {
|
||||
background: #FFF9D2;
|
||||
}
|
||||
.tile-recipe .tile-icon-box {
|
||||
background: #EAF4F4;
|
||||
}
|
||||
|
||||
.tile-title {
|
||||
font-family: var(--font-hand);
|
||||
font-size: 2.8rem;
|
||||
font-size: 1.75rem;
|
||||
font-weight: 700;
|
||||
color: var(--tannengruen);
|
||||
margin: 0 0 8px 0;
|
||||
margin: 0;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.menu-board-desc {
|
||||
font-size: 1rem;
|
||||
color: #555;
|
||||
max-width: 620px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* Das ausgeklappte Speisekarten-Grid */
|
||||
.menu-spread {
|
||||
background: var(--creme);
|
||||
border: 3px solid var(--schwarz);
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 12px 36px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.1);
|
||||
padding: 32px 28px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.menu-spread::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 6px; left: 6px; right: 6px; bottom: 6px;
|
||||
border: 1.5px dashed rgba(30, 77, 59, 0.35);
|
||||
border-radius: 12px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.menu-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
|
||||
gap: 22px;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
/* Einzelne Menükarte */
|
||||
.menu-card {
|
||||
background: rgba(255, 255, 255, 0.85);
|
||||
border: 2px solid var(--schwarz);
|
||||
border-radius: 12px;
|
||||
padding: 24px 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.12);
|
||||
transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.menu-card:hover {
|
||||
transform: translateY(-4px) scale(1.01);
|
||||
box-shadow: 6px 8px 0px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.menu-card.featured {
|
||||
background: #FFFDF0;
|
||||
border-color: var(--tannengruen);
|
||||
border-width: 2.5px;
|
||||
}
|
||||
|
||||
.menu-card-top {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.menu-card-icon-wrap {
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
background: var(--creme);
|
||||
border: 2px solid var(--schwarz);
|
||||
border-radius: 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1.8rem;
|
||||
margin-bottom: 14px;
|
||||
box-shadow: 2px 2px 0px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.menu-card-title {
|
||||
font-family: var(--font-hand);
|
||||
font-size: 1.7rem;
|
||||
color: var(--tannengruen);
|
||||
margin: 0 0 6px 0;
|
||||
line-height: 1.15;
|
||||
}
|
||||
|
||||
.menu-card-desc {
|
||||
font-size: 0.92rem;
|
||||
line-height: 1.45;
|
||||
color: #4a453f;
|
||||
margin: 0 0 14px 0;
|
||||
}
|
||||
|
||||
.menu-card-tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.menu-tag {
|
||||
font-size: 0.76rem;
|
||||
padding: 3px 8px;
|
||||
border-radius: 6px;
|
||||
font-weight: 600;
|
||||
background: rgba(30, 77, 59, 0.08);
|
||||
color: var(--tannengruen);
|
||||
border: 1px solid rgba(30, 77, 59, 0.2);
|
||||
}
|
||||
|
||||
.menu-tag.tag-warning {
|
||||
background: rgba(210, 155, 155, 0.2);
|
||||
color: #933;
|
||||
border-color: rgba(210, 155, 155, 0.4);
|
||||
}
|
||||
|
||||
.menu-card-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
width: 100%;
|
||||
padding: 12px 16px;
|
||||
font-family: var(--font-sans);
|
||||
font-size: 1rem;
|
||||
font-weight: 700;
|
||||
text-decoration: none;
|
||||
border-radius: 8px;
|
||||
border: 2px solid var(--schwarz);
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
transition: all 0.15s ease;
|
||||
box-shadow: 2px 2px 0px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
.menu-card-btn:active {
|
||||
transform: translate(2px, 2px);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.btn-green {
|
||||
background: var(--tannengruen);
|
||||
color: var(--creme);
|
||||
}
|
||||
.btn-green:hover {
|
||||
background: #27624c;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btn-rose {
|
||||
background: var(--altrosa);
|
||||
color: #222;
|
||||
}
|
||||
.btn-rose:hover {
|
||||
background: #daa8a8;
|
||||
}
|
||||
|
||||
.btn-yellow {
|
||||
background: #FFE885;
|
||||
color: #4a3e14;
|
||||
}
|
||||
.btn-yellow:hover {
|
||||
background: #ffeb99;
|
||||
}
|
||||
|
||||
.btn-creme {
|
||||
background: var(--creme);
|
||||
color: var(--schwarz);
|
||||
}
|
||||
.btn-creme:hover {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
/* Schnelle Buch-Statistik am Fuß */
|
||||
.home-footer-stats {
|
||||
margin-top: 28px;
|
||||
padding-top: 20px;
|
||||
border-top: 1.5px dashed rgba(30, 77, 59, 0.3);
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
flex-wrap: wrap;
|
||||
gap: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.stat-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.stat-val {
|
||||
font-family: var(--font-hand);
|
||||
font-size: 1.8rem;
|
||||
font-weight: 700;
|
||||
color: var(--tannengruen);
|
||||
}
|
||||
|
||||
.stat-lbl {
|
||||
font-size: 0.8rem;
|
||||
.tile-subtitle {
|
||||
font-size: 0.85rem;
|
||||
color: #666;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
margin: 0;
|
||||
line-height: 1.3;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.menu-spread {
|
||||
padding: 20px 14px;
|
||||
/* Optionaler Badge (z. B. offene Einkäufe) */
|
||||
.tile-badge {
|
||||
display: inline-block;
|
||||
font-size: 0.74rem;
|
||||
font-weight: 700;
|
||||
padding: 2px 8px;
|
||||
border-radius: 12px;
|
||||
background: rgba(30, 77, 59, 0.1);
|
||||
color: var(--tannengruen);
|
||||
border: 1px solid rgba(30, 77, 59, 0.25);
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
/* Rezeptanzahl direkt unter den Kacheln */
|
||||
.home-recipe-count {
|
||||
font-family: var(--font-hand);
|
||||
font-size: 1.55rem;
|
||||
font-weight: 700;
|
||||
color: var(--tannengruen);
|
||||
background: rgba(255, 255, 255, 0.85);
|
||||
border: 1.5px solid rgba(34, 34, 34, 0.3);
|
||||
border-radius: 30px;
|
||||
padding: 6px 20px;
|
||||
box-shadow: 2px 3px 0px rgba(0,0,0,0.1);
|
||||
letter-spacing: 0.3px;
|
||||
}
|
||||
|
||||
/* Mobile Anpassung: Schönes 2-Spalten-Grid */
|
||||
@media (max-width: 540px) {
|
||||
body.home-clean-body {
|
||||
padding: 50px 14px 20px 14px;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.menu-board-heading {
|
||||
font-size: 2.2rem;
|
||||
|
||||
.tile-grid {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 12px;
|
||||
}
|
||||
.home-header {
|
||||
padding: 10px 14px;
|
||||
|
||||
.tile-card {
|
||||
padding: 16px 10px;
|
||||
border-width: 2px;
|
||||
}
|
||||
.home-brand-title {
|
||||
font-size: 1.5rem;
|
||||
|
||||
.tile-icon-box {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
|
||||
.tile-title {
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
|
||||
.tile-subtitle {
|
||||
font-size: 0.78rem;
|
||||
}
|
||||
|
||||
/* 5. Kachel über die volle Breite auf Mobile */
|
||||
.tile-card:nth-child(5) {
|
||||
grid-column: span 2;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
gap: 14px;
|
||||
padding: 14px 18px;
|
||||
}
|
||||
|
||||
.tile-card:nth-child(5) .tile-icon-box {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
|
||||
.tile-card:nth-child(5) div {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.home-recipe-count {
|
||||
font-size: 1.35rem;
|
||||
padding: 5px 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="home-body">
|
||||
<body class="home-clean-body">
|
||||
|
||||
<!-- Header -->
|
||||
<header class="home-header">
|
||||
<a href="/" class="home-brand">
|
||||
<span class="home-brand-icon">📖</span>
|
||||
<div>
|
||||
<h1 class="home-brand-title">What To Cook?</h1>
|
||||
<p class="home-brand-sub">Privates Kochbuch & Menüplaner</p>
|
||||
</div>
|
||||
<!-- Unaufdringlicher Logout-Button oben rechts -->
|
||||
<div class="home-top-bar">
|
||||
<a href="/logout" class="home-logout-pill" title="Sitzung beenden">
|
||||
<span>Abmelden</span>
|
||||
<span>🚪</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="home-header-nav">
|
||||
<a href="/shopping-list" class="home-header-badge" title="Einkaufsliste aufrufen">
|
||||
<span>🛒</span>
|
||||
<span>{% if open_shopping_count > 0 %}{{ open_shopping_count }} offen{% else %}Einkaufsliste{% endif %}</span>
|
||||
</a>
|
||||
<a href="/cookbook" class="home-header-badge" title="Direkt ins Kochbuch">
|
||||
<span>📖</span>
|
||||
<span>{{ recipe_count }} Rezepte</span>
|
||||
</a>
|
||||
<a href="/logout" class="home-logout-btn" title="Abmelden">Abmelden</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- Hauptbereich: Das ausgeklappte Menü -->
|
||||
<main class="home-container">
|
||||
<!-- Zentrale Menü-Kacheln -->
|
||||
<main class="home-hub">
|
||||
|
||||
<div class="menu-board-intro">
|
||||
<div class="menu-board-tagline">✦ Willkommen in deiner Küche ✦</div>
|
||||
<h2 class="menu-board-heading">Was kochen wir heute?</h2>
|
||||
<p class="menu-board-desc">
|
||||
Wähle einen Bereich aus der Menükarte – vom schnellen Zufallsgenerator bis hin zum vollständigen Kochbuch und deiner Einkaufsliste.
|
||||
</p>
|
||||
<div class="tile-grid">
|
||||
|
||||
<!-- 1. ZUFALLSGENERATOR -->
|
||||
<a href="/cookbook?open=generator" class="tile-card tile-shuffle" title="Essens-Zufallsgenerator starten">
|
||||
<div class="tile-icon-box">🎲</div>
|
||||
<div>
|
||||
<h2 class="tile-title">Zufallsgenerator</h2>
|
||||
<p class="tile-subtitle">Gerichte auslosen</p>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<!-- 2. KOCHBUCH -->
|
||||
<a href="/cookbook" class="tile-card tile-cookbook" title="Zum Kochbuch">
|
||||
<div class="tile-icon-box">📖</div>
|
||||
<div>
|
||||
<h2 class="tile-title">Kochbuch</h2>
|
||||
<p class="tile-subtitle">Rezepte & Druckansicht</p>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<!-- 3. WOCHENMENÜPLAN -->
|
||||
<a href="/cookbook?open=mealplan" class="tile-card tile-mealplan" title="Wochenmenüplan öffnen">
|
||||
<div class="tile-icon-box">📅</div>
|
||||
<div>
|
||||
<h2 class="tile-title">Wochenmenüplan</h2>
|
||||
<p class="tile-subtitle">KW {{ current_week }} planen</p>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<!-- 4. EINKAUFSLISTE -->
|
||||
<a href="/shopping-list" class="tile-card tile-shopping" title="Zur Einkaufsliste">
|
||||
<div class="tile-icon-box">🛒</div>
|
||||
<div>
|
||||
<h2 class="tile-title">Einkaufsliste</h2>
|
||||
<p class="tile-subtitle">
|
||||
{% if open_shopping_count > 0 %}
|
||||
<span class="tile-badge">{{ open_shopping_count }} offen</span>
|
||||
{% else %}
|
||||
Zutaten & Notizen
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<!-- 5. REZEPT HINZUFÜGEN -->
|
||||
<a href="/cookbook?open=new-recipe" class="tile-card tile-recipe" title="Neues Rezept erfassen">
|
||||
<div class="tile-icon-box">➕</div>
|
||||
<div>
|
||||
<h2 class="tile-title">Rezept hinzufügen</h2>
|
||||
<p class="tile-subtitle">Neues Gericht eintragen</p>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="menu-spread">
|
||||
<div class="menu-grid">
|
||||
|
||||
<!-- 1. ZUFALLSGENERATOR -->
|
||||
<div class="menu-card featured">
|
||||
<div class="menu-card-top">
|
||||
<div class="menu-card-icon-wrap" style="background: #FFE885;">🎲</div>
|
||||
<h3 class="menu-card-title">Zufallsgenerator</h3>
|
||||
<p class="menu-card-desc">
|
||||
Keine Idee was gekocht werden soll? Bis zu 5 Gerichte nach Aufwand auslosen und direkt in deinen Wochenplan übernehmen.
|
||||
</p>
|
||||
<div class="menu-card-tags">
|
||||
<span class="menu-tag">Hauptgerichte</span>
|
||||
<span class="menu-tag">Schnelle Auslosung</span>
|
||||
<span class="menu-tag tag-warning">Ohne Kuchen/Kekse</span>
|
||||
</div>
|
||||
</div>
|
||||
<a href="/cookbook?open=generator" class="menu-card-btn btn-green">
|
||||
<span>🎲</span> <span>Generator starten</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- 2. KOCHBUCH -->
|
||||
<div class="menu-card">
|
||||
<div class="menu-card-top">
|
||||
<div class="menu-card-icon-wrap" style="background: #E8F2EC;">📖</div>
|
||||
<h3 class="menu-card-title">Mein Kochbuch</h3>
|
||||
<p class="menu-card-desc">
|
||||
Blättere durch alle 11 Kapitel, finde deine Lieblingsgerichte und nutze die millimetergenaue DIN A4 Buchdruck-Engine.
|
||||
</p>
|
||||
<div class="menu-card-tags">
|
||||
<span class="menu-tag">{{ recipe_count }} Rezepte</span>
|
||||
<span class="menu-tag">11 Kapitel</span>
|
||||
<span class="menu-tag">A4 Druckausgabe</span>
|
||||
</div>
|
||||
</div>
|
||||
<a href="/cookbook" class="menu-card-btn btn-creme">
|
||||
<span>📖</span> <span>Kochbuch aufschlagen</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- 3. WOCHENMENÜPLAN -->
|
||||
<div class="menu-card">
|
||||
<div class="menu-card-top">
|
||||
<div class="menu-card-icon-wrap" style="background: #F8EFEA;">📅</div>
|
||||
<h3 class="menu-card-title">Wochenmenüplan</h3>
|
||||
<p class="menu-card-desc">
|
||||
Plane die Mahlzeiten der aktuellen Kalenderwoche (Früh, Mittag, Kaffee & Kuchen, Abend) mit schneller Rezept-Live-Suche.
|
||||
</p>
|
||||
<div class="menu-card-tags">
|
||||
<span class="menu-tag">Aktuell: KW {{ current_week }}</span>
|
||||
<span class="menu-tag">Früh / Mittag / Abend</span>
|
||||
<span class="menu-tag">Kaffee & Kuchen</span>
|
||||
</div>
|
||||
</div>
|
||||
<a href="/cookbook?open=mealplan" class="menu-card-btn btn-rose">
|
||||
<span>📅</span> <span>Wochenplan ansehen</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- 4. EINKAUFSLISTE -->
|
||||
<div class="menu-card">
|
||||
<div class="menu-card-top">
|
||||
<div class="menu-card-icon-wrap" style="background: #FFF9D2;">🛒</div>
|
||||
<h3 class="menu-card-title">Einkaufsliste</h3>
|
||||
<p class="menu-card-desc">
|
||||
Alle benötigten Zutaten aus dem Wochenplan per Klick übernehmen, eigene Notizen hinzufügen und bequem im Supermarkt abhaken.
|
||||
</p>
|
||||
<div class="menu-card-tags">
|
||||
<span class="menu-tag">{% if open_shopping_count > 0 %}{{ open_shopping_count }} offen{% else %}Keine offenen Posten{% endif %}</span>
|
||||
<span class="menu-tag">Zutatenübernahme</span>
|
||||
<span class="menu-tag">Mobil optimiert</span>
|
||||
</div>
|
||||
</div>
|
||||
<a href="/shopping-list" class="menu-card-btn btn-yellow">
|
||||
<span>🛒</span> <span>Zur Einkaufsliste</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- 5. REZEPT HINZUFÜGEN -->
|
||||
<div class="menu-card">
|
||||
<div class="menu-card-top">
|
||||
<div class="menu-card-icon-wrap" style="background: #F3EBE1;">➕</div>
|
||||
<h3 class="menu-card-title">Rezept erfassen</h3>
|
||||
<p class="menu-card-desc">
|
||||
Füge ein neues Rezept mit Zutatenliste, Zubereitungsschritten, Kochzeit und Portionsangaben zum Kochbuch hinzu.
|
||||
</p>
|
||||
<div class="menu-card-tags">
|
||||
<span class="menu-tag">Zutatenliste</span>
|
||||
<span class="menu-tag">Portionen</span>
|
||||
<span class="menu-tag">Foto-Upload</span>
|
||||
</div>
|
||||
</div>
|
||||
<a href="/cookbook?open=new-recipe" class="menu-card-btn btn-creme">
|
||||
<span>➕</span> <span>Neues Rezept anlegen</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Fußzeile in der Menükarte -->
|
||||
<div class="home-footer-stats">
|
||||
<div class="stat-item">
|
||||
<span class="stat-val">{{ recipe_count }}</span>
|
||||
<span class="stat-lbl">Gespeicherte Rezepte</span>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<span class="stat-val">{{ chapters|length }}</span>
|
||||
<span class="stat-lbl">Buch-Kapitel</span>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<span class="stat-val">KW {{ current_week }}</span>
|
||||
<span class="stat-lbl">Aktuelle Menüwoche</span>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<span class="stat-val">A4</span>
|
||||
<span class="stat-lbl">Druckfertig gebunden</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Rezeptanzahl direkt unter den Kacheln -->
|
||||
<div class="home-recipe-count">
|
||||
📖 {{ recipe_count }} Rezepte im Kochbuch
|
||||
</div>
|
||||
|
||||
</main>
|
||||
|
||||
@@ -21,60 +21,80 @@
|
||||
}
|
||||
|
||||
/* Top Nav */
|
||||
/* Schlanker, mobiler Top Nav */
|
||||
.shop-nav {
|
||||
background-color: var(--creme);
|
||||
border-bottom: 2px solid var(--schwarz);
|
||||
padding: 10px 18px;
|
||||
padding: 8px 16px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
box-shadow: 0 4px 10px rgba(0,0,0,0.08);
|
||||
box-shadow: 0 3px 8px rgba(0,0,0,0.06);
|
||||
}
|
||||
|
||||
.shop-nav-brand {
|
||||
.shop-nav-back {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
background: #ffffff;
|
||||
border: 1.5px solid var(--schwarz);
|
||||
border-radius: 8px;
|
||||
padding: 6px 12px;
|
||||
font-size: 0.88rem;
|
||||
font-weight: 700;
|
||||
color: var(--schwarz);
|
||||
text-decoration: none;
|
||||
box-shadow: 2px 2px 0px rgba(0,0,0,0.12);
|
||||
transition: all 0.15s ease;
|
||||
cursor: pointer;
|
||||
}
|
||||
.shop-nav-back:hover {
|
||||
background: rgba(30, 77, 59, 0.08);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
.shop-nav-back:active {
|
||||
transform: translate(1px, 1px);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.shop-nav-center {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.shop-nav-title {
|
||||
font-family: var(--font-hand);
|
||||
font-size: 1.6rem;
|
||||
font-size: 1.7rem;
|
||||
font-weight: 700;
|
||||
color: var(--tannengruen);
|
||||
margin: 0;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.shop-nav-links {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.shop-nav-btn {
|
||||
.shop-nav-close {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
background: var(--creme);
|
||||
justify-content: center;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
background: #ffffff;
|
||||
border: 1.5px solid var(--schwarz);
|
||||
border-radius: 8px;
|
||||
padding: 6px 12px;
|
||||
font-size: 0.88rem;
|
||||
font-weight: 600;
|
||||
color: var(--schwarz);
|
||||
border-radius: 50%;
|
||||
font-size: 1.15rem;
|
||||
font-weight: 700;
|
||||
color: #555;
|
||||
text-decoration: none;
|
||||
box-shadow: 2px 2px 0px rgba(0,0,0,0.12);
|
||||
transition: all 0.15s;
|
||||
box-shadow: 2px 2px 0px rgba(0,0,0,0.1);
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
.shop-nav-btn:hover {
|
||||
background: #fff;
|
||||
transform: translateY(-1px);
|
||||
.shop-nav-close:hover {
|
||||
background: #fdf2f2;
|
||||
color: #b00;
|
||||
border-color: #b00;
|
||||
}
|
||||
|
||||
/* Hauptbereich Notizblock */
|
||||
@@ -360,30 +380,74 @@
|
||||
transform: translateX(-50%) translateY(0);
|
||||
opacity: 1;
|
||||
}
|
||||
@media (max-width: 600px) {
|
||||
.shop-nav {
|
||||
padding: 6px 12px;
|
||||
}
|
||||
.shop-nav-title {
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
.shop-main {
|
||||
margin: 10px auto 30px auto;
|
||||
padding: 0 8px;
|
||||
}
|
||||
.notepad-card {
|
||||
padding: 14px 10px;
|
||||
border-width: 2px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.notepad-card::before {
|
||||
left: 24px;
|
||||
}
|
||||
.notepad-header {
|
||||
margin-bottom: 14px;
|
||||
padding-bottom: 10px;
|
||||
gap: 6px;
|
||||
}
|
||||
.notepad-title-group h2 {
|
||||
font-size: 1.7rem;
|
||||
}
|
||||
.notepad-counter {
|
||||
font-size: 0.9rem;
|
||||
padding: 2px 6px;
|
||||
}
|
||||
.shop-add-form {
|
||||
padding: 6px;
|
||||
gap: 6px;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
.shop-input {
|
||||
font-size: 0.9rem;
|
||||
padding: 6px 6px;
|
||||
}
|
||||
.shop-add-btn {
|
||||
padding: 6px 10px;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
.shopping-item-row {
|
||||
padding: 8px 8px 8px 30px;
|
||||
gap: 8px;
|
||||
}
|
||||
.item-text {
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="shopping-body">
|
||||
|
||||
<!-- Nav -->
|
||||
<!-- Schlanker, mobiler Nav-Header -->
|
||||
<header class="shop-nav">
|
||||
<a href="/" class="shop-nav-brand">
|
||||
<span style="font-size: 1.6rem;">🛒</span>
|
||||
<div>
|
||||
<h1 class="shop-nav-title">Einkaufsliste</h1>
|
||||
</div>
|
||||
<a href="/" class="shop-nav-back" onclick="if(window.history.length > 1) { event.preventDefault(); window.history.back(); }" title="Zurück zum Menü">
|
||||
<span>⬅️</span> <span>Zurück</span>
|
||||
</a>
|
||||
|
||||
<div class="shop-nav-links">
|
||||
<a href="/" class="shop-nav-btn">
|
||||
<span>🏠</span> <span>Menü</span>
|
||||
</a>
|
||||
<a href="/cookbook" class="shop-nav-btn">
|
||||
<span>📖</span> <span>Kochbuch</span>
|
||||
</a>
|
||||
<a href="/cookbook?open=mealplan" class="shop-nav-btn">
|
||||
<span>📅</span> <span>Wochenplan</span>
|
||||
</a>
|
||||
<div class="shop-nav-center">
|
||||
<span style="font-size: 1.35rem;">🛒</span>
|
||||
<h1 class="shop-nav-title">Einkaufsliste</h1>
|
||||
</div>
|
||||
|
||||
<a href="/" class="shop-nav-close" title="Schließen / Zum Menü">✕</a>
|
||||
</header>
|
||||
|
||||
<!-- Main Container -->
|
||||
@@ -463,7 +527,7 @@
|
||||
<div class="empty-icon">🎉</div>
|
||||
<h3 class="empty-title">Alles eingekauft!</h3>
|
||||
<p class="empty-desc">Deine Einkaufsliste ist momentan leer. Füge oben neue Dinge hinzu oder übernimm Zutaten direkt aus deinem Wochenplan.</p>
|
||||
<a href="/cookbook?open=mealplan&prompt_transfer=1" class="shop-nav-btn" style="background: var(--tannengruen); color: var(--creme); font-weight: bold; padding: 10px 18px;">
|
||||
<a href="/cookbook?open=mealplan&prompt_transfer=1" class="shop-action-btn btn-wochenplan" style="padding: 10px 18px; font-size: 0.95rem; font-weight: bold;">
|
||||
<span>📅</span> <span>Zutaten aus Wochenplan holen</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user