From 077d0153615645d39d67298e67d685524e5e5c3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Bastian?= Date: Sun, 4 Aug 2019 17:11:50 +0200 Subject: [PATCH] =?UTF-8?q?Add=20"posts"=20section,=20archetype,=20?= =?UTF-8?q?=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archetypes/posts.md | 7 +++++++ content/posts/_index.md | 3 +++ content/recettes/_index.md | 3 +++ layouts/index.html | 9 +++++++++ layouts/partials/postlist.html | 5 +++++ layouts/partials/recipelist.html | 4 +--- scss/_params.scss | 4 ++++ scss/style.scss | 7 +++++++ static/css/style.css | 14 ++++++++++---- 9 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 archetypes/posts.md create mode 100644 content/posts/_index.md create mode 100644 content/recettes/_index.md create mode 100644 layouts/partials/postlist.html diff --git a/archetypes/posts.md b/archetypes/posts.md new file mode 100644 index 0000000..c9ab820 --- /dev/null +++ b/archetypes/posts.md @@ -0,0 +1,7 @@ +--- +title: "" # FIXME +date: 2019-07-13T10:43:40+02:00 # FIXME? +draft: true # FIXME +--- + +Insérer l'article ici diff --git a/content/posts/_index.md b/content/posts/_index.md new file mode 100644 index 0000000..1c63b2a --- /dev/null +++ b/content/posts/_index.md @@ -0,0 +1,3 @@ +--- +title: "Techniques, principes, …" +--- diff --git a/content/recettes/_index.md b/content/recettes/_index.md new file mode 100644 index 0000000..52699a1 --- /dev/null +++ b/content/recettes/_index.md @@ -0,0 +1,3 @@ +--- +title: "Les recettes" +--- diff --git a/layouts/index.html b/layouts/index.html index a969628..c61c3e0 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -4,5 +4,14 @@ {{ define "main" }} {{ .Content }} +{{ range where .Sections "Type" "==" "recettes" }} +

{{ .Title }}

{{ partial "recipelist.html" . }} {{ end }} + +{{ range where .Sections "Type" "==" "posts" }} +

{{ .Title }}

+{{ partial "postlist.html" . }} +{{ end }} + +{{ end }} diff --git a/layouts/partials/postlist.html b/layouts/partials/postlist.html new file mode 100644 index 0000000..81ab71d --- /dev/null +++ b/layouts/partials/postlist.html @@ -0,0 +1,5 @@ + diff --git a/layouts/partials/recipelist.html b/layouts/partials/recipelist.html index b431514..d9069db 100644 --- a/layouts/partials/recipelist.html +++ b/layouts/partials/recipelist.html @@ -1,6 +1,5 @@ -{{ range where .Sections "Type" "==" "recettes" }} {{ range sort .Sections "Params.homepage_index" }} -

{{ .Title }}

+

{{ .Title }}

{{ end }} -{{ end }} diff --git a/scss/_params.scss b/scss/_params.scss index 8ddea50..0600394 100644 --- a/scss/_params.scss +++ b/scss/_params.scss @@ -3,6 +3,10 @@ $bg_color: #010018; $link_color: #2081c8; $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; $head_bg_color: $secondary_bg_color; $footer_fg_color: darken($fg_color, 30%); diff --git a/scss/style.scss b/scss/style.scss index c6ade39..c7f3c32 100644 --- a/scss/style.scss +++ b/scss/style.scss @@ -88,16 +88,19 @@ body { h1 { font-size: 1.4em; + color: $title_h1_color; } h2 { font-size: 1.3em; text-indent: 2ex; + color: $title_h2_color; } h3 { font-size: 1.1em; text-indent: 4ex; + color: $title_h3_color; } .pagenamerow { @@ -136,6 +139,10 @@ ul { list-style-type: circle; } +.homepagecat { + margin-top: 50px; +} + .headbadges { display: flex; align-items: center; diff --git a/static/css/style.css b/static/css/style.css index 00401e7..0c50067 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -64,13 +64,16 @@ body { padding: 2em 1em; height: 100%; } #content h1 { - font-size: 1.4em; } + font-size: 1.4em; + color: #ffc467; } #content h2 { font-size: 1.3em; - text-indent: 2ex; } + text-indent: 2ex; + color: #ffd89a; } #content h3 { font-size: 1.1em; - text-indent: 4ex; } + text-indent: 4ex; + color: #ffeccd; } #content .pagenamerow { display: flex; align-items: center; @@ -81,7 +84,7 @@ body { #foot { font-size: 0.7em; - color: #989898; + color: #989797; display: flex; justify-content: flex-end; align-items: center; @@ -97,6 +100,9 @@ a, a:visited { ul { list-style-type: circle; } +.homepagecat { + margin-top: 50px; } + .headbadges { display: flex; align-items: center;