Refactor ProjectCard layout to use backdrop image with content overlay - #4
Merged
Merged
Conversation
Two projects pointed at image URLs that no longer resolve, and the card layout couldn't cope with the result: - Community.Blazor.MapLibre referenced .../examples/globe.png, which 404s; the file in the MapLibre repo is render-globe.png. Hack The Flag hotlinked app.hacktheflag.net, which is not serving the logo. Both images are now self-hosted under public/img/projects/ so the cards no longer depend on another host staying up. - ProjectCard laid the text over a fixed 240px image block with absolute positioning, so longer titles and tech lists spilled past the top of the tile and were clipped, and a failed image left a white box with white text on it plus the browser's alt-text fallback. The card now uses the image as a backdrop layer with the text in normal flow: the tile keeps a 240px minimum height but grows with its content, the scrim and a dark fallback background live on the card itself so text stays readable with or without an image, and a broken image is hidden outright. Also keeps the hover buttons reachable via keyboard focus. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XVdiFBajKv1UbARQujNq5j
Same image as the hotlinked cod3rs.org/img/logo.png, fetched from the Cod3rs-org GitHub organisation avatar, so the card no longer depends on another host serving it. Hack Esbjerg still points at hack-esbjerg.cod3rs.org; that host and the project's repository are both out of reach from here, so its image was left as-is. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XVdiFBajKv1UbARQujNq5j
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Redesigned the ProjectCard component to use a backdrop image layer behind text content rather than a fixed-height image block. This allows cards to grow with their content while maintaining readability through a tinted gradient overlay.
Key Changes
Component Structure (ProjectCard.astro)
<div>to semantic<article>elementonerrorhandlerLayout & Styling
position: absolute; inset: 0to fill the card as a backdrop.project-tintlayer combining brand gradient with bottom-up scrim for text contrast.project-contentuses flexbox withflex: 1 1 autoto anchor text to bottom while allowing card to growResponsive & Interactive Improvements
(hover: none)to detect touch devicesProject Content Updates
/img/projects/Implementation Details
https://claude.ai/code/session_01XVdiFBajKv1UbARQujNq5j