Update style of grouping headers in blog and index

This commit is contained in:
Alexis Tacnet
2017-01-04 14:09:39 +01:00
parent 5ff6beef99
commit 35460d3844
3 changed files with 8 additions and 2 deletions

View File

@@ -11,7 +11,9 @@
<ul> <ul>
{{ range first 5 (.Data.Pages.GroupByDate "Jan, 2006" "desc")}} {{ range first 5 (.Data.Pages.GroupByDate "Jan, 2006" "desc")}}
{{ $nbPages := len (where .Pages "Section" "blog")}} {{ $nbPages := len (where .Pages "Section" "blog")}}
{{ if ne $nbPages 0}}{{ .Key }}{{ end }} {{ if ne $nbPages 0}}
<li class="groupby">{{ .Key }}</li>
{{ end }}
{{ range where .Pages.ByPublishDate "Section" "blog"}} {{ range where .Pages.ByPublishDate "Section" "blog"}}
{{ partial "li.html" . }} {{ partial "li.html" . }}
{{ end }} {{ end }}

View File

@@ -5,7 +5,7 @@
<div class="page-heading">Blog</div> <div class="page-heading">Blog</div>
<ul> <ul>
{{ range .Data.Pages.GroupByDate "Jan, 2006" "desc"}} {{ range .Data.Pages.GroupByDate "Jan, 2006" "desc"}}
{{ .Key }} <li class="groupby">{{ .Key }}</li>
{{ range .Pages.ByPublishDate }} {{ range .Pages.ByPublishDate }}
{{ partial "li.html" . }} {{ partial "li.html" . }}
{{ end }} {{ end }}

View File

@@ -490,6 +490,10 @@ section.main .container.f04 .content .detail {
margin-bottom: 30px; margin-bottom: 30px;
} }
} }
section.main .container .content .groupby {
margin-top: 1em;
padding-left: 0.5em;
}
section.main .container .content .post-item { section.main .container .content .post-item {
display: -webkit-flex; display: -webkit-flex;
display: -moz-flex; display: -moz-flex;