fixed bug in list.html likes and views

This commit is contained in:
Nuno Coração 2023-05-08 21:35:02 +01:00
parent e75be1c390
commit cb77f886ea
2 changed files with 14 additions and 10 deletions

View file

@ -10,14 +10,6 @@
{{ end }}
{{- end -}}
<script>
var oid = "views_{{ .File.Path }}"
var oid_likes = "likes_{{ .File.Path }}"
</script>
{{ $jsPage := resources.Get "js/page.js" }}
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint "sha512" }}
<script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}"></script>
{{ $toc := and (.Params.showTableOfContents | default (.Site.Params.list.showTableOfContents | default false)) (in
.TableOfContents "<ul") }} <header>
{{ if .Params.showBreadcrumbs | default (.Site.Params.list.showBreadcrumbs | default false) }}
@ -27,6 +19,13 @@
<div class="mt-1 mb-2 text-base text-neutral-500 dark:text-neutral-400 print:hidden">
{{ partial "article-meta/list.html" (dict "context" . "scope" "single") }}
</div>
<script>
var oid = "views_{{ .File.Path }}"
var oid_likes = "likes_{{ .File.Path }}"
</script>
{{ $jsPage := resources.Get "js/page.js" }}
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint "sha512" }}
<script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}"></script>
</header>
<section class="{{ if $toc -}}
mt-12
@ -44,6 +43,9 @@
{{ .Content | emojify }}
</div>
</section>
{{ if gt .Pages 0 }}

View file

@ -42,6 +42,7 @@
</br></br>
{{ partial "series-closed.html" . }}
</div>
<script>
var oid = "views_{{ .File.Path }}"
var oid_likes = "likes_{{ .File.Path }}"
@ -49,6 +50,7 @@
{{ $jsPage := resources.Get "js/page.js" }}
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint "sha512" }}
<script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}"></script>
</section>
<footer class="pt-8 max-w-prose print:hidden">