Add thumbnail images to every remaining story card#53
Merged
Conversation
The insights grid got real thumbnails in a prior change, but four other story-card groups still rendered with a blank colour-variant background and no image: the case studies grid (and every "related cases" widget on the run-service pages that reuses the same data), newsroom releases, partners, and the three sustainability pillars - 24 cards across 9 pages. Sourced a distinct, topically relevant free-license photo per card from Pexels (images.pexels.com CDN, no API key required for direct fetch), cropped server-side to 560x320 to match the existing insights-thumbs convention, and avoided images with visible third-party brand names/logos or identifiable faces. Wired each set into its generator function the same way insights was: an image + alt field on the data list, rendered into an <img> inside the existing .story-card__media div (the CSS already handles empty vs populated media via object-fit: cover, so no style changes were needed). Case-study images are addressed by slug (case_thumb_path()) so the one asset set covers both the main case-studies.html grid and every service-detail page's related-cases section without duplication. Also removed the top-level assets/case-thumbs/ directory: it held 7 images under names that didn't match any of the 9 case-study slugs and was never referenced by the generator or the Makefile - dead weight left over from an earlier, incomplete pass at this same problem. The real case-study thumbnails now live under site/assets/case-thumbs/, matching where every other served asset directory already lives. Verified: build runs clean and is idempotent, the CI link-checker's internal-link scan passes with zero missing links/images, and I visually confirmed all four affected pages (case studies, newsroom, partners, sustainability) via headless Chrome screenshots. Signed-off-by: chellej <197998703+chellej@users.noreply.github.com>
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
images.pexels.comCDN - no API key needed for direct image fetch), cropped server-side to 560x320 to match the existinginsights-thumbsconvention. Avoided images with visible third-party brand names/logos or identifiable close-up faces.insights_main()was fixed previously: animage/image_altfield on the data list, rendered into an<img>inside the existing.story-card__mediadiv. No CSS changes needed -object-fit: coveralready handles populated vs. empty media.case_thumb_path()helper, so the one asset set covers both the maincase-studies.htmlgrid and every service-detail page's related-cases section with no duplication.assets/case-thumbs/directory: it held 7 images under names that didn't match any of the 9 case-study slugs and was never referenced by the generator or theMakefile- dead weight from an earlier, incomplete pass at this same problem. The real case-study thumbnails now live undersite/assets/case-thumbs/, matching where every other served asset directory already lives.Test plan
python3 -m py_compile scripts/generate-site.pypython3 scripts/generate-site.py- clean runsite/- 0 missing links/images