mix format

This commit is contained in:
Inhji 2023-04-29 09:43:34 +02:00
parent 1c8487a77c
commit 5ab196ae16
4 changed files with 62 additions and 52 deletions

View file

@ -124,7 +124,6 @@ defmodule Chiya.Notes.References do
{:error, changelog} ->
Logger.warn("Reference was not added.")
Logger.error(inspect(changelog))
end
end

View file

@ -85,16 +85,14 @@ defmodule ChiyaWeb.AdminComponents do
<.link
href={~p"/"}
class="flex gap-3 text-sm leading-6 font-semibold text-gray-900 dark:text-gray-100 dark:hover:text-gray-300 hover:text-gray-700"
><%= @settings.title %></.link>
>
<%= @settings.title %>
</.link>
</li>
<li class="flex-1"></li>
<%= if @current_user do %>
<li>
<.link
href="#"
id="dark-mode-toggle"
class="text-sm leading-6"
>
<.link href="#" id="dark-mode-toggle" class="text-sm leading-6">
<span class="inline dark:hidden">🌙</span>
<span class="hidden dark:inline"></span>
</.link>
@ -103,22 +101,22 @@ defmodule ChiyaWeb.AdminComponents do
<.link
href={~p"/admin"}
class="text-sm leading-6 text-gray-900 dark:text-gray-100 dark:hover:text-gray-300 hover:text-gray-700"
>Admin</.link>
>
Admin
</.link>
</li>
<li>
<.link
href={~p"/user/log_out"}
method="delete"
class="text-sm leading-6 text-gray-900 dark:text-gray-100 dark:hover:text-gray-300 hover:text-gray-700"
>Log out</.link>
>
Log out
</.link>
</li>
<% else %>
<li>
<.link
href="#"
id="dark-mode-toggle"
class="text-sm leading-6"
>
<.link href="#" id="dark-mode-toggle" class="text-sm leading-6">
<span class="inline dark:hidden">🌙</span>
<span class="hidden dark:inline"></span>
</.link>

View file

@ -31,9 +31,14 @@ defmodule ChiyaWeb.PublicComponents do
<div>
<h1 class="text-lg font-semibold leading-8 text-gray-800 dark:text-gray-200">
<%= render_slot(@inner_block) %>
<span :if={@inline} class="text-sm leading-6 font-normal text-gray-600 dark:text-gray-400"><%= render_slot(@subtitle) %></span>
<span :if={@inline} class="text-sm leading-6 font-normal text-gray-600 dark:text-gray-400">
<%= render_slot(@subtitle) %>
</span>
</h1>
<p :if={@subtitle != [] && @inline == false} class="mt-2 text-sm leading-6 text-gray-600 dark:text-gray-400">
<p
:if={@subtitle != [] && @inline == false}
class="mt-2 text-sm leading-6 text-gray-600 dark:text-gray-400"
>
<%= render_slot(@subtitle) %>
</p>
</div>

View file

@ -58,7 +58,15 @@
</a>
<% end %>
</section>
<a href={~p"/#{note.slug}"} class="text-theme-primary text-lg/10 font-semibold rounded-lg -mx-2 -my-0.5 px-2 py-0.5 hover:bg-theme-primary/10 transition"><%= note.name %> <span class="text-theme-muted font-normal text-sm"><%= pretty_date(note.published_at) %></span></a>
<a
href={~p"/#{note.slug}"}
class="text-theme-primary text-lg/10 font-semibold rounded-lg -mx-2 -my-0.5 px-2 py-0.5 hover:bg-theme-primary/10 transition"
>
<%= note.name %>
<span class="text-theme-muted font-normal text-sm">
<%= pretty_date(note.published_at) %>
</span>
</a>
</article>
<.line />