feat(site): add github source link to the global footer#97
Merged
Conversation
The footer was an empty placeholder; the only path to the repo was the build-SHA chip in the masthead, which most visitors don't notice. Adds an Octocat mark + "SOURCE" caption in the footer slot — icon for universal recognition, text label for the brutalist type system the rest of the chrome runs on. Also hoists the repo URL to a single `REPO_URL` constant in `site/src/lib/site-config.ts`. Masthead.astro now imports from there instead of carrying its own local copy. Same pattern as the existing `SITE_ORIGIN` centralization. The Octocat SVG uses `fill="currentColor"` so it follows the link's colour through both themes + the invert-on-hover state. 20 × 20 px matches the type baseline; `gap: var(--space-2)` keeps the icon and the "SOURCE" caption sitting consistently.
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 footer was an empty placeholder; the only path from the live site to the repo was the build-SHA chip in the masthead, which most visitors don't notice. Especially relevant given we're about to post this on HN — "View source" should be a one-click affordance from anywhere on the site.
Changes
SOURCEcaption, right-aligned, accent-red text,_blanktarget withnoopener noreferrer. SVG usesfill="currentColor"so it follows the link's colour through both themes + the invert-on-hover state.REPO_URLconstant — hoisted intosite/src/lib/site-config.tsnext toSITE_ORIGIN. Masthead's local copy removed. Same centralization pattern as the earlier site-origin work — if the repo ever moves, one file.gap: var(--space-2)to.site-footer aand a.gh-mark { width: 20px; height: 20px; flex: 0 0 auto }rule so the icon + label sit consistently.Visual
(local preview screenshot)
Footer reads
[Octocat] SOURCEin accent red on the cream rule above the page bottom. Invert-on-hover (ink bg + paper fg) is the existing footer-link rule — works for the icon too because ofcurrentColor.Test plan
bun run typecheckclean