From 4a7470316f9828cf2d8e29db0869d7ed7bd313d2 Mon Sep 17 00:00:00 2001 From: FlintyLemming Date: Mon, 19 Jan 2026 12:07:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=87=92=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/hugo-theme-stack/assets/ts/search.tsx | 2 +- .../layouts/_default/_markup/render-image.html | 1 - themes/hugo-theme-stack/layouts/_default/list.html | 7 +++---- .../layouts/partials/article-list/compact.html | 9 ++++----- .../layouts/partials/article-list/tile.html | 9 ++++----- .../layouts/partials/article/components/header.html | 7 +++---- .../layouts/partials/article/components/links.html | 2 +- .../hugo-theme-stack/layouts/partials/sidebar/left.html | 4 ++-- themes/hugo-theme-stack/layouts/shortcodes/youtube.html | 5 ++--- 9 files changed, 20 insertions(+), 26 deletions(-) diff --git a/themes/hugo-theme-stack/assets/ts/search.tsx b/themes/hugo-theme-stack/assets/ts/search.tsx index 1c81dd1..878e4ae 100644 --- a/themes/hugo-theme-stack/assets/ts/search.tsx +++ b/themes/hugo-theme-stack/assets/ts/search.tsx @@ -299,7 +299,7 @@ class Search { {item.image &&
- +
} diff --git a/themes/hugo-theme-stack/layouts/_default/_markup/render-image.html b/themes/hugo-theme-stack/layouts/_default/_markup/render-image.html index 0ed5584..79817ee 100644 --- a/themes/hugo-theme-stack/layouts/_default/_markup/render-image.html +++ b/themes/hugo-theme-stack/layouts/_default/_markup/render-image.html @@ -29,7 +29,6 @@ {{ with $Width }}width="{{ . }}"{{ end }} {{ with $Height }}height="{{ . }}"{{ end }} {{ with $Srcset }}srcset="{{ . }}"{{ end }} - loading="lazy" {{ with $alt }} alt="{{ . }}" {{ end }} diff --git a/themes/hugo-theme-stack/layouts/_default/list.html b/themes/hugo-theme-stack/layouts/_default/list.html index 9bc618d..50de05b 100644 --- a/themes/hugo-theme-stack/layouts/_default/list.html +++ b/themes/hugo-theme-stack/layouts/_default/list.html @@ -32,12 +32,11 @@ {{- $Height = $thumbnail.Height -}} {{- end -}} - + height="{{ $Height }}"> {{ else }} - + {{ end }} {{ end }} diff --git a/themes/hugo-theme-stack/layouts/partials/article-list/compact.html b/themes/hugo-theme-stack/layouts/partials/article-list/compact.html index f2784d6..f07a3c3 100644 --- a/themes/hugo-theme-stack/layouts/partials/article-list/compact.html +++ b/themes/hugo-theme-stack/layouts/partials/article-list/compact.html @@ -26,13 +26,12 @@ {{- $Height = $thumbnail.Height -}} {{- end -}} - {{ .Title }} + height="{{ $Height }}" + alt="{{ .Title }}"> {{ else }} - Featured image of post {{ .Title }} + Featured image of post {{ .Title }} {{ end }} {{ end }} diff --git a/themes/hugo-theme-stack/layouts/partials/article-list/tile.html b/themes/hugo-theme-stack/layouts/partials/article-list/tile.html index be5744b..12f1849 100644 --- a/themes/hugo-theme-stack/layouts/partials/article-list/tile.html +++ b/themes/hugo-theme-stack/layouts/partials/article-list/tile.html @@ -17,15 +17,14 @@ {{- $Height = $thumbnail.Height -}} {{- end -}} - Featured image of post {{ .context.Title }} {{ else }} - + {{ end }} {{ end }} diff --git a/themes/hugo-theme-stack/layouts/partials/article/components/header.html b/themes/hugo-theme-stack/layouts/partials/article/components/header.html index 7582ec2..a5f7112 100644 --- a/themes/hugo-theme-stack/layouts/partials/article/components/header.html +++ b/themes/hugo-theme-stack/layouts/partials/article/components/header.html @@ -20,12 +20,11 @@ Featured image of post {{ .Title }} {{ else }} - Featured image of post {{ .Title }} + Featured image of post {{ .Title }} {{ end }} diff --git a/themes/hugo-theme-stack/layouts/partials/article/components/links.html b/themes/hugo-theme-stack/layouts/partials/article/components/links.html index c526c0e..2f451db 100644 --- a/themes/hugo-theme-stack/layouts/partials/article/components/links.html +++ b/themes/hugo-theme-stack/layouts/partials/article/components/links.html @@ -21,7 +21,7 @@ {{ $permalink = .RelPermalink }} {{ end }}
- {{ . }} + {{ . }}
{{ end }} diff --git a/themes/hugo-theme-stack/layouts/partials/sidebar/left.html b/themes/hugo-theme-stack/layouts/partials/sidebar/left.html index 95266e5..de26144 100644 --- a/themes/hugo-theme-stack/layouts/partials/sidebar/left.html +++ b/themes/hugo-theme-stack/layouts/partials/sidebar/left.html @@ -11,14 +11,14 @@
{{ if not .local }} - + {{ else }} {{ $avatar := resources.Get (.src) }} {{ if $avatar }} {{ $avatarResized := $avatar.Resize "300x" }} + height="{{ $avatarResized.Height }}" class="site-logo" alt="Avatar"> {{ else }} {{ errorf "Failed loading avatar from %q" . }} {{ end }} diff --git a/themes/hugo-theme-stack/layouts/shortcodes/youtube.html b/themes/hugo-theme-stack/layouts/shortcodes/youtube.html index 2f85931..ac7cff4 100644 --- a/themes/hugo-theme-stack/layouts/shortcodes/youtube.html +++ b/themes/hugo-theme-stack/layouts/shortcodes/youtube.html @@ -3,9 +3,8 @@ {{- $ytHost := cond $pc.PrivacyEnhanced "www.youtube-nocookie.com" "www.youtube.com" -}} {{- $id := .Get "id" | default (.Get 0) -}}
-