Skip to content

Make Now section a carousel#8

Merged
cwage merged 2 commits intomainfrom
feature/now-carousel
Apr 16, 2026
Merged

Make Now section a carousel#8
cwage merged 2 commits intomainfrom
feature/now-carousel

Conversation

@cwage
Copy link
Copy Markdown
Owner

@cwage cwage commented Apr 16, 2026

Summary

  • Replaces the single-item Now block with a carousel: prev/next arrows + dot indicators above a single visible slide
  • Progressive enhancement — without JS, all entries stack as before; JS adds the .js-enabled class and carousel behavior
  • Entries render in reverse YAML order (append new items at the bottom of _data/now.yml, they show first)
  • Adds optional date field alongside type in meta line (e.g. article · 2026-04-08)
  • Subtle framed container (1px border + off-white bg) marks the section as featured

Notes

  • Controls sit above the slides so they stay anchored when active item height changes
  • Arrows wrap around at the ends; no keyboard nav (per discussion)
  • Carousel controls only render when now.yml has more than one entry
  • Broader content inventory (mix of types beyond article) is a worthwhile follow-up to make the "featured" framing earn its keep

Test plan

  • Build passes locally and in CI (Jekyll + htmlproofer)
  • With multiple entries: arrows and dots navigate between items; wraps at ends
  • With a single entry: controls are hidden, renders as before
  • Without JS: all items render stacked, no broken controls visible
  • Mobile / small viewport: controls stay reachable as slide height changes
  • Verify second entry (whoarewe, no image) renders correctly

🤖 Generated with Claude Code

Replace the single-rendered Now block with a carousel so multiple
recent items (articles, projects, etc.) can share the featured slot.
Progressive enhancement: without JS, all items stack as before;
with JS, one item is visible at a time, navigated via < > arrows
and clickable dots.

- Entries display in reverse YAML order so new items append at the
  bottom and show first
- Controls sit above the slide so they stay anchored when the
  active item's height changes
- Optional date field rendered alongside type
- Framed container (subtle border + off-white bg) marks the section
  as featured

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 16, 2026 20:17
Copy link
Copy Markdown

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 turns the homepage “Now” section into a progressively-enhanced carousel: without JavaScript it renders as a stacked list, and with JavaScript it becomes a single-slide view with previous/next controls and dot indicators.

Changes:

  • Update index.md to render Now entries in reverse order, add carousel markup/controls, and optionally display an entry date.
  • Add a small JS controller (now-carousel.js) to manage active slide/dot state and wraparound navigation.
  • Extend site CSS to style the framed “featured” container and the carousel controls/dots.

Reviewed changes

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

File Description
index.md Replaces the Now list with carousel markup (controls + slides), reverses item order, and adds optional date rendering.
assets/js/now-carousel.js Implements the JS behavior (adds .js-enabled, toggles .is-active, updates aria-current).
assets/css/style.css Adds framing + carousel styles and renames the meta class from .now-type to .now-meta.
_data/now.yml Updates metadata (type, new date) and adds an additional Now entry.

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

Comment thread index.md
Addresses Copilot review feedback: the script was fetched
unconditionally but early-returned for 0–1 entries. Gate it behind
the same size>1 check that guards the controls.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cwage cwage merged commit 16b0f59 into main Apr 16, 2026
1 check passed
@cwage cwage deleted the feature/now-carousel branch April 16, 2026 20:22
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.

2 participants