fix: pill modunda telefon link'i gizle (sıkışma sorunu)

Header pill modunda max-width 1100px'e iniyor. Nav + telefon + CTA
3 element sığmıyordu, telefon ile 'Ücretsiz Teklif' butonu üst üste
biniyordu.

Çözüm:
- Telefon link'ine data-pill-hide='true' attribute eklendi
- header-scroll.tsx scroll'da bu elementleri display:none yapıyor
- Pill kapanınca tekrar görünür hale geliyor
- whitespace-nowrap CTA butonuna eklendi (taşma engeli)
This commit is contained in:
Ege Can Komur
2026-05-20 18:56:21 +03:00
parent 8b4129c233
commit d5344443e9
2 changed files with 16 additions and 3 deletions
+10
View File
@@ -29,6 +29,10 @@ export function HeaderScrollEffect() {
if (!mobile && pillWrap && header && navBar && wrap) {
wrap.style.transform = "";
wrap.style.opacity = "";
// Pill modu için data-pill-hide elementlerini gizle/göster
const hidables = document.querySelectorAll<HTMLElement>(
'[data-pill-hide="true"]',
);
if (scrolled) {
pillWrap.style.padding = "12px 16px 0";
header.style.maxWidth = "1100px";
@@ -37,6 +41,9 @@ export function HeaderScrollEffect() {
header.style.boxShadow = "0 8px 24px rgba(0,0,0,0.08)";
navBar.style.height = "52px";
navBar.style.padding = "0 1.25rem";
hidables.forEach((el) => {
el.style.display = "none";
});
} else {
pillWrap.style.padding = "";
header.style.maxWidth = "";
@@ -45,6 +52,9 @@ export function HeaderScrollEffect() {
header.style.boxShadow = "";
navBar.style.height = "";
navBar.style.padding = "";
hidables.forEach((el) => {
el.style.display = "";
});
}
}