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} -> {:error, changelog} ->
Logger.warn("Reference was not added.") Logger.warn("Reference was not added.")
Logger.error(inspect(changelog)) Logger.error(inspect(changelog))
end end
end end

View file

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

View file

@ -31,9 +31,14 @@ defmodule ChiyaWeb.PublicComponents do
<div> <div>
<h1 class="text-lg font-semibold leading-8 text-gray-800 dark:text-gray-200"> <h1 class="text-lg font-semibold leading-8 text-gray-800 dark:text-gray-200">
<%= render_slot(@inner_block) %> <%= 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> </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) %> <%= render_slot(@subtitle) %>
</p> </p>
</div> </div>

View file

@ -58,7 +58,15 @@
</a> </a>
<% end %> <% end %>
</section> </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> </article>
<.line /> <.line />