css: factor out recent posts component.

This commit is contained in:
evazion
2021-02-16 01:48:20 -06:00
parent 1e80540a04
commit e215fd1c47
5 changed files with 27 additions and 31 deletions

View File

@@ -1,7 +1,11 @@
<% if wiki_page.tag.present? && !wiki_page.tag.empty? %>
<div id="wiki-page-posts">
<h2>Recent Posts <%= link_to "»", posts_path(tags: wiki_page.title) %></h2>
<div class="recent-posts">
<h2 class="recent-posts-header">
<%= link_to "Posts", posts_path(tags: wiki_page.title) %>
</h2>
<%= post_previews_html(wiki_page.tag.posts.limit(8), tags: wiki_page.title) %>
<div class="recent-posts-previews">
<%= post_previews_html(wiki_page.tag.posts.limit(8), tags: wiki_page.title) %>
</div>
</div>
<% end %>