Skip to content

refactor: deduplicate NewsPostPreview even/odd rendering#278

Merged
andygrunwald merged 1 commit intomainfrom
refactor/news-post-preview-dedup
Mar 21, 2026
Merged

refactor: deduplicate NewsPostPreview even/odd rendering#278
andygrunwald merged 1 commit intomainfrom
refactor/news-post-preview-dedup

Conversation

@andygrunwald
Copy link
Member

Summary

  • Replace two ~90% identical template branches with a single template using conditional CSS classes
  • The only differences between even/odd variants were text padding direction, text order, and image order
  • Reduces component from 73 lines to 43 lines

Test plan

  • astro build succeeds
  • Verify blog and changelog listing pages show correct alternating layout

🤖 Generated with Claude Code

Replace two ~90% identical template branches (even/odd layout) with a
single template using conditional CSS classes. Only the text padding,
text order, and image order differ between variants.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@netlify
Copy link

netlify bot commented Mar 21, 2026

Deploy Preview for lively-frangollo-e43a02 ready!

Name Link
🔨 Latest commit e3f7e19
🔍 Latest deploy log https://app.netlify.com/projects/lively-frangollo-e43a02/deploys/69bf00925af77e0008024cc2
😎 Deploy Preview https://deploy-preview-278--lively-frangollo-e43a02.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@andygrunwald andygrunwald merged commit f36b991 into main Mar 21, 2026
5 checks passed
@andygrunwald andygrunwald deleted the refactor/news-post-preview-dedup branch March 21, 2026 20:45
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