From d6efc731232035abded33c1122b78140231ac5de Mon Sep 17 00:00:00 2001 From: "roneo.org" Date: Fri, 23 Sep 2022 07:15:35 +0200 Subject: [PATCH] Show related posts --- assets/css/common/post-single.css | 12 ++++++++++++ i18n/en.yaml | 3 +++ i18n/fr.yaml | 3 +++ layouts/_default/single.html | 6 ++++++ layouts/partials/related.html | 13 +++++++++++++ 5 files changed, 37 insertions(+) create mode 100644 layouts/partials/related.html diff --git a/assets/css/common/post-single.css b/assets/css/common/post-single.css index 0f569bf5..28505022 100644 --- a/assets/css/common/post-single.css +++ b/assets/css/common/post-single.css @@ -295,6 +295,18 @@ margin-top: 56px; } +.post-footer h3 { + margin: 2em 0 1.2em; +} + +.post-footer .related ul { + padding-inline-start: 20px; +} + +.post-footer .related a:hover { + box-shadow: 0 1px; +} + .post-tags li { display: inline-block; margin-inline-end: 3px; diff --git a/i18n/en.yaml b/i18n/en.yaml index 3a1e2151..e6926e95 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -31,3 +31,6 @@ - id: code_copied translation: "copied!" + +- id: related + translation: "See also" \ No newline at end of file diff --git a/i18n/fr.yaml b/i18n/fr.yaml index b074c107..e164ae10 100644 --- a/i18n/fr.yaml +++ b/i18n/fr.yaml @@ -31,3 +31,6 @@ - id: code_copied translation: "CopiƩ !" + +- id: related + translation: "Voir aussi" \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index b7497255..4f26d3b2 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -36,6 +36,12 @@ {{- end }}