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;