Skip to content

fix(landing): keep hero shots in flow on narrow screens - #14

Merged
everpcpc merged 1 commit into
mainfrom
fix/mobile-hero-shots
Oct 3, 2026
Merged

everpcpc merged 1 commit into
mainfrom
fix/mobile-hero-shots

Conversation

@everpcpc

@everpcpc everpcpc commented Oct 3, 2026

Copy link
Copy Markdown
Member

Problem

On the reader landing page (/reader/), the hero screenshot composition breaks on screens ≤1024px (kmworks/kmworks.github.io#2):

  • The hero's height comes only from the in-flow Mac shot (.shotMain, landscape, short). The iPhone shot (.shotFloat) is absolutely anchored at bottom: -9% and is ~1.6x taller than the container, so its top edge extends above the container and covers the App Store button and the iOS/macOS/tvOS version chips.
  • Its bottom edge overhangs the container and overlaps the gallery tabs below.

Fix

From the 1024px breakpoint down, stack both shots in flow instead of absolute positioning: iPhone on the left, Mac on the right, bottom-aligned, with a slight overlap (margin-right: -8% + z-index) to keep the layered look. The container now sizes to both shots, so nothing can cover the text or the sections below.

Also synced the sizes attributes on both landing pages with the rendered widths (74vw / 32vw), and dropped the now-dead ≤640px .shotFloat override.

Desktop (>1024px) is unchanged.

Verification

  • pnpm typecheck && pnpm build && pnpm exec nimbus-docs check && pnpm lint:docs — all green
  • Checked /reader/ and / at iPhone 14 Pro (393px) and iPad mini (768px) in device emulation: buttons, chips, and gallery tabs no longer covered; composition intact

Fixes kmworks/kmworks.github.io#2

On the reader hero the floating iPhone shot is ~1.6x taller than the
landscape Mac main shot. Below 1024px the absolute bottom:-9% anchor
pushes its top edge above the heroShots container, covering the App
Store button and version chips, and its bottom edge overlaps the
gallery tabs below.

Stack both shots in flow (iPhone left, Mac right, bottom-aligned with a
slight overlap) from the 1024px breakpoint down, and sync the sizes
attributes with the rendered widths.

Fixes kmworks/kmworks.github.io#2
@everpcpc
everpcpc merged commit 98a14a0 into main Oct 3, 2026
1 check passed
@everpcpc
everpcpc deleted the fix/mobile-hero-shots branch October 3, 2026 00:19
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.

移动端Kmreader产品页排版混乱

1 participant