[WikiPages] Fix thumbnail spacing (#804)

This commit is contained in:
Cinder 2024-11-25 07:17:25 -08:00 committed by GitHub
parent 4b3bc37850
commit 86ba2fd4ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -14,10 +14,10 @@ module WikiPagesHelper
end
def wiki_page_post_previews(wiki_page)
tag.div(id: "wiki-page-posts") do
tag.section(id: "wiki-page-posts", class: "posts-container") do
if Post.fast_count(wiki_page.title) > 0
view_all_link = link_to("view all", posts_path(tags: wiki_page.title))
header = tag.h2("Posts (#{view_all_link})".html_safe)
header = tag.h2("Posts (#{view_all_link})".html_safe, class: "posts-container-header")
header + wiki_page.post_set.presenter.post_previews_html(self)
end
end

View File

@ -20,6 +20,10 @@ section.posts-container {
@include window-larger-than($thumb-desktop-breakpoint) {
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
h2.posts-container-header {
grid-column: -1 / 1;
}
}