Skip to content

feat(sidebar): add logo-height argument to size the brand logo#1978

Merged
markdumay merged 1 commit into
mainfrom
feat/sidebar-logo-height
Jul 2, 2026
Merged

feat(sidebar): add logo-height argument to size the brand logo#1978
markdumay merged 1 commit into
mainfrom
feat/sidebar-logo-height

Conversation

@markdumay

Copy link
Copy Markdown
Collaborator

Summary

Mode A sidebars (level-max = 1) render the brand logo and logomark through assets/image.html without an explicit height, so downstream themes must size them in CSS. This adds an optional logo-height argument (pixels) to the sidebar partial, forwarded to the image partial as image-height.

With it set, the logo and logomark carry proportional height/width attributes and derive their width from the aspect ratio — mirroring how the navbar consumes navigation.logo-height, so a shell-mode sidebar brand can match the navbar logo without hand-tuned CSS.

Changes

  • data/structures/sidebar.yml — register the optional logo-height argument.
  • _partials/assets/sidebar.html — read logo-height and pass it as image-height to both the full logo and the logomark.

Backward compatibility

When logo-height is omitted the argument is nil, so image-height has no effect and the brand images render exactly as before (CSS-driven). Existing sidebars are unaffected.

🤖 Generated with Claude Code

Mode A sidebars render the brand logo and logomark via assets/image.html
without an explicit height, so they must be sized in CSS. Add an optional
`logo-height` argument (pixels) that is passed through to the image partial
as `image-height`, letting the logo and logomark carry proportional
height/width attributes and derive their width from the aspect ratio —
mirroring how the navbar consumes `navigation.logo-height`.

Backward compatible: when `logo-height` is omitted the argument is nil and
the brand images render exactly as before (no image-height, CSS-driven).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@netlify

netlify Bot commented Jul 2, 2026

Copy link
Copy Markdown

Deploy Preview for gethinode-demo ready!

Name Link
🔨 Latest commit dd2d889
🔍 Latest deploy log https://app.netlify.com/projects/gethinode-demo/deploys/6a465c6d0bfd99000846e3ca
😎 Deploy Preview https://deploy-preview-1978--gethinode-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@markdumay markdumay enabled auto-merge July 2, 2026 12:44
@markdumay markdumay merged commit 458a0a1 into main Jul 2, 2026
15 checks passed
@markdumay markdumay deleted the feat/sidebar-logo-height branch July 2, 2026 12:46
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.15.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant