Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Chagratt
bwog-notes-v2
Commits
5390f3f9
Commit
5390f3f9
authored
May 02, 2020
by
wbar
Browse files
new layout for archives page : group articles by year
parent
f1821608
Changes
4
Hide whitespace changes
Inline
Side-by-side
layouts/archives/list.html
View file @
5390f3f9
...
...
@@ -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>
...
...
layouts/partials/article_date.html
0 → 100644
View file @
5390f3f9
{{ .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 }}
layouts/partials/metadata.html
View file @
5390f3f9
<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 }}
...
...
static/css/style.css
View file @
5390f3f9
...
...
@@ -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.
4
em
;
}
li
{
line-height
:
1.
6
em
;
}
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
;}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment