navmenu.razor
unknown
plain_text
a year ago
14 kB
1
Indexable
Never
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" /> <div class="top-row ps-3 navbar navbar-dark"> <div class="container-flui"> @if (!@IconMenuActive) { <img class="img1" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJQAAAB+CAYAAADC4zgwAAAABHNCSVQICAgIfAhkiAAAFFBJREFUeF7tnQuQHEUZx2dm9468iCQgRBNU8BUMKlaUBEkut7uXBFCJoqIWliIlKKWi5nG5BJBDQ5K7CwTBonxglVhERbAqCibGu927JCgGNGUUosgjCRpCiCTEJJe9u90Z/713s/T29sx0z87s7aMnlbq7mX58j19/3dPdM6Nr6nC0QGsqkcbFU3gJIg2GtmZut67MV2gBZRAOEQDJIqct/OuMJR2ZWZZq1gw9qumwYkcsqWwJSykjMLjYMJ0zcUb2yzO/G7Evb3hy1clnj/xl7M0XP5g2jOgYlrIHd689duWMFRPrPWIpoByAetfk2ZnPv3dV1L68vLeliJUr3n5Deta0y4vgQsK/6Lr+/nqESwHl0uVNGnOW2XbRBoNOcmzg8OCqP17ZyGZ766QLBq67YB13vAW46sbOdaOobLRY0Zv4cNbSHrbzdcR6ioqwLHOwrW9BDq7O+GtjKMuyzsSpg7w6ax0uBZQgaSu2z7dMELZ2XjcZsHPt5gQLAMsN8jnH95HnekERqiKZAqoEN7mAgjs/fjfnkucQspDIVtWHAiog97mA8kOA8iVeNchzFOe5d4bV2jUqoAICii6GB5cXIMizGmWsKFGc+1DP1SWWUVL2mgBqWSqxEorcJmYJ61BnPBVq1wI4imbYvYBigHwT/t7H02f/sWeO3PXn6yex13BHquGOlD79BdT5EzGbBJeqqoGyJyFtc3yn6RGrMTKGqxPuyEzckRVMAdB3ZkGZ1KnrkwHKlsVtjEbSZM2MuXLrJQU6kfNrmrdgBj8/J3su6t4TlH5e5VQlUAApA8VyFtPxb22s20vPgusHjj//6p1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+x1CQcSNkLZKTdydm6da1XbHUvXSEWpaML4U9u8igmdxauDUOTE+s70ikFvPKPpluHHP3ZZsHvGxvX0dVv0aVi3j2HbVBuZPTvJQSASrXHfQm7oeR8aIL6xDmiM5kW5VTNHQ7T1+LNgKmweEpL79A8cZI7e2a0d+UyPLkJelpoCh5yJv33swDaklv8xkRK3II14/j+qkijUVkUI7BfxYgG3pE/1THvJ5fstG95Ai1dMuC8UZDFm9oG77z4DmGKGNPG4QNlBcYlKGLWrao0fO32Zx5KCcDs3LlB9k6JnpjqeaVj863CKhOTnUAKlcdyUOAxP/85O7yVOI/iChTcflFXJ8qqhspb8W2S1+fzQy+bJdd0hiqoIUY2oLO5mQ3L1zSYY93nW69DFDfRt6baQCdIKAVEZnYZCfi3Cbmhixr2vpEaj+tL1dPzsRmEECxOntFaBYoNr/dsNkI52QTOt3yVMvnMHFHxlUFh5c9XacNSEnLelv+gT53ul0q7qIuwV3UFlp48ruBhZm181xniHOz6HRrtSOUCDy8Vi4D1Fcwez9+ePY+13pZUETGV3nL8oDqScQ0Q0uV0uWJALVi+3wrOzQctbyAan/qk439Bw+TfWz5w83hLDzLU/E7MG/3zfz5RmNq55zu3AR0cYSK4y5Zv9KtV/o/zygo7gY1I9QAAAAASUVORK5CYII="> } <button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu"> <span class="material-symbols-outlined"> keyboard_double_arrow_left </span> </button> </div> </div> <div class="@NavMenuCssClass" @onclick="ToggleNavMenu"> <nav class="flex-column"> <div class="nav-item px-3"> <NavLink class="nav-link" href="" Match="NavLinkMatch.All"> <span class="dashboard"> <img class="dash-icon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAQAAABKfvVzAAAAJElEQVQ4y2NgGKzgPxrAJUaZBnQ2NrHBroG2oTQa06MxTX8AAMYKfpA+AYB7AAAAAElFTkSuQmCC" width="20px" height="20px" /> </span> @if (!@IconMenuActive) { <label>Dashboard</label> } </NavLink> </div> <div class="nav-item px-3"> <NavLink class="nav-link" href="counter"> <span class="oi oi-plus" aria-hidden="true"></span> @if (!@IconMenuActive) { <label>Service request</label> } </NavLink> </div> <div class="nav-item px-3"> <NavLink class="nav-link" @onclick="()=>expandSubNav=!expandSubNav"> <span class="oi oi-list-rich" aria-hidden="true"></span> @if (!@IconMenuActive) { <label>Orders</label> <span class="down-arrow"> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAQAAABKfvVzAAAAR0lEQVQ4y2NgGAWDEPzXIiyCLFn///f/MBSRMKBIPT4N/5G1gJX/x6MBriUczA4nqBxZC5HKkbQQqxyuhXjlUC31o4lsMAMApWJJk5qElCQAAAAASUVORK5CYII=" /> </span> } </NavLink> @if (!@IconMenuActive) { @if (expandSubNav) { <ul class="nav flex-column" id="subn"> <li class="nav-item px-3 nav-link"> <NavLink class="nav-link" href="#"> <span class="sub-1"></span>Sub-menu 1 </NavLink> </li> <li class="nav-item px-3 nav-link"> <NavLink class="nav-link" href="#"> <span class="sub-2"></span>Sub-menu 2 </NavLink> </li> </ul> } } </div> <div class="nav-item px-3"> <NavLink class="nav-link" href="counter"> <span class="oi oi-plus" aria-hidden="true"></span> @if (!@IconMenuActive) { <label>My Tasks</label> } </NavLink> </div> <div class="nav-item px-3"> <NavLink class="nav-link" href="counter"> <span class="oi oi-plus" aria-hidden="true"></span> @if (!@IconMenuActive) { <label>Admin Settings</label> } </NavLink> </div> <div class="nav-item px-3"> <NavLink class="nav-link" @onclick="()=>expandSubNav2=!expandSubNav2"> <span class="oi oi-list-rich" aria-hidden="true"></span> @if (!@IconMenuActive) { <label>Entities</label> <span class="down-arrow"> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAQAAABKfvVzAAAAR0lEQVQ4y2NgGAWDEPzXIiyCLFn///f/MBSRMKBIPT4N/5G1gJX/x6MBriUczA4nqBxZC5HKkbQQqxyuhXjlUC31o4lsMAMApWJJk5qElCQAAAAASUVORK5CYII=" /> </span> } </NavLink> @if (!@IconMenuActive) { @if (expandSubNav2) { <ul class="nav flex-column" id="subn"> <li class="nav-item px-3 nav-link"> <NavLink class="nav-link" href="#"> <span class="sub-1"></span>Sub-menu 1 </NavLink> </li> <li class="nav-item px-3 nav-link"> <NavLink class="nav-link" href="#"> <span class="sub-2"></span>Sub-menu 2 </NavLink> </li> </ul> } } </div> </nav> </div> <div class="bottom-row"> <div class="icon-menu-arrow"> @if (!@IconMenuActive) { <span class="material-symbols-outlined" style="color: rgb(255, 255, 255);" @onclick="ToggleIconMenu">keyboard_double_arrow_left</span> } else { <span class="material-symbols-outlined" style="color: rgb(255, 255, 255);" @onclick="ToggleIconMenu">double_arrow</span> } </div> </div> @code { //bool to send to MainLayout for shrinking sidebar and showing/hide menu text private bool IconMenuActive { get; set; } = false; private bool expandSubNav = false; private bool expandSubNav2 = false; //EventCallback for sending bool to MainLayout [Parameter] public EventCallback<bool> ShowIconMenu { get; set; } private bool collapseNavMenu ; private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null; private void ToggleNavMenu() { collapseNavMenu = !collapseNavMenu; } //Method to toggle IconMenuActive bool and send bool via EventCallback private async Task ToggleIconMenu() { IconMenuActive = !IconMenuActive; await ShowIconMenu.InvokeAsync(IconMenuActive); } }