fix(navigation): let CSS size the nav logo and drop the inline width cap

The navbar logo carried an inline `height:36px;width:auto;max-width:{logo_width}px`
while `.navbar-logo > img` already owns `height:36px;padding:0 30px`. Under
`box-sizing:border-box` that max-width capped the border box, so the 60px of
horizontal padding stayed inside it and wide logos were squeezed against a
fixed height, breaking the intrinsic aspect ratio.

- Render the nav logo with no inline sizing; CSS alone sizes it.
- Add a `$lazy` argument to jio_get_adaptive_theme_img() so the navbar can emit
  the real src up front instead of a square lazyload placeholder; defaults to
  'auto' so every other caller keeps the lazy_other behaviour.
- Remove the superseded logo_width plumbing: the setting (PHP + VUE schemas),
  Settings::logo_width(), jio_get_site_logo_width(), the --jio-logo-width token
  and the unused has_logo context key.
- Cover the contract in the header reference test.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kate522andClaude Opus 5 committed 2026-11-05 17:50:56 +08:00
1 parent 3ce5bfc20c
commit 8e74b60570
9 files changed
+36 -43

No files matched your search

@@ -16,7 +16,6 @@ namespace Jio\Settings {
public static function container_max_width(): int { return 1200; }
public static function font_family(): string { return 'system'; }
public static function font_family_custom(): string { return ''; }
public static function logo_width(): int { return 150; }
public static function get_sidebar_config(): array { return ['width' => 311]; }
public static function get_header_theme_config(): array { return []; }
public static function background_css(string $key): string { return ''; }