diff --git a/assets/scss/_lists.scss b/assets/scss/_lists.scss index 8c1cc70..760d877 100644 --- a/assets/scss/_lists.scss +++ b/assets/scss/_lists.scss @@ -8,11 +8,13 @@ .posts-list { display: flex; flex-direction: column; - margin-bottom: .5em; + margin-bottom: var(--pico-spacing); > article { - padding-bottom: .5rem; + padding-bottom: var(--pico-spacing); + padding-left: var(--pico-spacing); } + } /* List of last posts, on the home page*/ diff --git a/layouts/_default/home.html b/layouts/_default/home.html index add0c47..02875bc 100644 --- a/layouts/_default/home.html +++ b/layouts/_default/home.html @@ -1,20 +1,7 @@ {{ define "main" }} {{ if .Site.Params.home_post_list }} -
-

{{ i18n "lastPosts" }}

- - {{ range first 5 .Site.RegularPages.ByPublishDate.Reverse }} -
- - {{- .Title -}} - -
- {{ end }} -
+ {{ partial "home_post_list" . }} {{ end }}
{{ range .Pages.ByPublishDate.Reverse }}
- + {{.Title}} {{ partial "lists-footer.html" . }} diff --git a/layouts/partials/home_post_list.html b/layouts/partials/home_post_list.html new file mode 100644 index 0000000..cbc45c5 --- /dev/null +++ b/layouts/partials/home_post_list.html @@ -0,0 +1,14 @@ +
+

{{ i18n "lastPosts" }}

+ + {{ range first 5 .Site.RegularPages.ByPublishDate.Reverse }} + + {{ end }} +