Set preparation steps background to beige and hide chapter divider pages during search
This commit is contained in:
@@ -681,6 +681,8 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
gap: 14px;
|
gap: 14px;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
|
background: var(--creme);
|
||||||
|
background-color: var(--creme);
|
||||||
}
|
}
|
||||||
|
|
||||||
.step-badge {
|
.step-badge {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
|
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
|
||||||
<link rel="alternate icon" type="image/x-icon" href="/favicon.ico">
|
<link rel="alternate icon" type="image/x-icon" href="/favicon.ico">
|
||||||
<link rel="apple-touch-icon" href="/static/apple-touch-icon.png">
|
<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">
|
<style id="print-engine-styles">
|
||||||
/* Auf dem Bildschirm: Cover, Inhaltsverzeichnis und Seitenzahlen ausblenden */
|
/* Auf dem Bildschirm: Cover, Inhaltsverzeichnis und Seitenzahlen ausblenden */
|
||||||
@media screen {
|
@media screen {
|
||||||
@@ -378,8 +378,8 @@
|
|||||||
display: flex !important;
|
display: flex !important;
|
||||||
gap: 6px !important;
|
gap: 6px !important;
|
||||||
align-items: flex-start !important;
|
align-items: flex-start !important;
|
||||||
background: rgba(255, 255, 255, 0.6) !important;
|
background: var(--creme, #FAF6F0) !important;
|
||||||
background-color: rgba(255, 255, 255, 0.6) !important;
|
background-color: var(--creme, #FAF6F0) !important;
|
||||||
border-radius: 6px !important;
|
border-radius: 6px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1401,7 +1401,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
let matchedCount = 0;
|
let matchedCount = 0;
|
||||||
const chaptersWithMatches = new Set();
|
|
||||||
|
|
||||||
recipeCards.forEach(card => {
|
recipeCards.forEach(card => {
|
||||||
const titleEl = card.querySelector('.recipe-title');
|
const titleEl = card.querySelector('.recipe-title');
|
||||||
@@ -1411,25 +1410,14 @@
|
|||||||
if (match) {
|
if (match) {
|
||||||
card.classList.remove('search-hidden');
|
card.classList.remove('search-hidden');
|
||||||
matchedCount++;
|
matchedCount++;
|
||||||
let prev = card.previousElementSibling;
|
|
||||||
while (prev) {
|
|
||||||
if (prev.classList.contains('divider')) {
|
|
||||||
chaptersWithMatches.add(prev.id);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
prev = prev.previousElementSibling;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
card.classList.add('search-hidden');
|
card.classList.add('search-hidden');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Beim Suchen Kapitelseiten komplett ausblenden
|
||||||
dividers.forEach(div => {
|
dividers.forEach(div => {
|
||||||
if (chaptersWithMatches.has(div.id)) {
|
div.classList.add('search-hidden');
|
||||||
div.classList.remove('search-hidden');
|
|
||||||
} else {
|
|
||||||
div.classList.add('search-hidden');
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (emptyState) {
|
if (emptyState) {
|
||||||
|
|||||||
Reference in New Issue
Block a user