posts: fix parent/child post layout.

Fix regression causing parent/child posts to be laid out as a grid
instead of as a single row of posts.
This commit is contained in:
evazion
2021-12-05 02:18:13 -06:00
parent 2e6f480d07
commit 40568a9843
2 changed files with 14 additions and 9 deletions

View File

@@ -2,7 +2,7 @@
<% if posts.empty? %>
<p>No posts found.</p>
<% else %>
<div class="posts-container grid gap-2">
<div class="posts-container">
<% posts.each do |post| -%>
<% %><%= post -%>
<% end -%>

View File

@@ -1,6 +1,14 @@
.post-gallery {
.post-preview-image {
max-width: 100%;
}
}
.post-gallery-inline {
overflow-x: auto;
white-space: nowrap;
.posts-container {
overflow-x: auto;
white-space: nowrap;
}
article.post-preview {
width: auto;
@@ -12,13 +20,10 @@
}
}
.post-gallery {
.post-gallery-grid {
.posts-container {
place-items: center;
}
.post-preview-image {
max-width: 100%;
display: grid;
gap: 0.5rem;
}
&.post-gallery-150 .posts-container { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }