chiya/lib/chiya_web/controllers/tag_html/index.html.heex

47 lines
1.3 KiB
Text
Raw Normal View History

2023-09-10 22:55:16 +02:00
<.header>
<.icon name="hero-document-text" /> Tags
<:subtitle>Tags are tags.</:subtitle>
</.header>
2023-09-13 20:59:15 +02:00
<section class="card-list mt-8">
2023-09-23 22:43:17 +02:00
<h3 class="leading-normal text-xl dark:text-gray-100">With Regex</h3>
2023-09-13 20:59:15 +02:00
<%= for tag <- Enum.filter(@tags, fn t -> !!t.regex end) do %>
<article class="card">
<header>
<h2>
<a href={"/admin/tags/#{tag.id}"}><%= tag.name %></a>
</h2>
</header>
<footer>
<span><%= Enum.count(tag.notes) %> notes</span>
<span>Updated <%= from_now(tag.updated_at) %></span>
<%= if String.length(tag.regex || "") > 0 do %>
<span>Regex: <%= tag.regex %></span>
<% end %>
</footer>
</article>
<% end %>
</section>
<section class="card-list mt-8">
2023-09-23 22:43:17 +02:00
<h3 class="leading-normal text-xl dark:text-gray-100">Without Regex</h3>
2023-09-13 20:59:15 +02:00
<%= for tag <- Enum.filter(@tags, fn t -> !t.regex end) do %>
<article class="card">
2023-09-10 22:55:16 +02:00
<header>
2023-09-13 20:59:15 +02:00
<h2>
2023-09-10 22:55:16 +02:00
<a href={"/admin/tags/#{tag.id}"}><%= tag.name %></a>
</h2>
</header>
2023-09-13 20:59:15 +02:00
<footer>
2023-09-10 22:55:16 +02:00
<span><%= Enum.count(tag.notes) %> notes</span>
<span>Updated <%= from_now(tag.updated_at) %></span>
2023-09-13 20:59:15 +02:00
<%= if String.length(tag.regex || "") > 0 do %>
<span>Regex: <%= tag.regex %></span>
<% end %>
2023-09-10 22:55:16 +02:00
</footer>
</article>
<% end %>
</section>