Set preparation steps background to beige and hide chapter divider pages during search

This commit is contained in:
2026-10-16 21:01:51 +02:00
parent d4b00ccde2
commit 3760ad0e3f
2 changed files with 7 additions and 17 deletions
+2
View File
@@ -681,6 +681,8 @@
display: flex;
gap: 14px;
align-items: flex-start;
background: var(--creme);
background-color: var(--creme);
}
.step-badge {
+5 -17
View File
@@ -11,7 +11,7 @@
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
<link rel="alternate icon" type="image/x-icon" href="/favicon.ico">
<link rel="apple-touch-icon" href="/static/apple-touch-icon.png">
<link rel="stylesheet" href="/static/cookbook.css?v=4.6.5">
<link rel="stylesheet" href="/static/cookbook.css?v=4.6.6">
<style id="print-engine-styles">
/* Auf dem Bildschirm: Cover, Inhaltsverzeichnis und Seitenzahlen ausblenden */
@media screen {
@@ -378,8 +378,8 @@
display: flex !important;
gap: 6px !important;
align-items: flex-start !important;
background: rgba(255, 255, 255, 0.6) !important;
background-color: rgba(255, 255, 255, 0.6) !important;
background: var(--creme, #FAF6F0) !important;
background-color: var(--creme, #FAF6F0) !important;
border-radius: 6px !important;
}
@@ -1401,7 +1401,6 @@
}
let matchedCount = 0;
const chaptersWithMatches = new Set();
recipeCards.forEach(card => {
const titleEl = card.querySelector('.recipe-title');
@@ -1411,25 +1410,14 @@
if (match) {
card.classList.remove('search-hidden');
matchedCount++;
let prev = card.previousElementSibling;
while (prev) {
if (prev.classList.contains('divider')) {
chaptersWithMatches.add(prev.id);
break;
}
prev = prev.previousElementSibling;
}
} else {
card.classList.add('search-hidden');
}
});
// Beim Suchen Kapitelseiten komplett ausblenden
dividers.forEach(div => {
if (chaptersWithMatches.has(div.id)) {
div.classList.remove('search-hidden');
} else {
div.classList.add('search-hidden');
}
div.classList.add('search-hidden');
});
if (emptyState) {