summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorBigCoke233 <hi@guhub.cn>2026-01-22 23:00:12 +0800
committerBigCoke233 <hi@guhub.cn>2026-01-22 23:00:12 +0800
commitfc1f1d2280dcc9798821fd951b348e692179dcf2 (patch)
tree29a9e61b4d82cfad014c21947dbe612f644fac5f /layouts
parent11d46195a56cb19001fcba854baa6ca757fc083a (diff)
perf: lazy load webmention images
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_partials/posts/action-menu/webmention-section.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/layouts/_partials/posts/action-menu/webmention-section.html b/layouts/_partials/posts/action-menu/webmention-section.html
index b304feae..98b31689 100644
--- a/layouts/_partials/posts/action-menu/webmention-section.html
+++ b/layouts/_partials/posts/action-menu/webmention-section.html
@@ -27,7 +27,8 @@
{{ $value := math.Floor (mul math.Rand 80) }}
{{ $rotate := cond (lt $value 40) (sub 10 $value) (sub $value 30) }}
<img src="{{ .author.photo }}" alt="Profile Picture"
- class="h-5 w-5 rd-full transition-transform {{ if lt $rotate 0 }}group-hover:-rotate-{{ mul -1 $rotate }}{{ else }}group-hover:rotate-{{ $rotate }}{{ end }} hover:scale-150" />
+ loading="lazy"
+ class="h-5 w-5 rd-full transition-transform {{ if lt $rotate 0 }}group-hover:-rotate-{{ mul -1 $rotate }}{{ else }}group-hover:rotate-{{ $rotate }}{{ end }} hover:scale-150" />
</a>
{{ end }}
</div>