mirror of
https://github.com/thegeeklab/hugo-geekdoc.git
synced 2024-11-21 12:20:39 +00:00
fix: add missing navigation for pagination (#540)
This commit is contained in:
parent
54b7d1388f
commit
2f752b32ad
@ -47,3 +47,7 @@ language_switch_no_tranlation_prefix: "Stránka není přeložena:"
|
||||
propertylist_required: povinné
|
||||
propertylist_optional: volitené
|
||||
propertylist_default: výchozí
|
||||
|
||||
pagination_page_prev: předchozí
|
||||
pagination_page_next: další
|
||||
pagination_page_state: "{{ .PageNumber }}/{{ .TotalPages }}"
|
||||
|
@ -47,3 +47,7 @@ language_switch_no_tranlation_prefix: "Seite nicht übersetzt:"
|
||||
propertylist_required: erforderlich
|
||||
propertylist_optional: optional
|
||||
propertylist_default: Standardwert
|
||||
|
||||
pagination_page_prev: vorher
|
||||
pagination_page_next: weiter
|
||||
pagination_page_state: "{{ .PageNumber }}/{{ .TotalPages }}"
|
||||
|
@ -47,3 +47,7 @@ language_switch_no_tranlation_prefix: "Page not translated:"
|
||||
propertylist_required: required
|
||||
propertylist_optional: optional
|
||||
propertylist_default: default
|
||||
|
||||
pagination_page_prev: prev
|
||||
pagination_page_next: next
|
||||
pagination_page_state: "{{ .PageNumber }}/{{ .TotalPages }}"
|
||||
|
@ -47,3 +47,7 @@ language_switch_no_tranlation_prefix: "Pagina non tradotta:"
|
||||
propertylist_required: richiesto
|
||||
propertylist_optional: opzionale
|
||||
propertylist_default: valore predefinito
|
||||
|
||||
pagination_page_prev: precedente
|
||||
pagination_page_next: prossimo
|
||||
pagination_page_state: "{{ .PageNumber }}/{{ .TotalPages }}"
|
||||
|
@ -47,3 +47,7 @@ language_switch_no_tranlation_prefix: "未翻訳のページ:"
|
||||
propertylist_required: 必須
|
||||
propertylist_optional: 任意
|
||||
propertylist_default: 既定値
|
||||
|
||||
pagination_page_prev: 前
|
||||
pagination_page_next: 次
|
||||
pagination_page_state: "{{ .PageNumber }}/{{ .TotalPages }}"
|
||||
|
@ -47,3 +47,7 @@ language_switch_no_tranlation_prefix: "页面未翻译:"
|
||||
propertylist_required: 需要
|
||||
propertylist_optional: 可选
|
||||
propertylist_default: 默认值
|
||||
|
||||
pagination_page_prev: 以前
|
||||
pagination_page_next: 下一个
|
||||
pagination_page_state: "{{ .PageNumber }}/{{ .TotalPages }}"
|
||||
|
@ -31,6 +31,7 @@
|
||||
</footer>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ partial "pagination.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "post-tag" }}
|
||||
|
@ -28,4 +28,5 @@
|
||||
</footer>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ partial "pagination.html" . }}
|
||||
{{ end }}
|
||||
|
22
layouts/partials/pagination.html
Normal file
22
layouts/partials/pagination.html
Normal file
@ -0,0 +1,22 @@
|
||||
{{ $pag := $.Paginator }}
|
||||
|
||||
|
||||
<nav class="gdoc-paging flex flex-even align-center" role="navigation">
|
||||
<div class="gdoc-paging__item gdoc-paging__item--prev">
|
||||
{{ if $pag.HasPrev }}
|
||||
<a class="flex-inline align-center fake-link no-wrap" href="{{ $pag.Prev.URL }}">
|
||||
<i class="gdoc-icon">gdoc_keyboard_arrow_left</i>
|
||||
{{ i18n "pagination_page_prev" | upper }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="gdoc-paging__state">{{ i18n "pagination_page_state" $pag }}</div>
|
||||
<div class="gdoc-paging__item gdoc-paging__item--next">
|
||||
{{ if $pag.HasNext }}
|
||||
<a class="flex-inline align-center fake-link no-wrap" href="{{ $pag.Next.URL }}">
|
||||
{{ i18n "pagination_page_next" | upper }}
|
||||
<i class="gdoc-icon">gdoc_keyboard_arrow_right</i>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</nav>
|
@ -29,6 +29,7 @@
|
||||
</footer>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ partial "pagination.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "post-tag" }}
|
||||
|
@ -679,6 +679,32 @@ svg.gdoc-icon {
|
||||
}
|
||||
}
|
||||
|
||||
.gdoc-paging {
|
||||
padding: $padding-16 0;
|
||||
|
||||
&__item {
|
||||
flex: 1 1 0;
|
||||
|
||||
a:visited {
|
||||
color: var(--link-color);
|
||||
}
|
||||
|
||||
a:hover,
|
||||
a:visited:hover {
|
||||
background: var(--link-color);
|
||||
color: $gray-100;
|
||||
}
|
||||
|
||||
&--next {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
&--prev {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.gdoc-error {
|
||||
padding: $padding-96 $padding-16;
|
||||
margin: 0 auto;
|
||||
|
@ -1,6 +1,7 @@
|
||||
@media print {
|
||||
.gdoc-nav,
|
||||
.gdoc-footer .container span:not(:first-child),
|
||||
.gdoc-paging,
|
||||
.editpage {
|
||||
display: none;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user