Skip to content

feat: post cover as a full-width banner - #8

Merged
Mimic890 merged 2 commits into
mainfrom
feat/cover-banner
Nov 4, 2026
Merged

Mimic890 merged 2 commits into
mainfrom
feat/cover-banner

Conversation

@Mimic890

@Mimic890 Mimic890 commented Nov 4, 2026

Copy link
Copy Markdown
Owner

The post cover becomes a full-width banner, right under the top bar and above the title.

  • layout.html has a new empty banner block between the top bar and <main>; post.html fills it with the cover. The banner sits outside the 44rem text column, so it spans the page with no 100vw tricks and no horizontal scroll.
  • CSS: height: min(30vh, 320px), min(25vh, 200px) up to 30rem; object-fit: cover, centered; no rounded corners; --surface background while loading. width/height attributes are kept. Because the CSS height is fixed, the box size never depends on the image.
  • Title, dates and tags stay in the text column. Posts without a cover are unchanged.
  • Test: the cover is between the top bar and <main>, and a post without a cover has no banner.
  • SPEC (EN + RU): Post page section and Decision log. README (EN + RU): one line on the crop under cover.

Checked with screenshots of a 1600×900 test cover at 1280×900, 1920×1080 and 390×844, light and dark, plus a post without a cover. Heights were 270, 320 and 200 px; the crop was centered; scrollWidth matched the viewport. vet, staticcheck, govulncheck and go test -race pass.

@Mimic890
Mimic890 merged commit bf10b6b into main Nov 4, 2026
4 checks passed
@Mimic890
Mimic890 deleted the feat/cover-banner branch November 4, 2026 19:45
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