Browse Source

feat: improve links

main
Inhji Y. 3 months ago
parent
commit
977fef89e6
  1. 14
      lib/mirage_web/live/link_live/index.html.leex

14
lib/mirage_web/live/link_live/index.html.leex

@ -1,6 +1,5 @@
<header class="hero">
<h1>Listing Links</h1>
<p><%= Enum.count(@links) %> Links</p>
<h1>Listing <%= Enum.count(@links) %> Links</h1>
</header>
<%= if @live_action in [:new, :edit] do %>
@ -14,9 +13,12 @@
<section class="bg-content width-full grid cards wrap">
<%= for link <- @links do %>
<%= live_redirect to: Routes.link_show_path(@socket, :show, link), class: "col card", id: "link-#{link.id}" do %>
<strong><%= link.title %></strong>
<p><%= link.domain || link.url %></p>
<% end %>
<article>
<h2>
<%= live_redirect link.title || link.url, to: Routes.link_show_path(@socket, :show, link) %>
<p><%= link.domain || link.url %></p>
</h2>
<p><%= link.content_html |> raw %></p>
</article>
<% end %>
</section>
Loading…
Cancel
Save