Skip to content

Add PWA basics: viewport, theme-color, and web app manifest - #59

Merged
jrodal98 merged 1 commit into
masterfrom
feat/pwa-basics
Oct 20, 2026
Merged

jrodal98 merged 1 commit into
masterfrom
feat/pwa-basics

Conversation

@jrodal98

Copy link
Copy Markdown
Owner

PWA basics for brunnylol, so the site installs and lays out properly on mobile:

  • Viewport meta on every page (base.html) and on the themed error pages (src/error.rs) — mobile browsers were guessing the layout width without it.
  • theme-color (#1a1a2e, the site's --bg-primary) in both places too, so browser chrome matches the theme.
  • Web app manifest at static/manifest.json (name/short_name Brunnylol, start_url: /, display: standalone, brand colors), linked from base.html.
  • 192×192 and 512×512 icons rendered from static/favicon.svg, traveling base64-encoded under assets/ and decoded into static/ by build.rs — the same pattern as the existing favicon PNGs (which is why they're gitignored as generated files). The manifest also references the existing 180×180 apple-touch icon.

Tests: new tests/pwa_test.rs — the manifest is served as JSON and parses with the expected fields, every icon it references is actually served as image/png (this also proves build.rs regenerated the 192/512 PNGs from a cold tree), and the home page carries the viewport meta, theme-color, and manifest link. The existing favicon suite still passes.

@jrodal98
jrodal98 merged commit 1c46de9 into master Oct 20, 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.

1 participant