mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-21 18:11:37 +01:00
translation list separate partial
This commit is contained in:
parent
084498558c
commit
7170eda172
@ -15,22 +15,7 @@
|
||||
{{- end }}
|
||||
{{- if not (.Param "hideMeta") }}
|
||||
<div class="post-meta">
|
||||
{{- if .IsTranslated -}}
|
||||
<ul class="i18n_list">
|
||||
{{- i18n "translations" | default "Translations"}}:
|
||||
{{- range .Translations }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">
|
||||
{{- if (and $.Site.Params.displayFullLangName (.Language.LanguageName)) }}
|
||||
{{- .Language.LanguageName | emojify | humanize -}}
|
||||
{{- else }}
|
||||
{{- .Lang | humanize -}}
|
||||
{{- end -}}
|
||||
</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
{{- partial "translation_list.html" . -}}
|
||||
</div>
|
||||
{{- end}}
|
||||
</header>
|
||||
|
@ -31,24 +31,8 @@
|
||||
{{- end }}
|
||||
{{- if not (.Param "hideMeta") }}
|
||||
<div class="post-meta">
|
||||
{{- partial "post_meta.html" . -}}
|
||||
{{- if .IsTranslated -}}
|
||||
{{- if or .Params.author $.Site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) }} | {{- end -}}
|
||||
<ul class="i18n_list">
|
||||
{{- i18n "translations" | default "Translations"}}:
|
||||
{{- range .Translations }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">
|
||||
{{- if (and $.Site.Params.displayFullLangName (.Language.LanguageName)) }}
|
||||
{{- .Language.LanguageName | emojify | humanize -}}
|
||||
{{- else }}
|
||||
{{- .Lang | humanize -}}
|
||||
{{- end -}}
|
||||
</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
{{- partial "post_meta.html" . -}}
|
||||
{{- partial "translation_list.html" . -}}
|
||||
</div>
|
||||
{{- end}}
|
||||
</header>
|
||||
|
19
layouts/partials/translation_list.html
Normal file
19
layouts/partials/translation_list.html
Normal file
@ -0,0 +1,19 @@
|
||||
{{- if .IsTranslated -}}
|
||||
{{- if (ne .Layout "search")}}
|
||||
{{- if or .Params.author $.Site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) }} | {{- end -}}
|
||||
{{- end }}
|
||||
<ul class="i18n_list">
|
||||
{{- i18n "translations" | default "Translations"}}:
|
||||
{{- range .Translations }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">
|
||||
{{- if (and $.Site.Params.displayFullLangName (.Language.LanguageName)) }}
|
||||
{{- .Language.LanguageName | emojify | humanize -}}
|
||||
{{- else }}
|
||||
{{- .Lang | humanize -}}
|
||||
{{- end -}}
|
||||
</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end }}
|
Loading…
Reference in New Issue
Block a user