From 5d3bea73a5b63183e5363f84b7ae95dd0226b8ca Mon Sep 17 00:00:00 2001 From: vimux Date: Fri, 25 May 2018 17:29:46 +0300 Subject: [PATCH] Add initial "related articles" block --- i18n/en.yaml | 4 ++++ layouts/_default/single.html | 1 + layouts/partials/related.html | 11 +++++++++++ static/css/main.css | 5 +++++ 4 files changed, 21 insertions(+) create mode 100644 layouts/partials/related.html diff --git a/i18n/en.yaml b/i18n/en.yaml index 78b68ca..644b07b 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -8,6 +8,10 @@ - id: meta_categories translation: Categories +# Related +- id: related_title + translation: Related + # Footer - id: footer_credits translation: "Powered by Hugo and Binario theme." diff --git a/layouts/_default/single.html b/layouts/_default/single.html index ed55c50..db6fe87 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -14,6 +14,7 @@ {{ end }} + {{ partial "related.html" . }} {{ partial "comments.html" . }} {{ partial "footer.html" . }} \ No newline at end of file diff --git a/layouts/partials/related.html b/layouts/partials/related.html new file mode 100644 index 0000000..a17cc6f --- /dev/null +++ b/layouts/partials/related.html @@ -0,0 +1,11 @@ +{{ $related := .Site.RegularPages.Related . | first 5 }} +{{ with $related }} + +{{ end }} \ No newline at end of file diff --git a/static/css/main.css b/static/css/main.css index f6d91da..4f115d9 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -706,6 +706,11 @@ mark { margin-bottom: .625rem; } +/*Related */ +.related { + margin-top: .625rem; +} + /* Pagination */ .pagination { margin-bottom: .625rem;