about summary refs log tree commit diff
path: root/MatrixUtils.Web/Shared/NavMenu.razor
blob: 770a246b69da86911e840542b82b7be63e2caf3e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<div class="top-row ps-3 navbar navbar-dark">
    <div class="container-fluid">
        <a class="navbar-brand" href="">Rory&::MatrixUtils</a>
        <button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
            <span class="navbar-toggler-icon"></span>
        </button>
    </div>
</div>

@* icons: https://www.appstudio.dev/app/OpenIconic.html *@

<div class="@NavMenuCssClass nav-scrollable" @onclick="ToggleNavMenu">
    <nav class="flex-column">
        <div class="nav-item px-3">
            <NavLink class="nav-link" href="" Match="NavLinkMatch.All">
                <span class="oi oi-home" aria-hidden="true"></span> Home
            </NavLink>
        </div>
        
        <div class="nav-item px-3">
            <NavLink class="nav-link" href="About">
                <span class="oi oi-info" aria-hidden="true"></span> About RMU
            </NavLink>
        </div>

        <!-- Main tools -->
        
        <div class="nav-item px-3">
            <h5 style="margin-left: 1em;">Main tools</h5>
            <hr style="margin-bottom: 0em;"/>
        </div>

        <div class="nav-item px-3">
            <NavLink class="nav-link" href="Rooms">
                <span class="oi oi-list-rich" aria-hidden="true"></span> Room list
            </NavLink>
        </div>

        <div class="nav-item px-3">
            <NavLink class="nav-link" href="User/Profile">
                <span class="oi oi-person" aria-hidden="true"></span> Manage profile
            </NavLink>
        </div>
        
        <div class="nav-item px-3">
            <NavLink class="nav-link" href="User/DirectMessages">
                <span class="oi oi-people" aria-hidden="true"></span> Manage DMs
            </NavLink>
        </div>

        <!-- Extra tools -->
        
        <div class="nav-item px-3">
            <h5 style="margin-left: 1em;">Extra tools</h5>
            <hr style="margin-bottom: 0em;"/>
        </div>

        <div class="nav-item px-3">
            <NavLink class="nav-link" href="HSAdmin">
                <span class="oi oi-hard-drive" aria-hidden="true"></span> Homeserver admin
            </NavLink>
        </div>

        <div class="nav-item px-3">
            <NavLink class="nav-link" href="Tools">
                <span class="oi oi-plus" aria-hidden="true"></span> Other tools
            </NavLink>
        </div>

        <div class="nav-item px-3">
            <NavLink class="nav-link" href="Labs">
                <span class="oi oi-beaker" aria-hidden="true"></span> Labs
            </NavLink>
        </div>

        <!-- RMU -->
        
        <div class="nav-item px-3">
            <h5 style="margin-left: 1em;">RMU</h5>
            <hr style="margin-bottom: 0em;"/>
        </div>
        
        <div class="nav-item px-3">
            <NavLink class="nav-link" href="Dev/Options">
                <span class="oi oi-wrench" aria-hidden="true"></span> Developer options
            </NavLink>
        </div>
        
        <div class="nav-item px-3">
            <NavLink class="nav-link" href="Dev/Utilities">
                <span class="oi oi-code" aria-hidden="true"></span> Developer utilities
            </NavLink>
        </div>
    </nav>
</div>

@code {
    private bool collapseNavMenu = true;

    private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;

    private void ToggleNavMenu() => collapseNavMenu = !collapseNavMenu;

}