translation list separate partial
This commit is contained in:
parent
084498558c
commit
7170eda172
@ -15,22 +15,7 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if not (.Param "hideMeta") }}
|
{{- if not (.Param "hideMeta") }}
|
||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
{{- if .IsTranslated -}}
|
{{- partial "translation_list.html" . -}}
|
||||||
<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 }}
|
|
||||||
</div>
|
</div>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
</header>
|
</header>
|
||||||
|
@ -31,24 +31,8 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if not (.Param "hideMeta") }}
|
{{- if not (.Param "hideMeta") }}
|
||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
{{- partial "post_meta.html" . -}}
|
{{- partial "post_meta.html" . -}}
|
||||||
{{- if .IsTranslated -}}
|
{{- partial "translation_list.html" . -}}
|
||||||
{{- 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 }}
|
|
||||||
</div>
|
</div>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
</header>
|
</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