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
This commit is contained in:
Juan Ara 2020-07-24 21:53:21 +02:00 committed by GitHub
parent d5d3863322
commit 34ff24e31b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View file

@ -12,8 +12,10 @@ layout: archive
{% assign posts = site.posts %} {% assign posts = site.posts %}
{% endif %} {% endif %}
<div class="entries-{{ page.entries_layout | default: 'list' }}">
{% for post in posts %} {% for post in posts %}
{% include archive-single.html %} {% include archive-single.html type=page.entries_layout %}
{% endfor %} {% endfor %}
</div>
{% include paginator.html %} {% include paginator.html %}

View file

@ -32,7 +32,7 @@
} }
.archive__subtitle { .archive__subtitle {
margin: 1.414em 0 0; margin: 1.414em 0 0.5em;
padding-bottom: 0.5em; padding-bottom: 0.5em;
font-size: $type-size-5; font-size: $type-size-5;
color: $muted-text-color; color: $muted-text-color;