Skip to content

feat: typography, scroll-reveal, and HTML cleanup#75

Merged
VatsalSy merged 3 commits into
mainfrom
Savart/frontend-improvements-typography-hero
Mar 20, 2026
Merged

feat: typography, scroll-reveal, and HTML cleanup#75
VatsalSy merged 3 commits into
mainfrom
Savart/frontend-improvements-typography-hero

Conversation

@comphy-bot

Copy link
Copy Markdown
Member

Summary

A frontend audit + improvements pass on comphy-lab.org.

Typography — the biggest visible change

Added Cormorant Garamond (display/headings) + Jost (body) via Google Fonts with async loading and noscript fallback. Both loaded with media="print" onload="this.media='all'" to avoid render-blocking.

  • --font-display applied to all h1h6 globally
  • --font-primary is now Jost with system-ui fallback
  • Hero title: weight 800→600, line-height 1.15, letter-spacing adjusted for serif rendering

Before: system-ui everywhere — invisible, not a design decision
After: Cormorant Garamond headings with Jost body — editorial precision that matches the scientific character of the lab

Hero depth

Film-grain texture overlay on .s-intro::after via inline SVG fractalNoise (opacity 0.035, mix-blend-mode: overlay). Adds subtle depth to the hero background without any new image asset.

HTML cleanup (index.html)

  • Removed dead rellax class + data-rellax-speed attribute (Rellax library was never loaded)
  • Fixed malformed HTML: a </p> tag was sitting outside its container </div>
  • Extracted all inline styles to proper CSS classes:
    • .s-intro__social-icons, .s-intro__icon variants (hero profile icons)
    • .s-intro__cta-btn (Featured Research CTA button)
    • .s-about__news-icon (newspaper icon in news header)
    • .s-featured-wrapper and children — replaces a 30-line <style> block with 7 !important rules

Scroll-reveal animations

Elements with [data-animate-el] inside [data-animate-block] now animate in on scroll:

  • CSS: opacity: 0; transform: translateY(24px) → visible, with stagger delays for child 2/3/4
  • JS: IntersectionObserver in utils.js adds .is-inview at threshold 0.12; graceful fallback if IO unavailable
  • Full prefers-reduced-motion guard disables all transitions + hero fadeInUp animations

Accessibility

  • Added aria-label to all three hero social icon links (ORCID, GitHub, Scholar)
  • prefers-reduced-motion guards on hero entry animations

Tests

All 48 tests pass. Clean Jekyll build.

Typography
- Add Cormorant Garamond (display) + Jost (body) via Google Fonts
  with print-media async loading and noscript fallback
- Apply --font-display to all headings; body uses --font-primary (Jost)
  with system-ui fallback chain
- Hero title: switch to Cormorant Garamond, adjust weight (800→600),
  tighten line-height (1.15) and letter-spacing for serif rendering

Hero depth
- Add SVG fractalNoise grain overlay on .s-intro::after for subtle
  texture (opacity 0.035, mix-blend-mode: overlay)

Markup cleanup (index.html)
- Remove dead rellax class + data-rellax-speed attribute (library never loaded)
- Fix malformed HTML: misplaced </p> outside its container div
- Extract all inline styles to CSS classes:
  - .s-intro__social-icons (hero profile icon row)
  - .s-intro__icon / --orcid / --github / --scholar
  - .s-intro__cta-btn (Featured Research button)
  - .s-about__news-icon (newspaper icon in news header)
  - .s-featured-wrapper and children (replaces 30-line !important style block)
- Remove <style> block with 7 !important overrides from index.html

Scroll-reveal
- CSS: [data-animate-block] children start opacity:0 translateY(24px),
  transition to visible when .is-inview is added; stagger delays for
  2nd/3rd/4th children; prefers-reduced-motion guard disables all
- JS (utils.js): IntersectionObserver wires .is-inview on scroll entry,
  threshold 0.12; graceful fallback if IO unavailable

Accessibility
- Add aria-label to all hero social icon links
- Add prefers-reduced-motion guards for hero fadeInUp animations

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e1fb39c937

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread assets/js/utils.js Outdated
@VatsalSy VatsalSy self-assigned this Mar 20, 2026
Reveal animated blocks when IntersectionObserver is unavailable so home content does not stay hidden.

Skip iframe embeds when cloning featured research cards to avoid loading YouTube players on the homepage.
@VatsalSy
VatsalSy merged commit 4d5e06c into main Mar 20, 2026
3 checks passed
@VatsalSy
VatsalSy deleted the Savart/frontend-improvements-typography-hero branch March 20, 2026 11:56
VatsalSy added a commit that referenced this pull request Jun 29, 2026
…ypography-hero

feat: typography, scroll-reveal, and HTML cleanup
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.

2 participants