Skip to content

fix(event-landing): enforce 16:9 aspect ratio on banner - #834

Open
fishman wants to merge 1 commit into
Project-HAMi:masterfrom
fishman:fix-landing-banner
Open

fix(event-landing): enforce 16:9 aspect ratio on banner#834
fishman wants to merge 1 commit into
Project-HAMi:masterfrom
fishman:fix-landing-banner

Conversation

@fishman

@fishman fishman commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Replace the fixed max-height with an aspect-ratio so the banner scales
responsively, and center the image with object-position.

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Some banners have an odd aspect-ratio. We should enforce 16:9 as default.

Also requires the same aspect-ratio from the KubeCon China banner. @rootsongjc

Which issue(s) this PR fixes:

Fixes #746

Also supercedes #752

Checklist:

  • npm run lint and npm run format:check pass
  • npm run build succeeds for both en and zh
  • Chinese translation updated if English docs changed (or noted why not)
  • Commits are signed off (git commit -s)

Replace the fixed max-height with an aspect-ratio so the banner scales
responsively, and center the image with object-position.

Signed-off-by: Reza Jelveh <fishmangit@dynamia.ai>
@hami-robot hami-robot Bot added the kind/cleanup Refactoring, config, or tidy-up with no behavior change label Sep 1, 2026
@hami-robot
hami-robot Bot requested review from archlitchi and wawa0210 September 1, 2026 16:56
@hami-robot

hami-robot Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: fishman
Once this PR has been reviewed and has the lgtm label, please assign archlitchi for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@netlify

netlify Bot commented Sep 1, 2026

Copy link
Copy Markdown

Deploy Preview for project-hami ready!

Name Link
🔨 Latest commit 110809e
🔍 Latest deploy log https://app.netlify.com/projects/project-hami/deploys/6a9703b28b57e20008c90fe3
😎 Deploy Preview https://deploy-preview-834--project-hami.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

display: block;
width: 100%;
max-height: 480px;
aspect-ratio: 16 / 9;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this drops the 480px cap, so on a 1140px container the banner is now about 640px tall. in #746 the ask was that banners already look too large on desktop. does this make that worse?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bigger issue is the Kubecon China banner, but that's a normal format. Almost all conference banners are 16/9

display: block;
width: 100%;
max-height: 480px;
aspect-ratio: 16 / 9;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the kcd vietnam banner is 1920x1920 and the kubecon jp one is 1920x1080. so cover cuts 44 percent off the square one, which is the banner #746 is about, and leaves the other untouched. is contain plus a background closer to what you want?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything cuts a part off, the Vietnam banner is 4:3 but allows for 16:9 to keep all the important content.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i measured the file on master and it is 1920x1920, so 1:1 rather than 4:3. at 16:9 that drops 44 percent of the height instead of 25. still fine for the important content?

max-height: 480px;
aspect-ratio: 16 / 9;
object-fit: cover;
object-position: center;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

object-position already defaults to center, so this line changes nothing. keep it as documentation, or drop it?

@fishman fishman Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, will double check but if true, probably drop it. The other pr that set a fixed width seemed to have caused it to be left aligned, but maybe I saw it wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ui kind/cleanup Refactoring, config, or tidy-up with no behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UI] Fix KCD Vietnam event banner image sizing and cropping

2 participants