What To Cook (WTC) v4.5: Print 256mm Safe-Height fuer Apple/Android, Echtzeit-Rezeptsuche, Kaffee & Kuchen

This commit is contained in:
2026-10-14 20:48:00 +02:00
parent c01d2d7639
commit d4e8a4dc6b
3 changed files with 679 additions and 339 deletions
+267 -249
View File
@@ -81,6 +81,91 @@
white-space: nowrap;
}
/* Recipe Search Bar */
.cb-search-box {
display: flex;
align-items: center;
position: relative;
flex: 0 1 240px;
max-width: 280px;
min-width: 130px;
background: rgba(250, 246, 240, 0.18);
border: 1.5px solid rgba(250, 246, 240, 0.45);
border-radius: 20px;
padding: 3px 10px;
transition: all 0.2s ease;
margin: 0 6px;
}
.cb-search-box:focus-within {
background: var(--creme);
border-color: var(--creme);
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}
.cb-search-icon {
font-size: 0.95rem;
margin-right: 6px;
opacity: 0.85;
user-select: none;
}
.cb-search-box:focus-within .cb-search-icon {
filter: brightness(0.2);
}
.cb-search-input {
background: transparent;
border: none;
outline: none;
color: var(--creme);
font-family: var(--font-hand);
font-size: 1rem;
width: 100%;
}
.cb-search-box:focus-within .cb-search-input {
color: var(--schwarz);
}
.cb-search-input::placeholder {
color: rgba(250, 246, 240, 0.7);
}
.cb-search-box:focus-within .cb-search-input::placeholder {
color: rgba(34, 34, 34, 0.55);
}
.cb-search-clear {
background: none;
border: none;
color: inherit;
cursor: pointer;
padding: 0 4px;
font-size: 0.85rem;
opacity: 0.75;
line-height: 1;
}
.cb-search-clear:hover {
opacity: 1;
}
.recipe-page.search-hidden,
.divider.search-hidden {
display: none !important;
}
#search-empty-state {
text-align: center;
padding: 40px 20px;
background: rgba(255, 255, 255, 0.7);
border: 2px dashed rgba(34, 34, 34, 0.25);
border-radius: 12px;
margin: 20px auto;
max-width: 500px;
}
.cb-nav-actions {
display: flex;
align-items: center;
@@ -661,228 +746,8 @@
}
}
/* iOS Safari AirPrint Anpassung: Verhindert Seitenüberlauf und Stauchung */
@supports (-webkit-touch-callout: none) {
@media print {
html, body.cookbook-body {
width: 100% !important;
max-width: 100% !important;
min-width: 0 !important;
height: auto !important;
min-height: auto !important;
overflow: visible !important;
background-color: var(--creme) !important;
}
.book-wrapper {
width: 100% !important;
max-width: 100% !important;
min-width: 0 !important;
margin: 0 !important;
padding: 0 !important;
}
.page {
width: 100% !important;
max-width: 100% !important;
min-width: 0 !important;
height: auto !important;
min-height: auto !important;
max-height: none !important;
box-sizing: border-box !important;
background-color: var(--creme) !important;
overflow: hidden !important;
page-break-after: always !important;
break-after: page !important;
page-break-inside: avoid !important;
break-inside: avoid !important;
}
.cover {
width: 100% !important;
max-width: 100% !important;
min-width: 0 !important;
height: 220mm !important;
min-height: auto !important;
max-height: 220mm !important;
background-size: 100% 100% !important;
background-position: 0 0 !important;
background-repeat: no-repeat !important;
padding: 16mm 10mm !important;
box-sizing: border-box !important;
overflow: hidden !important;
page-break-after: always !important;
break-after: page !important;
page-break-inside: avoid !important;
break-inside: avoid !important;
}
.cover-box {
padding: 16mm 14mm !important;
max-width: 85% !important;
}
.divider {
width: 100% !important;
max-width: 100% !important;
min-width: 0 !important;
height: 220mm !important;
min-height: auto !important;
max-height: 220mm !important;
padding: 18mm 10mm !important;
box-sizing: border-box !important;
overflow: hidden !important;
page-break-after: always !important;
break-after: page !important;
page-break-inside: avoid !important;
break-inside: avoid !important;
}
.recipe-page {
width: 100% !important;
max-width: 100% !important;
min-width: 0 !important;
height: auto !important;
min-height: auto !important;
max-height: 225mm !important;
padding: 6mm 10mm !important;
box-sizing: border-box !important;
overflow: hidden !important;
page-break-after: always !important;
break-after: page !important;
page-break-inside: avoid !important;
break-inside: avoid !important;
}
.recipe-grid {
grid-template-columns: 55mm 1fr !important;
gap: 8mm !important;
width: 100% !important;
min-width: 0 !important;
}
.page:last-child {
page-break-after: auto !important;
break-after: auto !important;
}
}
}
/* Einheitliche Druck-Architektur ohne gerätespezifische Stauchungs-Hacks */
/* Fallback-Klasse falls JS is-ios gesetzt hat */
@media print {
html.is-ios,
body.is-ios.cookbook-body {
width: 100% !important;
max-width: 100% !important;
min-width: 0 !important;
height: auto !important;
min-height: auto !important;
overflow: visible !important;
background-color: var(--creme) !important;
}
.is-ios .book-wrapper {
display: block !important;
width: 100% !important;
max-width: 100% !important;
min-width: 0 !important;
margin: 0 !important;
padding: 0 !important;
gap: 0 !important;
}
.is-ios .page {
width: 100% !important;
max-width: 100% !important;
min-width: 0 !important;
height: auto !important;
min-height: auto !important;
max-height: none !important;
margin: 0 !important;
padding: 0 !important;
box-sizing: border-box !important;
background-color: var(--creme) !important;
overflow: hidden !important;
page-break-after: always !important;
break-after: page !important;
page-break-inside: avoid !important;
break-inside: avoid !important;
}
.is-ios .cover {
width: 100% !important;
max-width: 100% !important;
min-width: 0 !important;
height: 220mm !important;
min-height: auto !important;
max-height: 220mm !important;
background-size: 100% 100% !important;
background-position: 0 0 !important;
background-repeat: no-repeat !important;
padding: 16mm 10mm !important;
box-sizing: border-box !important;
overflow: hidden !important;
page-break-after: always !important;
break-after: page !important;
page-break-inside: avoid !important;
break-inside: avoid !important;
}
.is-ios .cover-box {
padding: 16mm 14mm !important;
max-width: 85% !important;
}
.is-ios .divider {
width: 100% !important;
max-width: 100% !important;
min-width: 0 !important;
height: 220mm !important;
min-height: auto !important;
max-height: 220mm !important;
padding: 18mm 10mm !important;
box-sizing: border-box !important;
overflow: hidden !important;
page-break-after: always !important;
break-after: page !important;
page-break-inside: avoid !important;
break-inside: avoid !important;
}
.is-ios .recipe-page {
width: 100% !important;
max-width: 100% !important;
min-width: 0 !important;
height: auto !important;
min-height: auto !important;
max-height: 225mm !important;
padding: 6mm 10mm !important;
box-sizing: border-box !important;
overflow: hidden !important;
page-break-after: always !important;
break-after: page !important;
page-break-inside: avoid !important;
break-inside: avoid !important;
}
.is-ios .recipe-grid {
grid-template-columns: 55mm 1fr !important;
gap: 8mm !important;
width: 100% !important;
min-width: 0 !important;
}
.is-ios .notes-box-empty {
display: block !important;
padding: 4px 8px !important;
margin-top: 3px !important;
background: #FFFDF0 !important;
border: 1px dashed #D4C165 !important;
}
.is-ios .notes-blank-lines {
display: flex !important;
flex-direction: column !important;
gap: 8px !important;
margin-top: 3px !important;
}
.is-ios .notes-blank-line {
border-bottom: 1.5px dotted rgba(80, 70, 50, 0.45) !important;
height: 12px !important;
width: 100% !important;
display: block !important;
}
.is-ios .print-only {
display: block !important;
}
.is-ios .page:last-child {
page-break-after: auto !important;
break-after: auto !important;
}
}
/* --- Cover Gestaltung --- */
.cover {
@@ -2665,8 +2530,13 @@ body.modal-open {
box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.15);
}
/* --- Druck-Spezifische Optimierungen (Exakte A4-Höhe 297mm & Seitenzahlen millimetergenau am Fuß) --- */
/* --- Druck-Spezifische Optimierungen (Exakte A4-Höhe 256mm & abwechselnde Seitenzahlen am Fuß) --- */
@media print {
@page {
size: A4 portrait;
margin: 0;
}
/* Titelseite, Inhaltsverzeichnis und Seitenzahlen IM DRUCK SICHTBAR */
.page.cover {
display: flex !important;
@@ -2676,14 +2546,14 @@ body.modal-open {
display: flex !important;
}
/* A4 Druck: 282mm Höhe passt exakt in AirPrint & Standard-Drucker ohne 2. Seite für Seitenzahl */
/* A4 Druck: 256mm Höhe passt absolut sicher in AirPrint (267mm) & Android Chrome ohne 2. Seite oder Abschneiden */
.page, .cover, .toc-page, .divider, .recipe-page {
width: 210mm !important;
max-width: 210mm !important;
min-width: 210mm !important;
height: 282mm !important;
min-height: 282mm !important;
max-height: 282mm !important;
height: 256mm !important;
min-height: 256mm !important;
max-height: 256mm !important;
box-sizing: border-box !important;
overflow: hidden !important;
page-break-after: always !important;
@@ -2701,23 +2571,40 @@ body.modal-open {
position: relative !important;
bottom: auto !important;
border: none !important;
padding: 3mm 0 2mm 0 !important;
padding: 1.5mm 0 1mm 0 !important;
width: 100% !important;
box-sizing: border-box !important;
z-index: 100 !important;
}
.divider {
padding: 14mm 10mm !important;
padding: 10mm 10mm 2mm 10mm !important;
justify-content: center !important;
align-items: center !important;
position: relative !important;
}
.divider .chapter-number {
font-family: var(--font-hand) !important;
font-size: 2.8rem !important;
color: var(--altrosa) !important;
margin-bottom: -6px !important;
}
.divider h2 {
font-family: var(--font-hand) !important;
font-size: 3.4rem !important;
color: var(--tannengruen) !important;
margin: 0 0 15px 0 !important;
line-height: 1.15 !important;
}
.doodle-placeholder {
width: 140mm !important;
height: 140mm !important;
max-width: 140mm !important;
max-height: 140mm !important;
margin: 6mm auto 0 auto !important;
width: 120mm !important;
height: 120mm !important;
max-width: 120mm !important;
max-height: 120mm !important;
margin: 4mm auto !important;
}
.doodle-placeholder img {
@@ -2726,12 +2613,20 @@ body.modal-open {
object-fit: contain !important;
}
.divider .page-footer {
position: absolute !important;
bottom: 2mm !important;
left: 0 !important;
right: 0 !important;
padding: 0 10mm !important;
}
.page-footer.page-even {
left: auto !important;
right: auto !important;
justify-content: flex-start !important;
text-align: left !important;
padding-left: 4mm !important;
padding-left: 3mm !important;
padding-right: 0 !important;
}
@@ -2740,57 +2635,103 @@ body.modal-open {
left: auto !important;
justify-content: flex-end !important;
text-align: right !important;
padding-right: 4mm !important;
padding-right: 3mm !important;
padding-left: 0 !important;
}
.page-footer .page-number {
font-size: 0.95rem !important;
font-family: var(--font-hand), 'Caveat', cursive !important;
font-size: 1.15rem !important;
font-weight: 700 !important;
color: var(--tannengruen) !important;
line-height: 1 !important;
}
.recipe-page {
padding: 6mm 10mm !important;
padding: 4mm 8mm 2mm 8mm !important;
overflow: hidden !important;
}
.recipe-header {
margin-bottom: 2.5mm !important;
}
.recipe-title {
font-size: 1.65rem !important;
line-height: 1.15 !important;
margin: 0 0 1.5mm 0 !important;
}
.recipe-meta-row {
display: flex !important;
flex-wrap: wrap !important;
gap: 2mm 5mm !important;
font-size: 0.82rem !important;
margin-bottom: 1.5mm !important;
}
.recipe-source-line {
display: none !important;
}
.recipe-grid {
display: grid !important;
grid-template-columns: 58mm 1fr !important;
gap: 6mm !important;
width: 100% !important;
min-width: 0 !important;
flex: 1 1 auto !important;
margin-bottom: 1.5mm !important;
}
.ingredients-box {
padding: 6px 8px !important;
padding: 4px 6px !important;
}
.ingredients-list {
gap: 2px !important;
display: flex !important;
flex-direction: column !important;
gap: 1.5px !important;
}
.ingredients-list li {
font-size: 0.80rem !important;
line-height: 1.25 !important;
font-size: 0.76rem !important;
line-height: 1.2 !important;
}
.ingredients-list li.ing-subheading {
font-size: 0.84rem !important;
margin-top: 3px !important;
font-size: 0.80rem !important;
font-weight: 700 !important;
margin-top: 2px !important;
padding-bottom: 1px !important;
}
.recipe-photo-box {
height: 38mm !important;
max-height: 38mm !important;
height: 32mm !important;
max-height: 32mm !important;
margin-bottom: 2mm !important;
}
.recipe-photo-box img {
width: 100% !important;
height: 32mm !important;
max-height: 32mm !important;
object-fit: cover !important;
border-radius: 6px !important;
}
.recipe-photo-empty {
display: none !important;
}
.portion-matrix-table {
font-size: 0.72rem !important;
line-height: 1.2 !important;
font-size: 0.70rem !important;
line-height: 1.18 !important;
}
.portion-matrix-table th {
padding: 1px 2px !important;
font-size: 0.7rem !important;
font-size: 0.68rem !important;
}
.portion-matrix-table td {
@@ -2799,7 +2740,84 @@ body.modal-open {
.recipe-grid:has(.has-portion-matrix) {
grid-template-columns: 68mm 1fr !important;
gap: 8mm !important;
gap: 6mm !important;
}
.instructions-steps {
display: flex !important;
flex-direction: column !important;
gap: 2.5px !important;
}
.step-card {
padding: 2.5px 5px !important;
margin-bottom: 2px !important;
font-size: 0.80rem !important;
line-height: 1.22 !important;
display: flex !important;
gap: 6px !important;
align-items: flex-start !important;
}
.step-badge {
width: 16px !important;
height: 16px !important;
font-size: 0.72rem !important;
flex-shrink: 0 !important;
}
.step-text {
flex: 1 1 auto !important;
}
.notes-box {
margin-top: 2mm !important;
padding: 3px 6px !important;
font-size: 0.76rem !important;
line-height: 1.2 !important;
background: #FFFDF0 !important;
border: 1px dashed #D4C165 !important;
border-radius: 6px !important;
}
.notes-box-title {
font-weight: 700 !important;
font-size: 0.78rem !important;
margin-bottom: 2px !important;
}
.notes-box-empty {
display: block !important;
padding: 3px 6px !important;
margin-top: 2mm !important;
background: #FFFDF0 !important;
border: 1px dashed #D4C165 !important;
}
.notes-blank-lines {
display: flex !important;
flex-direction: column !important;
gap: 6px !important;
margin-top: 2px !important;
}
.notes-blank-line {
border-bottom: 1px dotted rgba(100, 90, 70, 0.4) !important;
height: 8px !important;
width: 100% !important;
}
.print-only {
display: block !important;
}
.no-print {
display: none !important;
}
.page:last-child {
page-break-after: auto !important;
break-after: auto !important;
}
}