Skip to content

feat: replace light/dark portraits with single unified image#841

Merged
mldangelo merged 3 commits intomainfrom
feat/simplify-portrait
Mar 14, 2026
Merged

feat: replace light/dark portraits with single unified image#841
mldangelo merged 3 commits intomainfrom
feat/simplify-portrait

Conversation

@mldangelo
Copy link
Owner

Summary

  • Replace three theme-specific portrait images (me-light.jpg, me-dark.jpg, me.jpg) with a single new portrait
  • Simplify ThemePortrait component from dual-image CSS toggle to a single <img> tag
  • Remove light/dark portrait CSS switching rules from cards.css and dark-mode.css
  • Add subtle filter: brightness(0.85) for dark mode to soften the white background on both hero and footer avatars

Test plan

  • Visual QA: hero avatar in light mode
  • Visual QA: hero avatar in dark mode (brightness filter applied)
  • Visual QA: footer avatar in both modes
  • All 274 tests pass
  • TypeScript type-check clean
  • Formatting clean

🤖 Generated with Claude Code

Simplify the portrait system from three theme-specific images to one.
Remove CSS light/dark toggle logic and add subtle brightness filter
for dark mode to soften the white background.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 14, 2026 07:01
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Mar 14, 2026
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 14, 2026

Deploying mldangelo with  Cloudflare Pages  Cloudflare Pages

Latest commit: 15f6f58
Status: ✅  Deploy successful!
Preview URL: https://ab54caa5.mldangelo.pages.dev
Branch Preview URL: https://feat-simplify-portrait.mldangelo.pages.dev

View logs

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR consolidates the site’s portrait/avatar handling by moving from theme-specific images (light/dark) to a single shared portrait asset, while keeping dark-mode aesthetics via a CSS brightness adjustment.

Changes:

  • Simplifies ThemePortrait from a two-image theme swap to a single <img> pointing at /images/me.jpg.
  • Removes the light/dark portrait CSS toggling rules and adds dark-mode filter: brightness(0.85) for hero and footer avatars.
  • Replaces/removes portrait image assets to rely on a single portrait file.

Reviewed changes

Copilot reviewed 4 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/components/Template/ThemePortrait.tsx Switches to a single portrait image render path.
public/images/me.jpg Adds the unified portrait asset used across UI and metadata.
public/images/me-light.jpg Removed legacy light-mode portrait asset.
public/images/me-dark.jpg Removed legacy dark-mode portrait asset.
app/styles/pages/home.css Applies a dark-mode brightness filter to the hero avatar image.
app/styles/dark-mode.css Applies a dark-mode brightness filter to the footer avatar image; removes theme-swap rules.
app/styles/components/cards.css Removes theme-specific portrait visibility rules, leaving base portrait wrapper styling.
Comments suppressed due to low confidence (1)

src/components/Template/ThemePortrait.tsx:19

  • ThemePortrait is no longer theme-aware (it always renders /images/me.jpg), so the component/file name is now misleading. Consider renaming it to something like Portrait/AvatarPortrait (and updating imports) to better reflect its behavior and avoid confusion for future contributors.
export default function ThemePortrait({
  width,
  height,
  priority = false,
  className = '',

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +379 to +381
[data-theme='dark'] .hero-avatar img {
filter: brightness(0.85);
}
mldangelo and others added 2 commits March 14, 2026 08:42
Eliminates visible white background corners in dark mode and gives
a more modern look for the headshot.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move duplicated brightness filter from hero-specific and footer-specific
rules to a single .theme-portrait img selector in dark-mode.css.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mldangelo mldangelo merged commit 3238c7d into main Mar 14, 2026
9 checks passed
@mldangelo mldangelo deleted the feat/simplify-portrait branch March 14, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants