Speisekarte mobil: alle Kategorien auf einen Blick, beim Scrollen angeheftet; weiße Karten zu zweit
- Kategorie-Chips umbrechend sichtbar, beim Scrollen kompakte, fixierte Leiste unter der Navigation (Platzhalter hält die Höhe) - Handy: weiße Karten zweispaltig, rote Specials und Bucket-Promo weiter über volle Breite - Chicken-Wings-Classic-Kasten: Körnung als Überblendung statt Hintergrund-Ebene (iOS zeigte graue Fläche), Schrift wieder hell - Speisekarte-Kopf mobil: Burger tiefer, damit Zutaten nicht über dem Text liegen Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
08f687822f
commit
455d60a846
2 files changed
+52
-12
No files matched your search
+22
-1
@@ -145,8 +145,29 @@
|
||||
}, { threshold: 0 }).observe(heroEl);
|
||||
}
|
||||
|
||||
/* ---------- Speisekarte: aktive Kategorie ---------- */
|
||||
/* ---------- Speisekarte: Kategorien anheften ---------- */
|
||||
var catNav = $('.cat-nav');
|
||||
if (catNav) {
|
||||
var stuck = false;
|
||||
var checkStuck = function () {
|
||||
var navH = document.body.classList.contains('nav-visible') ? ((nav && nav.offsetHeight) || 0) : 0;
|
||||
var top = catNav.getBoundingClientRect().top;
|
||||
var shouldStick = top < navH;
|
||||
if (shouldStick === stuck) return;
|
||||
stuck = shouldStick;
|
||||
if (stuck) catNav.style.height = catNav.offsetHeight + 'px';
|
||||
else catNav.style.height = '';
|
||||
catNav.classList.toggle('is-stuck', stuck);
|
||||
};
|
||||
window.addEventListener('scroll', checkStuck, { passive: true });
|
||||
window.addEventListener('resize', function () {
|
||||
if (stuck) { stuck = false; catNav.classList.remove('is-stuck'); catNav.style.height = ''; }
|
||||
checkStuck();
|
||||
});
|
||||
checkStuck();
|
||||
}
|
||||
|
||||
/* ---------- Speisekarte: aktive Kategorie ---------- */
|
||||
if (catNav && 'IntersectionObserver' in window) {
|
||||
var links = $$('a', catNav);
|
||||
var list = $('ul', catNav);
|
||||
|
||||
Reference in new issue
Block a user