diff options
| author | BigCoke233 <hi@guhub.cn> | 2026-01-22 23:00:12 +0800 |
|---|---|---|
| committer | BigCoke233 <hi@guhub.cn> | 2026-01-22 23:00:12 +0800 |
| commit | d5dcb97a4bd7eff2886132670ad6ce04d73c13be (patch) | |
| tree | 2ad780cc7d77b4850fd2dadba7fc3cd08dd756f0 | |
| parent | ab7d9fcc13a9beb631fb49b0a9c2e905159b07d2 (diff) | |
perf: lazy load webmention images
Former-commit-id: fc1f1d2280dcc9798821fd951b348e692179dcf2
| -rw-r--r-- | layouts/_partials/posts/action-menu/webmention-section.html | 3 |
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> |
