techgarage-ir.MTWireGuard/UI/Pages/Shared/_Layout.cshtml
2024-01-25 20:40:43 +03:30

218 lines
10 KiB
Text

@{
string username = Environment.GetEnvironmentVariable("MT_USER");
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="Mikrotik Wireguard management panel">
<meta name="author" content="Kazem Ma79">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="Mikrotik, RouterOS, Wireguard, MTWireguard">
<title>@ViewData["Title"]</title>
<!-- Favicon -->
<link href="img/favicon.ico" rel="icon">
<!-- Google Web Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Heebo:wght@400;500;600;700&display=swap" rel="stylesheet">
<!-- Icon Font Stylesheet -->
<link href="assets/lib/boxicons/css/boxicons.min.css" rel="stylesheet">
<link href="assets/libs/fortawesome/fontawesome-free/css/all.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.4.1/font/bootstrap-icons.css" rel="stylesheet">
<!-- Template Stylesheet -->
<link href="assets/css/core.css" rel="stylesheet">
<!-- Theme Style Switcher-->
<script src="assets/js/themeSwitcher.js"></script>
<!-- Libraries Stylesheet -->
<link href="assets/lib/owl.carousel/css/owl.carousel.min.css" rel="stylesheet">
<link href="lib/tempusdominus/css/tempusdominus-bootstrap-4.min.css" rel="stylesheet">
<link href="assets/libs/flatpickr/flatpickr.min.css" rel="stylesheet">
<link href="https://cdn.datatables.net/v/bs5/jszip-3.10.1/dt-1.13.7/b-2.4.2/b-html5-2.4.2/fc-4.3.0/fh-3.4.0/r-2.5.0/sp-2.2.0/sl-1.7.0/datatables.min.css" rel="stylesheet">
@await RenderSectionAsync("Styles", required: false)
</head>
<body>
<div class="container-fluid position-relative d-flex p-0">
<!-- Spinner Start -->
<div id="spinner" class="show bg-white position-fixed translate-middle w-100 vh-100 top-50 start-50 d-flex align-items-center justify-content-center">
<div class="spinner-border text-primary" style="width: 3rem; height: 3rem;" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
<!-- Spinner End -->
<!-- Sidebar Start -->
<div class="sidebar pb-3">
<nav class="navbar navbar-light pt-0">
<div class="navbar-brand d-flex justify-content-center align-items-center m-0 p-3 w-100">
<a href="index.html">
<h3 class="text-primary">
MTWireguard
</h3>
</a>
</div>
<div class="d-flex align-items-center ms-4 my-4">
<div class="position-relative">
<img class="rounded-circle" src="img/user.png" alt="" style="width: 45px; height: 45px;">
</div>
<div class="ms-3">
<h6 class="mb-0">@username</h6>
<span>Admin</span>
</div>
</div>
<ul class="navbar-nav w-100" id="sideNav">
<li class="nav-item">
<a asp-page="Index" class="nav-link">
<i class="bx bx-home-circle me-2"></i>Dashboard
</a>
</li>
<li class="nav-item text-center text-uppercase py-2">
<span>Wireguard</span>
</li>
<li class="nav-item">
<a asp-page="Clients" class="nav-link">
<i class="bx bx-group me-2"></i>Users
</a>
</li>
<li class="nav-item">
<a asp-page="Servers" class="nav-link">
<i class="bx bx-broadcast me-2"></i>Servers
</a>
</li>
<li class="nav-item">
<a asp-page="Pools" class="nav-link">
<i class="bx bx-current-location me-2"></i>Pools
</a>
</li>
<li class="nav-item text-center text-uppercase py-2">
<span>Settings</span>
</li>
<li class="nav-item">
<a asp-page="Settings" class="nav-link">
<i class="bx bx-cog me-2"></i>Settings
</a>
</li>
</ul>
</nav>
</div>
<!-- Sidebar End -->
<!-- Content Start -->
<div class="content">
<!-- Navbar Start -->
<nav class="navbar navbar-expand navbar-light sticky-top px-4 py-0">
<a href="index.html" class="navbar-brand d-flex d-lg-none me-4">
<h2 class="text-primary mb-0"><i class="fa fa-hashtag"></i></h2>
</a>
<a href="#" class="sidebar-toggler flex-shrink-0">
<i class="fa fa-bars"></i>
</a>
<form class="col-4 d-none d-md-flex ms-4">
<input class="form-control border-1 shadow-sm" type="search" placeholder="Search">
</form>
<div class="navbar-nav align-items-center ms-auto">
<div class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown">
<i class="bx bx-sm bx-bell"></i>
</a>
<ul id="logs" class="dropdown-menu dropdown-menu-end border-1 rounded-0 rounded-bottom m-0"></ul>
</div>
<div class="nav-item dropdown">
<a href="#" class="nav-link" data-bs-toggle="dropdown">
<i class="bx bx-sm bx-palette"></i>
</a>
<ul class="dropdown-menu p-0">
<li>
<a class="dropdown-item" href="javascript:void(0);" data-bs-theme-value="light">
<span class="d-flex align-items-center"><i class="bx bx-sun me-2"></i>Light</span>
</a>
</li>
<li>
<a class="dropdown-item" href="javascript:void(0);" data-bs-theme-value="dark">
<span class="d-flex align-items-center"><i class="bx bx-moon me-2"></i>Dark</span>
</a>
</li>
<li>
<a class="dropdown-item" href="javascript:void(0);" data-bs-theme-value="auto">
<span class="d-flex align-items-center"><i class="bx bx-desktop me-2"></i>System</span>
</a>
</li>
</ul>
</div>
<div class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown">
<img class="rounded-circle me-lg-2" src="img/user.png" alt="" style="width: 40px; height: 40px;">
<span class="d-none d-lg-inline-flex">@username</span>
</a>
<div class="dropdown-menu dropdown-menu-end border-1 rounded-0 rounded-bottom m-0">
<a asp-page="Logout" class="dropdown-item">Log Out</a>
</div>
</div>
</div>
</nav>
<!-- Navbar End -->
<div class="container-fluid p-4">
@RenderBody()
</div>
<!-- Footer Start -->
<footer class="container-fluid px-4">
<div class="rounded-top p-4">
<div class="row">
<div class="col-12 col-sm-6 text-center text-sm-start">
2022 - 2024 &copy; <a href="#">MTWireguard</a>, All Right Reserved.
</div>
<div class="col-12 col-sm-6 text-center text-sm-end">
Designed By <a href="https://htmlcodex.com">HTML Codex</a>
</div>
</div>
</div>
</footer>
<!-- Footer End -->
</div>
<!-- Content End -->
@await RenderSectionAsync("Modals", required: false)
<!-- Back to Top -->
<a href="#" class="btn btn-lg btn-primary btn-lg-square back-to-top" style="display: none;"><i class="bi bi-arrow-up"></i></a>
</div>
<!-- JavaScript Libraries -->
<script src="js/APIClient.js"></script>
<script src="assets/js/main.js"></script>
<script src="js/wireguard.js"></script>
<script src="assets/libs/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="assets/lib/jquery/js/jquery.min.js"></script>
<script src="assets/libs/jquery-ui/jquery-ui.min.js"></script>
<script src="lib/chart/chart.min.js"></script>
<script src="lib/easing/easing.min.js"></script>
<script src="lib/waypoints/waypoints.min.js"></script>
<script src="assets/lib/owl.carousel/js/owl.carousel.min.js"></script>
<script src="lib/tempusdominus/js/moment.min.js"></script>
<script src="lib/tempusdominus/js/moment-timezone.min.js"></script>
<script src="lib/tempusdominus/js/tempusdominus-bootstrap-4.min.js"></script>
<script src="assets/libs/flatpickr/flatpickr.min.js"></script>
<script src="https://cdn.datatables.net/v/bs5/jszip-3.10.1/dt-1.13.7/b-2.4.2/b-html5-2.4.2/fc-4.3.0/fh-3.4.0/r-2.5.0/sp-2.2.0/sl-1.7.0/datatables.min.js"></script>
<script>
$.ajaxSetup({
async: true
});
let here = location.pathname;
$(`#sideNav .nav-item .nav-link[href="${here}"]`).addClass('active');
</script>
<!-- Template Javascript -->
<script src="js/helper.js"></script>
@await RenderSectionAsync("Scripts", required: false)
</body>
</html>