Skip to content

Add a dismissable phase 2 banner linking to Interstellar - #62

Merged
emptymalei merged 1 commit into
hugofrom
claude/phase2-banner-13df3b
Oct 8, 2026
Merged

emptymalei merged 1 commit into
hugofrom
claude/phase2-banner-13df3b

Conversation

@emptymalei

Copy link
Copy Markdown
Member

Requested by L · project thread

Before: interimm.org gives no hint that the story has moved on, and nothing links to the phase 2 site.

After: every page has a slim signal-blue bar above the header: "You are reading Phase 1, the Mars era of InterImm. The story has moved on to 2219, when a signal arrived from Ross 128 b. Enter The Contact Era →" (Chinese on CN pages: 进入通联纪). The link goes to interstellar.interimm.org (or /en/ from English pages). A close button hides it, and it stays hidden on every page after that.

How: a new partial phase2-banner.html is rendered from baseof.html before the header, so it sits in the page flow and covers nothing. Its look is in its own assets/css/phase2-banner.css (phase 2 colours scoped to the bar) and the close button in assets/js/phase2-banner.js, both fingerprinted like the other assets; the kit files are untouched. The dismissal is stored in localStorage, and a one-line inline check hides the bar before paint on later pages. On phones the second sentence is dropped to keep the bar to two lines; without JavaScript the bar shows with no close button.

Checked with a local hugo --minify --gc build (0.135.0) in Chromium at 1280px and 390px, light and dark: no horizontal scroll, no console errors, and after closing it the bar stays hidden on the next page.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KJEwDnnTi1kgDtYkX1CU2a


Generated by Claude Code

A slim bar above the header on every page says this site is phase 1 and
links to interstellar.interimm.org (CN root or /en/). The close button
remembers the choice in localStorage; an inline check hides it before
paint on later pages. Styles and script are their own files, so the kit
is untouched.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KJEwDnnTi1kgDtYkX1CU2a
@emptymalei emptymalei self-assigned this Oct 8, 2026
@emptymalei
emptymalei merged commit 8a4ae01 into hugo Oct 8, 2026
2 checks passed
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