diff --git a/app/static/cookbook.css b/app/static/cookbook.css index fcf1891..c982428 100755 --- a/app/static/cookbook.css +++ b/app/static/cookbook.css @@ -334,419 +334,7 @@ min-height: 580px; } -/* ========================================================================== - A4 Print Engine (Android Chrome, iOS Safari, Desktop) - ========================================================================== */ -@page { - size: A4 portrait; - margin: 0; -} - -@media print { - * { - -webkit-print-color-adjust: exact !important; - print-color-adjust: exact !important; - color-adjust: exact !important; - box-sizing: border-box !important; - } - - html, - body.cookbook-body { - width: 210mm !important; - min-width: 210mm !important; - max-width: 210mm !important; - height: auto !important; - min-height: 297mm !important; - margin: 0 !important; - padding: 0 !important; - background-color: var(--creme) !important; - color: var(--schwarz) !important; - display: block !important; - overflow: visible !important; - float: none !important; - } - - .cb-nav, - .cb-filter-bar, - .no-print, - .no-print *, - .empty-chapter-section, - .empty-chapter-section *, - .empty-chapter-box, - .empty-chapter-box * { - display: none !important; - visibility: hidden !important; - height: 0 !important; - min-height: 0 !important; - max-height: 0 !important; - margin: 0 !important; - padding: 0 !important; - border: none !important; - page-break-before: avoid !important; - page-break-after: avoid !important; - break-before: avoid !important; - break-after: avoid !important; - overflow: hidden !important; - } - - .book-wrapper { - display: block !important; - width: 210mm !important; - max-width: 210mm !important; - min-width: 210mm !important; - margin: 0 !important; - padding: 0 !important; - gap: 0 !important; - float: none !important; - } - - /* Basis für JEDE A4-Seite im Druck: Exakt 1 Seite ohne Überlauf */ - .page { - width: 210mm !important; - max-width: 210mm !important; - min-width: 210mm !important; - height: 297mm !important; - min-height: 297mm !important; - max-height: 297mm !important; - margin: 0 !important; - padding: 0 !important; - background-color: var(--creme) !important; - position: relative !important; - box-sizing: border-box !important; - box-shadow: none !important; - border-radius: 0 !important; - page-break-after: always !important; - break-after: page !important; - page-break-inside: avoid !important; - break-inside: avoid !important; - overflow: hidden !important; - } - - .page:last-child { - page-break-after: auto !important; - break-after: auto !important; - } - - /* 1. COVER IM DRUCK */ - .cover { - width: 210mm !important; - max-width: 210mm !important; - min-width: 210mm !important; - height: 297mm !important; - min-height: 297mm !important; - max-height: 297mm !important; - box-sizing: border-box !important; - padding: 30mm 15mm !important; - display: flex !important; - justify-content: center !important; - align-items: center !important; - background-color: var(--creme) !important; - background-image: url("data:image/svg+xml,%3Csvg preserveAspectRatio='none' viewBox='0 0 200 800' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M 5 0 Q 15 200 0 400 T 10 800 L 20 800 Q 10 600 25 400 T 15 0 Z' fill='%231E4D3B' opacity='0.9'/%3E%3Cpath d='M 35 0 Q 25 250 40 500 T 30 800 L 55 800 Q 65 500 45 250 T 50 0 Z' fill='%231E4D3B' opacity='0.85'/%3E%3Cpath d='M 70 0 Q 80 300 65 600 T 75 800 L 85 800 Q 75 500 90 300 T 80 0 Z' fill='%231E4D3B' opacity='0.9'/%3E%3Cpath d='M 105 0 Q 95 200 110 400 T 100 800 L 125 800 Q 135 600 120 400 T 125 0 Z' fill='%231E4D3B' opacity='0.8'/%3E%3Cpath d='M 140 0 Q 150 250 135 500 T 145 800 L 155 800 Q 145 500 160 250 T 150 0 Z' fill='%231E4D3B' opacity='0.9'/%3E%3Cpath d='M 175 0 Q 165 300 180 600 T 170 800 L 195 800 Q 205 500 185 300 T 190 0 Z' fill='%231E4D3B' opacity='0.85'/%3E%3C/svg%3E") !important; - background-size: 100% 100% !important; - background-position: 0 0 !important; - background-repeat: no-repeat !important; - page-break-after: always !important; - break-after: page !important; - page-break-inside: avoid !important; - break-inside: avoid !important; - overflow: hidden !important; - } - - .cover-box { - border: 3.5px solid var(--schwarz) !important; - background-color: var(--creme) !important; - box-shadow: none !important; - transform: rotate(-1deg) !important; - padding: 25mm 20mm !important; - max-width: 82% !important; - box-sizing: border-box !important; - margin: auto !important; - } - - .cover-box h1 { - font-family: var(--font-hand) !important; - font-size: 3.5rem !important; - line-height: 1.15 !important; - margin: 0 !important; - color: var(--schwarz) !important; - } - - .cover-box p { - font-family: var(--font-hand) !important; - font-size: 1.6rem !important; - color: var(--tannengruen) !important; - margin-top: 14px !important; - margin-bottom: 0 !important; - } - - /* 2. TRENNSEITEN IM DRUCK */ - .divider { - width: 210mm !important; - max-width: 210mm !important; - min-width: 210mm !important; - height: 297mm !important; - min-height: 297mm !important; - max-height: 297mm !important; - box-sizing: border-box !important; - padding: 35mm 15mm !important; - display: flex !important; - flex-direction: column !important; - justify-content: center !important; - align-items: center !important; - text-align: center !important; - background-color: var(--creme) !important; - page-break-after: always !important; - break-after: page !important; - page-break-inside: avoid !important; - break-inside: avoid !important; - overflow: hidden !important; - } - - .chapter-number { - font-family: var(--font-hand) !important; - font-size: 3rem !important; - color: var(--altrosa) !important; - margin-bottom: -8px !important; - } - - .divider h2 { - font-family: var(--font-hand) !important; - font-size: 3.8rem !important; - color: var(--tannengruen) !important; - margin: 0 0 25px 0 !important; - line-height: 1.15 !important; - } - - .doodle-placeholder { - width: 240px !important; - height: 240px !important; - border: 2.5px dashed var(--altrosa) !important; - border-radius: 12px !important; - background: rgba(210, 155, 155, 0.05) !important; - display: flex !important; - justify-content: center !important; - align-items: center !important; - position: relative !important; - margin: 0 auto !important; - } - - .doodle-placeholder.has-illustration, - .doodle-placeholder:has(img) { - border: none !important; - background: transparent !important; - } - - /* 3. EINZELNE REZEPTSEITE IM DRUCK */ - .recipe-page { - width: 210mm !important; - max-width: 210mm !important; - min-width: 210mm !important; - height: 297mm !important; - min-height: 297mm !important; - max-height: 297mm !important; - box-sizing: border-box !important; - padding: 12mm 16mm 10mm 16mm !important; - display: flex !important; - flex-direction: column !important; - justify-content: flex-start !important; - gap: 8px !important; - background-color: var(--creme) !important; - page-break-after: always !important; - break-after: page !important; - page-break-inside: avoid !important; - break-inside: avoid !important; - overflow: hidden !important; - } - - .recipe-header { - border-bottom: 2px dashed rgba(30, 77, 59, 0.35) !important; - padding-bottom: 6px !important; - margin-bottom: 0 !important; - } - - .recipe-header-top { - display: flex !important; - justify-content: space-between !important; - align-items: center !important; - margin-bottom: 2px !important; - } - - .recipe-chapter-badge { - font-size: 0.82rem !important; - padding: 2px 8px !important; - margin-bottom: 0 !important; - background: var(--altrosa-light) !important; - border: 1.5px solid var(--altrosa) !important; - } - - .recipe-credits-badge { - display: inline-block !important; - font-family: var(--font-hand) !important; - font-size: 0.78rem !important; - color: #444 !important; - padding: 1px 7px !important; - background: rgba(30, 77, 59, 0.05) !important; - border: 1px dashed rgba(30, 77, 59, 0.35) !important; - border-radius: 8px !important; - } - - .recipe-title { - font-size: 2rem !important; - margin: 0 0 4px 0 !important; - line-height: 1.15 !important; - color: var(--tannengruen) !important; - } - - .recipe-meta-row { - font-size: 0.88rem !important; - gap: 12px !important; - color: #4a453f !important; - } - - /* Im Druck IMMER 2 Spalten: Links Bild + Zutaten, Rechts Zubereitung */ - .recipe-grid { - display: grid !important; - grid-template-columns: 62mm 1fr !important; - gap: 12mm !important; - align-items: start !important; - flex: 1 !important; - } - - .recipe-side { - display: flex !important; - flex-direction: column !important; - gap: 10px !important; - } - - /* Bildgröße im Druck gezielt begrenzen (44mm hoch), damit Rezept auf 1 Seite passt */ - .recipe-photo-box { - width: 100% !important; - height: 44mm !important; - max-height: 44mm !important; - aspect-ratio: auto !important; - border: 1.5px solid var(--schwarz) !important; - box-shadow: none !important; - border-radius: 6px !important; - background: rgba(30, 77, 59, 0.04) !important; - overflow: hidden !important; - } - - .recipe-photo-box img { - width: 100% !important; - height: 100% !important; - object-fit: cover !important; - display: block !important; - } - - .recipe-photo-empty { - display: none !important; - } - - .ingredients-box { - padding: 8px 12px !important; - border: 1.5px solid rgba(30, 77, 59, 0.4) !important; - background: rgba(255, 255, 255, 0.7) !important; - border-radius: 6px !important; - } - - .section-hand-title { - font-size: 1.35rem !important; - margin: 0 0 6px 0 !important; - padding-bottom: 2px !important; - border-bottom: 1.5px solid var(--altrosa) !important; - color: var(--tannengruen) !important; - } - - .ingredients-list { - gap: 3px !important; - } - - .ingredients-list li { - font-size: 0.85rem !important; - line-height: 1.25 !important; - } - - .recipe-main { - display: flex !important; - flex-direction: column !important; - gap: 10px !important; - } - - .instructions-steps { - gap: 8px !important; - } - - .step-card { - gap: 10px !important; - } - - .step-badge { - width: 22px !important; - height: 22px !important; - font-size: 0.9rem !important; - background: var(--tannengruen) !important; - color: var(--creme) !important; - } - - .step-text { - font-size: 0.9rem !important; - line-height: 1.34 !important; - padding-top: 1px !important; - } - - .notes-box { - padding: 6px 12px !important; - font-size: 0.88rem !important; - margin-top: 2px !important; - background: #FFF9D2 !important; - border: 1.5px solid #E2D172 !important; - box-shadow: none !important; - } - - .notes-box-title { - font-size: 0.92rem !important; - margin-bottom: 2px !important; - } - - .recipe-source { - display: none !important; - } - - .notes-box-empty { - display: block !important; - padding: 6px 12px !important; - margin-top: 4px !important; - background: #FFFDF0 !important; - border: 1.5px dashed #D4C165 !important; - box-shadow: none !important; - border-radius: 6px !important; - } - - .notes-blank-lines { - display: flex !important; - flex-direction: column !important; - gap: 8px !important; - margin-top: 4px !important; - padding-bottom: 2px !important; - } - - .notes-blank-line { - border-bottom: 1.5px dotted rgba(80, 70, 50, 0.45) !important; - height: 14px !important; - width: 100% !important; - display: block !important; - } - - .print-only { - display: block !important; - } - - .no-print { - display: none !important; - } -} - -/* Einheitliche Druck-Architektur ohne gerätespezifische Stauchungs-Hacks */ +/* (Druckstile zentral in cookbook.html