Skip to content

Commit

Permalink
Configure entries layout list or grid (mmistakes#2616)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
TarodBOFH authored and chukycheese committed Sep 18, 2023
1 parent 95b27dd commit a6e3ea9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ <h3 class="archive__subtitle">{{ site.data.ui-text[site.locale].recent_posts | d
{% assign posts = site.posts %}
{% endif %}

{% for post in posts %}
{% include archive-single.html %}
{% endfor %}
<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 %}
2 changes: 1 addition & 1 deletion _sass/minimal-mistakes/_archive.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a6e3ea9

Please sign in to comment.