tutto il js taglist in un file apposito (#327)
Some checks failed
Container Publish / build-image (push) Successful in 6m57s
Vulnerability Scan / Daily Vulnerability Scan (push) Failing after 17s

Reviewed-on: #327
Co-authored-by: paspo <paolo@asperti.com>
Co-committed-by: paspo <paolo@asperti.com>
This commit is contained in:
Paolo Asperti 2024-10-30 22:04:56 +00:00 committed by Paolo Asperti
parent d4aaa76270
commit 58894ae249
2 changed files with 14 additions and 14 deletions

View File

@ -1,5 +1,6 @@
function show_all_tags(e) { var moretags = document.getElementById('more-tags');
moretags.addEventListener('click', function(e) {
$(".tags-sidebar li").removeClass("hidden"); $(".tags-sidebar li").removeClass("hidden");
$(e).addClass("hidden"); $(moretags).parent().addClass("hidden");
return false; e.stopPropagation();
} }, false);

View File

@ -1,13 +1,4 @@
<section> <section>
{{ $js := resources.Get "js/taglist.js" }}
{{ with $js | minify | fingerprint }}
<script
src="{{ .RelPermalink }}"
integrity="{{ .Data.Integrity }}"
crossorigin="anonymous"></script>
{{ end }}
<h3>Tags</h3> <h3>Tags</h3>
<ul class="tags-sidebar"> <ul class="tags-sidebar">
@ -58,6 +49,14 @@
<a style="font-size: {{ $font_size }}rem;" href="/{{ .Page.Lang }}{{ .Page.Path }}">{{ .Page.LinkTitle | safeHTML }} ({{ len .Pages }})</a></li> <a style="font-size: {{ $font_size }}rem;" href="/{{ .Page.Lang }}{{ .Page.Path }}">{{ .Page.LinkTitle | safeHTML }} ({{ len .Pages }})</a></li>
{{ end }} {{ end }}
{{ end }} {{ end }}
<li><a href="#" onclick="return show_all_tags(this)">{{ T "more_tags" }}</a></li> <li><a id="more-tags">{{ T "more_tags" }}</a></li>
</ul> </ul>
{{ $js := resources.Get "js/taglist.js" }}
{{ with $js | minify | fingerprint }}
<script
src="{{ .RelPermalink }}"
integrity="{{ .Data.Integrity }}"
crossorigin="anonymous"></script>
{{ end }}
</section> </section>