7c127074f9
Replace deprecated config keys and template methods per Hugo v0.158.0: Config (10 files): - languageCode → locale - languageName → label Templates: - site.LanguageCode → site.Language.Locale (baseof.html, head.html, schema.html x2) - site.Language.Lang → site.Language.Name (single.html) - .Lang → .Language.Name (likes.html, views.html) Ref: https://discourse.gohugo.io/t/deprecations-in-v0-158-0/56869
26 lines
858 B
HTML
26 lines
858 B
HTML
<span>
|
|
{{ $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 "." .Language.Name ".md" }}
|
|
{{ $path = replace $path $lang ".md" }}
|
|
{{ end }}
|
|
{{ $id = delimit (slice "views_" $path) "" }}
|
|
{{ end }}
|
|
{{ 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>
|