tutto il js taglist in un file apposito (#327)
Reviewed-on: #327 Co-authored-by: paspo <paolo@asperti.com> Co-committed-by: paspo <paolo@asperti.com>
This commit is contained in:
parent
d4aaa76270
commit
58894ae249
@ -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");
|
||||
$(e).addClass("hidden");
|
||||
return false;
|
||||
}
|
||||
$(moretags).parent().addClass("hidden");
|
||||
e.stopPropagation();
|
||||
}, false);
|
||||
|
@ -1,13 +1,4 @@
|
||||
<section>
|
||||
|
||||
{{ $js := resources.Get "js/taglist.js" }}
|
||||
{{ with $js | minify | fingerprint }}
|
||||
<script
|
||||
src="{{ .RelPermalink }}"
|
||||
integrity="{{ .Data.Integrity }}"
|
||||
crossorigin="anonymous"></script>
|
||||
{{ end }}
|
||||
|
||||
<h3>Tags</h3>
|
||||
<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>
|
||||
{{ 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>
|
||||
|
||||
{{ $js := resources.Get "js/taglist.js" }}
|
||||
{{ with $js | minify | fingerprint }}
|
||||
<script
|
||||
src="{{ .RelPermalink }}"
|
||||
integrity="{{ .Data.Integrity }}"
|
||||
crossorigin="anonymous"></script>
|
||||
{{ end }}
|
||||
</section>
|
||||
|
Loading…
x
Reference in New Issue
Block a user