diff options
| author | Eltrac <hi@guhub.cn> | 2025-11-01 09:40:24 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-11-01 09:40:24 +0800 |
| commit | 173363deb4787b6171e1a47e9bc3a861f03b20f4 (patch) | |
| tree | 92fc7405e29d56c6a610a5d0fba6d83152440f87 | |
| parent | 3cde8adc23de7afe867f00419adf30334aa8e5a7 (diff) | |
perf(css): add explicit height and width to images reduce layout shifts
Former-commit-id: d093647215692b7018954afec8fa86d16bf34b00
| -rw-r--r-- | layouts/_partials/components/logo.html | 4 | ||||
| -rw-r--r-- | layouts/_partials/footer.html | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/layouts/_partials/components/logo.html b/layouts/_partials/components/logo.html index e44fc9e9..226cb557 100644 --- a/layouts/_partials/components/logo.html +++ b/layouts/_partials/components/logo.html @@ -8,5 +8,7 @@ class="title-image-container {{ $class }}"> <img src="{{ $src }}" alt="Logo" class="dark:invert title-image {{ $imageClass }}" - style="view-transition-name: title-image" /> + style="view-transition-name: title-image" + width="160px" height="154px" + /> </a> diff --git a/layouts/_partials/footer.html b/layouts/_partials/footer.html index 1b218f7f..0711ef66 100644 --- a/layouts/_partials/footer.html +++ b/layouts/_partials/footer.html @@ -27,6 +27,8 @@ src="{{ .icon }}" alt="{{ .name }} icon." loading="lazy" + width="1rem" + height="1rem" /> </a> </li> |
