Instatic icon indicating copy to clipboard operation
Instatic copied to clipboard

[Bug]: No navigation menu on tablet/phone breakpoints

Open borskyj opened this issue 4 months ago • 1 comments

Summary

Severity: High — primary site navigation was completely inaccessible on tablet and phone Environment: Instatic CMS site, breakpoints Mobile 375px / Tablet 768px / Desktop 1440px

Summary

On tablet (768px) and phone (375px) viewports, the header showed only the logo and the "Rezervovat konzultaci" CTA button. The full nav was invisible, with no hamburger menu or other mechanism to reach it — mobile/tablet visitors had no way to navigate the site.

Root Cause

Two compounding issues, found by reading the live header markup/CSS and rendering both breakpoints:

  1. Nav hidden below 1024px with no replacement. The homepage nav carried class sy-hide-sub, styled display: none !important; and only restored at @media (min-width: 1024px). Both non-desktop breakpoints (375px, 768px) fall under that threshold, so the nav vanished with no fallback.
  2. No shared header template. There is no site-wide ("everywhere") header template — each of the pages carries its own independently duplicated header copy, so pages had drifted apart. One page, for example, didn't even have the sy-hide-sub class, so its nav wasn't hidden but had no wrap handling for narrow screens either (overflow risk).

Resolution

Built and manually rolled out to all pages (no shared template existed to apply it once):

  • Global CSS classes (.sy-mobile-toggle, .sy-mobile-toggle-bar, .sy-mobile-panel) and a site-wide src/scripts/mobile-menu.js toggle script.
  • Each page's header patched individually with a hamburger button + slide-down nav panel, and sy-hide-sub added where missing.
  • Verified visually at 375px and 768px across multiple pages — old nav correctly hidden, hamburger visible, panel opens with all links.

Follow-up / Platform Gap

The underlying cause — no shared header template, so every page's header must be patched by hand — is still true. Any future header change (nav items, logo, styling) will again require touching all 11 pages individually instead of one template. Is per-page header duplication expected behavior, or is there a supported "everywhere"/global template mechanism this site isn't using? If the latter is missing from the platform, that's the real fix needed here.

Steps to reproduce

  1. Open any page of the site at a viewport ≤1023px wide (tablet or phone).
  2. Observe the header: only logo + CTA button render.
  3. No hamburger icon, no way to access subsections.

Expected behavior

Below desktop width, the nav should collapse into a hamburger/drawer menu rather than disappearing.

Actual behavior

Nav disappears entirely with nothing standing in to replace it.

Version or commit

0.0.13

Deployment mode

Docker Compose with SQLite

Logs or screenshots


borskyj avatar Jul 28 '26 14:07 borskyj

Closing this — on further investigation this isn't actually a bug in Instatic. The everywhere page-template target already exists in the codebase (src/core/page-tree/pageTemplate.ts) for exactly this purpose: a single shared layout (e.g. header) wrapped around every page via a base.outlet.

The missing mobile nav we hit was caused by our own site not using that feature — each page had its own independently duplicated header copy instead of inheriting from an everywhere template, so the responsive nav fix had to be hand-patched onto all 11 pages individually. That's a site-authoring gap on our end, not a platform defect. Apologies for the noise.

borskyj-symph avatar Jul 28 '26 14:07 borskyj-symph