mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-01-22 22:45:42 -06:00
fixed problem with likes/views rendering
This commit is contained in:
parent
756d07aa80
commit
6daf41ed2b
2 changed files with 32 additions and 28 deletions
|
@ -1,8 +1,9 @@
|
|||
<span>
|
||||
{{ $id := "null" }}
|
||||
{{ if eq .Kind "taxonomy" }}
|
||||
<span id="likes_taxonomy_{{ .Page.Data.Plural }}">
|
||||
{{ $id = delimit (slice "likes_taxonomy_" .Page.Data.Plural) "" }}
|
||||
{{ else if eq .Kind "term" }}
|
||||
<span id="likes_term_{{ .Page.Data.Term }}">
|
||||
{{ $id = delimit (slice "likes_term_" .Page.Data.Term) "" }}
|
||||
{{ else }}
|
||||
{{ $translations := .AllTranslations }}
|
||||
{{ with .File }}
|
||||
|
@ -11,9 +12,11 @@
|
|||
{{ $lang := print "." .Lang ".md" }}
|
||||
{{ $path = replace $path $lang ".md" }}
|
||||
{{end}}
|
||||
<span id="likes_{{ $path }}">
|
||||
{{ $id = delimit (slice "likes_" $path) "" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
class="animate-pulse inline-block text-transparent max-h-3 rounded-full mt-[-2px] align-middle bg-neutral-300 dark:bg-neutral-400" title="likes">loading</span>
|
||||
<span id="{{ $id }}"
|
||||
class="animate-pulse inline-block text-transparent max-h-3 rounded-full mt-[-2px] align-middle bg-neutral-300 dark:bg-neutral-400"
|
||||
title="likes">loading</span>
|
||||
<span class="inline-block align-text-bottom">{{ partial "icon.html" "heart" }}</span>
|
||||
</span>
|
|
@ -1,8 +1,9 @@
|
|||
<span>
|
||||
{{ $id := "null" }}
|
||||
{{ if eq .Kind "taxonomy" }}
|
||||
<span id="views_taxonomy_{{ .Page.Data.Plural }}">
|
||||
{{ $id = delimit (slice "views_taxonomy_" .Page.Data.Plural) "" }}
|
||||
{{ else if eq .Kind "term" }}
|
||||
<span id="views_term_{{ .Page.Data.Term }}">
|
||||
{{ $id = delimit (slice "views_term_" .Page.Data.Term) "" }}
|
||||
{{ else }}
|
||||
{{ $translations := .AllTranslations }}
|
||||
{{ with .File }}
|
||||
|
@ -11,9 +12,9 @@
|
|||
{{ $lang := print "." .Lang ".md" }}
|
||||
{{ $path = replace $path $lang ".md" }}
|
||||
{{end}}
|
||||
<span id="views_{{ $path }}">
|
||||
{{ $id = delimit (slice "views_" $path) "" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
class="animate-pulse inline-block text-transparent max-h-3 rounded-full mt-[-2px] align-middle bg-neutral-300 dark:bg-neutral-400" title="views">loading</span>
|
||||
<span id="{{ $id }}" class="animate-pulse inline-block text-transparent max-h-3 rounded-full mt-[-2px] align-middle bg-neutral-300 dark:bg-neutral-400" title="views">loading</span>
|
||||
<span class="inline-block align-text-bottom">{{ partial "icon.html" "eye" }}</span>
|
||||
</span>
|
Loading…
Reference in a new issue