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>
|
||||
|
|
|
@ -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