From 0c21f00b671865f392a27a156b7d036fb7e3949e Mon Sep 17 00:00:00 2001 From: iGor milhit Date: Sun, 2 Jan 2022 20:24:06 +0100 Subject: [PATCH] post image: get the image in the atom xml file * Moves the image from the post header to the main content. * Fixes an error in the publication date in the atom file. * Adapts the style of the figure when it's a post image. * Comments the single page template. Co-Authored-by: iGor milhit --- assets/scss/_medias.scss | 18 ++++++++++++++++++ assets/scss/_post.scss | 4 ---- layouts/_default/rss.xml | 2 +- layouts/_default/single.html | 23 ++++++++++++++++++----- 4 files changed, 37 insertions(+), 10 deletions(-) diff --git a/assets/scss/_medias.scss b/assets/scss/_medias.scss index 343faab..16be130 100644 --- a/assets/scss/_medias.scss +++ b/assets/scss/_medias.scss @@ -1,3 +1,9 @@ +/////////////////// +// // +// MEDIAS // +// // +/////////////////// + .audio, .stream { border: $dark-polar solid 1px; @@ -71,3 +77,15 @@ figure { } } } + +.post-image { + border: none; + margin-left: 0; + padding-left: 0; + + @include breakpoint(laptop) { + max-width: 97%; + margin-right: 0; + padding-right: 0; + } +} diff --git a/assets/scss/_post.scss b/assets/scss/_post.scss index ae968be..d0fc570 100644 --- a/assets/scss/_post.scss +++ b/assets/scss/_post.scss @@ -10,10 +10,6 @@ } } -.post-image { - width: 97%; -} - .post-info { > ul { diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 854c203..f469733 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -29,7 +29,7 @@ {{ .Title }} {{ .Permalink }} - {{ .PublishDate.Format "2006-01-02" | safeHTML }} + {{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} {{ .Permalink }} {{ .Content | html }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index b852cd2..3483a52 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,17 +1,30 @@ {{ define "main" }}
- {{ if .Params.postimage -}} - {{ .Params.postimagedescription }} - {{ end }}

{{ .Title }}

+ {{- if ne .Layout "static" }} {{- partial "post-info.html" . -}} {{ end }}
+
+ + {{ if .Params.postimage -}} +
+ {{ .Params.postimagedescription }} +
+ {{ end }} {{ .Content -}}
{{ end -}}