summaryrefslogtreecommitdiff
path: root/layouts/_partials/scripts.html
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-08-02 09:27:40 +0800
committerEltrac <hi@guhub.cn>2025-08-02 09:27:40 +0800
commitea845e50495d79f48315c281186a51aa486ae263 (patch)
tree2c84db4e66e639b6dc40d9e4dece3227cbb9cad2 /layouts/_partials/scripts.html
parent472574f12a7b9c2f4617feda17e54d940dfc8972 (diff)
perf: refactor render-blocking action-menu logic
- put initialization script at the end of the page - delay initialization furthermore - delay comment count fetch after giscus iframe is loaded
Diffstat (limited to 'layouts/_partials/scripts.html')
-rw-r--r--layouts/_partials/scripts.html4
1 files changed, 4 insertions, 0 deletions
diff --git a/layouts/_partials/scripts.html b/layouts/_partials/scripts.html
index 6dc0080b..7c000323 100644
--- a/layouts/_partials/scripts.html
+++ b/layouts/_partials/scripts.html
@@ -7,6 +7,10 @@
{{ partial "scripts/fancybox-js" . }}
{{ partial "scripts/aplayer-js" . }}
+{{ if .File }}
+ {{ partial "scripts/action-menu-js" (.File.UniqueID | urlize) }}
+{{ end }}
+
{{ with resources.Get "js/tooltip.js" }}
<script>{{ .Content | safeJS }}</script>
{{ end }}