Fit the site to a phone, and show the build in the footer - #113
Merged
Merged
Conversation
On a 390px screen every page scrolled sideways. The header held the wordmark, six links and two buttons on one 60px row, which ran to 521px, so the GitHub link, search and the theme toggle sat off-screen. Hiding API and Changelog below 640px had not made the rest fit. The header now wraps below 640px: the two buttons stay beside the wordmark, and the links take a full-width row of their own that scrolls sideways, so every link is reachable and nothing is hidden. The buttons moved out of the nav into their own group for that. The scroll offset for in-page links grows with the taller header. Docs pages put the whole sidebar above the content once it stacks below 940px, so a phone showed twenty links before the page. The sidebar is now a disclosure that ships open, naming the current page in its summary. An inline script closes it on a narrow screen before the content below it renders, and reopens it when the width crosses the breakpoint. Without JavaScript it stays open, as before. On a wide screen the summary is hidden and the sidebar is unchanged. The footer gains a build line: "Built with Accent CMS 0.25.1 (d7ed19b) · Last updated 2026-09-13". The version and hash are `accent.version_string`. The date is `site.built_at`, the build time, which on this site is when a change was last deployed; file modification dates would be the CI checkout time. The `date` filter passes the ISO timestamp through unformatted, so the date is its first ten characters. `site.built_at` is not in v0.25.1's documentation, but that release renders it, checked with its binary. The home page's code sample imported from "accent-sass"; the npm package is @zoosky/accent-sass. Checked in Chrome, with each page in a 390px and a 320px frame and at 1280px: - Home, install, compatibility, changelog and demo are exactly the viewport wide at 390px and at 320px; before, every page was 521px at 390px. - The docs menu starts closed on a phone, with the page heading at 205px instead of below the list, and opens on tap. - The search dialog fits the phone screen and returns results. - At 1280px the header is one 61px row, and the sidebar is sticky and open with its summary hidden. - The build line renders with Accent v0.25.1, the release CI pins, and with 0.26.0-dev, and fits the phone footer. Tables and code blocks already scrolled inside themselves, and the demo's panes and tabs already fit a phone, so neither changed.
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.
Why
On a phone, the documentation site scrolled sideways on every page, and on docs pages the whole sidebar came before any content. The footer also gave no way to tell which build a reader was looking at.
What changes
Header
On a 390px screen, the header's single 60px row held the wordmark, six links and two buttons, and ran to 521px. The GitHub link, the search button and the theme toggle were off-screen, and every page scrolled sideways. Hiding API and Changelog below 640px had not made the rest fit.
navinto their own.site-toolsgroup, so the two can be laid out separately.Docs sidebar
Below 940px the sidebar sits above the content, so a phone showed twenty links before the page itself.
<details>disclosure. It ships open, and its summary names the current page.chrome.js, because a deferred script would close the list only after it had painted, and the page would jump.Footer build line
The footer now ends with, for example,
Built with Accent CMS 0.25.1 (d7ed19b) · Last updated 2026-09-13.accent.version_string.site.built_at, the build time. On this site that is when a change was last deployed, because the Pages workflow rebuilds on every change to the docs, the theme, the compiler orCHANGELOG.md. Per-file modification dates would only be the CI checkout time.datefilter passes the ISO timestamp through unformatted, so the template shows its first ten characters. The full timestamp stays in thedatetimeattribute.site.built_atis not in v0.25.1's documentation, but v0.25.1 does render it. I checked with the v0.25.1 binary, the release the workflow pins.site.last_modifiedis the fallback if a release ever omits it.Home page
The code sample on the home page imported from
"accent-sass". The npm package is@zoosky/accent-sass.What was measured
In Chrome, each page loaded in a 390px frame and a 320px frame, where media queries respond to the frame width, and at 1280px. A script listed every element extending past the viewport.
The only element still flagged is the skip link, which sits off-screen by design.
Tables and code blocks already scrolled inside themselves on a phone, and the demo's panes and tabs already fit, so neither changed.