Skip to content

Add overlay hero layout for blog posts#8

Merged
joshcoolman merged 1 commit into
mainfrom
feature/blog-overlay-hero
Feb 12, 2026
Merged

Add overlay hero layout for blog posts#8
joshcoolman merged 1 commit into
mainfrom
feature/blog-overlay-hero

Conversation

@joshcoolman

@joshcoolman joshcoolman commented Feb 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a .overlay.md filename convention that triggers a full-bleed hero image with title/subtitle overlaid on a gradient
  • Image lookup unchanged -- slug derived by stripping .overlay from filename
  • Applied to "Your Basic Blog" as the first overlay post

How it works

  • Rename blog/post-name.md to blog/post-name.overlay.md to enable
  • Hero image bleeds to top of viewport with a gradient fading to the page background
  • Title, date, and subtitle sit on the gradient at the bottom of the image
  • No changes needed to image filenames or front matter

Test plan

  • Visit /blog/your-basic-blog -- should show overlay hero
  • Visit /blog/its-happening -- should show default layout (unchanged)
  • Verify blog index cards render correctly for all posts
  • Check responsive behavior on mobile

🤖 Generated with Claude Code


Note

Medium Risk
Touches blog content discovery and slug parsing by introducing a .overlay.md convention, which could affect which markdown file is selected/rendered for a given post. Rendering changes are otherwise isolated to blog post presentation when overlay is enabled and an image exists.

Overview
Adds an optional overlay-hero blog post layout enabled via a .overlay.md filename convention.

lib/blog/loadBlog.ts now detects .overlay.md files, derives slugs by stripping the .overlay suffix, and exposes a new meta.overlay flag (also added to BlogMeta) while preferring the overlay file when both variants exist.

app/(blog)/blog/[slug]/page.tsx conditionally renders a new full-bleed hero (image + gradient + overlaid meta/title/subtitle) when meta.overlay is true, with accompanying styles added in blog.module.css.

Written by Cursor Bugbot for commit 338818c. This will update automatically on new commits. Configure here.

@vercel

vercel Bot commented Feb 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
com-joshcoolman Ready Ready Preview, Comment Feb 12, 2026 6:45pm
sandbox Ready Ready Preview, Comment Feb 12, 2026 6:45pm

Request Review

position: relative;
width: 100vw;
margin-left: calc(50% - 50vw);
margin-top: -80px;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Mobile hero offset overshoots viewport top

Medium Severity

margin-top: -80px in blog.module.css cancels desktop postWrapper padding, but mobile uses smaller top padding. Overlay posts can render shifted above the viewport on small screens, so the hero no longer cleanly starts at the top and content alignment becomes inconsistent.

Fix in Cursor Fix in Web

Comment thread lib/blog/loadBlog.ts
const posts: BlogMeta[] = files.map((fileName) => {
const slug = fileName.replace(/\.md$/, '')
const overlay = fileName.endsWith('.overlay.md')
const slug = fileName.replace(/\.overlay\.md$/, '').replace(/\.md$/, '')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Overlay and regular files can collide

Low Severity

getAllPosts() now normalizes both post.md and post.overlay.md to the same slug, but still loads every .md file. If both files exist, the index and static params can contain duplicate slugs, causing duplicate cards and conflicting route generation.

Additional Locations (1)

Fix in Cursor Fix in Web

.overlayHero {
position: relative;
width: 100vw;
margin-left: calc(50% - 50vw);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Full-bleed hero can trigger horizontal scrolling

Low Severity

The new full-bleed hero uses width: 100vw with margin-left: calc(50% - 50vw), which can exceed the layout width when a vertical scrollbar is present. Overlay posts may show an unwanted horizontal scrollbar and slight sideways page shift on some browsers.

Fix in Cursor Fix in Web

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment thread .github/workflows/claude.yml Outdated
Posts with .overlay.md filename get a full-bleed hero image with
title/meta overlaid on a gradient. The slug and image lookup are
unchanged -- only the markdown filename triggers the variant.

- Parse .overlay.md convention in loadBlog.ts
- Add overlay boolean to BlogMeta type
- Conditional overlay layout in post page
- Full-bleed hero with gradient (transparent to opaque)
- Applied to your-basic-blog as first overlay post

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@joshcoolman
joshcoolman force-pushed the feature/blog-overlay-hero branch from ad926ba to 338818c Compare February 12, 2026 18:43
@joshcoolman
joshcoolman merged commit dbdea04 into main Feb 12, 2026
6 checks passed
@joshcoolman
joshcoolman deleted the feature/blog-overlay-hero branch February 12, 2026 18:55
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