layouts: use details for the post informations

* Wraps the post informations inside a details HTML tag.
* Reduces the bottom margin of the post main heading.
* Reorders the SCSS rules in order to set the post-info class to the
  details HTML tags.
* Add the permalink to the post informations.
* Uses the i18n mechanism for the new layout strings, such as
  "post-infos" or "permalink".
* Updates the changelog.
* Closes #17.

Co-Authored-by: iGor milhit <igor@milhit.ch>
merge-requests/5/merge
iGor milhit 2021-06-06 18:09:48 +02:00
parent e7de77b3ad
commit 9ac94f1d5c
Signed by: igor
GPG Key ID: 692D97C3D0228A99
5 changed files with 47 additions and 28 deletions

View File

@ -16,7 +16,10 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
### Commits
- footer: add link to the last commit [`5621975`](https://framagit.org/iGormilhit/portfoliGor/commit/5621975a29032440d3ffd7dc6e2f7ce15b70e747)
- layouts: use details for the post informations [`13af33a`](https://framagit.org/iGormilhit/portfoliGor/commit/13af33aa88d394faec748ff64840aaec520b3297)
- head: improve the metadata exposed [`e7de77b`](https://framagit.org/iGormilhit/portfoliGor/commit/e7de77b3ad3f67c1833bdc3030cad034e5d0d5c6)
- content: improve verses layout for small screens [`029a3ac`](https://framagit.org/iGormilhit/portfoliGor/commit/029a3ac1745580c999b75ae6fd9b68e520514a91)
- footer: add link to the last commit [`0190c23`](https://framagit.org/iGormilhit/portfoliGor/commit/0190c233e9eb54638ddddf9cccb87405391b3c7b)
- list: fix date variable on the lists and sections [`36a334c`](https://framagit.org/iGormilhit/portfoliGor/commit/36a334cab9d4e2bf746214571287d35a29bdf6eb)
- shortcodes: adds an audio player with album cover [`e1cf918`](https://framagit.org/iGormilhit/portfoliGor/commit/e1cf9185f3f7c3cba4e97c6b2371fb9a465017da)
- head: add a favicon [`e56fddc`](https://framagit.org/iGormilhit/portfoliGor/commit/e56fddc6e0c15bb6839c9cfc6277df5eb8f46d03)

View File

@ -5,7 +5,7 @@
///////////////////
.post-header {
margin: 1em 0;
margin: 1rem 0 .5rem 0;
h1 {
margin: 0;
@ -14,11 +14,15 @@
.post-info {
font-size: $font-size-small;
margin-top: 0;
padding: 0;
color: $snow-storm-light-grey;
> li {
padding-right: .3rem;
> ul {
margin-top: 0;
padding: 0;
> li {
padding-right: .3rem;
}
}
li {
@ -40,7 +44,7 @@
}
@include breakpoint(tablet) {
.post-info {
.post-info > ul {
display: flex;
flex-wrap: wrap;

View File

@ -1,4 +1,7 @@
/////////////////// // FONT // //
///////////////////
// //
// FONT //
// //
///////////////////
$font-size-base: 1.25rem !default; // 25 px

5
i18n/fr.toml 100644
View File

@ -0,0 +1,5 @@
[post-infos]
other = "Informations sur le billet"
[permalink]
other = "Permalien"

View File

@ -1,24 +1,28 @@
<ul class="post-info">
<li>Publié le&#x202F;: {{ dateFormat "2006-01-02" (default .Date (.PublishDate)) }}</li>
{{ if (and (isset .Params "lastmod") (gt (dateFormat "2006-01-02" (.Lastmod)) (dateFormat "2006-01-02" (.PublishDate)))) }}
<li>Dernière mise à jour&#x202F;: {{ .Lastmod.Format "2006-01-02" }}</li>
{{ end }}
{{ with .Params.categories }}
<li>Catégories&#x202F;:
<details class="post-info">
<summary>{{ i18n "post-infos" }}</summary>
<ul>
{{ range sort . }}
<li class="post-taxonomies"><a href="{{ "categories" | absURL}}/{{ . | urlize }}">{{ . }}</a></li>
<li>Publié le&#x202F;: {{ dateFormat "2006-01-02" (default .Date (.PublishDate)) }}</li>
{{ if (and (isset .Params "lastmod") (gt (dateFormat "2006-01-02" (.Lastmod)) (dateFormat "2006-01-02" (.PublishDate)))) }}
<li>Dernière mise à jour&#x202F;: {{ .Lastmod.Format "2006-01-02" }}</li>
{{ end }}
</ul>
</li>
{{ end }}
{{ with .Params.tags }}
<li>Tags&#x202F;:
<ul>
{{ range sort . }}
<li class="post-taxonomies"> <a href="{{ "tags" | absURL }}/{{ . | urlize }}">{{ . }}</a> </li>
{{ with .Params.categories }}
<li>Catégories&#x202F;:
<ul>
{{ range sort . }}
<li class="post-taxonomies"><a href="{{ "categories" | absURL}}/{{ . | urlize }}">{{ . }}</a></li>
{{ end }}
</ul>
</li>
{{ end }}
{{ with .Params.tags }}
<li>Tags&#x202F;:
<ul>
{{ range sort . }}
<li class="post-taxonomies"> <a href="{{ "tags" | absURL }}/{{ . | urlize }}">{{ . }}</a> </li>
{{ end }}
</ul>
</li>
{{ end }}
<li><a href="{{ .Permalink }}">{{ i18n "permalink" }}</a></li>
</ul>
</li>
{{ end }}
</ul>
</details>