<%= @note.name %>

<%= if @note.published_at do %> Published <% else %> Unpublished <% end %> <.dot /> Last Updated <%= if not Enum.empty?(@note.tags) do %> <.dot /> Tags <%= for tag <- @note.tags do %> <%= tag.name %> <% end %> <% end %> <%= if @current_user do %> <.dot /> Show in Admin <% end %>

<%= Markdown.render(@note.content) |> raw %>
<%= if !Enum.empty?(@note.images) do %> <.line />
<%= for image <- @note.images do %> <% end %>
<% end %>
<%= if not Enum.empty?(@note.comments) do %> <.line />

<%= Enum.count(@note.comments) %> Comments

<% else %> <.line />

No comments yet.

<% end %> <.line /> <.simple_form :let={f} for={@changeset} action={~p"/#{@note.slug}/comment"} class="bg-theme-background -m-3" > <.error :if={@changeset.action}> Oops, something went wrong! Please check the errors below. <.input field={f[:author_name]} type="text" placeholder="Name" class="bg-theme-background dark:bg-theme-background border-theme-base/20 dark:border-theme-base/20 text-theme-base dark:text-theme-base placeholder-theme-base/40 dark:placeholder-theme-base/60 dark:focus:border-theme-base/60 dark:focus:border-theme-base/60" /> <.input field={f[:content]} type="textarea" placeholder="Content" rows="3" class="bg-theme-background dark:bg-theme-background border-theme-base/20 dark:border-theme-base/20 text-theme-base dark:text-theme-base placeholder-theme-base/60 dark:placeholder-theme-base/60 focus:border-theme-base/60 dark:focus:border-theme-base/60" /> <.input field={f[:note_id]} type="hidden" /> <:actions> <.button>Submit Comment