Repository navigation
feat: add KubeCon + CloudNativeCon NA 2026 announcement banner on homepage - #602
Conversation
…epage Signed-off-by: thisisobate <obasiuche62@gmail.com>
|
Welcome to the Microcks community! 💖 Thanks and congrats 🎉 for opening your first pull request here! Be sure to follow the pull request template or please update it accordingly. Hope you have a great time there! |
yada
left a comment
There was a problem hiding this comment.
Thanks for this, the banner looks good on desktop and the front-matter toggle is a nice touch. I ran the PR locally and found a layout bug that makes the homepage hero partly hidden on mobile. It needs fixing before merge.
See details in comment
|
The hero offset never applies. In I measured how much of the hero
The 1770px screenshot in the PR description doesn't show this because wide viewports have enough natural spacing. FixUse the general sibling combinator in both places in .has-announcement ~ main .herobanner { ... }and the same change inside the Non-blocking suggestions
I haven't tested dark mode, but please test it. |
Use the general sibling combinator since a <script> sits between </header> and <main>, and drive the offset from the banner's measured height via a CSS variable so it adapts when the text wraps. Reduce banner font size below 480px. Signed-off-by: thisisobate <obasiuche62@gmail.com>
yada
left a comment
There was a problem hiding this comment.
Thanks for the quick fix, b685455 works. I re-tested on the same viewports (320 to 1920px, plus live resize and dark mode) and the hero heading is fully visible everywhere, with no horizontal scroll.
On the JS added in header.html: the ~ selector change is what fixes the overlap, and the script only fine-tunes the spacing. I'd keep it. The banner text is editable from announcement.text in front matter, and the script adjusts the hero spacing automatically if the text gets longer or shorter. A CSS-only version would need its per-breakpoint heights re-measured every time the text changes.
With JS disabled the page still has no overlap at any width, because the CSS fallback and the hero padding absorb the difference.
LGTM.
|
You are now a Microcks community contributor! 💖 Thanks and congrats 🚀 on merging your first pull request! We are delighted and very proud of you! 👏 📢 If you're using Microcks in your organization, please add your company name to this list. 🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact. If you need to know why and how to add yourself to the list, please read the blog post "Join the Microcks Adopters list and Empower the vibrant open source Community 🙌" Kudos and please keep going, we need you 🙌 |
What
Adds an announcement ribbon at the top of the homepage promoting KubeCon + CloudNativeCon North America (Nov 9-12), linking to the registration page with UTM tracking.
How
content/_index.md– newannouncementfront-matter block (enable,text,cta,link) so the message/link can be updated or disabled without touching templates.themes/microcks/layouts/partials/header.html– renders the banner inside the fixed<header>only when.IsHomeandannouncement.enableare true; adds ahas-announcementclass on the header. Falls back to an arrow icon ifctais omitted.themes/microcks/assets/scss/_announcement.scss(new) –#46aaf3background, white text, centered flex layout, hover state, and a margin offset on.herobannerso the hero isn't hidden under the taller fixed header. Includes a mobile breakpoint.themes/microcks/assets/scss/style.scss– imports the new partial.Notes
announcement.enable: falseincontent/_index.md.rel="noopener".Related issue(s)
Fixes #601
Screenshot