Files
cookbook/app/templates/home.html
T

351 lines
9.1 KiB
HTML
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.
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<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>
: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;
justify-content: center;
align-items: center;
position: relative;
padding: 24px 16px;
}
/* Dezenter Logout-Button oben rechts */
.home-top-bar {
position: absolute;
top: 16px;
right: 18px;
z-index: 10;
}
.home-logout-pill {
display: inline-flex;
align-items: center;
gap: 6px;
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.82rem;
font-weight: 600;
color: #666;
text-decoration: none;
transition: all 0.15s ease;
backdrop-filter: blur(4px);
}
.home-logout-pill:hover {
color: #b00;
border-color: #b00;
background: #ffffff;
transform: translateY(-1px);
}
/* Kacheln Hauptcontainer */
.home-hub {
width: 100%;
max-width: 820px;
display: flex;
flex-direction: column;
align-items: center;
gap: 22px;
margin: auto 0;
}
/* 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;
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;
}
.tile-card:hover {
transform: translateY(-3px);
box-shadow: 5px 8px 0px rgba(34, 34, 34, 0.95);
background: #ffffff;
}
.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: 1.75rem;
font-weight: 700;
color: var(--tannengruen);
margin: 0;
line-height: 1.1;
}
.tile-subtitle {
font-size: 0.85rem;
color: #666;
margin: 0;
line-height: 1.3;
font-weight: 500;
}
/* 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;
}
.tile-grid {
grid-template-columns: repeat(2, 1fr);
gap: 12px;
}
.tile-card {
padding: 16px 10px;
border-width: 2px;
}
.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-clean-body">
<!-- 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>
<!-- Zentrale Menü-Kacheln -->
<main class="home-hub">
<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>
<!-- Rezeptanzahl direkt unter den Kacheln -->
<div class="home-recipe-count">
📖 {{ recipe_count }} Rezepte im Kochbuch
</div>
</main>
</body>
</html>