Add "posts" section, archetype, …

This commit is contained in:
Théophile Bastian 2019-08-04 17:11:50 +02:00
parent ef6778edba
commit 077d015361
9 changed files with 49 additions and 7 deletions

7
archetypes/posts.md Normal file
View file

@ -0,0 +1,7 @@
---
title: "" # FIXME
date: 2019-07-13T10:43:40+02:00 # FIXME?
draft: true # FIXME
---
Insérer l'article ici

3
content/posts/_index.md Normal file
View file

@ -0,0 +1,3 @@
---
title: "Techniques, principes, …"
---

View file

@ -0,0 +1,3 @@
---
title: "Les recettes"
---

View file

@ -4,5 +4,14 @@
{{ define "main" }} {{ define "main" }}
{{ .Content }} {{ .Content }}
{{ range where .Sections "Type" "==" "recettes" }}
<h2 class="homepagecat">{{ .Title }}</h2>
{{ partial "recipelist.html" . }} {{ partial "recipelist.html" . }}
{{ end }} {{ end }}
{{ range where .Sections "Type" "==" "posts" }}
<h2 class="homepagecat">{{ .Title }}</h2>
{{ partial "postlist.html" . }}
{{ end }}
{{ end }}

View file

@ -0,0 +1,5 @@
<ul>
{{ range sort .Pages "Title" }}
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>

View file

@ -1,6 +1,5 @@
{{ range where .Sections "Type" "==" "recettes" }}
{{ range sort .Sections "Params.homepage_index" }} {{ range sort .Sections "Params.homepage_index" }}
<h2 class="recipecat">{{ .Title }}</h2> <h3 class="recipecat">{{ .Title }}</h3>
<ul> <ul>
{{ range sort .Pages "Title" }} {{ range sort .Pages "Title" }}
@ -8,4 +7,3 @@
{{ end }} {{ end }}
</ul> </ul>
{{ end }} {{ end }}
{{ end }}

View file

@ -3,6 +3,10 @@
$bg_color: #010018; $bg_color: #010018;
$link_color: #2081c8; $link_color: #2081c8;
$fg_color: #e4e4e4; $fg_color: #e4e4e4;
$title_base_color: #ffc467;
$title_h1_color: lighten($title_base_color, 0%);
$title_h2_color: lighten($title_base_color, 10%);
$title_h3_color: lighten($title_base_color, 20%);
$secondary_bg_color: #178ca7; $secondary_bg_color: #178ca7;
$head_bg_color: $secondary_bg_color; $head_bg_color: $secondary_bg_color;
$footer_fg_color: darken($fg_color, 30%); $footer_fg_color: darken($fg_color, 30%);

View file

@ -88,16 +88,19 @@ body {
h1 { h1 {
font-size: 1.4em; font-size: 1.4em;
color: $title_h1_color;
} }
h2 { h2 {
font-size: 1.3em; font-size: 1.3em;
text-indent: 2ex; text-indent: 2ex;
color: $title_h2_color;
} }
h3 { h3 {
font-size: 1.1em; font-size: 1.1em;
text-indent: 4ex; text-indent: 4ex;
color: $title_h3_color;
} }
.pagenamerow { .pagenamerow {
@ -136,6 +139,10 @@ ul {
list-style-type: circle; list-style-type: circle;
} }
.homepagecat {
margin-top: 50px;
}
.headbadges { .headbadges {
display: flex; display: flex;
align-items: center; align-items: center;

View file

@ -64,13 +64,16 @@ body {
padding: 2em 1em; padding: 2em 1em;
height: 100%; } height: 100%; }
#content h1 { #content h1 {
font-size: 1.4em; } font-size: 1.4em;
color: #ffc467; }
#content h2 { #content h2 {
font-size: 1.3em; font-size: 1.3em;
text-indent: 2ex; } text-indent: 2ex;
color: #ffd89a; }
#content h3 { #content h3 {
font-size: 1.1em; font-size: 1.1em;
text-indent: 4ex; } text-indent: 4ex;
color: #ffeccd; }
#content .pagenamerow { #content .pagenamerow {
display: flex; display: flex;
align-items: center; align-items: center;
@ -81,7 +84,7 @@ body {
#foot { #foot {
font-size: 0.7em; font-size: 0.7em;
color: #989898; color: #989797;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
@ -97,6 +100,9 @@ a, a:visited {
ul { ul {
list-style-type: circle; } list-style-type: circle; }
.homepagecat {
margin-top: 50px; }
.headbadges { .headbadges {
display: flex; display: flex;
align-items: center; align-items: center;