mix format
This commit is contained in:
parent
d24ee9e69f
commit
13a6eddf1b
1 changed files with 12 additions and 13 deletions
|
@ -5,9 +5,9 @@
|
|||
</h1>
|
||||
<p class="mt-2 text-sm leading-6 text-theme-base">
|
||||
<%= if @note.published_at do %>
|
||||
<span>Published</span>
|
||||
<span>Published</span>
|
||||
<% else %>
|
||||
<span>Unpublished</span>
|
||||
<span>Unpublished</span>
|
||||
<% end %>
|
||||
<time class="text-theme-primary font-semibold"><%= pretty_date(@note.published_at) %></time>
|
||||
<span>·</span>
|
||||
|
@ -55,20 +55,20 @@
|
|||
<.line />
|
||||
|
||||
<h2 class="mb-6 text-theme-base"><%= Enum.count(@note.comments) %> Comments</h2>
|
||||
|
||||
|
||||
<aside id="comments" class="flex flex-col gap-6">
|
||||
<%= for comment <- @note.comments do %>
|
||||
<article class="text-theme-base bg-theme-base/10 p-1">
|
||||
<header class="flex flex-row justify-between">
|
||||
<strong class="text-theme-primary"><%= comment.author_name %></strong>
|
||||
<span class="text-theme-dim"><%= from_now(comment.inserted_at) %></span>
|
||||
</header>
|
||||
<p><%= comment.content %></p>
|
||||
</article>
|
||||
<article class="text-theme-base bg-theme-base/10 p-1">
|
||||
<header class="flex flex-row justify-between">
|
||||
<strong class="text-theme-primary"><%= comment.author_name %></strong>
|
||||
<span class="text-theme-dim"><%= from_now(comment.inserted_at) %></span>
|
||||
</header>
|
||||
<p><%= comment.content %></p>
|
||||
</article>
|
||||
<% end %>
|
||||
</aside>
|
||||
<% end %>
|
||||
|
||||
|
||||
<.line />
|
||||
|
||||
<.simple_form :let={f} for={@changeset} action={~p"/#{@note.slug}/comment"}>
|
||||
|
@ -76,11 +76,10 @@
|
|||
Oops, something went wrong! Please check the errors below.
|
||||
</.error>
|
||||
<.input field={f[:author_name]} type="text" placeholder="Name" />
|
||||
<.input field={f[:content]} type="textarea" placeholder="Content" rows="3" />
|
||||
<.input field={f[:content]} type="textarea" placeholder="Content" rows="3" />
|
||||
<.input field={f[:note_id]} type="hidden" />
|
||||
<:actions>
|
||||
<.button>Submit Comment</.button>
|
||||
</:actions>
|
||||
</.simple_form>
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue