Repository navigation
feat: main and post pages, themes, languages - #3
Merged
Merged
Conversation
Fontsource 5.3.0 variable woff2, Latin and Cyrillic subsets only, with their OFL license texts.
html/template pages with the top bar, newest posts with pagination, the post page with cover and reading time, and HTML 404/503 pages. Theme and language come from cookies set by a no-JS POST /prefs form. CSS is embedded with chroma palettes scoped per theme.
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.
Stage 3: pages.
What
PAGE_SIZEper page,/?page=N; page 1 is/, out-of-range pages return 404) and an empty state.ceil(words / READING_WPM), at least 1 minute), cover and the sanitized post HTML.<html lang>comes from the post; the top bar keeps the UI language.assets/logo.svgfrom the vault, else a built-in mark), site name, theme toggle, EN/RU switch, RSS link and a GitHub link (ifGITHUB_URLis set).themecookie overrides it and is rendered on the server, with no inline JS. The chroma code palettes (github/github-dark) are scoped to the active theme.internal/server/web/i18n/{en,ru}.json, including localized dates. A test checks that both files have the same keys.POST /prefs: a no-JS form. It checks the theme and lang values and sets the cookie (HttpOnly,SameSite=Lax, 1 year,Secureon https). It redirects only to a local path (open-redirect guard) and limits the body to 4 KB./static/*: embedded CSS (content-hashed URL, immutable cache) and fonts. No directory listing.Tests
/prefscookie attributes and the open-redirect cases;/assets/*from the mirror, plus headless Chrome:Not done here
loading=lazy: stage 4.