show url in public notes

This commit is contained in:
Inhji 2023-07-18 07:27:27 +02:00
parent 18dc503e1f
commit 2c4e10af80
2 changed files with 13 additions and 3 deletions

View file

@ -3,8 +3,10 @@
<%= @note.name %> <%= @note.name %>
</.header> </.header>
<aside class="max-w-2xl mx-auto mt-8 prose prose-gruvbox bg-theme-background1 rounded p-2 empty:hidden"> <aside class="max-w-2xl mx-auto mt-8 prose prose-gruvbox">
<div class="bg-theme-background1 rounded p-2 empty:hidden">
<%= raw(render_outline(@note)) %> <%= raw(render_outline(@note)) %>
</div>
</aside> </aside>
<section class="mt-8 mx-auto prose prose-gruvbox md:prose-lg lg:prose-xl | p-summary e-content"> <section class="mt-8 mx-auto prose prose-gruvbox md:prose-lg lg:prose-xl | p-summary e-content">
@ -22,6 +24,13 @@
</section> </section>
<% end %> <% end %>
<%= if String.length(@note.url) > 0 do %>
<section class="mt-8 max-w-2xl mx-auto text-center text-lg">
<.divider text=" " />
<.icon name="hero-link" /> <a href={@note.url}><%= @note.url %></a>
</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>

View file

@ -19,6 +19,7 @@ defmodule ChiyaWeb.Indie.Micropub do
|> Enum.with_index() |> Enum.with_index()
|> Enum.map(fn {photo, index} -> |> Enum.map(fn {photo, index} ->
featured = index == 0 featured = index == 0
Chiya.Notes.create_note_image(%{ Chiya.Notes.create_note_image(%{
note_id: note.id, note_id: note.id,
path: photo.path, path: photo.path,