From a3de983ff27f172b71c62db163158a225bec1a68 Mon Sep 17 00:00:00 2001 From: Miguel de la Cruz Date: Wed, 10 Jan 2024 09:51:59 +0100 Subject: [PATCH] Adds references to posts --- data/en/references.yaml | 2 ++ data/es/references.yaml | 2 ++ themes/hugo-bearcub/assets/style.css | 28 +++++++++++++++++++ themes/hugo-bearcub/layouts/_default/rss.xml | 11 +++++++- .../hugo-bearcub/layouts/_default/single.html | 9 ++++++ 5 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 data/en/references.yaml create mode 100644 data/es/references.yaml diff --git a/data/en/references.yaml b/data/en/references.yaml new file mode 100644 index 0000000..9c7f2e9 --- /dev/null +++ b/data/en/references.yaml @@ -0,0 +1,2 @@ +--- +by: by diff --git a/data/es/references.yaml b/data/es/references.yaml new file mode 100644 index 0000000..961d45b --- /dev/null +++ b/data/es/references.yaml @@ -0,0 +1,2 @@ +--- +by: por diff --git a/themes/hugo-bearcub/assets/style.css b/themes/hugo-bearcub/assets/style.css index c93ee1c..a4c3a74 100644 --- a/themes/hugo-bearcub/assets/style.css +++ b/themes/hugo-bearcub/assets/style.css @@ -179,3 +179,31 @@ figcaption > p { footer a.footerlink { text-decoration: none; } + +content .blog-reference { + width: 100% - 20px; + border: 1px solid; + padding: 10px; + margin: 10px; +} + +content .blog-reference p { + margin: 0; +} + +content .blog-reference p.blog-reference-title { + font-weight: bold; +} + +content .blog-reference p.blog-reference-title > a{ + text-decoration: none; +} + +content .blog-reference p.blog-reference-subtitle { + font-size: 0.8rem; + line-height: 1; +} + +content .blog-reference p.blog-reference-description { + margin-top: 10px; +} diff --git a/themes/hugo-bearcub/layouts/_default/rss.xml b/themes/hugo-bearcub/layouts/_default/rss.xml index 70d1193..6b7cdc1 100644 --- a/themes/hugo-bearcub/layouts/_default/rss.xml +++ b/themes/hugo-bearcub/layouts/_default/rss.xml @@ -65,7 +65,16 @@ {{- with $authorEmail }}{{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }} {{ .Permalink }} {{ .Summary | transform.XMLEscape | safeHTML }} - {{ `` | safeHTML }} + {{ `` | safeHTML }}{{ .name }}{{ `` | safeHTML }} {{ $data.references.by }} {{ .author }}: {{ .description }}{{ `
{{ .name }}
{{ $data.references.by }} {{ .author }}
{{ .description }}