Compare commits

..

1 commit

Author SHA1 Message Date
2c9cc0c20f
feat: add dark mode
Some checks failed
Checks / check (pull_request) Failing after -2m59s
part 1
2024-12-01 18:31:23 +02:00
4 changed files with 9 additions and 14 deletions

View file

@ -202,12 +202,9 @@ defmodule ExmrWeb.CoreComponents do
def simple_form(assigns) do def simple_form(assigns) do
~H""" ~H"""
<.form :let={f} for={@for} as={@as} {@rest}> <.form :let={f} for={@for} as={@as} {@rest}>
<div class="mt-10 space-y-8 bg-white dark:bg-zinc-950"> <div class="mt-10 space-y-8 bg-white">
<%= render_slot(@inner_block, f) %> <%= render_slot(@inner_block, f) %>
<div <div :for={action <- @actions} class="mt-2 flex items-center justify-between gap-6">
:for={action <- @actions}
class="mt-2 flex items-center justify-between gap-6 dark:text-zinc-100"
>
<%= render_slot(action, f) %> <%= render_slot(action, f) %>
</div> </div>
</div> </div>
@ -313,7 +310,7 @@ defmodule ExmrWeb.CoreComponents do
~H""" ~H"""
<div> <div>
<label class="flex items-center gap-4 text-sm leading-6 text-zinc-600 dark:text-zinc-200"> <label class="flex items-center gap-4 text-sm leading-6 text-zinc-600">
<input type="hidden" name={@name} value="false" disabled={@rest[:disabled]} /> <input type="hidden" name={@name} value="false" disabled={@rest[:disabled]} />
<input <input
type="checkbox" type="checkbox"
@ -399,7 +396,7 @@ defmodule ExmrWeb.CoreComponents do
def label(assigns) do def label(assigns) do
~H""" ~H"""
<label for={@for} class="block text-sm font-semibold leading-6 text-zinc-800 dark:text-zinc-200"> <label for={@for} class="block text-sm font-semibold leading-6 text-zinc-800">
<%= render_slot(@inner_block) %> <%= render_slot(@inner_block) %>
</label> </label>
""" """

View file

@ -14,7 +14,7 @@ defmodule ExmrWeb.UserForgotPasswordLive do
<.simple_form for={@form} id="reset_password_form" phx-submit="send_email"> <.simple_form for={@form} id="reset_password_form" phx-submit="send_email">
<.input field={@form[:email]} type="email" placeholder="Email" required /> <.input field={@form[:email]} type="email" placeholder="Email" required />
<:actions> <:actions>
<.button phx-disable-with="Sending..." class="w-full dark:text-black dark:bg-red-600"> <.button phx-disable-with="Sending..." class="w-full">
Send password reset instructions Send password reset instructions
</.button> </.button>
</:actions> </:actions>

View file

@ -26,7 +26,7 @@ defmodule ExmrWeb.UserLoginLive do
</.link> </.link>
</:actions> </:actions>
<:actions> <:actions>
<.button phx-disable-with="Logging in..." class="w-full dark:bg-teal-600"> <.button phx-disable-with="Logging in..." class="w-full">
Log in <span aria-hidden="true"></span> Log in <span aria-hidden="true"></span>
</.button> </.button>
</:actions> </:actions>

View file

@ -6,7 +6,7 @@ defmodule ExmrWeb.UserRegistrationLive do
def render(assigns) do def render(assigns) do
~H""" ~H"""
<div class="mx-auto max-w-sm dark:bg-zinc-950"> <div class="mx-auto max-w-sm">
<.header class="text-center"> <.header class="text-center">
Register for an account Register for an account
<:subtitle> <:subtitle>
@ -35,9 +35,7 @@ defmodule ExmrWeb.UserRegistrationLive do
<.input field={@form[:password]} type="password" label="Password" required /> <.input field={@form[:password]} type="password" label="Password" required />
<:actions> <:actions>
<.button phx-disable-with="Creating account..." class="w-full dark:bg-green-800"> <.button phx-disable-with="Creating account..." class="w-full">Create an account</.button>
Create an account
</.button>
</:actions> </:actions>
</.simple_form> </.simple_form>
</div> </div>