diff options
| author | Eltrac <hi@guhub.cn> | 2025-04-02 18:28:02 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-04-02 18:28:02 +0800 |
| commit | bbedeb0eaf43472ea51fbdbf76aec420e8045e8b (patch) | |
| tree | 3407cf16fc155461cf9298a3a44715efc97233b5 /layouts/partials/scripts.html | |
| parent | ebfe153b8527ba7feb5b6826dfd75168fb683a1c (diff) | |
| parent | 5b17aaa86f546e12ffdaee4e1417eca020b5b565 (diff) | |
Merge branch 'master' of https://github.com/BigCoke233/geek-death-project
Former-commit-id: 2fce6568356f731fed20198efc886f936b4a38f8
Diffstat (limited to 'layouts/partials/scripts.html')
| -rw-r--r-- | layouts/partials/scripts.html | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index b22c8989..dbf6aee0 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -8,9 +8,12 @@ <script>{{ $lazyload.Content | safeJS }}</script> {{- end }} -{{- $fancybox := resources.Get "js/fancybox.js" | minify }} -{{- if $fancybox }} - <script>{{ $fancybox.Content | safeJS }}</script> +{{- if or (in .Section "posts") (in .Section "cards") (in .Section "library") (eq .Type "single") }} + <script src="/js/fancybox.umd.js"></script> + {{- $fancybox := resources.Get "js/fancybox.js" | minify }} + {{- if $fancybox }} + <script>{{ $fancybox.Content | safeJS }}</script> + {{- end }} {{- end }} <script> |
