Fix #1: add i18n for en/ru
This commit is contained in:
parent
0f60a781eb
commit
63e411c12f
9 changed files with 73 additions and 13 deletions
|
@ -1,3 +1,3 @@
|
|||
<p>© Дмитрий Колосов, 2020<br>
|
||||
Движок <a target="_blank" href="https://gohugo.io/">Hugo</a>, тема <a target="_blank" href="https://github.com/mitrichius/hugo-theme-anubis">Anubis</a>.
|
||||
<p>© {{ if isset .Site.Params "author"}}{{ .Site.Params.author }}, {{end}}2020<br>
|
||||
{{ i18n "powered" | humanize }} <a target="_blank" href="https://gohugo.io/">Hugo</a>, {{ i18n "theme" }} <a target="_blank" href="https://github.com/mitrichius/hugo-theme-anubis">Anubis</a>.
|
||||
</p>
|
|
@ -1,21 +1,23 @@
|
|||
{{ if or ( .Paginator.HasPrev ) ( .Paginator.HasNext ) }}
|
||||
{{ $toNewPostsMessage := i18n "toNewPosts" | humanize }}
|
||||
{{ $toOldPostsMessage := i18n "toOldPosts" | humanize }}
|
||||
<div class="pagination">
|
||||
<div class="left">
|
||||
{{ if .Paginator.HasPrev }}
|
||||
{{ if eq .Paginator.PageNumber 2 }}
|
||||
<a class="pagination-item" href="{{ .Site.BaseURL }}{{ .Site.LanguagePrefix }}">К новым постам</a>
|
||||
<a class="pagination-item" href="{{ .Site.BaseURL }}{{ .Site.LanguagePrefix }}">{{ $toNewPostsMessage }}</a>
|
||||
{{ else }}
|
||||
<a class="pagination-item" href="{{ .Paginator.Prev.URL }}">К новым постам</a>
|
||||
<a class="pagination-item" href="{{ .Paginator.Prev.URL }}">{{ $toNewPostsMessage }}</a>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<span class="pagination-item disabled">К новым постам</span>
|
||||
<span class="pagination-item disabled">{{ $toNewPostsMessage }}</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="right">
|
||||
{{ if .Paginator.HasNext }}
|
||||
<a class="pagination-item" href="{{ .Paginator.Next.URL }}">К старым постам</a>
|
||||
<a class="pagination-item" href="{{ .Paginator.Next.URL }}">{{ $toOldPostsMessage }}</a>
|
||||
{{ else }}
|
||||
<span class="pagination-item disabled">К старым постам</span>
|
||||
<span class="pagination-item disabled">{{ $toOldPostsMessage }}</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue