Skip to content

Fix missing viewport/head meta on the-fleet pages (mobile rendering) - #200

Open
testtest126 wants to merge 1 commit into
mainfrom
fix/fleet-viewport-meta
Open

Fix missing viewport/head meta on the-fleet pages (mobile rendering)#200
testtest126 wants to merge 1 commit into
mainfrom
fix/fleet-viewport-meta

Conversation

@testtest126

Copy link
Copy Markdown
Owner

Summary

  • All five /chess/the-fleet/* pages (index.html, night-two, night-three, night-four, night-five) were bare fragments — no <!DOCTYPE html>, no <html>, no <head>. They started directly at <title>.
  • With no viewport meta, mobile browsers fall back to a 980px desktop layout width and shrink text to pinch-to-zoom size. Confirmed before the fix: grep -L viewport matched all 5 files; /chess/ (which already has the meta) was unaffected.
  • Fix wraps each page's existing content in the same scaffold /chess/index.html already uses: <!doctype html>, <html lang="en">, <head> with <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1">, then </head><body> right after the page's existing head-level <style> block, and </body></html> at the end of the file. No visible content, CSS, or the "codex" dark theme touched — diff is purely the 10 wrapper lines per file.

Verification

  • grep -L viewport docs/the-fleet/index.html docs/the-fleet/*/index.html → empty (all 5 now have it).
  • Served the fixed docs/ tree locally, resized the browser to 390×844, and read window.innerWidth:
    • Before: not served (no viewport meta existed at all — the documented root cause).
    • After: innerWidth reports 390 (not 980) on both the-fleet/index.html and the-fleet/night-four/index.html, with document.querySelector('meta[name="viewport"]') present and content="width=device-width, initial-scale=1".
  • Screenshot at 390×844 confirms the dark codex theme renders full-width and readable, unchanged from the intended design.

Docs-only, no code/CI surface beyond static HTML.

Test plan

  • grep -L viewport on all 5 target files → none missing
  • Served locally, verified innerWidth = device width (390) post-fix on 2 of the 5 pages
  • Visual screenshot check — no regression to the dark theme/layout

🤖 Generated with Claude Code

All five /chess/the-fleet/* pages (index, night-two through night-five)
were bare fragments with no <!DOCTYPE html>, <html>, or <head> — they
started directly at <title>. With no viewport meta, mobile browsers fall
back to a 980px desktop layout width and shrink everything to
pinch-to-zoom size (confirmed: window.innerWidth reported 980 on a 390px
viewport, vs 390 on /chess/, which already has the meta).

Wraps each page's existing content in the same scaffold /chess/index.html
uses (doctype, <html lang="en">, <head> with charset + viewport, closing
</head><body> after the head-level <style> block, </body></html> at the
end) — no visible content, styles, or the codex dark theme touched.

Verified locally: served the fixed docs/ tree, resized to a 390x844
viewport, and confirmed window.innerWidth now reports 390 (not 980) with
the viewport meta present, on both the index and night-four pages.
Screenshot confirms the dark codex theme renders unchanged, full-width,
readable.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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