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 @@ ...@@ -5,14 +5,18 @@
<h1>Archives</h1> <h1>Archives</h1>
</header> </header>
<ul> {{ $pages := (where .Site.RegularPages "Section" "in" .Site.Params.section_on_frontpage) }}
{{ range (where .Site.RegularPages "Section" "in" .Site.Params.section_on_frontpage) }} {{ range ($pages.GroupByDate "2006") }}
<li> <h2>{{ .Key }}</h2>
{{ .Date.Format "2006-01-02" }} <ul class="archives-list">
<a href="{{ .RelPermalink }}">{{ .Title }}</a> {{ range .Pages }}
</li> <li>
{{ end}} <span><a href="{{ .RelPermalink }}">{{ .Title }}</a></span>
<span class="articles-metadata">{{ partial "article_date.html" .}}</span>
</li>
{{ end }}
</ul> </ul>
{{ end}}
<!-- <!--
<footer> <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"> <p class="articles-metadata">
{{ .Date.Day }} {{ index $.Site.Data.mois (printf "%d" .Date.Month) }} {{ .Date.Year }} {{ partial "article_date.html" .}}
{{ if ne .Lastmod .Date }} - modifié le
{{ .Lastmod.Day }} {{ index $.Site.Data.mois (printf "%d" .Lastmod.Month) }} {{ .Lastmod.Year }}{{ end }}
- -
<span class="article-tags"> <span class="article-tags">
{{ range .Params.tags }} {{ range .Params.tags }}
......
...@@ -21,7 +21,7 @@ nav .brand { font-size: 1.5em; font-weight: bold;} ...@@ -21,7 +21,7 @@ nav .brand { font-size: 1.5em; font-weight: bold;}
/* Styling for elements */ /* Styling for elements */
a { color: #419bd5; text-decoration: none; border-bottom: 1px dotted;} a { color: #419bd5; text-decoration: none; border-bottom: 1px dotted;}
a:hover {color: #FFF; } a:hover {color: #FFF; }
li { line-height: 1.4em; } li { line-height: 1.6em; }
h2 { margin-top: 2.0em; } h2 { margin-top: 2.0em; }
h3 { margin-top: 1.5em; } h3 { margin-top: 1.5em; }
small { font-size: 0.8em; } small { font-size: 0.8em; }
...@@ -100,3 +100,4 @@ footer { ...@@ -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*='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;} 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