Skip to content

feat: directory-tree hero + GSAP motion for structlint - #26

Merged
murilopmachado merged 1 commit into
mainfrom
polish/gsap-and-differentiation
Aug 4, 2026
Merged

feat: directory-tree hero + GSAP motion for structlint#26
murilopmachado merged 1 commit into
mainfrom
polish/gsap-and-differentiation

Conversation

@murilopmachado

Copy link
Copy Markdown
Member

What changed

The marketing site's hero used the same layout as the other four AxeForge
sites built this session: kicker/h1/lede/ctas on the left, a terminal-window
demo box on the right. This PR keeps the brand shell (topbar, footer
cross-links, SEO/JSON-LD, axeforge.css tokens) untouched but gives
structlint its own hero centerpiece and adds GSAP motion.

New hero concept: an animated directory tree with a flagged violation

Replaced the terminal-window demo with a hand-drawn directory tree (plain
CSS rail/elbow connectors, no SVG, no terminal chrome/dot title bar) showing
a sample project:

myapp/
├── cmd/
│   └── main.go
├── internal/
│   ├── domain/
│   └── db/
├── go.mod
└── .env.local          [flagged]

.env.local is visually flagged (accent border/tint + a visible
disallowed_file_pattern badge + a CLI-style verdict line), grounded in the
actual disallowed: ["*.env*", ...] rule and the frozen violation codes
documented in README.md. This matches structlint's real "directory drift"
framing much better than a generic scrolling log ever did. Layout stays
side-by-side (text-left, diagram-right) — only the centerpiece changed.

GSAP motion (CDN: gsap@3.12.5 + ScrollTrigger)

  • Hero entrance timeline: kicker → h1 → lede → ctas → tree panel,
    staggered on load.
  • Tree draw-in: each row's connector lines extend top-down
    (scaleY/scaleX 0→1) and its node fades in, row by row; the flagged
    .env.local node pulses once revealed.
  • Scroll reveals: card grids in each section below the fold fade +
    translateY in, staggered, once per section (ScrollTrigger once: true
    doesn't replay on scroll-up).
  • Reduced motion: gsap.matchMedia() branches on
    prefers-reduced-motion. Nothing is ever hidden by CSS — only JS applies
    autoAlpha:0/scale:0 initial states, and only inside the
    no-preference branch — so a blocked/slow CDN load or reduced motion
    both leave the page fully visible immediately, zero animation. Verified
    via Playwright's reduced_motion="reduce" emulation: computed
    opacity: 1 on every hero/tree/section element, tree lines at full
    scale, no tween.

Verification

  • Served web/ locally, screenshotted at 1440×1600 and 375×1400 (Playwright
    • system chromium, real wall-clock waits so GSAP's rAF ticker settles
      before capture — headless --virtual-time-budget doesn't reliably drive
      GSAP's ticker, so raw CLI screenshots mid-animation aren't representative).
      Read every image: tree renders correctly, violation node reads clearly,
      no terminal-window silhouette left, hero collapses to one column on
      mobile, all section reveals resolve to fully visible after scroll.
  • document.documentElement.scrollWidth === clientWidth confirmed at both
    375px and 1440px — no horizontal overflow.
  • node detect.mjs --json (impeccable anti-pattern detector): identical
    advisory findings to the pre-existing main file (grid background,
    single-font false-positive, em-dash density) — no new anti-patterns
    introduced.
  • No console errors/pageerrors during load or scroll (checked via
    Playwright console/pageerror listeners).
  • Re-ran the full 5-dimension audit — 20/20, holding the file's prior
    score:
    • Accessibility: 4/4 — reduced-motion hard-verified as above; tree
      connector lines are aria-hidden; the tree <ul> has a descriptive
      aria-label; violation info is conveyed via visible text/badge, not
      hover-only; no focusable elements ever left in a hidden pre-reveal state.
    • Performance: 4/4 — GSAP/ScrollTrigger scripts load at the end of
      <body> (non-blocking); all animation uses transform properties
      (x/y/scale) per GSAP performance guidance, no layout thrashing.
    • Theming: 4/4 — every new color is var(--af-*) or reuses
      already-audited semantic tones (feed-tone-*); no new hardcoded colors.
    • Responsive: 4/4 — no horizontal scroll at 375px or 1440px; tree
      shrinks font/rail width under 480px; violation badge wraps onto its own
      line via flex-basis: 100%.
    • Implementation Integrity: 4/4 — progressive enhancement (page is
      fully visible with zero JS/GSAP failure); ScrollTrigger reveals fire
      once per section via once: true, no replay on scroll-direction change.

No Co-Authored-By line.

Replace the generic terminal-window hero (shared verbatim across every
AxeForge marketing site) with a hero built around structlint's actual
mechanism: an animated directory tree with connecting branch lines and
one node flagged as a violation, matching the "directory drift" framing
in the product copy.

- New centerpiece: a hand-authored file tree (myapp/, cmd/main.go,
  internal/{domain,db}, go.mod, .env.local) drawn with plain CSS
  rail/elbow connectors (no SVG, no terminal chrome), with .env.local
  flagged via accent color + a visible disallowed_file_pattern badge and
  a CLI-style verdict line, grounded in the real --disallowed rule and
  frozen violation codes from README.md.
- GSAP (CDN) drives: a hero entrance timeline (kicker -> h1 -> lede ->
  ctas -> tree panel), a top-down tree "draw-in" (branches extend via
  scaleY/scaleX, nodes fade in row by row) with the flagged node
  pulsing once revealed, and once-per-section scroll reveals for the
  card grids below the fold.
- Reduced motion is a hard branch via gsap.matchMedia(): nothing is
  ever hidden by CSS, so a failed/blocked CDN load or
  prefers-reduced-motion both leave the page fully visible immediately
  with zero animation -- verified via Playwright's reduced-motion
  media emulation (opacity 1, tree fully drawn, no tween).
- Brand shell (topbar, footer cross-links, SEO/JSON-LD, axeforge.css
  tokens) untouched; side-by-side hero layout kept, only the
  centerpiece and composition change.
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

✅ PR title follows the required format

Current title: feat: directory-tree hero + GSAP motion for structlint

@murilopmachado
murilopmachado merged commit 9a7c5fb into main Aug 4, 2026
5 of 6 checks passed
@murilopmachado
murilopmachado deleted the polish/gsap-and-differentiation branch August 4, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant