Compare commits

..

2 commits

Author SHA1 Message Date
4ef23a5ec9
fix: dark mode for calendar
Some checks failed
Build and Push Docker Image / Build and Push Image (push) Waiting to run
Checks / check (push) Has been cancelled
2024-12-23 00:13:29 +02:00
a724826a59
style: mix format 2024-12-23 00:10:10 +02:00

View file

@ -35,20 +35,32 @@
</b>
</div>
</div>
<button phx-click="edit" phx-value-id={exam.id}
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-3 rounded-md">
<button
phx-click="edit"
phx-value-id={exam.id}
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-3 rounded-md"
>
{gettext("Edit")}
</button>
<button phx-click="remove" phx-value-id={exam.id}
class="bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-3 rounded-md">
<button
phx-click="remove"
phx-value-id={exam.id}
class="bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-3 rounded-md"
>
{gettext("Remove")}
</button>
</div>
</div>
<.modal :if={@live_action in [:new, :edit]} id="exam-modal" show on_cancel={JS.patch(~p"/exams")}>
<.live_component module={ExmrWeb.ExamLive.FormComponent} id={@exam.id || :new} title={@page_title}
action={@live_action} exam={@exam} patch={~p"/exams"} />
<.live_component
module={ExmrWeb.ExamLive.FormComponent}
id={@exam.id || :new}
title={@page_title}
action={@live_action}
exam={@exam}
patch={~p"/exams"}
/>
</.modal>
<div>
@ -66,19 +78,19 @@
<div class="font-bold text-center">{day}</div>
<% end %>
<!-- Empty spaces for previous month -->
<!-- Empty spaces for previous month -->
<%= for _ <- 1..(Date.day_of_week(@current_month)) do %>
<div></div>
<% end %>
<!-- Days of the month -->
<!-- Days of the month -->
<%= for day <- 1..Date.days_in_month(@current_month) do %>
<% {:ok, date}=Date.new(@current_month.year, @current_month.month, day) %>
<% {:ok, date} = Date.new(@current_month.year, @current_month.month, day) %>
<div class={["border rounded p-3", @current_month == date && "bg-zinc-800"]}>
<div class={["border rounded p-3 dark:border-zinc-400", @current_month == date && "bg-zinc-200 dark:bg-zinc-800"]}>
<div class="text-sm font-bold">{day}</div>
<!-- Render events for the current day -->
<!-- Render events for the current day -->
<% IO.puts("Date: #{date}") %>
<% IO.inspect(Map.get(@events, date)) %>