Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jsnjack/hugo-changelog-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYauhen Shulitski <jsnjack@gmail.com>2018-10-02 16:15:47 +0300
committerYauhen Shulitski <jsnjack@gmail.com>2018-10-02 16:15:47 +0300
commitfbdc575d22859d3e52b7ec06a39ea83d9c8e87b8 (patch)
tree2de5d0e45eb877f209d1ca43b2200326d6ec5670
parent63a66388be6b66742fd0a905ab50c40571451250 (diff)
:p: Handle empty experimental changes better
-rw-r--r--layouts/index.html26
1 files changed, 14 insertions, 12 deletions
diff --git a/layouts/index.html b/layouts/index.html
index 17c1a76..a322849 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -10,20 +10,22 @@
{{ $paginator := .Paginate ( where .Pages.ByWeight.Reverse "Section" "released" ) }}
<div class="section timeline">
-
{{ if eq $paginator.PageNumber 1 }}
- <div class="timeline-item experimental">
- <div class="timeline-left">
- <div class="timeline-icon"></div>
- </div>
- <div class="changes timeline-content">
- <div>
- {{ range where .Pages "Section" "experimental"}}
- {{ .Content }}
- {{ end }}
+ {{ $experimentalPages := where .Pages "Section" "experimental" }}
+ {{ if $experimentalPages }}
+ <div class="timeline-item experimental">
+ <div class="timeline-left">
+ <div class="timeline-icon"></div>
+ </div>
+ <div class="changes timeline-content">
+ <div>
+ {{ range $experimentalPages }}
+ {{ .Content }}
+ {{ end }}
+ </div>
+ </div>
</div>
- </div>
- </div>
+ {{ end }}
{{ end }}
{{ range $paginator.Pages }}