forked from mirror/Mainroad
implement multilang
This commit is contained in:
parent
0365a26f4a
commit
e1ff8c0f8c
3 changed files with 7 additions and 3 deletions
layouts
|
@ -6,7 +6,11 @@
|
|||
</div>
|
||||
{{- end }}
|
||||
|
||||
{{ $paginator := (.Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections).ByDate.Reverse (.Site.Params.pagerSizeIndex | default 5))}}
|
||||
{{ $pages := .Site.RegularPages }}
|
||||
{{ range .Site.Home.Translations }}
|
||||
{{ $pages = $pages | lang.Merge .Site.RegularPages }}
|
||||
{{ end }}
|
||||
{{ $paginator := (.Paginate (where $pages "Type" "in" .Site.Params.mainSections).ByDate.Reverse (.Site.Params.pagerSizeIndex | default 5))}}
|
||||
{{ range $paginator.Pages }}
|
||||
{{- .Render "summary" }}
|
||||
{{ end }}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="footer__links">
|
||||
{{ range $key, $value := . }}
|
||||
{{- if ne $key 0 }} | {{ end -}}
|
||||
<a class="footer__link" href="{{ $value.URL }}" {{- if not .Page }} target="_blank"{{ end }}>{{ $value.Name }}</a>
|
||||
<a class="footer__link" href="{{ $value.URL }}" {{- if not .Page }} target="_blank"{{ end }}>{{ i18n $value.Identifier | default $value.Name}}</a>
|
||||
{{- end }}
|
||||
</div>
|
||||
{{- end }}
|
|
@ -12,7 +12,7 @@
|
|||
{{ if .Pre }}
|
||||
{{ readFile (printf "static%s" .Pre) | safeHTML }}
|
||||
{{ end }}
|
||||
<span class="menu__text">{{ .Name }}</span>
|
||||
<span class="menu__text">{{ i18n .Identifier | default .Name}}</span>
|
||||
{{ .Post }}
|
||||
</a>
|
||||
</li>
|
||||
|
|
Loading…
Add table
Reference in a new issue