Merge pull request #194 from Mitrichius/fix-post-pagination-without-title
Fix post pagination without post titles
This commit is contained in:
commit
7ba8c815fc
@ -54,3 +54,9 @@ readNext:
|
||||
|
||||
lastMod:
|
||||
other: "Last modified:"
|
||||
|
||||
toNewPost:
|
||||
other: "to new post"
|
||||
|
||||
toOldPost:
|
||||
other: "to old post"
|
@ -51,3 +51,9 @@ readNext:
|
||||
|
||||
lastMod:
|
||||
other: "Отредактировано:"
|
||||
|
||||
toNewPost:
|
||||
other: "к новой записи"
|
||||
|
||||
toOldPost:
|
||||
other: "к старой записи"
|
@ -1,13 +1,15 @@
|
||||
{{ if or ( .PrevInSection ) ( .NextInSection ) }}
|
||||
{{ $toNewPostMessage := i18n "toNewPost" }}
|
||||
{{ $toOldPostMessage := i18n "toOldPost" }}
|
||||
<div class="pagination post-pagination">
|
||||
<div class="left pagination-item {{ if not .NextInSection }}disabled{{ end }}">
|
||||
{{ if .NextInSection }}
|
||||
<a href="{{ .NextInSection.RelPermalink }}">{{ .NextInSection.Title }}</a>
|
||||
<a href="{{ .NextInSection.RelPermalink }}">{{ .NextInSection.Title | default $toNewPostMessage }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="right pagination-item {{ if not .PrevInSection }}disabled{{ end }}">
|
||||
{{ if .PrevInSection }}
|
||||
<a href="{{ .PrevInSection.RelPermalink }}">{{ .PrevInSection.Title }}</a>
|
||||
<a href="{{ .PrevInSection.RelPermalink }}">{{ .PrevInSection.Title | default $toOldPostMessage }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user