mirror of
https://github.com/thomasjsn/hugo-theme-hello-friend.git
synced 2024-12-26 07:49:27 +01:00
Merge pull request #30 from MyIgel/master
Make "Older/Newer posts" texts configurable and allow empty config file
This commit is contained in:
commit
25ec8673b2
@ -78,6 +78,8 @@ paginate = 5
|
||||
writtenBy = "Written by"
|
||||
readMore = "Read more"
|
||||
readOtherPosts = "Read other posts"
|
||||
newerPosts = "Newer posts"
|
||||
olderPosts = "Older posts"
|
||||
|
||||
[languages.en.params.logo]
|
||||
logoText = "hello friend"
|
||||
|
@ -20,6 +20,8 @@ paginate = 5
|
||||
writtenBy = "Written by"
|
||||
readMore = "Read more"
|
||||
readOtherPosts = "Read other posts"
|
||||
newerPosts = "Newer posts"
|
||||
olderPosts = "Older posts"
|
||||
|
||||
[languages.en.params.logo]
|
||||
logoText = "hello friend"
|
||||
|
@ -11,7 +11,7 @@
|
||||
<span class="post-date">
|
||||
{{ .Date.Format "2006-01-02" }}
|
||||
</span>
|
||||
{{ with .Params.Author }}<span class="post-author">— {{ $.Site.Params.WrittenBy }} {{ . }}</span>{{ end }}
|
||||
{{ with .Params.Author }}<span class="post-author">— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}</span>{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if .Params.tags }}
|
||||
@ -35,7 +35,7 @@
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div><a class="read-more button" href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a></div>
|
||||
<div><a class="read-more button" href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore | default "Read more" }} →</a></div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ partial "pagination.html" . }}
|
||||
|
@ -7,7 +7,7 @@
|
||||
{{ .Format "2006-01-02" }}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ with .Params.Author }}<span class="post-author">— {{ $.Site.Params.WrittenBy }} {{ . }}</span>{{ end }}
|
||||
{{ with .Params.Author }}<span class="post-author">— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}</span>{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if .Params.tags }}
|
||||
@ -28,7 +28,7 @@
|
||||
{{ if or .NextInSection .PrevInSection }}
|
||||
<div class="pagination">
|
||||
<div class="pagination__title">
|
||||
<span class="pagination__title-h">{{ $.Site.Params.ReadOtherPosts }}</span>
|
||||
<span class="pagination__title-h">{{ $.Site.Params.ReadOtherPosts | default "Read other posts" }}</span>
|
||||
<hr />
|
||||
</div>
|
||||
<div class="pagination__buttons">
|
||||
|
@ -8,7 +8,7 @@
|
||||
{{ end }}
|
||||
{{ if gt (len $.Site.Menus.main) $.Site.Params.showMenuItems }}
|
||||
<ul class="menu__sub-inner">
|
||||
<li class="menu__sub-inner-more-trigger">{{ $.Site.Params.MenuMore }} <span class="menu__sub-inner-more-trigger-icon">></span></li>
|
||||
<li class="menu__sub-inner-more-trigger">{{ $.Site.Params.MenuMore | default "Show more" }} <span class="menu__sub-inner-more-trigger-icon">></span></li>
|
||||
|
||||
<ul class="menu__sub-inner-more hidden">
|
||||
{{ range last (sub (len $.Site.Menus.main) $.Site.Params.showMenuItems) $.Site.Menus.main }}
|
||||
|
@ -4,14 +4,14 @@
|
||||
<span class="button previous">
|
||||
<a href="{{ .Paginator.Prev.URL }}">
|
||||
<span class="button__icon">←</span>
|
||||
<span class="button__text">Newer posts</span>
|
||||
<span class="button__text">{{ $.Site.Params.NewerPosts | default "Newer posts" }}</span>
|
||||
</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ if .Paginator.HasNext }}
|
||||
<span class="button next">
|
||||
<a href="{{ .Paginator.Next.URL }}">
|
||||
<span class="button__text">Older posts</span>
|
||||
<span class="button__text">{{ $.Site.Params.OlderPosts | default "Older posts" }}</span>
|
||||
<span class="button__icon">→</span>
|
||||
</a>
|
||||
</span>
|
||||
|
Loading…
Reference in New Issue
Block a user