More layout and customisations.
This commit is contained in:
@@ -10,111 +10,8 @@
|
||||
</head>
|
||||
|
||||
<body class="d-flex flex-column min-vh-100">
|
||||
|
||||
<!-- Topbar -->
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light px-3">
|
||||
<a class="navbar-brand d-flex align-items-center" href="/">
|
||||
<img src="/static/img/logo.png" alt="Logo" height="30" class="me-2">
|
||||
<span>SynLotto</span>
|
||||
</a>
|
||||
<div class="ms-auto d-flex align-items-center gap-3">
|
||||
{{ if .User }}
|
||||
{{ if .IsAdmin }}
|
||||
<!-- Admin Dropdown -->
|
||||
<div class="dropdown">
|
||||
<a class="nav-link text-dark" href="#" id="adminDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="bi bi-shield-lock fs-5 position-relative"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-end dropdown-admin-box shadow-sm" aria-labelledby="adminDropdown">
|
||||
<li class="dropdown-header text-center fw-bold">Admin Menu</li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li class="text-center"><a href="/admin/dashboard" class="dropdown-item">Tools</a></li>
|
||||
<li class="text-center"><a href="/admin/dashboard" class="dropdown-item">Audit Logs</a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li class="text-center"><a href="/admin/dashboard" class="dropdown-item">Open Dashboard</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
<!-- Notification Dropdown -->
|
||||
<div class="dropdown">
|
||||
<a class="nav-link text-dark" href="#" id="notificationDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="bi bi-bell fs-5 position-relative">
|
||||
<span class="position-absolute top-0 start-0 translate-middle badge rounded-pill bg-warning text-dark" style="transform: translate(-40%, -50%)">
|
||||
3
|
||||
</span>
|
||||
</i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-end dropdown-notification-box shadow-sm" aria-labelledby="notificationDropdown">
|
||||
<li class="dropdown-header text-center fw-bold">Notifications</li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
|
||||
<!-- Example notification -->
|
||||
<li class="px-3 py-2">
|
||||
<div class="d-flex align-items-start">
|
||||
<i class="bi bi-info-circle text-primary me-2 fs-4"></i>
|
||||
<div>
|
||||
<div class="fw-semibold">System Update</div>
|
||||
<small class="text-muted">A new lottery draw has been posted.</small>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
|
||||
<li class="px-3 py-2">
|
||||
<div class="d-flex align-items-start">
|
||||
<i class="bi bi-check-circle text-success me-2 fs-4"></i>
|
||||
<div>
|
||||
<div class="fw-semibold">Sync Complete</div>
|
||||
<small class="text-muted">All results are up-to-date.</small>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li class="text-center"><a href="/notifications" class="dropdown-item">View all notifications</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Message Dropdown -->
|
||||
<div class="dropdown">
|
||||
<a class="nav-link text-dark" href="#" id="messageDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="bi bi-envelope fs-5 position-relative">
|
||||
<!-- Unread badge (example: 2 messages) -->
|
||||
<span class="position-absolute top-0 start-0 translate-middle badge rounded-pill bg-danger text-dark" style="transform: translate(-40%, -50%)">
|
||||
2
|
||||
</span>
|
||||
</i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-end dropdown-message-box shadow-sm" aria-labelledby="messageDropdown" style="min-width: 300px;">
|
||||
<li class="dropdown-header text-center fw-bold">Messages</li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
|
||||
<!-- Example message item -->
|
||||
<li class="px-3 py-2">
|
||||
<div class="d-flex align-items-start">
|
||||
<i class="bi bi-person-circle me-2 fs-4 text-secondary"></i>
|
||||
<div>
|
||||
<div class="fw-semibold">Admin</div>
|
||||
<small class="text-muted">Welcome to SynLotto!</small>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li class="text-center"><a href="/messages" class="dropdown-item">View all messages</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- User Greeting -->
|
||||
<span class="navbar-text">Hello, {{ .User.Username }}</span>
|
||||
<a class="btn btn-outline-danger btn-xs" href="/logout">Logout</a>
|
||||
{{ else }}
|
||||
<a class="btn btn-outline-primary btn-sm" href="/login">Login</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
{{ template "topbar" . }}
|
||||
<!-- Main Layout -->
|
||||
<div class="container-fluid flex-grow-1">
|
||||
<div class="row">
|
||||
|
||||
Reference in New Issue
Block a user