Scroll every breaking story, not just the newest - #107
Merged
Conversation
The CMS can raise more than one now (triangle-cms#230), and the banner was built for exactly one: six copies of a single headline, with one still overlay linking the whole band to its article. Read `items` and scroll all of them. The marquee loops by translating the strip from -50% to 0, which is seamless only while its two halves are identical, so the strip is built as one half rendered twice. Three slots per half fills a wide screen with one story; more stories take fewer repeats to cover the same width, which keeps the wait for any one headline to come back around roughly constant as stories are added. One story still renders six copies, exactly as before. Links had to change with it. One overlay cannot serve several stories, so each headline links itself and the marquee pauses on hover and focus-within: a link that slides out from under the cursor is the problem the overlay was avoiding, and stopping it under the pointer avoids the same thing while still reaching every story. A single story keeps the overlay, which is a bigger and steadier target than the text. A CMS that predates `items` sends only `text`/`article_slug`, so index.astro falls back to that pair. The two repos deploy independently and an empty red band during the gap is the failure worth avoiding. Also pass `breaking` to the two cards in column 1 of the 3-6-3 block. The second pinned story lands in that slot, and without the kicker it read as an ordinary story sitting beside a breaking one. Measured in headless Chromium over CDP rather than reasoned from classes: banner box still 48px, animation running then `paused` under the cursor, and `elementFromPoint` at the band's centre returns the story's own anchor with 8 anchors and no overlay for two stories, and the overlay with no strip anchors for one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L4qBhBdQto1yNp1zP7VLYc
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.
The public half of DrexelTriangle/triangle-cms#230. The CMS can now raise
several breaking stories and pin several to the top of the homepage; this makes
that visible.
Banner
Reads
breaking_news.itemsand scrolls all of them:The marquee loops by translating the strip from -50% to 0, which is seamless
only while its two halves are identical, so the strip is one half rendered
twice. Three slots per half fills a wide screen with one story; more stories
take fewer repeats to cover the same width, which keeps the wait for any one
headline to come back around roughly constant. One story still renders six
copies, exactly as before.
Links
One overlay cannot serve several stories, so each headline links itself and the
marquee pauses on
:hover/:focus-within. A link that slides out from underthe cursor is what the overlay was avoiding; stopping it under the pointer
avoids the same thing while still reaching story 2. A single story keeps the
overlay, which is a bigger and steadier target than the text.
Deploy order does not matter
A CMS that predates
itemssends onlytext/article_slug, andindex.astrofalls back to that pair. Either repo can ship first without anempty red band in between.
Second pinned story
Section-3-6-3now passesbreakingto the two cards in column 1. The secondpin lands in that slot, and without the kicker it read as an ordinary story
sitting next to a breaking one.
Verified by measurement, not by reading classes
Stub CMS +
astro dev+ headless Chromium over CDP:running,pausedon hoverelementFromPointat band centre<a href="/article/academy">Plus
npm run lint,npm run check(0 errors), andnpm run build.🤖 Generated with Claude Code
https://claude.ai/code/session_01L4qBhBdQto1yNp1zP7VLYc