Add About page, hide Rover from menu

This commit is contained in:
Graham McIntire 2026-04-08 14:36:28 -05:00
parent cbcb51e5e5
commit f8763feb38
3 changed files with 22 additions and 1 deletions

View file

@ -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"

View 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

View file

@ -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