From 34ff24e31bf8640f7ef3eb8d5170ad3141aaa89f Mon Sep 17 00:00:00 2001 From: Juan Ara Date: Fri, 24 Jul 2020 21:53:21 +0200 Subject: [PATCH] Configure entries layout `list` or `grid` (#2616) * Configure entries layout `list` or `grid` This allows to use grid layout on `page.entries_layout` on the home layout. Included a break since when using grid the post images are too close to the horizontal line bellow `posts` text. There's a entries div now surrounding the posts since the first row of the grid was having a slight padding on the left. The home now behaves like posts/categories/tags pages with grid but including the paginator. For best results on desktop use `classes: wide` and `paginate: 4` on `_config.yml` (or multiples of 4 if you want more rows) * Fix indent * Archive subtitle leaves space on the bottom * Now space is added through style --- _layouts/home.html | 8 +++++--- _sass/minimal-mistakes/_archive.scss | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/_layouts/home.html b/_layouts/home.html index 8a49047e..c3a99768 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -12,8 +12,10 @@ layout: archive {% assign posts = site.posts %} {% endif %} -{% for post in posts %} - {% include archive-single.html %} -{% endfor %} +
+ {% for post in posts %} + {% include archive-single.html type=page.entries_layout %} + {% endfor %} +
{% include paginator.html %} diff --git a/_sass/minimal-mistakes/_archive.scss b/_sass/minimal-mistakes/_archive.scss index 12fbf654..3df29961 100644 --- a/_sass/minimal-mistakes/_archive.scss +++ b/_sass/minimal-mistakes/_archive.scss @@ -32,7 +32,7 @@ } .archive__subtitle { - margin: 1.414em 0 0; + margin: 1.414em 0 0.5em; padding-bottom: 0.5em; font-size: $type-size-5; color: $muted-text-color;