fix #314 - Archive page shows error when there are 0 posts
This commit is contained in:
parent
e09bbc6d4e
commit
842005439f
|
@ -114,3 +114,6 @@ other = "solarized"
|
||||||
|
|
||||||
[skin-kimbie]
|
[skin-kimbie]
|
||||||
other = "kimbie"
|
other = "kimbie"
|
||||||
|
|
||||||
|
[no-contents]
|
||||||
|
other = "Nothing to Display"
|
|
@ -114,3 +114,6 @@ other = "solarized"
|
||||||
|
|
||||||
[skin-kimbie]
|
[skin-kimbie]
|
||||||
other = "kimbie"
|
other = "kimbie"
|
||||||
|
|
||||||
|
[no-contents]
|
||||||
|
other = "Nothing to Display"
|
|
@ -114,3 +114,6 @@ other = "solarized"
|
||||||
|
|
||||||
[skin-kimbie]
|
[skin-kimbie]
|
||||||
other = "kimbie"
|
other = "kimbie"
|
||||||
|
|
||||||
|
[no-contents]
|
||||||
|
other = "Nothing to Display"
|
|
@ -114,3 +114,6 @@ other = "solarized"
|
||||||
|
|
||||||
[skin-kimbie]
|
[skin-kimbie]
|
||||||
other = "kimbie"
|
other = "kimbie"
|
||||||
|
|
||||||
|
[no-contents]
|
||||||
|
other = "Nothing to Display"
|
|
@ -114,3 +114,6 @@ other = "solarized"
|
||||||
|
|
||||||
[skin-kimbie]
|
[skin-kimbie]
|
||||||
other = "kimbie"
|
other = "kimbie"
|
||||||
|
|
||||||
|
[no-contents]
|
||||||
|
other = "Nothing to Display"
|
|
@ -114,3 +114,6 @@ other = "solarized"
|
||||||
|
|
||||||
[skin-kimbie]
|
[skin-kimbie]
|
||||||
other = "kimbie"
|
other = "kimbie"
|
||||||
|
|
||||||
|
[no-contents]
|
||||||
|
other = "Nothing to Display"
|
|
@ -114,3 +114,6 @@ other = "solarized"
|
||||||
|
|
||||||
[skin-kimbie]
|
[skin-kimbie]
|
||||||
other = "kimbie"
|
other = "kimbie"
|
||||||
|
|
||||||
|
[no-contents]
|
||||||
|
other = "Nothing to Display"
|
|
@ -114,3 +114,6 @@ other = "solarized"
|
||||||
|
|
||||||
[skin-kimbie]
|
[skin-kimbie]
|
||||||
other = "kimbie"
|
other = "kimbie"
|
||||||
|
|
||||||
|
[no-contents]
|
||||||
|
other = "Nothing to Display"
|
|
@ -114,3 +114,6 @@ other = "solarized"
|
||||||
|
|
||||||
[skin-kimbie]
|
[skin-kimbie]
|
||||||
other = "kimbie"
|
other = "kimbie"
|
||||||
|
|
||||||
|
[no-contents]
|
||||||
|
other = "Nothing to Display"
|
|
@ -16,8 +16,8 @@
|
||||||
{{ $filteredPages = (where $filteredPages "Type" "!=" (lower .)) }}
|
{{ $filteredPages = (where $filteredPages "Type" "!=" (lower .)) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if gt (len $filteredPages) 0 }}
|
||||||
{{ $paginator := .Paginate ($filteredPages.GroupByDate ($.Param "archiveGroupByDate" | default "2006")) ($.Param "archivePaginate") }}
|
{{ $paginator := .Paginate ($filteredPages.GroupByDate ($.Param "archiveGroupByDate" | default "2006")) ($.Param "archivePaginate") }}
|
||||||
|
|
||||||
{{ range ($paginator).PageGroups }}
|
{{ range ($paginator).PageGroups }}
|
||||||
<span class="archive__key" data-ani="{{ $.Site.Params.enableUiAnimation | default "true" }}">{{ .Key }}</span>
|
<span class="archive__key" data-ani="{{ $.Site.Params.enableUiAnimation | default "true" }}">{{ .Key }}</span>
|
||||||
<ul class="archive__ul" data-dir="{{ $.Param "languagedir" | default "ltr" }}">
|
<ul class="archive__ul" data-dir="{{ $.Param "languagedir" | default "ltr" }}">
|
||||||
|
@ -37,6 +37,10 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
{{ i18n "no-contents" | default "There is nothing to display" }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="grow"></div>
|
<div class="grow"></div>
|
||||||
{{ partial "pagination/pagination" . }}
|
{{ partial "pagination/pagination" . }}
|
||||||
|
|
|
@ -17,8 +17,9 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="archive__container">
|
<div class="archive__container">
|
||||||
{{ $pages := (where .Site.RegularPages "Section" "talks") }}
|
{{ $pages := (where .Site.RegularPages "Section" "talks") }}
|
||||||
{{ $paginator := .Paginate ($pages.GroupByPublishDate ($.Param "talksGroupByDate" | default "2006")) ($.Param "talksPaginate") }}
|
|
||||||
|
|
||||||
|
{{ if gt (len $pages) 0 }}
|
||||||
|
{{ $paginator := .Paginate ($pages.GroupByPublishDate ($.Param "talksGroupByDate" | default "2006")) ($.Param "talksPaginate") }}
|
||||||
{{ range ($paginator).PageGroups }}
|
{{ range ($paginator).PageGroups }}
|
||||||
<span class="archive__key" data-ani="{{ $.Site.Params.enableUiAnimation | default "true" }}">{{ .Key }}</span>
|
<span class="archive__key" data-ani="{{ $.Site.Params.enableUiAnimation | default "true" }}">{{ .Key }}</span>
|
||||||
<ul class="archive__ul" data-dir="{{ $.Param "languagedir" | default "ltr" }}">
|
<ul class="archive__ul" data-dir="{{ $.Param "languagedir" | default "ltr" }}">
|
||||||
|
@ -45,6 +46,10 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
{{ i18n "no-contents" | default "There is nothing to display" }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="grow"></div>
|
<div class="grow"></div>
|
||||||
{{ partial "pagination/pagination" . }}
|
{{ partial "pagination/pagination" . }}
|
||||||
|
|
Loading…
Reference in New Issue