diff --git a/lib/freedive_web/live/home_live.ex b/lib/freedive_web/live/home_live.ex
index cd94797..28bb187 100644
--- a/lib/freedive_web/live/home_live.ex
+++ b/lib/freedive_web/live/home_live.ex
@@ -3,9 +3,12 @@ defmodule FreediveWeb.HomeLive do
def render(assigns) do
~H"""
- <.section>
+ <.block class="px-2 py-4">
<.panel is-info>
- <.panel_heading>Home
+ <.panel_heading>
+ Home
+
+
<.panel_tabs is-hidden-mobile>
All
Compute
@@ -13,21 +16,22 @@ defmodule FreediveWeb.HomeLive do
Network
System
+
<.panel_tabs is-hidden-tablet>
-
- <.icon for="infinity" color="auto" />
+
+ <.icon for="all" color="auto" />
- <.icon for="binary" color="auto" />
+ <.icon for="compute" color="auto" />
- <.icon for="hard-drive" color="auto" />
+ <.icon for="storage" color="auto" />
- <.icon for="earth" color="auto" />
+ <.icon for="network" color="auto" />
- <.icon for="bot" color="auto" />
+ <.icon for="system" color="auto" />
@@ -40,11 +44,10 @@ defmodule FreediveWeb.HomeLive do
name="search"
value={@query}
/>
-
-
-
+ <.icon for="search" size="1.5rem" aria-hidden="true" is-left />
+
<.link patch={~p"/services"} class="panel-block pt-1">
<.icon for="puzzle" color="auto" aria-hidden="true" />
@@ -64,12 +67,32 @@ defmodule FreediveWeb.HomeLive do
Software updates
+
+ <.section>
+ <.box>
+ <.button phx-click="color" phx-value-enable="true">
+ Color
+
+ <.button phx-click="color" phx-value-enable="false">
+ Grayscale
+
+
"""
end
def mount(_params, _session, socket) do
- socket = assign(socket, query: "")
+ socket = assign(socket, query: "all")
{:ok, socket}
end
+
+ def handle_event("color", %{"enable" => "true"}, socket) do
+ Freedive.Features.enable(:colorhash)
+ {:noreply, assign(socket, query: "color")}
+ end
+
+ def handle_event("color", %{"enable" => "false"}, socket) do
+ Freedive.Features.disable(:colorhash)
+ {:noreply, assign(socket, query: "grayscale")}
+ end
end