Compare commits

..

No commits in common. "c935fbbc4270f8a3c3fc5faec2e24aebd1e95334" and "3a1060826f145b6cba0a68db6a97547771da25fd" have entirely different histories.

3 changed files with 10 additions and 197 deletions

View file

@ -1,7 +1,7 @@
<main class="container"> <main class="container">
<.flash_group flash={@flash} /> <.flash_group flash={@flash} />
<.navbar is-fixed-top is-light> <.navbar is-fixed-top is-light>
<.navbar_brand class="ml-1"> <.navbar_brand>
<.navbar_item> <.navbar_item>
<.title is-4> <.title is-4>
Freedive Freedive
@ -11,7 +11,7 @@
<.navbar_burger target="navbar_top" /> <.navbar_burger target="navbar_top" />
</.navbar_brand> </.navbar_brand>
<.navbar_menu id="navbar_top" class="mr-1"> <.navbar_menu id="navbar_top">
<%!-- <%= if @current_user do %> <%!-- <%= if @current_user do %>
<.navbar_start> <.navbar_start>
<.navbar_item has-dropdown is-hoverable> <.navbar_item has-dropdown is-hoverable>
@ -60,30 +60,18 @@
<.navbar_item has-dropdown is-hoverable> <.navbar_item has-dropdown is-hoverable>
<.navbar_link> <.navbar_link>
<span class="icon mr-2">
<Lucideicons.bot aria-hidden="true" />
</span>
System System
</.navbar_link> </.navbar_link>
<.navbar_dropdown> <.navbar_dropdown>
<.link href={~p"/updates"} class="navbar-item"> <%!-- <.navbar_item>
<span class="icon mr-2"> <.link>Software Updates</.link>
<Lucideicons.hard_drive_download aria-hidden="true" /> </.navbar_item>
</span>
Software updates
</.link>
<.navbar_divider /> <.navbar_divider />
<.link href={~p"/packages"} class="navbar-item"> <.navbar_item>
<span class="icon mr-2"> <.link>Packages</.link>
<Lucideicons.package aria-hidden="true" /> </.navbar_item> --%>
</span>
Packages
</.link>
<.link href={~p"/services"} class="navbar-item"> <.link href={~p"/services"} class="navbar-item">
<span class="icon mr-2">
<Lucideicons.puzzle aria-hidden="true" />
</span>
Services Services
</.link> </.link>
</.navbar_dropdown> </.navbar_dropdown>
@ -91,29 +79,20 @@
<% end %> <% end %>
<.navbar_item has-dropdown is-hoverable> <.navbar_item has-dropdown is-hoverable>
<.navbar_link> <.navbar_link>
<span class="icon mr-2">
<Lucideicons.circle_user aria-hidden="true" />
</span>
Account Account
</.navbar_link> </.navbar_link>
<.navbar_dropdown> <.navbar_dropdown>
<%= if @current_user do %> <%= if @current_user do %>
<.link href={~p"/users/settings"} class="navbar-item"> <.link href={~p"/users/settings"} class="navbar-item">
<span class="icon mr-2">
<Lucideicons.user_cog aria-hidden="true" />
</span>
Settings Settings
</.link> </.link>
<.link href={~p"/users/log_out"} method="delete" class="navbar-item"> <.link href={~p"/users/log_out"} method="delete" class="navbar-item">
<span class="icon mr-2">
<Lucideicons.log_out aria-hidden="true" />
</span>
Log out Log out
</.link> </.link>
<% else %> <% else %>
<.link href={~p"/users/log_in"} class="navbar-item"> <.link href={~p"/users/log_in"} class="navbar-item">
<Lucideicons.log_in aria-hidden="true" /> Log in Log in
</.link> </.link>
<% end %> <% end %>
</.navbar_dropdown> </.navbar_dropdown>

View file

@ -204,28 +204,6 @@ defmodule Liliform.Components do
""" """
end end
@doc """
Renders control.
"""
attr :class, :string, default: nil, doc: "the optional class of the control"
attr :rest, :global, doc: "the arbitrary HTML attributes to add to the control"
slot :inner_block, required: true, doc: "the inner block that renders the control content"
def control(assigns) do
assigns =
assigns
|> extend_class("control")
|> set_phx_attributes()
|> set_bulma_classes()
~H"""
<p {@heex_class} {@heex_phx_attributes} {@rest}>
<%= render_slot(@inner_block) %>
</p>
"""
end
@doc """ @doc """
Renders section. Renders section.
""" """
@ -886,94 +864,6 @@ defmodule Liliform.Components do
""" """
end end
@doc """
Renders a panel.
"""
attr :class, :string, default: nil, doc: "the optional class of the panel"
attr :rest, :global, doc: "the arbitrary HTML attributes to add to the panel"
slot :inner_block, required: true, doc: "the inner block that renders the panel content"
def panel(assigns) do
assigns =
assigns
|> extend_class("panel")
|> set_phx_attributes()
|> set_bulma_classes()
~H"""
<article {@heex_class} {@heex_phx_attributes} {@rest}>
<%= render_slot(@inner_block) %>
</article>
"""
end
@doc """
Renders a panel-heading.
"""
attr :class, :string, default: nil, doc: "the optional class of the panel-heading"
attr :rest, :global, doc: "the arbitrary HTML attributes to add to the panel-heading"
slot :inner_block, required: true, doc: "the inner block that renders the panel-heading content"
def panel_heading(assigns) do
assigns =
assigns
|> extend_class("panel-heading")
|> set_phx_attributes()
|> set_bulma_classes()
~H"""
<p {@heex_class} {@heex_phx_attributes} {@rest}>
<%= render_slot(@inner_block) %>
</p>
"""
end
@doc """
Renders a panel-tabs.
"""
attr :class, :string, default: nil, doc: "the optional class of the panel-tabs"
attr :rest, :global, doc: "the arbitrary HTML attributes to add to the panel-tabs"
slot :inner_block, required: true, doc: "the inner block that renders the panel-tabs content"
def panel_tabs(assigns) do
assigns =
assigns
|> extend_class("panel-tabs")
|> set_phx_attributes()
|> set_bulma_classes()
~H"""
<p {@heex_class} {@heex_phx_attributes} {@rest}>
<%= render_slot(@inner_block) %>
</p>
"""
end
@doc """
Renders a panel-block.
"""
attr :class, :string, default: nil, doc: "the optional class of the panel-block"
attr :rest, :global, doc: "the arbitrary HTML attributes to add to the panel-block"
slot :inner_block, required: true, doc: "the inner block that renders the panel-block content"
def panel_block(assigns) do
assigns =
assigns
|> extend_class("panel-block")
|> set_phx_attributes()
|> set_bulma_classes()
~H"""
<div {@heex_class} {@heex_phx_attributes} {@rest}>
<%= render_slot(@inner_block) %>
</div>
"""
end
@doc """ @doc """
Renders search input. Renders search input.
""" """

View file

@ -4,68 +4,12 @@ defmodule FreediveWeb.HomeLive do
def render(assigns) do def render(assigns) do
~H""" ~H"""
<.section> <.section>
<.panel is-info> <.title>Home</.title>
<.panel_heading>Home</.panel_heading>
<.panel_tabs is-hidden-mobile>
<a class="is-active">All</a>
<a>Compute</a>
<a>Storage</a>
<a>Network</a>
<a>System</a>
</.panel_tabs>
<.panel_tabs is-hidden-tablet>
<a class="is-active"><Lucideicons.infinity aria-hidden="true" /></a>
<a><Lucideicons.binary aria-hidden="true" /></a>
<a><Lucideicons.hard_drive aria-hidden="true" /></a>
<a><Lucideicons.earth aria-hidden="true" /></a>
<a><Lucideicons.bot aria-hidden="true" /></a>
</.panel_tabs>
<.panel_block>
<.control has-icons-left>
<input
class="input is-info"
type="text"
placeholder="Search"
name="search"
value={@query}
/>
<span class="icon is-left">
<Lucideicons.search aria-hidden="true" />
</span>
</.control>
</.panel_block>
<.link patch={~p"/users/settings"} class="panel-block pt-1">
<span class="panel-icon">
<Lucideicons.user_cog aria-hidden="true" />
</span>
<span class="mt-2 ml-2">Account settings</span>
</.link>
<.link patch={~p"/services"} class="panel-block pt-1">
<span class="panel-icon">
<Lucideicons.puzzle aria-hidden="true" />
</span>
<div class="mt-2 ml-2">System services</div>
</.link>
<.link patch={~p"/packages"} class="panel-block pt-1">
<span class="panel-icon">
<Lucideicons.package aria-hidden="true" />
</span>
<span class="mt-2 ml-2">System packages</span>
</.link>
<.link patch={~p"/updates"} class="panel-block pt-1">
<span class="panel-icon">
<Lucideicons.hard_drive_download aria-hidden="true" />
</span>
<span class="mt-2 ml-2">System software updates</span>
</.link>
</.panel>
</.section> </.section>
""" """
end end
def mount(_params, _session, socket) do def mount(_params, _session, socket) do
socket = assign(socket, query: "")
{:ok, socket} {:ok, socket}
end end
end end