.header>
<.icon name="hero-document-text" /> Notes
<:subtitle>Notes are the content, the heart of your site.
<:actions>
<.link href={~p"/admin/notes/new"}>
<.button>New Note
<.link href={~p"/admin/notes/import"}>
<.button>Import Note
<.table id="notes" rows={@notes} row_click={&JS.navigate(~p"/admin/notes/#{&1}")}>
<:col :let={note} label="Name"><%= note.name %>
<:col :let={note} label="Updated at"><%= from_now(note.updated_at) %>
<:col :let={note} label="Published at"><%= from_now(note.published_at) %>
<:action :let={note}>
<.link navigate={~p"/admin/notes/#{note}"}>Show
<.link navigate={~p"/admin/notes/#{note}/edit"}>Edit
<:action :let={note}>
<.link href={~p"/admin/notes/#{note}"} method="delete" data-confirm="Are you sure?">
Delete