-
-
Notifications
You must be signed in to change notification settings - Fork 453
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed problem with likes/views rendering
- Loading branch information
1 parent
756d07a
commit 6daf41e
Showing
2 changed files
with
32 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
<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 }} | ||
{{ $path := .Path }} | ||
{{range $translations}} | ||
{{ $lang := print "." .Lang ".md" }} | ||
{{ $path = replace $path $lang ".md" }} | ||
{{end}} | ||
<span id="likes_{{ $path }}"> | ||
{{ end }} | ||
{{ $translations := .AllTranslations }} | ||
{{ with .File }} | ||
{{ $path := .Path }} | ||
{{range $translations}} | ||
{{ $lang := print "." .Lang ".md" }} | ||
{{ $path = replace $path $lang ".md" }} | ||
{{end}} | ||
{{ $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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
<span> | ||
{{ if eq .Kind "taxonomy" }} | ||
<span id="views_taxonomy_{{ .Page.Data.Plural }}"> | ||
{{ else if eq .Kind "term" }} | ||
<span id="views_term_{{ .Page.Data.Term }}"> | ||
{{ else }} | ||
{{ $translations := .AllTranslations }} | ||
{{ with .File }} | ||
{{ $path := .Path }} | ||
{{range $translations}} | ||
{{ $lang := print "." .Lang ".md" }} | ||
{{ $path = replace $path $lang ".md" }} | ||
{{end}} | ||
<span id="views_{{ $path }}"> | ||
{{ end }} | ||
{{ $id := "null" }} | ||
{{ if eq .Kind "taxonomy" }} | ||
{{ $id = delimit (slice "views_taxonomy_" .Page.Data.Plural) "" }} | ||
{{ else if eq .Kind "term" }} | ||
{{ $id = delimit (slice "views_term_" .Page.Data.Term) "" }} | ||
{{ else }} | ||
{{ $translations := .AllTranslations }} | ||
{{ with .File }} | ||
{{ $path := .Path }} | ||
{{range $translations}} | ||
{{ $lang := print "." .Lang ".md" }} | ||
{{ $path = replace $path $lang ".md" }} | ||
{{end}} | ||
{{ $id = delimit (slice "views_" $path) "" }} | ||
{{ 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 class="inline-block align-text-bottom">{{ partial "icon.html" "eye" }}</span> | ||
{{ end }} | ||
<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> |