mirror of
https://github.com/kubesphere/website.git
synced 2025-12-26 08:22:54 +00:00
fix: add docs index page navigation
Signed-off-by: ROOMrepair <twekjz@gmail.com>
This commit is contained in:
parent
85ebc72aee
commit
6119b3d8fd
|
|
@ -147,9 +147,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{{ if .IsPage }}
|
||||
{{ partial "pagination" . }}
|
||||
{{ end }}
|
||||
|
||||
<div></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -155,9 +155,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{{ if .IsPage }}
|
||||
{{ partial "pagination" . }}
|
||||
{{ end }}
|
||||
|
||||
<div></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<div class="page-div common-flex-layout">
|
||||
{{ if .IsPage }}
|
||||
<!-- if not each page in a section is pure page we can't simply use prev/nextInsection -->
|
||||
<!-- or is there a better way -->
|
||||
<!-- todo!!! is there a better way to solve this ? -->
|
||||
{{ $current := .}}
|
||||
{{ $p := .Parent.Pages.ByWeight }}
|
||||
{{ $length := len $p }}
|
||||
|
|
@ -29,5 +30,20 @@
|
|||
{{ else }}
|
||||
{{ partial "page_navigation" (dict "context" . "prev" false)}}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<!-- index prev -->
|
||||
{{ partial "page_navigation" (dict "context" . "prev" true)}}
|
||||
|
||||
<!-- index next -->
|
||||
{{ $pages:= .Pages.ByWeight}}
|
||||
{{ if gt $pages 0}}
|
||||
{{ with (index $pages 0)}}
|
||||
<a class="next" href="{{.RelPermalink}}">
|
||||
{{ i18n "Next" }}
|
||||
<span>: {{.LinkTitle}}</span>
|
||||
<img src="/images/docs/v3.3/next.svg" alt="{{ i18n " Next" }}">
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
Loading…
Reference in New Issue