mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 00:14:05 +00:00
feat(docs): add section pager
This commit is contained in:
1 parent
d664b4bcba
commit
1e9bcd1dcb
2 files changed
+12
-4
No files matched your search
@@ -36,6 +36,10 @@
|
||||
</div>
|
||||
|
||||
{{ partial "tags.html" . }}
|
||||
|
||||
<div class="article-widget">
|
||||
{{ partial "section_pager.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="body-footer">
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
{{ $str := "" }}
|
||||
<div class="post-nav">
|
||||
{{if .NextInSection}}
|
||||
{{/* For the docs layout, prev/next labels are reversed. */}}
|
||||
{{ if eq .Type "docs" }}{{ $str = "previous" }}{{else}}{{ $str = "next" }}{{end}}
|
||||
<div class="post-nav-item">
|
||||
<div class="meta-nav">{{ i18n "next" }}</div>
|
||||
<a href="{{.NextInSection.Permalink}}" rel="next">{{.NextInSection.Title}}</a>
|
||||
<div class="meta-nav">{{ i18n $str }}</div>
|
||||
<a href="{{.NextInSection.RelPermalink}}" rel="next">{{.NextInSection.Title}}</a>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .PrevInSection}}
|
||||
{{ if eq .Type "docs" }}{{ $str = "next" }}{{else}}{{ $str = "previous" }}{{end}}
|
||||
<div class="post-nav-item">
|
||||
<div class="meta-nav">{{ i18n "previous" }}</div>
|
||||
<a href="{{.PrevInSection.Permalink}}" rel="prev">{{.PrevInSection.Title}}</a>
|
||||
<div class="meta-nav">{{ i18n $str }}</div>
|
||||
<a href="{{.PrevInSection.RelPermalink}}" rel="prev">{{.PrevInSection.Title}}</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
Reference in new issue
Block a user