From 2a63d4e9dea2da215468569672d0aa55a5656650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Bastian?= Date: Sat, 30 Jan 2021 21:28:00 +0100 Subject: [PATCH] Layout: ajout d'un champ "source" --- layouts/partials/source.html | 4 ++++ layouts/recettes/single.html | 6 ++++++ scss/style.scss | 7 +++++++ static/css/style.css | 5 +++++ 4 files changed, 22 insertions(+) create mode 100644 layouts/partials/source.html diff --git a/layouts/partials/source.html b/layouts/partials/source.html new file mode 100644 index 0000000..f7f7c85 --- /dev/null +++ b/layouts/partials/source.html @@ -0,0 +1,4 @@ +Source ou inspiration : +{{ with .url -}}{{- end }} + {{- with .name -}}{{ . }}{{- else -}}{{ .url }}{{- end -}} +{{- with .url -}}{{- end }} diff --git a/layouts/recettes/single.html b/layouts/recettes/single.html index da206c9..b8f8148 100644 --- a/layouts/recettes/single.html +++ b/layouts/recettes/single.html @@ -30,6 +30,12 @@ {{ end }}{{ end }} + + {{ with .Params.source }} +
+ {{ partial "source" . }} +
+ {{ end }} {{ end }} {{ define "main" }} diff --git a/scss/style.scss b/scss/style.scss index 41ccbd8..379b2d1 100644 --- a/scss/style.scss +++ b/scss/style.scss @@ -180,6 +180,13 @@ body { font-size: 1.5em; font-weight: bold; } + + .source { + margin-top: 15px; + text-align: right; + font-size: 0.9em; + font-style: italic; + } } #main_photo { diff --git a/static/css/style.css b/static/css/style.css index f327781..d48ee22 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -128,6 +128,11 @@ body { #content #pagename { font-size: 1.5em; font-weight: bold; } + #content .source { + margin-top: 15px; + text-align: right; + font-size: 0.9em; + font-style: italic; } #main_photo { display: flex;