Add About page, hide Rover from menu
This commit is contained in:
parent
cbcb51e5e5
commit
f8763feb38
3 changed files with 22 additions and 1 deletions
|
|
@ -42,11 +42,11 @@ defmodule MicrowavepropWeb.Layouts do
|
|||
<nav class="flex gap-2">
|
||||
<.link navigate="/map" class="btn btn-ghost btn-sm">Map</.link>
|
||||
<.link navigate="/path" class="btn btn-ghost btn-sm">Path</.link>
|
||||
<.link navigate="/rover" class="btn btn-ghost btn-sm">Rover</.link>
|
||||
<.link navigate="/beacons" class="btn btn-ghost btn-sm">Beacons</.link>
|
||||
<.link navigate="/contacts/map" class="btn btn-ghost btn-sm">Contact Map</.link>
|
||||
<.link navigate="/contacts" class="btn btn-ghost btn-sm">Contacts</.link>
|
||||
<.link navigate="/submit" class="btn btn-ghost btn-sm">Submit</.link>
|
||||
<.link navigate="/about" class="btn btn-ghost btn-sm">About</.link>
|
||||
<.link
|
||||
:if={@current_scope && @current_scope.user && @current_scope.user.is_admin}
|
||||
navigate="/users"
|
||||
|
|
|
|||
20
lib/microwaveprop_web/live/about_live.ex
Normal file
20
lib/microwaveprop_web/live/about_live.ex
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
defmodule MicrowavepropWeb.AboutLive do
|
||||
@moduledoc false
|
||||
use MicrowavepropWeb, :live_view
|
||||
|
||||
@impl true
|
||||
def mount(_params, _session, socket) do
|
||||
{:ok, assign(socket, page_title: "About")}
|
||||
end
|
||||
|
||||
@impl true
|
||||
def render(assigns) do
|
||||
~H"""
|
||||
<Layouts.app flash={@flash} current_scope={@current_scope}>
|
||||
<.header>
|
||||
About
|
||||
</.header>
|
||||
</Layouts.app>
|
||||
"""
|
||||
end
|
||||
end
|
||||
|
|
@ -56,6 +56,7 @@ defmodule MicrowavepropWeb.Router do
|
|||
live "/path", PathLive
|
||||
live "/rover", RoverLive
|
||||
live "/algo", AlgoLive
|
||||
live "/about", AboutLive
|
||||
live "/backfill", BackfillLive
|
||||
|
||||
# Beacons: read-only public views
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue