Remove redundant nav from navbar

Add current location to navbar
Remove giant header on edit user page
This commit is contained in:
Lilian 2023-05-21 00:23:19 +02:00
parent 7409c4e948
commit 1a66dbd41f
Signed by: enbyfoxen
GPG key ID: 007CA12D692829E1
3 changed files with 15 additions and 11 deletions

View file

@ -24,6 +24,12 @@
var linkActive = !string.IsNullOrWhiteSpace(linkFlag?.Value) && linkFlag.Value == user.Id.ToString() && !string.IsNullOrWhiteSpace(lTimeFlag?.Value) && DateTime.UtcNow - DateTime.Parse(lTimeFlag.Value) < TimeSpan.FromMinutes(5);
}
@section HeaderNavAddLocation {
<span class="navbar-text">
Edit User
</span>
}
@section Scripts {
<script src="/js/idle-timer.min.js"></script>
@ -56,16 +62,10 @@
}
}
<div class="text-center">
<h1 class="display-5">
Edit User
</h1>
</div>
<form id="change_user" method="POST">
<div class="d-flex flex-row align-items-center my-3">
<h3>Account</h3>
<button type="button" class="btn btn-lg btn-danger mx-3" name="action" data-bs-toggle="modal" data-bs-target="#deleteConfirmModal">Delete</button> <!-- Calls the below modal dialog to confirm user deletetion -->
<button type="button" class="btn btn-lg btn-danger mx-3" name="action" data-bs-toggle="modal" data-bs-target="#deleteConfirmModal">Delete</button> <!-- Calls the modal dialog to confirm user deletion -->
</div>
<div class="mb-3">
<label for="nickname" class="form-label">Nickname</label>

View file

@ -10,6 +10,12 @@
<link rel="stylesheet" href="~/lib/datatables/dataTables.bootstrap5.min.css"/>
}
@section HeaderNavAddLocation {
<span class="navbar-text">
Home
</span>
}
@section HeaderAddUser {
<button type="button" class="btn btn-primary ms-auto" data-bs-toggle="modal" data-bs-target="#add_user_modal"> <!-- Calls the modal dialog to add user -->
Add User

View file

@ -15,17 +15,15 @@
<nav class="navbar fixed-top navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
<div class="container">
<a class="navbar-brand" asp-area="" asp-page="/Index">AfRApay</a>
@await RenderSectionAsync("HeaderNavAddLocation", required:false)
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
<ul class="navbar-nav flex-grow-1">
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-page="/Index">Home</a>
</li>
</ul>
<div class="d-flex">
<div class="d-flex mt-2 mt-md-0">
@await RenderSectionAsync("HeaderAddSearch", false)
@await RenderSectionAsync("HeaderAddUser", false)
</div>