Commit 52ba4c45 authored by Floréal Toumikian's avatar Floréal Toumikian

Enhanced: Tag pages, article, and arrticl-cards display

parent b308780d
Pipeline #26464 passed with stage
in 1 minute and 16 seconds
......@@ -15,12 +15,7 @@
<h2>Derniers billets</h2>
<% for post in sorted_articles[0..3] do %>
<div class="card-panel hoverable">
<h3><%= post[:title] %></h3>
<%= render '/partials/article-meta.html', article: post %>
<p><%= excerptize(strip_html(post.compiled_content(snapshot: :pre)), length: 140) %></p>
<a class="waves-effect waves-light btn light-green darken-4" href="<%= post.path %>"><i class="small material-icons right">chevron_right</i>Lire l'article</a>
</div>
<%= render '/partials/article-card.html', post: post %>
<% end %>
</div>
......
<div class="card-panel hoverable">
<h3><%= post[:title] %></h3>
<%= render '/partials/article-meta.html', article: post %>
<p class="flow-text"><%= excerptize(strip_html(post.compiled_content(snapshot: :pre)), length: 140) %></p>
<a class="waves-effect waves-light btn light-green darken-4" href="<%= post.path %>"><i class="small material-icons right">chevron_right</i>Lire l'article</a>
</div>
......@@ -13,7 +13,9 @@
<h1><%= @item[:title] %></h1>
<%= render '/partials/article-meta.html', article: @item %>
<div class="flow-text">
<%= yield %>
</div>
<%= comments_section %>
</div>
......
......@@ -75,9 +75,9 @@ module TagPages
def create_tags_pages
all_tags.map do |tag|
@items.create(
"<ul><% items_with_tag(\"#{tag}\").each do |item| %>
<li><%= link_to item[:title], item %></li>
<% end %></ul>",
"<% items_with_tag(\"#{tag}\").each do |post| %>
<%= render '/partials/article-card.html', post: post %>
<% end %>",
{ title: "Tag: #{tag}" },
"#{tag_pages_prefix}/#{tag}.html"
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment