hacks-guide-minimal-mistake.../_layouts/home.html
Juan Ara 34ff24e31b
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
2020-07-24 15:53:21 -04:00

21 lines
475 B
HTML

---
layout: archive
---
{{ content }}
<h3 class="archive__subtitle">{{ site.data.ui-text[site.locale].recent_posts | default: "Recent Posts" }}</h3>
{% if paginator %}
{% assign posts = paginator.posts %}
{% else %}
{% assign posts = site.posts %}
{% endif %}
<div class="entries-{{ page.entries_layout | default: 'list' }}">
{% for post in posts %}
{% include archive-single.html type=page.entries_layout %}
{% endfor %}
</div>
{% include paginator.html %}