// Top-level chrome — viewport switcher, page selector, header, footer function Icon({ name, size = 18, stroke = 1.6 }) { const paths = { search: <>, user: <>, bag: <>, heart: , heartFill: , menu: <>, close: <>, chevR: , chevD: , chevL: , arrR: <>, arrUR: <>, plus: <>, minus: , check: , star: , starFill: , chat: <>, spark: <>, leaf: <>, moon: , shield: , flame: <>, brain: <>, sun: <>, desktop: <>, tablet: <>, mobile: <>, }; return ( {paths[name]} ); }; const Logo = ({ small }) => (
nkherbal. est. 2008 · andheri, mumbai
); // Top fixed chrome function TopChrome({ viewport, setViewport, page, setPage, theme, toggleTheme }) { const pages = [ 'Home', 'Shop', 'Product', 'Cart', 'Checkout', 'About', 'Ingredients', 'Journal', 'Contact', 'Account' ]; return (
nkherbal redesign · v1
{[ { v: 'desktop', i: 'desktop', l: 'Desktop' }, { v: 'tablet', i: 'tablet', l: 'Tablet' }, { v: 'mobile', i: 'mobile', l: 'Mobile' }, ].map(o => ( ))}
); }; // Site header (inside the viewport) function Header({ vp, page, goto, openCart, openSearch, cartCount, openQuiz }) { const [mobileNav, setMobileNav] = React.useState(false); const [scrolled, setScrolled] = React.useState(false); const isMobile = vp === 'mobile'; React.useEffect(() => { const el = document.querySelector('.viewport'); if (!el) return; const onScroll = () => setScrolled(el.scrollTop > 60); el.addEventListener('scroll', onScroll, { passive: true }); return () => el.removeEventListener('scroll', onScroll); }, []); const isHome = page === 'Home'; const headerBg = (isHome && !scrolled) ? 'transparent' : 'var(--bg)'; const headerShadow = (!isHome || scrolled) ? '0 1px 20px rgba(0,0,0,0.07)' : 'none'; const isTablet = vp === 'tablet'; const navItems = [ { id: 'Shop', label: 'Shop' }, { id: 'Ingredients', label: 'Ingredients' }, { id: 'About', label: 'Our Story' }, { id: 'Journal', label: 'Journal' }, { id: 'Contact', label: 'Contact' }, ]; return (
{/* announcement bar */}
{[0,1].map(i => (
{[ 'FREE SHIPPING ACROSS INDIA', 'USE CODE SAVE499 · SAVE ₹499 ON EVERY ORDER', 'FSSAI APPROVED · ISO 9001-2015', 'COLD-PROCESSED · NO PRESERVATIVES', 'FREE SHIPPING ACROSS INDIA', 'USE CODE SAVE499 · SAVE ₹499 ON EVERY ORDER', 'FSSAI APPROVED · ISO 9001-2015', 'COLD-PROCESSED · NO PRESERVATIVES', ].map((text, j) => ( {text} ))}
))}
{!isMobile && ( )}
{!isMobile && !isTablet && ( )} {!isMobile && } {isMobile && ( )}
{mobileNav && (
)}
); }; // Footer function Footer({ vp, goto }) { const isMobile = vp === 'mobile'; return ( ); }; window.Icon = Icon; window.Logo = Logo; window.TopChrome = TopChrome; window.Header = Header; window.Footer = Footer;