summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-11-01 09:40:24 +0800
committerEltrac <hi@guhub.cn>2025-11-01 09:40:24 +0800
commitd093647215692b7018954afec8fa86d16bf34b00 (patch)
tree4494905bbddb7c88f629a7df9754588a498d607e
parentac0d843edb68e9806277cafc3b68289934b03005 (diff)
perf(css): add explicit height and width to images reduce layout shifts
-rw-r--r--layouts/_partials/components/logo.html4
-rw-r--r--layouts/_partials/footer.html2
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>