initial commit
This commit is contained in:
commit
164fa61ad2
40 changed files with 1263 additions and 0 deletions
62
community_backup/webui/templates/base.html
Normal file
62
community_backup/webui/templates/base.html
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Community Backup</title>
|
||||
</head>
|
||||
<body style="display: flex; flex-direction: column; height: 100vh">
|
||||
<header class="bg-body-tertiary">
|
||||
<div class="container">
|
||||
<nav class="navbar navbar-expand-lg">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="/" >Community Backup</a>
|
||||
<div class="navbar-nav">
|
||||
{% if request.user.is_authenticated %}
|
||||
<a class="nav-link" href="{% url 'borg_list' %}">Borg Repositories</a>
|
||||
<div class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
{{ user.username }}
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><form method=post action="{% url 'logout' %}?next={% url 'landing' %}">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn dropdown-item">Logout</button>
|
||||
</form></li>
|
||||
<li><a class="dropdown-item" href="{% url 'password_change' %}">Change Password</a></li>
|
||||
{% if user.is_staff %}
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><a class="dropdown-item" href="{% url 'admin:index' %}">Admin</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<a class="btn nav-item" type="button" href="{% url 'login' %}?next={% url 'landing' %}">Login</a>
|
||||
<a class="btn nav-item" type="button" href="{% url 'register' %}">Register</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
<main class="container" style="flex: 1 1 auto">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</main>
|
||||
<footer class="bg-body-tertiary">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{% url "about" %}">About</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">Imprint</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue