freedive/lib/freedive_web/components/layouts/app.html.heex

136 lines
3.9 KiB
Text

<main class="container">
<.flash_group flash={@flash} />
<.navbar is-fixed-top is-light>
<.navbar_brand class="ml-1">
<.navbar_item>
<.title is-4>
Freedive
</.title>
</.navbar_item>
<.navbar_burger target="navbar_top" />
</.navbar_brand>
<.navbar_menu id="navbar_top" class="mr-1">
<%= if @current_user do %>
<.navbar_start>
<.navbar_item has-dropdown is-hoverable>
<.navbar_link>
<.icon for="compute" aria-hidden="true">
Compute
</.icon>
</.navbar_link>
<.navbar_dropdown>
<.link href={~p"/compute/apps"} class="navbar-item">
Apps
</.link>
<.link href={~p"/compute/tasks"} class="navbar-item">
Tasks
</.link>
</.navbar_dropdown>
</.navbar_item>
<.navbar_item has-dropdown is-hoverable>
<.navbar_link>
<.icon for="storage" aria-hidden="true">
Storage
</.icon>
</.navbar_link>
<.navbar_dropdown>
<.link href={~p"/storage/local"} class="navbar-item">
Local
</.link>
<.link href={~p"/storage/shared"} class="navbar-item">
Shared
</.link>
<.link href={~p"/storage/remote"} class="navbar-item">
Remote
</.link>
</.navbar_dropdown>
</.navbar_item>
<.navbar_item has-dropdown is-hoverable>
<.navbar_link>
<.icon for="network" aria-hidden="true">
Network
</.icon>
</.navbar_link>
<.navbar_dropdown>
<.link href={~p"/network/public"} class="navbar-item">
Public
</.link>
<.link href={~p"/network/private"} class="navbar-item">
Private
</.link>
<.navbar_divider />
<.link href={~p"/network/endpoints"} class="navbar-item">
Endpoints
</.link>
</.navbar_dropdown>
</.navbar_item>
</.navbar_start>
<% end %>
<.navbar_end>
<%= if @current_user do %>
<.navbar_item>
<%= @current_user.email %>
</.navbar_item>
<.navbar_item has-dropdown is-hoverable>
<.navbar_link>
<.icon for="system" aria-hidden="true">
System
</.icon>
</.navbar_link>
<.navbar_dropdown>
<.link href={~p"/updates"} class="navbar-item">
Software updates
</.link>
<.navbar_divider />
<.link href={~p"/packages"} class="navbar-item">
Packages
</.link>
<.link href={~p"/services"} class="navbar-item">
Services
</.link>
</.navbar_dropdown>
</.navbar_item>
<% end %>
<.navbar_item has-dropdown is-hoverable>
<.navbar_link>
<.icon for="account" aria-hidden="true">
Account
</.icon>
</.navbar_link>
<.navbar_dropdown>
<%= if @current_user do %>
<.link href={~p"/users/settings"} class="navbar-item">
Settings
</.link>
<.link href={~p"/users/log_out"} method="delete" class="navbar-item">
Log out
</.link>
<% else %>
<.link href={~p"/users/log_in"} class="navbar-item">
Log in
</.link>
<% end %>
</.navbar_dropdown>
</.navbar_item>
</.navbar_end>
</.navbar_menu>
</.navbar>
<%= @inner_content %>
</main>