BasicOIDC/templates/settings/base_settings_page.html

90 lines
2.7 KiB
HTML
Raw Normal View History

2022-04-04 15:39:23 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
2022-04-05 15:17:34 +00:00
<meta charset="UTF-8">
2022-04-18 15:13:41 +00:00
<title>{{ _p.page_title }} - {{ _p.app_name }}</title>
2022-04-05 15:17:34 +00:00
<!-- Bootstrap core CSS -->
<link href="/assets/css/bootstrap.css" rel="stylesheet" crossorigin="anonymous"/>
<link rel="stylesheet" href="/assets/css/base_settings_page.css">
2022-04-04 15:39:23 +00:00
</head>
<body>
2022-04-05 15:17:34 +00:00
<div class="d-flex flex-column flex-shrink-0 p-3 bg-light" style="width: 280px;">
2022-04-04 15:39:23 +00:00
<a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto link-dark text-decoration-none">
2022-04-18 15:13:41 +00:00
<span class="fs-4">{{ _p.app_name }}</span>
2022-04-04 15:39:23 +00:00
</a>
2022-07-22 13:11:30 +00:00
{% if _p.is_admin %}
<span>Version {{ _p.version }}</span>
{% endif %}
2022-04-04 15:39:23 +00:00
<hr>
<ul class="nav nav-pills flex-column mb-auto">
2022-04-05 15:17:34 +00:00
<li class="nav-item">
<a href="/settings" class="nav-link link-dark">
Account details
</a>
</li>
<li>
<a href="/settings/change_password" class="nav-link link-dark">
Change password
</a>
</li>
2022-04-18 17:23:43 +00:00
<li>
<a href="/settings/two_factors" class="nav-link link-dark">
Two-factor authentication
</a>
</li>
2022-04-05 15:17:34 +00:00
2022-04-18 15:13:41 +00:00
{% if _p.is_admin %}
2022-04-06 16:08:57 +00:00
<hr/>
2022-04-05 15:17:34 +00:00
<li>
2022-04-06 15:18:06 +00:00
<a href="/admin/clients" class="nav-link link-dark">
Clients
2022-04-05 15:17:34 +00:00
</a>
</li>
<li>
<a href="/admin/users" class="nav-link link-dark">
Users
</a>
</li>
{% endif %}
2022-04-04 15:39:23 +00:00
</ul>
<hr>
<div class="dropdown">
2022-04-05 15:17:34 +00:00
<a href="#" class="d-flex align-items-center link-dark text-decoration-none dropdown-toggle" id="dropdownUser"
data-bs-toggle="dropdown" aria-expanded="false">
<img src="/assets/img/account.png" alt="" width="32" height="32" class="rounded-circle me-2">
2022-04-18 15:13:41 +00:00
<strong>{{ _p.user_name }}</strong>
2022-04-05 15:17:34 +00:00
</a>
<ul class="dropdown-menu text-small shadow" aria-labelledby="dropdownUser">
<li><a class="dropdown-item" href="/logout">Sign out</a></li>
</ul>
2022-04-04 15:39:23 +00:00
</div>
2022-04-05 15:17:34 +00:00
</div>
<div class="page_body" style="flex: 1">
2022-04-18 15:13:41 +00:00
{% if let Some(msg) = _p.danger_message %}
2022-04-05 15:17:34 +00:00
<div class="alert alert-danger">{{ msg }}</div>
{% endif %}
2022-04-18 15:13:41 +00:00
{% if let Some(msg) = _p.success_message %}
2022-04-05 15:17:34 +00:00
<div class="alert alert-success">{{ msg }}</div>
{% endif %}
2022-04-04 15:39:23 +00:00
2022-04-18 15:13:41 +00:00
<h2 class="bd-title mt-0" style="margin-bottom: 40px;">{{ _p.page_title }}</h2>
2022-04-04 15:39:23 +00:00
{% block content %}
TO_REPLACE
{% endblock content %}
2022-04-05 15:17:34 +00:00
</div>
2022-04-04 15:39:23 +00:00
<script src="/assets/js/bootstrap.bundle.min.js"></script>
2022-04-05 15:17:34 +00:00
<script>
document.querySelectorAll(".nav-link").forEach(el => {
if(el.href === location.href) el.classList.add("active");
else el.classList.remove("active")
})
2022-07-22 13:11:30 +00:00
2022-04-05 15:17:34 +00:00
</script>
2022-04-04 15:39:23 +00:00
</body>
</html>