2023-06-28 16:35:57 +02:00
|
|
|
<article class="h-entry hentry">
|
2023-07-05 16:53:20 +02:00
|
|
|
<.header titleclass="p-name">
|
|
|
|
<:title><%= @note.name %></:title>
|
|
|
|
</.header>
|
2023-03-15 19:16:01 +01:00
|
|
|
|
2023-07-05 16:34:16 +02:00
|
|
|
<section class="mt-8 prose prose-gruvbox md:prose-lg lg:prose-xl | p-summary e-content">
|
2023-04-03 22:22:02 +02:00
|
|
|
<%= Markdown.render(@note.content) |> raw %>
|
|
|
|
</section>
|
2023-03-13 03:26:39 +01:00
|
|
|
|
2023-07-05 16:34:16 +02:00
|
|
|
<footer class="mt-8 text-theme-base">
|
2023-07-04 06:57:13 +02:00
|
|
|
<%= if @note.published_at do %>
|
|
|
|
<span>Published</span>
|
|
|
|
<% else %>
|
|
|
|
<span>Unpublished</span>
|
|
|
|
<% end %>
|
|
|
|
<time class="font-semibold | dt-published"><%= pretty_date(@note.published_at) %></time>
|
|
|
|
<.dot />
|
|
|
|
<span>Last Updated</span>
|
2023-07-05 06:49:37 +02:00
|
|
|
<time class="font-semibold" datetime={datetime(@note.updated_at)}>
|
|
|
|
<%= pretty_date(@note.updated_at) %>
|
|
|
|
</time>
|
2023-07-04 06:57:13 +02:00
|
|
|
<%= if not Enum.empty?(@note.tags) do %>
|
|
|
|
<.dot />
|
|
|
|
<span>Tags</span>
|
|
|
|
<span class="inline-flex flex-row gap-1">
|
|
|
|
<%= for tag <- @note.tags do %>
|
|
|
|
<a href={~p"/tagged-with/#{tag.slug}"} class="underline-link font-semibold | p-category">
|
|
|
|
<%= tag.name %>
|
|
|
|
</a>
|
|
|
|
<% end %>
|
|
|
|
</span>
|
|
|
|
<% end %>
|
|
|
|
<%= if @current_user do %>
|
|
|
|
<.dot />
|
|
|
|
<a href={~p"/admin/notes/#{@note}"} class="underline-link font-semibold">Show in Admin</a>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<a href={~p"/about"} class="hidden | u-author">Inhji</a>
|
|
|
|
<a href={~p"/note/#{@note.slug}"} class="hidden | u-url u-uid"><%= @note.name %></a>
|
2023-06-30 13:18:32 +02:00
|
|
|
</footer>
|
|
|
|
|
2023-07-05 16:34:16 +02:00
|
|
|
<section class="mt-8">
|
2023-05-22 20:05:44 +02:00
|
|
|
<%= if !Enum.empty?(@note.images) do %>
|
|
|
|
<.line />
|
2023-03-13 05:59:40 +01:00
|
|
|
|
2023-05-22 20:05:44 +02:00
|
|
|
<div class="flex flex-wrap gap-3">
|
|
|
|
<%= for image <- @note.images do %>
|
|
|
|
<a
|
|
|
|
href={ChiyaWeb.Uploaders.NoteImage.url({image.path, image}, :full_dithered)}
|
|
|
|
class="lightbox | w-28"
|
|
|
|
data-gallery="note"
|
|
|
|
data-description={ChiyaWeb.Markdown.render(image.content)}
|
|
|
|
>
|
|
|
|
<img
|
|
|
|
src={ChiyaWeb.Uploaders.NoteImage.url({image.path, image}, :thumb_dithered)}
|
|
|
|
class="rounded"
|
|
|
|
/>
|
|
|
|
</a>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2023-05-25 21:23:04 +02:00
|
|
|
<% end %>
|
2023-05-22 20:05:44 +02:00
|
|
|
</section>
|
2023-06-28 16:35:57 +02:00
|
|
|
</article>
|