Browse Source

feat: show tags in blog index

main
Inhji Y. 3 months ago
parent
commit
fbd25c4910
  1. 12
      lib/mirage_web/live/blog_live.html.leex

12
lib/mirage_web/live/blog_live.html.leex

@ -25,7 +25,17 @@
<% end %>
</header>
<footer>
<time datetime="<%= note.inserted_at %>" class="dt-published">Created <%= note.inserted_at |> Timex.from_now() %></time><span class="muted"> * </span><time datetime="<%= note.updated_at %>" class="dt-updated">Last Edited <%= note.updated_at |> Timex.from_now() %></time>
<div>
<time datetime="<%= note.inserted_at %>" class="dt-published">Created <%= note.inserted_at |> Timex.from_now() %></time><span class="muted"> * </span><time datetime="<%= note.updated_at %>" class="dt-updated">Last Edited <%= note.updated_at |> Timex.from_now() %></time>
</div>
<div class="tags">
<%= for topic <- note.topics do %>
<span class="tag">
<%= link topic.text, to: Routes.topic_path(MirageWeb.Endpoint, :show, topic), class: "p-category" %>
</span>
<% end %>
</div>
</footer>
</article>
<% end %>

Loading…
Cancel
Save