fix(hero): forward the cover flag into the hero body partial - #190
Merged
Conversation
`hero.hugo.html` passed `cover` to `utilities/section.html` but omitted it from the `assets/hero.html` dict, so `$args.cover` there always fell back to the structure default of `false`. The `hero-image-full-height` branch at `assets/hero.html:158` was therefore unreachable, and the SCSS block added in 36701b5 had never applied to a rendered page. Measured in the Hinode exampleSite at 1900x1031 with `cover: true`: the illustration column now carries `hero-image-full-height` instead of `my-md-auto align-self-end`. Landscape illustrations are unchanged -- under `object-fit: contain` their width is already the limiting dimension. A portrait illustration is now contained within its column (989px tall) instead of stretching the hero past the cover height (1284px tall, inflating the section to 1332px). Scoped to the hero block. The other five callers of `assets/hero.html` (about, featured, panels, contact-form, contact) compose it as a layout primitive with their own fixed orientation and width choices; forwarding `cover` there would silently change existing renders for blocks that never had the behavior. Refs: gethinode/hinode#2107 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
🎉 This PR is included in version 2.3.5 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found while investigating gethinode/hinode#2107.
Problem
hero.hugo.htmlpassescovertoutilities/section.htmlbut omits it from theassets/hero.htmldict. So atassets/hero.html:158:$args.coveralways resolved to the structure defaultfalse. Thehero-image-full-heightbranch was unreachable, and the SCSS added in 36701b5 ("fix(hero): add full-height image styling for cover sections", Feb 2026) had never applied to a rendered page.None of the six callers of
assets/hero.htmlpassedcover.Change
One line: forward
cover. Theherostructure already declares it.What this actually does — less than the class name suggests
Measured in the Hinode exampleSite at 1900×1031 with
cover: true:object-fit: containthe width is already the binding dimension, so the rendered box is identical either way (428×241).The reason it does so little: the section is
d-flex align-items-center, so its inner container is centred rather than stretched. Everyheight: 100%in that SCSS resolves against a 292px content-sized row, never the 940px section. So the class is a guard against over-tall illustrations, not the "fill the full height" feature its name and commit message claim.Worth shipping as-is — it's a real improvement for portrait images and the branch is meant to be reachable — but the naming and intent are worth a second look. I did not rename or redesign it; that's a layout change beyond this fix.
Scope
Hero only.
about,featured,panels,contact-form, andcontactcomposeassets/hero.htmlas a layout primitive with their own fixed orientation and width choices; forwardingcoverthere would silently change existing renders for blocks that never had the behavior.npm testpasses.🤖 Generated with Claude Code