Commit 5390f3f9 authored by wbar's avatar wbar
Browse files

new layout for archives page : group articles by year

parent f1821608
......@@ -5,14 +5,18 @@
<h1>Archives</h1>
</header>
<ul>
{{ range (where .Site.RegularPages "Section" "in" .Site.Params.section_on_frontpage) }}
<li>
{{ .Date.Format "2006-01-02" }}
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</li>
{{ end}}
{{ $pages := (where .Site.RegularPages "Section" "in" .Site.Params.section_on_frontpage) }}
{{ range ($pages.GroupByDate "2006") }}
<h2>{{ .Key }}</h2>
<ul class="archives-list">
{{ range .Pages }}
<li>
<span><a href="{{ .RelPermalink }}">{{ .Title }}</a></span>
<span class="articles-metadata">{{ partial "article_date.html" .}}</span>
</li>
{{ end }}
</ul>
{{ end}}
<!--
<footer>
......
{{ .Date.Day }} {{ index $.Site.Data.mois (printf "%d" .Date.Month) }} {{ .Date.Year }}
{{ if ne .Lastmod .Date }} - modifié le
{{ .Lastmod.Day }} {{ index $.Site.Data.mois (printf "%d" .Lastmod.Month) }} {{ .Lastmod.Year }}{{ end }}
<p class="articles-metadata">
{{ .Date.Day }} {{ index $.Site.Data.mois (printf "%d" .Date.Month) }} {{ .Date.Year }}
{{ if ne .Lastmod .Date }} - modifié le
{{ .Lastmod.Day }} {{ index $.Site.Data.mois (printf "%d" .Lastmod.Month) }} {{ .Lastmod.Year }}{{ end }}
{{ partial "article_date.html" .}}
-
<span class="article-tags">
{{ range .Params.tags }}
......
......@@ -21,7 +21,7 @@ nav .brand { font-size: 1.5em; font-weight: bold;}
/* Styling for elements */
a { color: #419bd5; text-decoration: none; border-bottom: 1px dotted;}
a:hover {color: #FFF; }
li { line-height: 1.4em; }
li { line-height: 1.6em; }
h2 { margin-top: 2.0em; }
h3 { margin-top: 1.5em; }
small { font-size: 0.8em; }
......@@ -100,3 +100,4 @@ footer {
ul li a[href*='framasoft.org']:before {content: url('/images/icons/gitlab.png'); margin-right: 2px; vertical-align: -3px;}
ul li a[href*='framapiaf.org']:before {content: url('/images/icons/masto.png'); margin-right: 2px; vertical-align: -3px;}
.archives-list {padding-left: 0px; list-style-type: none;}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment