Skip to content

Make the pages responsive on phones - #21

Merged
cdiddens merged 1 commit into
pyoomph:mainfrom
cdiddens:develop
Aug 4, 2026
Merged

Make the pages responsive on phones#21
cdiddens merged 1 commit into
pyoomph:mainfrom
cdiddens:develop

Conversation

@cdiddens

@cdiddens cdiddens commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

The site had no viewport meta tag, so phones rendered the 950px desktop layout scaled down. Adding it exposed a few layout issues, fixed here as well.

Changes

header.html

  • <meta name="viewport" content="width=device-width, initial-scale=1"> — the main fix.
  • <meta charset="utf-8"> — the About page contains real UTF-8 en-dashes ("Navier–Stokes–Cahn–Hilliard", "vapour–liquid") that were rendered as mojibake without a declared charset.
  • lang="en" on <html>.

_generated/css/style.css

  • .flex-column had a hard min-width: 470px, wider than a phone viewport, which made the whole page scroll horizontally.
  • #menu was 4px wider than its container because its 2px border was added on top of width: 100%; now box-sizing: border-box.
  • Global img { max-width: 100% }, pre { overflow-x: auto }, #content { overflow-wrap: break-word }.
  • Breakpoints at 800/600/480/380px: tighter padding, the menu wraps into a flex row with tappable entries, the GPL notice wraps instead of scrolling, list indentation reclaimed, gallery items capped at one thumbnail wide with captions wrapping underneath, and the header logo switches to background-size: contain so its edges are not cropped.
  • The gallery rules were written with CSS nesting (& > li, & img, …) and are now flat selectors, so they also apply in browsers without nesting support — there the thumbnails otherwise lost their fixed 200×150 size and showed list bullets.

Verification

Rendered all three pages headless at 320/375/414/768/1024/1280 px:

  • No horizontal overflow (scrollWidth == clientWidth) at any width.
  • Desktop is pixel-identical apart from the menu bar being 4px narrower (the box-sizing fix, a 2px shift of the labels) and the gallery block. The gallery was checked by patching the old stylesheet with nesting emulated: it then produces exactly the new geometry (241px tall, page height 2153), confirming current browsers already rendered it that way.

No content or design changes.

🤖 Generated with Claude Code

https://claude.ai/code/session_019XJeo2Rp5sDjApHWf77wza

The site had no viewport meta tag, so phones rendered the 950px desktop
layout scaled down. Adding it exposed a few layout issues that are fixed
here as well:

- .flex-column had a hard min-width of 470px, wider than a phone viewport,
  which made the whole page scroll horizontally
- #menu was 4px wider than its container because its 2px border was added
  on top of width:100%
- the GPL notice and the command lines could not wrap

Breakpoints at 800/600/480/380px tighten padding, wrap the menu into a
flex row with tappable entries, wrap the GPL block, cap the gallery items
at one thumbnail wide and show the whole header logo instead of cropping
its sides. The desktop rendering is unchanged apart from the 4px menu fix.

The gallery rules were written with CSS nesting; they are now flat
selectors so that they also apply in browsers without nesting support,
where the thumbnails otherwise lost their fixed size.

Also declares the UTF-8 charset - the About page contains en-dashes that
were rendered as mojibake without it - and the document language.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019XJeo2Rp5sDjApHWf77wza
@cdiddens
cdiddens merged commit 2447029 into pyoomph:main Aug 4, 2026
1 check failed
@cdiddens
cdiddens deleted the develop branch August 4, 2026 12:43
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