diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..d42cb3b Binary files /dev/null and b/.DS_Store differ diff --git a/BackGroud-news.png b/BackGroud-news.png new file mode 100644 index 0000000..ebeb81e Binary files /dev/null and b/BackGroud-news.png differ diff --git a/Pizza Diavolo angeschnitten.png b/Pizza Diavolo angeschnitten.png new file mode 100644 index 0000000..ce8de3d Binary files /dev/null and b/Pizza Diavolo angeschnitten.png differ diff --git a/Pizza Diavolo.png b/Pizza Diavolo.png new file mode 100644 index 0000000..4c7398e Binary files /dev/null and b/Pizza Diavolo.png differ diff --git a/icons/cat-akut.png b/icons/cat-akut.png new file mode 100644 index 0000000..007192c Binary files /dev/null and b/icons/cat-akut.png differ diff --git a/icons/cat-einfach.png b/icons/cat-einfach.png new file mode 100644 index 0000000..af42e85 Binary files /dev/null and b/icons/cat-einfach.png differ diff --git a/icons/cat-fleisch.png b/icons/cat-fleisch.png new file mode 100644 index 0000000..d84bf93 Binary files /dev/null and b/icons/cat-fleisch.png differ diff --git a/icons/cat-goettlich.png b/icons/cat-goettlich.png new file mode 100644 index 0000000..3bb9250 Binary files /dev/null and b/icons/cat-goettlich.png differ diff --git a/icons/cat-kaese.png b/icons/cat-kaese.png new file mode 100644 index 0000000..5185fd6 Binary files /dev/null and b/icons/cat-kaese.png differ diff --git a/icons/cat-kinder.png b/icons/cat-kinder.png new file mode 100644 index 0000000..e805e89 Binary files /dev/null and b/icons/cat-kinder.png differ diff --git a/icons/cat-marine.png b/icons/cat-marine.png new file mode 100644 index 0000000..1eac33d Binary files /dev/null and b/icons/cat-marine.png differ diff --git a/icons/cat-neuheit.png b/icons/cat-neuheit.png new file mode 100644 index 0000000..8052626 Binary files /dev/null and b/icons/cat-neuheit.png differ diff --git a/icons/cat-ohne-oliven.png b/icons/cat-ohne-oliven.png new file mode 100644 index 0000000..75ecaae Binary files /dev/null and b/icons/cat-ohne-oliven.png differ diff --git a/icons/cat-ohne-pilze.png b/icons/cat-ohne-pilze.png new file mode 100644 index 0000000..0a460f0 Binary files /dev/null and b/icons/cat-ohne-pilze.png differ diff --git a/icons/cat-ohne-zwiebeln.png b/icons/cat-ohne-zwiebeln.png new file mode 100644 index 0000000..57e387f Binary files /dev/null and b/icons/cat-ohne-zwiebeln.png differ diff --git a/icons/cat-vegetarier.png b/icons/cat-vegetarier.png new file mode 100644 index 0000000..eadb231 Binary files /dev/null and b/icons/cat-vegetarier.png differ diff --git a/icons/extra-angebot.png b/icons/extra-angebot.png new file mode 100644 index 0000000..1ccfc82 Binary files /dev/null and b/icons/extra-angebot.png differ diff --git a/icons/extra-unassigned.jpg b/icons/extra-unassigned.jpg new file mode 100644 index 0000000..7d3d2b2 Binary files /dev/null and b/icons/extra-unassigned.jpg differ diff --git a/index.html b/index.html index 49baf5c..4368f03 100644 --- a/index.html +++ b/index.html @@ -22,89 +22,414 @@ html, body { margin: 0; min-height: 100%; - height: 100%; background: var(--bg); color: var(--paper); font-family: "Outfit", system-ui, sans-serif; } + body { + display: flex; + flex-direction: column; + } + body.preview-open { overflow: hidden; } + .cat-nav { + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 40; + flex-shrink: 0; + background: linear-gradient(180deg, rgba(26, 21, 16, 0.97) 0%, rgba(26, 21, 16, 0.88) 85%, transparent 100%); + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px); + border-bottom: 1px solid rgba(244, 237, 228, 0.1); + padding: 0.65rem clamp(0.5rem, 2vw, 1rem) 0.75rem; + transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease; + will-change: transform; + } + + .cat-nav.cat-nav--hidden { + transform: translateY(-100%); + opacity: 0; + pointer-events: none; + } + + @media (prefers-reduced-motion: reduce) { + .cat-nav { + transition-duration: 0.01ms; + } + } + + /** Shop-Bereich unter dem News-Block; Abstand oben, wenn Kategorien-Leiste eingeblendet ist */ + .page-body { + flex: 1 1 auto; + min-height: 0; + width: 100%; + display: flex; + flex-direction: column; + transition: padding-top 0.35s ease; + } + + body.cat-nav-visible .page-body { + padding-top: clamp(4.25rem, 11vw, 5.5rem); + } + + .news-hero { + position: relative; + flex: 0 0 auto; + min-height: 100vh; + min-height: 100dvh; + display: flex; + flex-direction: column; + align-items: flex-start; + justify-content: center; + gap: 0; + padding: clamp(1.5rem, 4vw, 3rem); + padding-right: min(42vw, 28rem); + text-align: left; + background-color: var(--bg); + background-image: + linear-gradient( + to right, + var(--bg) 0%, + rgba(26, 21, 16, 0.97) 14%, + rgba(26, 21, 16, 0.88) 28%, + rgba(26, 21, 16, 0.5) 52%, + rgba(26, 21, 16, 0.12) 78%, + transparent 100% + ), + url("BackGroud-news.png"); + background-size: cover; + background-position: right center; + background-repeat: no-repeat; + border-bottom: 1px solid rgba(244, 237, 228, 0.08); + } + + .news-hero__inner { + position: relative; + z-index: 1; + max-width: min(36rem, 100%); + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 1.15rem; + } + + .news-hero__badge { + display: inline-block; + font-size: clamp(0.7rem, 1.5vw, 0.82rem); + font-weight: 600; + letter-spacing: 0.2em; + text-transform: uppercase; + color: #e8c56a; + } + + .news-hero__title { + font-family: "Bebas Neue", Impact, sans-serif; + font-size: clamp(2.75rem, 10vw, 4.5rem); + line-height: 0.95; + letter-spacing: 0.03em; + margin: 0; + max-width: 16ch; + color: var(--paper); + } + + .news-hero__text { + margin: 0; + max-width: 28rem; + font-size: clamp(0.95rem, 2vw, 1.1rem); + font-weight: 300; + line-height: 1.55; + color: var(--muted); + } + + .news-hero__text strong { + color: var(--paper); + font-weight: 500; + } + + .news-hero__hint { + position: absolute; + bottom: clamp(1rem, 3vh, 2rem); + left: clamp(1.5rem, 4vw, 3rem); + font-size: 0.75rem; + font-weight: 500; + letter-spacing: 0.12em; + text-transform: uppercase; + color: var(--muted); + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 0.35rem; + } + + .news-hero__hint::after { + content: ""; + width: 1px; + height: 2rem; + background: linear-gradient(180deg, rgba(244, 237, 228, 0.35), transparent); + animation: news-hint-bob 1.8s ease-in-out infinite; + } + + @keyframes news-hint-bob { + 0%, 100% { transform: translateY(0); opacity: 0.6; } + 50% { transform: translateY(6px); opacity: 1; } + } + + @media (prefers-reduced-motion: reduce) { + .news-hero__hint::after { + animation: none; + } + } + + @media (max-width: 640px) { + .news-hero { + padding-right: clamp(1rem, 4vw, 1.5rem); + background-image: + linear-gradient( + to right, + var(--bg) 0%, + rgba(26, 21, 16, 0.98) 32%, + rgba(26, 21, 16, 0.82) 58%, + rgba(26, 21, 16, 0.35) 82%, + rgba(26, 21, 16, 0.06) 96%, + transparent 100% + ), + url("BackGroud-news.png"); + background-position: 82% center; + } + } + + .cat-nav__scroll { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + gap: 0.5rem; + overflow-x: auto; + overflow-y: hidden; + padding-bottom: 0.15rem; + scroll-snap-type: x proximity; + -webkit-overflow-scrolling: touch; + scrollbar-width: thin; + scrollbar-color: rgba(196, 92, 38, 0.45) transparent; + } + + .cat-nav__scroll::-webkit-scrollbar { + height: 4px; + } + + .cat-nav__scroll::-webkit-scrollbar-thumb { + background: rgba(196, 92, 38, 0.45); + border-radius: 999px; + } + + .cat-nav__btn { + flex: 0 0 auto; + scroll-snap-align: start; + display: flex; + flex-direction: column; + align-items: center; + justify-content: flex-start; + gap: 0.35rem; + min-width: 5rem; + max-width: 6.25rem; + padding: 0.4rem 0.45rem 0.5rem; + border: 1px solid rgba(244, 237, 228, 0.12); + border-radius: 10px; + background: rgba(35, 28, 21, 0.65); + color: var(--paper); + font-family: inherit; + cursor: pointer; + transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease; + } + + .cat-nav__btn:hover { + border-color: rgba(232, 197, 106, 0.45); + background: rgba(45, 36, 28, 0.75); + } + + .cat-nav__btn.is-active { + border-color: rgba(196, 92, 38, 0.85); + background: rgba(196, 92, 38, 0.18); + box-shadow: 0 0 0 1px rgba(196, 92, 38, 0.25); + } + + .cat-nav__btn.is-active .cat-nav__icon-wrap { + filter: brightness(1.12) saturate(1.08); + } + + .cat-nav__icon-wrap { + width: 3.75rem; + height: 3.75rem; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + border: none; + background: transparent; + color: #e8c56a; + } + + .cat-nav__icon-wrap svg, + .cat-nav__icon-wrap .cat-icon-img { + width: 3.25rem; + height: 3.25rem; + display: block; + } + + .cat-nav__icon-wrap .cat-icon-img { + object-fit: contain; + } + + .cat-nav__label { + font-size: 0.62rem; + font-weight: 600; + line-height: 1.15; + text-align: center; + color: var(--paper); + letter-spacing: 0.02em; + } + + .cat-nav__hint { + font-size: 0.58rem; + font-weight: 300; + line-height: 1.2; + text-align: center; + color: var(--muted); + max-width: 5rem; + } + + .filter-empty { + display: none; + flex: 1; + min-height: 40vh; + align-items: center; + justify-content: center; + padding: 2rem; + text-align: center; + color: var(--muted); + font-size: 0.95rem; + font-weight: 300; + } + + .filter-empty.is-visible { + display: flex; + } + .page { width: 100vw; - height: 100vh; + flex: 1 1 auto; + min-height: 0; display: flex; flex-direction: column; } - .pizza-row { - flex: 1 1 50%; + /** Drei Pizzen nebeneinander; sichtbare Karten teilen sich die Breite gleichmäßig */ + .pizza-grid { + flex: 1 1 auto; min-height: 0; width: 100%; display: flex; flex-direction: row; + flex-wrap: nowrap; align-items: stretch; - border-bottom: 1px solid rgba(244, 237, 228, 0.08); + gap: 1px; + background: rgba(244, 237, 228, 0.1); } - .pizza-row:last-child { - border-bottom: none; - } - - .pizza-row--image-right .text-col { - order: 1; - } - - .pizza-row--image-right .img-col { - order: 2; - } - - .pizza-row--image-left .text-col { - order: 2; - } - - .pizza-row--image-left .img-col { - order: 1; + .pizza-row { + flex: 1 1 0; + min-width: 0; + min-height: 0; + width: auto; + display: flex; + flex-direction: column; + align-items: stretch; + background: linear-gradient(180deg, #231c15 0%, rgba(26, 21, 16, 0.98) 45%, var(--bg) 100%); } .text-col, .img-col { - flex: 1 1 50%; min-width: 0; min-height: 0; display: flex; align-items: center; - padding: clamp(1rem, 3vw, 2.5rem); } .text-col { + flex: 0 0 auto; flex-direction: column; - justify-content: center; - align-items: flex-start; - background: linear-gradient(135deg, rgba(26, 21, 16, 0.97) 0%, #231c15 100%); - } - - .pizza-row--image-right .text-col { - padding-right: clamp(0.75rem, 2vw, 1.5rem); - } - - .pizza-row--image-left .text-col { - padding-left: clamp(0.75rem, 2vw, 1.5rem); + justify-content: flex-start; + align-items: center; + text-align: center; + padding: clamp(0.65rem, 1.8vw, 1.1rem) clamp(0.5rem, 1.2vw, 0.85rem) 0.35rem; + background: transparent; } .img-col { + flex: 1 1 auto; position: relative; - background: radial-gradient(ellipse 80% 70% at 50% 50%, #2a2219 0%, var(--bg) 75%); + justify-content: center; + align-items: center; + padding: clamp(0.35rem, 1vw, 0.75rem) clamp(0.35rem, 1vw, 0.65rem) clamp(0.5rem, 1.2vw, 0.85rem); + background: radial-gradient(ellipse 75% 80% at 50% 45%, #2a2219 0%, transparent 72%); } - .pizza-row--image-right .img-col { - justify-content: flex-end; + .pizza-grid h1 { + font-size: clamp(1.45rem, 2.8vw, 2.35rem); + margin-bottom: 0.35rem; } - .pizza-row--image-left .img-col { - justify-content: flex-start; + .pizza-grid .subtitle { + margin-bottom: 0.5rem; + } + + .pizza-grid .details { + max-width: 100%; + font-size: clamp(0.78rem, 1.25vw, 0.92rem); + line-height: 1.45; + } + + .pizza-grid .price { + margin-top: 0.65rem; + font-size: clamp(0.95rem, 1.5vw, 1.1rem); + } + + .pizza-grid .pizza-badges { + justify-content: center; + max-width: 100%; + margin: 0.2rem 0 0.45rem; + } + + .pizza-grid .pizza-frame { + width: min(100%, 44vmin); + height: min(100%, 44vmin); + } + + @media (max-width: 720px) { + .pizza-grid { + flex-direction: column; + flex-wrap: nowrap; + } + + .pizza-row { + flex: 0 0 auto; + width: 100%; + border-bottom: 1px solid rgba(244, 237, 228, 0.08); + } + + .pizza-row:last-child { + border-bottom: none; + } + + .pizza-grid .pizza-frame { + width: min(100%, min(68vmin, 82vw)); + height: min(100%, min(68vmin, 82vw)); + } } .img-col--clickable { @@ -189,6 +514,64 @@ color: var(--paper); } + .pizza-badges { + display: flex; + flex-wrap: wrap; + gap: 0.45rem; + margin: 0.35rem 0 0.85rem; + max-width: 22rem; + } + + .pizza-badge { + width: 3.1rem; + height: 3.1rem; + border-radius: 50%; + display: inline-flex; + align-items: center; + justify-content: center; + flex-shrink: 0; + background: transparent; + border: none; + box-shadow: none; + color: #e8c56a; + cursor: default; + transition: transform 0.15s ease, filter 0.15s ease; + } + + .pizza-badge:hover { + transform: scale(1.06); + filter: brightness(1.08); + } + + .pizza-badge svg, + .pizza-badge .cat-icon-img { + width: 2.75rem; + height: 2.75rem; + display: block; + } + + .pizza-badge .cat-icon-img { + object-fit: contain; + } + + .pizza-badge--preview { + width: 2.65rem; + height: 2.65rem; + } + + .pizza-badge--preview svg, + .pizza-badge--preview .cat-icon-img { + width: 2.35rem; + height: 2.35rem; + } + + .preview-badges { + display: flex; + flex-wrap: wrap; + gap: 0.4rem; + margin: 0 0 1rem; + } + /* ——— Preview ——— */ .preview { position: fixed; @@ -543,10 +926,40 @@ + +
-
+
+
+

Aktion & Neuigkeiten

+

Wochenangebot: Diavolo scharf

+

+ Bis Sonntag 2 € sparen auf alle großen Pizzen — frisch aus dem Steinofen, + wie immer mit Teig aus 48 Stunden Gare. +

+
+

+ Runter scrollen +

+
+ +
+
+ Keine Pizza passt zu den gewählten Kategorien. +
+ +
+

Klassiker

+

Margherita

Tomate, Mozzarella, Basilikum. Unser Teig über Nacht, Ofen aus Stein. @@ -567,7 +980,17 @@

-
+
+
+

Beliebt

+
+

Salami

+

+ Tomate, Mozzarella, luftgetrocknete Salami. Würzig, saftig, mit leichtem + Paprika-Touch. Für alle, die es etwas kräftiger mögen. +

+

ab 11,00 €

+
+
+ +
-

Beliebt

-

Salami

+

Scharf

+
+

Diavolo

- Tomate, Mozzarella, luftgetrocknete Salami. Würzig, saftig, mit leichtem - Paprika-Touch. Für alle, die es etwas kräftiger mögen. + Tomate, Mozzarella, scharfe Salami, Peperoncini. Feurig und würzig — für + alle, die es richtig scharf mögen.

-

ab 11,00 €

+

ab 12,00 €

+
+
+
+ +
+ +

Pizza

Margherita

+

Zutaten

@@ -668,11 +1109,272 @@ const IMAGE_SWAP_MS = 5000; const PREVIEW_SLIDE_MS = 650; + var CATEGORY_ORDER = [ + "marine", + "fleisch", + "vegetarier", + "kaese", + "akut", + "einfach", + "kinder", + "ohne_zwiebeln", + "ohne_oliven", + "ohne_pilze", + "neuheit", + "goettlich", + ]; + + var CATEGORY_DEFS = { + marine: { + label: "Marine", + hint: "Fisch & Meeresfrüchte", + icon: "icons/cat-marine.png", + }, + fleisch: { + label: "Fleisch", + hint: "Mit Fleisch", + icon: "icons/cat-fleisch.png", + }, + vegetarier: { + label: "Vegetarier", + hint: "Ohne Fleisch", + icon: "icons/cat-vegetarier.png", + }, + kaese: { + label: "Käse", + hint: "Käse-lastig", + icon: "icons/cat-kaese.png", + }, + akut: { + label: "Akut", + hint: "Scharf / würzig", + icon: "icons/cat-akut.png", + }, + einfach: { + label: "Einfach", + hint: "Wenig Zutaten", + icon: "icons/cat-einfach.png", + }, + kinder: { + label: "Für Kinder", + hint: "Mild & kindgerecht", + icon: "icons/cat-kinder.png", + }, + ohne_zwiebeln: { + label: "Ohne Zwiebeln", + hint: "Zwiebel-frei", + icon: "icons/cat-ohne-zwiebeln.png", + }, + ohne_oliven: { + label: "Ohne Oliven", + hint: "Oliven-frei", + icon: "icons/cat-ohne-oliven.png", + }, + ohne_pilze: { + label: "Ohne Pilze", + hint: "Pilz-frei", + icon: "icons/cat-ohne-pilze.png", + }, + neuheit: { + label: "Neuheit", + hint: "Neu im Sortiment", + icon: "icons/cat-neuheit.png", + }, + goettlich: { + label: "Göttlich", + hint: "Besonders empfohlen", + icon: "icons/cat-goettlich.png", + }, + }; + + function escapeAttr(s) { + return String(s) + .replace(/&/g, "&") + .replace(/"/g, """) + .replace(//g, ">"); + } + + function escapeHtml(s) { + return String(s) + .replace(/&/g, "&") + .replace(//g, ">"); + } + + function categoryIconInnerHtml(def) { + if (!def) return ""; + if (def.icon) { + return ( + '' + ); + } + return def.svg || ""; + } + + /** Mehrfachauswahl: Klick toggelt; leer = alle Pizzas sichtbar */ + var activeCategories = []; + + function toggleCategory(id) { + var i = activeCategories.indexOf(id); + if (i >= 0) { + activeCategories.splice(i, 1); + } else { + activeCategories.push(id); + } + } + + function pizzaMatchesFilter(p) { + if (!activeCategories.length) return true; + if (!p.categories || !p.categories.length) return false; + for (var a = 0; a < activeCategories.length; a++) { + if (p.categories.indexOf(activeCategories[a]) !== -1) return true; + } + return false; + } + + function renderCategoryBadges(categoryIds, badgeClass) { + var cls = badgeClass || "pizza-badge"; + if (!categoryIds || !categoryIds.length) return ""; + return categoryIds + .map(function (id) { + var def = CATEGORY_DEFS[id]; + if (!def) return ""; + return ( + '' + + categoryIconInnerHtml(def) + + "" + ); + }) + .join(""); + } + + function mountOverviewBadges() { + document.querySelectorAll("[data-badges-for]").forEach(function (el) { + var idx = parseInt(el.getAttribute("data-badges-for"), 10); + var p = pizzas[idx]; + if (!p || !p.categories) { + el.innerHTML = ""; + return; + } + el.innerHTML = renderCategoryBadges(p.categories); + }); + } + + function getVisibleIndices() { + return pizzas + .map(function (p, i) { + return pizzaMatchesFilter(p) ? i : -1; + }) + .filter(function (i) { + return i >= 0; + }); + } + + function applyFilter() { + var vis = getVisibleIndices(); + var emptyEl = document.getElementById("filter-empty"); + document.querySelectorAll(".pizza-row[data-pizza-index]").forEach(function (row) { + var idx = parseInt(row.getAttribute("data-pizza-index"), 10); + var show = vis.indexOf(idx) !== -1; + row.style.display = show ? "" : "none"; + row.setAttribute("aria-hidden", show ? "false" : "true"); + }); + if (emptyEl) { + if (vis.length === 0) { + emptyEl.classList.add("is-visible"); + emptyEl.removeAttribute("aria-hidden"); + } else { + emptyEl.classList.remove("is-visible"); + emptyEl.setAttribute("aria-hidden", "true"); + } + } + document.querySelectorAll("#cat-nav-scroll .cat-nav__btn").forEach(function (btn) { + var cat = btn.getAttribute("data-cat"); + if (!cat) return; + var match = activeCategories.indexOf(cat) !== -1; + btn.classList.toggle("is-active", match); + btn.setAttribute("aria-pressed", match ? "true" : "false"); + }); + } + + function syncFilterAfterChange() { + applyFilter(); + var vis = getVisibleIndices(); + if (preview.classList.contains("is-visible")) { + if (vis.indexOf(currentIndex) === -1) { + if (vis.length) { + currentIndex = vis[0]; + renderPizza(); + } else { + closePreview(); + } + } + } + } + + function stepPreview(delta) { + var vis = getVisibleIndices(); + if (!vis.length) return; + var pos = vis.indexOf(currentIndex); + if (pos === -1) { + currentIndex = vis[0]; + } else { + var nextPos = (pos + delta + vis.length) % vis.length; + currentIndex = vis[nextPos]; + } + renderPizza(); + } + + function mountCategoryNav() { + var scroll = document.getElementById("cat-nav-scroll"); + if (!scroll) return; + var parts = []; + CATEGORY_ORDER.forEach(function (id) { + var d = CATEGORY_DEFS[id]; + if (!d) return; + parts.push( + '" + ); + }); + scroll.innerHTML = parts.join(""); + scroll.querySelectorAll(".cat-nav__btn").forEach(function (btn) { + btn.addEventListener("click", function () { + var cat = btn.getAttribute("data-cat"); + if (!cat) return; + toggleCategory(cat); + syncFilterAfterChange(); + }); + }); + } + const pizzas = [ { name: "Margherita", image: "magarita.png", imageCut: "magaritta angeschnitten.png", + categories: ["vegetarier", "kaese", "einfach", "kinder", "goettlich"], ingredients: [ "Tomatensauce San Marzano", "Fior di Latte Mozzarella", @@ -693,6 +1395,7 @@ name: "Salami", image: "salami.png", imageCut: "salami angeschnitten.png", + categories: ["fleisch", "akut", "neuheit", "ohne_oliven"], ingredients: [ "Tomatensauce", "Mozzarella", @@ -710,6 +1413,28 @@ { label: "Salz", value: "2,8 g" }, ], }, + { + name: "Diavolo", + image: "Pizza Diavolo.png", + imageCut: "Pizza Diavolo angeschnitten.png", + categories: ["fleisch", "akut", "ohne_pilze", "neuheit"], + ingredients: [ + "Tomatensauce San Marzano", + "Mozzarella", + "Scharfe Salami", + "Peperoncini", + "Olivenöl extra vergine", + "Hefeteig 48h", + ], + macros: [ + { label: "Energie", value: "856 kcal" }, + { label: "Fett", value: "36 g" }, + { label: "davon gesättigt", value: "15 g" }, + { label: "Kohlenhydrate", value: "83 g" }, + { label: "Eiweiß", value: "33 g" }, + { label: "Salz", value: "3,0 g" }, + ], + }, ]; let currentIndex = 0; @@ -770,6 +1495,7 @@ const preview = document.getElementById("preview"); const previewTimerEl = document.getElementById("preview-timer"); const previewTitle = document.getElementById("preview-title"); + const previewBadges = document.getElementById("preview-badges"); const previewIngredients = document.getElementById("preview-ingredients"); const previewMacros = document.getElementById("preview-macros"); const carouselLayerA = document.getElementById("carousel-layer-a"); @@ -901,6 +1627,12 @@ const p = pizzas[currentIndex]; previewTitle.textContent = p.name; + if (previewBadges) { + previewBadges.innerHTML = p.categories + ? renderCategoryBadges(p.categories, "pizza-badge pizza-badge--preview") + : ""; + } + previewIngredients.innerHTML = p.ingredients .map(function (ing) { return "
  • " + ing + "
  • "; @@ -958,13 +1690,11 @@ }); btnPrev.addEventListener("click", function () { - currentIndex = (currentIndex - 1 + pizzas.length) % pizzas.length; - renderPizza(); + stepPreview(-1); }); btnNext.addEventListener("click", function () { - currentIndex = (currentIndex + 1) % pizzas.length; - renderPizza(); + stepPreview(1); }); btnClose.addEventListener("click", closePreview); @@ -999,6 +1729,37 @@ " — (Demo: hier käme der echte Warenkorb.)" ); }); + + (function () { + var newsHero = document.getElementById("news-hero"); + var catNav = document.getElementById("cat-nav"); + if (!newsHero || !catNav) return; + + function applyNewsIntersection(entry) { + var inNews = entry.isIntersecting; + if (inNews) { + catNav.classList.add("cat-nav--hidden"); + document.body.classList.remove("cat-nav-visible"); + catNav.setAttribute("aria-hidden", "true"); + } else { + catNav.classList.remove("cat-nav--hidden"); + document.body.classList.add("cat-nav-visible"); + catNav.setAttribute("aria-hidden", "false"); + } + } + + var io = new IntersectionObserver( + function (entries) { + entries.forEach(applyNewsIntersection); + }, + { root: null, threshold: 0, rootMargin: "0px" } + ); + io.observe(newsHero); + })(); + + mountCategoryNav(); + applyFilter(); + mountOverviewBadges(); })(); diff --git a/indexStyleWhiteRed.html b/indexStyleWhiteRed.html new file mode 100644 index 0000000..73c1858 --- /dev/null +++ b/indexStyleWhiteRed.html @@ -0,0 +1,1808 @@ + + + + + + Pizza + + + + + + + + +
    +
    +
    +

    Aktion & Neuigkeiten

    +

    Wochenangebot: Diavolo scharf

    +

    + Bis Sonntag 2 € sparen auf alle großen Pizzen — frisch aus dem Steinofen, + wie immer mit Teig aus 48 Stunden Gare. +

    +
    +

    + Runter scrollen +

    +
    + +
    +
    + Keine Pizza passt zu den gewählten Kategorien. +
    + +
    +
    +
    +

    Klassiker

    +
    +

    Margherita

    +

    + Tomate, Mozzarella, Basilikum. Unser Teig über Nacht, Ofen aus Stein. + Sanft, säuerlich, klar — wie Neapel, nur auf deinem Bildschirm. +

    +

    ab 9,50 €

    +
    +
    +
    + +
    +
    +
    + +
    +
    +

    Beliebt

    +
    +

    Salami

    +

    + Tomate, Mozzarella, luftgetrocknete Salami. Würzig, saftig, mit leichtem + Paprika-Touch. Für alle, die es etwas kräftiger mögen. +

    +

    ab 11,00 €

    +
    +
    +
    + +
    +
    +
    + +
    +
    +

    Scharf

    +
    +

    Diavolo

    +

    + Tomate, Mozzarella, scharfe Salami, Peperoncini. Feurig und würzig — für + alle, die es richtig scharf mögen. +

    +

    ab 12,00 €

    +
    +
    +
    + +
    +
    +
    +
    +
    +
    + + + + + +