Browse Source

feat: show domain for source links

main
Inhji Y. 8 months ago
parent
commit
6b8ace7c17
  1. 3
      assets/css/app.scss
  2. 5
      lib/mirage_web/live/show_note_live.html.leex

3
assets/css/app.scss

@ -106,7 +106,7 @@ a {
/* === Layout === */
.container { max-width: 60rem; }
.grid { display: flex; }
.grid, .flex { display: flex; }
.col, .spacer { flex: 1; }
main[role=main] {
@ -237,7 +237,6 @@ kbd {
}
a.link {
display: flex;
flex: 1;
}
}

5
lib/mirage_web/live/show_note_live.html.leex

@ -32,7 +32,10 @@
<%= for link <- @note.links do %>
<div class="link-wrapper">
<%= link link.title || link.url, to: link.url, class: "link" %>
<%= link to: link.url, class: "link" do %>
<span class="flex"><%= link.title || link.url %></span>
<span class="flex"><%= link.domain %></span>
<% end %>
<%= if @current_user do %>
<%= link "🗑️ DELETE", to: "#", phx_click: "delete_link", phx_value_link_id: link.id, data: [confirm: "Are you sure?"] %>
<% end %>

Loading…
Cancel
Save