Files
deepdrft/DeepDrftPublic.Client/Layout/Pages.cs
T
daniel-c-harvey 743c2c3d02 feat(public-nav): slim appbar to ARCHIVE + inline CUTS/SESSIONS/MIXES, drop GENRES and Tracks (8.I)
Desktop flattens the ARCHIVE popover into inline appbar links above the medium
breakpoint; mobile keeps the indented sub-list under ARCHIVE. GENRES and /tracks
removed from nav only — routes (GenresView, TracksView) remain reachable by URL.
Retires the now-dead desktop hover-popover and its 8.J collapse-state machinery
(mobile drawer still dismisses on click).
2026-06-13 21:26:44 -04:00

46 lines
2.0 KiB
C#

using MudBlazor;
namespace DeepDrftPublic.Client.Layout;
public class PageRoute
{
public string Name { get; set; } = string.Empty;
public string Route { get; set; } = string.Empty;
public string? Icon { get; set; } = null;
// Optional one-level fan-out. A node with children is a dual-role node: its own Route is a
// real destination (desktop click / mobile tap navigate to it), and Children render as a
// hover dropdown on desktop and an indented sub-list on mobile. Depth is capped at one level
// by convention — children are not themselves expected to carry children.
public IReadOnlyList<PageRoute> Children { get; set; } = [];
public bool HasChildren => Children.Count > 0;
}
public static class Pages
{
// ARCHIVE (→ the release-cardinal /archive browser) carries the three medium modes as Children.
// Above the medium breakpoint the desktop nav flattens them into inline appbar links beside
// ARCHIVE (no popover); below the breakpoint the mobile hamburger renders them as an indented
// sub-list under ARCHIVE. /tracks and /genres are intentionally absent from the nav (8.I) —
// their routes (TracksView, GenresView) remain reachable by direct URL.
public static readonly List<PageRoute> MenuPages =
[
new()
{
Name = "Archive", Route = "/archive", Icon = Icons.Material.Filled.Inventory2,
Children =
[
new() { Name = "Cuts", Route = "/cuts", Icon = Icons.Material.Filled.Album },
new() { Name = "Sessions", Route = "/sessions", Icon = Icons.Material.Filled.Piano },
new() { Name = "Mixes", Route = "/mixes", Icon = Icons.Material.Filled.GraphicEq },
],
},
];
public static readonly List<PageRoute> AllPages =
new List<PageRoute>
{
new() { Name = "Home", Route = "/", Icon = Icons.Material.Filled.Home }
}.Concat(MenuPages).ToList();
}