From ac180f2d20bc811b662b55b7b0da62a8a42d7d40 Mon Sep 17 00:00:00 2001 From: mms Date: Tue, 5 Dec 2023 23:07:58 +0100 Subject: chore: general tidy yp --- layouts/_default/index.html | 18 +++++++++++++----- layouts/_default/list.html | 16 +++++++++------- 2 files changed, 22 insertions(+), 12 deletions(-) (limited to 'layouts/_default') diff --git a/layouts/_default/index.html b/layouts/_default/index.html index 2770e36..008a958 100644 --- a/layouts/_default/index.html +++ b/layouts/_default/index.html @@ -10,14 +10,22 @@ Hey! I'm Michał Sapka, a computer programmer living in Kraków, Poland. This we {{ end }}

» All updates

+

Recent blog posts

+ +{{ $recent_categories := slice "blog" }} +{{ range first 7 (where .Site.RegularPages ".Params.category" "intersect" $recent_categories) }} + {{ partial "partials/article_list_item.html" . }} +{{ end }} +

» Go to blog

Sections

TOC

diff --git a/layouts/_default/list.html b/layouts/_default/list.html index ae89782..f1fd111 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,11 +1,13 @@ {{ define "main" }} -

- {{ replace .Title "-" " " }} archives -

-

Articles

- {{ range .Data.Pages }} - {{ partial "partials/article_list_item.html" . }} - {{ end }} + {{ if in .Page.Params.Category "blog" }} + {{ partial "partials/blog_index.html" . }} + {{ else }} + +

Articles

+ {{ range .Data.Pages }} + {{ partial "partials/article_list_item.html" . }} + {{ end }} + {{ end }} {{ end }} -- cgit v1.2.3