Skip to content

Blog page reevamp - #295

Open
muskanhashim wants to merge 5 commits into
mainfrom
blog-card-grid
Open

Blog page reevamp#295
muskanhashim wants to merge 5 commits into
mainfrom
blog-card-grid

Conversation

@muskanhashim

Copy link
Copy Markdown
Contributor

No description provided.

The listing was a wall of date/title/description rows that all carried the same
weight, and it gave the posts' own figures nowhere to appear.

Each post is now a card whose shape comes from its own cover image, so figures
are shown whole rather than letterboxed into a fixed box; the covers here range
from 1.46:1 to 7.5:1 and no single ratio serves them.
The cover is the first locally hosted image in the post, found at build time.
Remote images are skipped on purpose, so a post cannot hotlink a third party
from the index.
Dimensions come from images.Config, except for SVGs, which that function does
not read, so those are taken from the root element instead.

A picture only earns a cover slot if it reads at card size. Panoramas and dense
multi-panel figures shrink to illegible strips, so those posts and the ones with
no image at all get a type card coloured from $eco-hues, the same cycle the
ecosystem cards and people monograms already use. That way the grid never shows
an empty frame.

The newest post spans two columns. Cards stretch to their row so every row ends
level, and each one reserves ground beneath its picture so the text never lands
on the artwork. Titles and descriptions are clamped to two lines, since the
descriptions run from six words to twenty-five.

An archive rail lists every post by year alongside the grid, and drops away
below 62rem.

.page-item-author goes with the old markup; nothing else referenced it. /events
and the landing page keep using .page-item, which is untouched.
Conditional classes go inline on one attribute, the way the ecosystem cards
already write them, rather than split across lines.

A type card has no picture to give it height, so its text sits in the flow and
the card grows to fit a long title instead of clipping it.
The longest title on a type card slid under the "scverse blog" mark, so the text
block now clears it.

One column means much narrower cards, so the same words wrap onto more lines
than they do on a wide screen and outgrew the ground reserved beneath the
picture; on the lead card the title sat across the diagram at 375px.

The lead carries a kicker the others do not and was a line short of room for it.

Checked at 375, 820 and 1280: no card's text crosses its picture, nothing
overflows its column, nothing is clipped, and there is no horizontal scroll.
@netlify

netlify Bot commented Sep 2, 2026

Copy link
Copy Markdown

Deploy Preview for jade-cajeta-1bcca0 ready!

Name Link
🔨 Latest commit eb7b038
🔍 Latest deploy log https://app.netlify.com/projects/jade-cajeta-1bcca0/deploys/6a9985b70f6d0200081f5cb5
😎 Deploy Preview https://deploy-preview-295--jade-cajeta-1bcca0.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.

@muskanhashim
muskanhashim requested a review from Zethson September 2, 2026 10:01
@flying-sheep

flying-sheep commented Sep 3, 2026

Copy link
Copy Markdown
Member

too bad this isn’t stable yet: https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Grid_layout/Grid_lanes

I like it but I think the black-to-white gradient is too harsh that appears for posts that have diagrams as central graphic

@josenimo

josenimo commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

I think it looks good, I checked both MacOS and Android Mobile.
I tend to agree with @flying-sheep about the black-to-white gradient, but this looks good enough to me.

Philipp and José both found the black-to-white gradient too harsh on the posts
whose cover is a diagram, and they were right: the stops were percentages of the
card, so on a tall card the dark washed most of the way up a white figure.

The stops are in rem now, measured from the bottom, so the dark covers the ground
already reserved for the text and feathers out over the 2.5rem above it. How far
it reaches no longer depends on how tall the picture is.

It holds flat across the text rather than fading through it. Fading looked softer
but put white titles on a pale wash over a white figure: measured against white,
contrast was 2.1:1 on the BioContextAI card and 4.2:1 on the lead, both under the
4.5:1 AA threshold. Flat brings the worst case to 13.8:1 on wide screens and
7.1:1 at 375px, where the taller text zone needs the flat part to reach further.
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.

3 participants