33 lines
947 B
Text
33 lines
947 B
Text
<header>
|
|
<h1 class="text-lg font-semibold leading-8 text-theme-heading"><%= @note.name %></h1>
|
|
<p class="mt-2 text-sm leading-6 text-theme-muted">
|
|
<%= pretty_date(@note.published_at) %>
|
|
</p>
|
|
</header>
|
|
|
|
|
|
<section class="prose mt-8">
|
|
<%= Markdown.render(@note.content) |> raw %>
|
|
</section>
|
|
|
|
<%= if !Enum.empty?(@note.images) do %>
|
|
<.line />
|
|
|
|
<div class="flex flex-wrap gap-3" id="images">
|
|
<%= for image <- @note.images do %>
|
|
<article>
|
|
<a href={"#image-#{image.id}"}>
|
|
<img
|
|
class="rounded-lg w-28 border"
|
|
src={ChiyaWeb.Uploaders.NoteImage.url({image.path, image}, :thumb_dithered)}
|
|
/>
|
|
</a>
|
|
<a href="#images" class="lightbox" id={"image-#{image.id}"}>
|
|
<span style={"background-image: url('#{ChiyaWeb.Uploaders.NoteImage.url({image.path, image}, :full_dithered)}')"}>
|
|
</span>
|
|
</a>
|
|
</article>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|
|
|