add notes linking here section

This commit is contained in:
Inhji 2023-07-13 07:34:21 +02:00
parent c4214c85c5
commit 8bcbf1eafb

View file

@ -9,6 +9,18 @@
<%= Markdown.render(@note.content) |> raw %> <%= Markdown.render(@note.content) |> raw %>
</section> </section>
<%= if not Enum.empty?(@note.links_to) do %>
<section class="mt-8 prose prose-gruvbox max-w-2xl mx-auto">
<.divider text="" />
Notes linking here:
<ul class="">
<%= for link <- @note.links_to do %>
<li><a href={~p"/note/#{link.slug}"}><%= link.name %></a></li>
<% end %>
</ul>
</section>
<% end %>
<footer class="max-w-2xl mx-auto mt-8 text-theme-base"> <footer class="max-w-2xl mx-auto mt-8 text-theme-base">
<%= if @note.published_at do %> <%= if @note.published_at do %>
<span>Published</span> <span>Published</span>