Repository navigation
Add a dismissable phase 2 banner linking to Interstellar - #62
Merged
Merged
Conversation
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
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.
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.htmlis rendered frombaseof.htmlbefore the header, so it sits in the page flow and covers nothing. Its look is in its ownassets/css/phase2-banner.css(phase 2 colours scoped to the bar) and the close button inassets/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 --gcbuild (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