Compare commits

..

No commits in common. "2606ed767262f121058df917d41a2c4dcfb2a1e0" and "9b971b0941475f49c891373796c0d8e6948b6170" have entirely different histories.

11 changed files with 43 additions and 91 deletions

View file

@ -116,9 +116,6 @@ STATIC_URL = "static/"
TASKS = {"default": {"BACKEND": "django.tasks.backends.immediate.ImmediateBackend"}} TASKS = {"default": {"BACKEND": "django.tasks.backends.immediate.ImmediateBackend"}}
STATIC_ROOT = BASE_DIR.parent.parent / "static" STATIC_ROOT = BASE_DIR.parent.parent / "static"
STATICFILES_DIRS = [
BASE_DIR / "static",
]
RELEASE_VERSION = "0.12" RELEASE_VERSION = "0.12"

File diff suppressed because one or more lines are too long

View file

@ -1,3 +0,0 @@
h1 {
font-size: 2rem
};

View file

@ -1,48 +1,17 @@
{% load static %}
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<link rel="stylesheet" href="{% static 'vendored/css/bulma.min.css' %}"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@1.0.4/css/bulma.min.css">
<link rel="stylesheet" href="{% static 'webui/css/webui.css' %}">
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Community Backup</title> <title>Community Backup</title>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', () => {
// Get all "navbar-burger" elements
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
// Add a click event on each of them
$navbarBurgers.forEach( el => {
el.addEventListener('click', () => {
// Get the target from the "data-target" attribute
const target = el.dataset.target;
const $target = document.getElementById(target);
// Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
el.classList.toggle('is-active');
$target.classList.toggle('is-active');
});
});
});
</script>
</head> </head>
<body style="display: flex; flex-direction: column; height: 100vh"> <body style="display: flex; flex-direction: column; height: 100vh">
<nav class="navbar" role="navigation" aria-label="main navigation" > <nav class="navbar" role="navigation" aria-label="main navigation" >
<div class="navbar-brand"> <div class="navbar-brand">
<a class="navbar-item" href="/">Community Backup</a> <a class="navbar-item" href="/">Community Backup</a>
<a role="button" class="navbar-burger" data-target="navMenu" aria-label="menu" aria-expanded="false">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div> </div>
<div class="navbar-menu" id="navMenu"> <div class="navbar-menu">
<div class="navbar-start"></div> <div class="navbar-start"></div>
<div class="navbar-end"> <div class="navbar-end">

View file

@ -3,6 +3,5 @@
{% block content %} {% block content %}
<form action="{% url borg_edit %}"> <form action="{% url borg_edit %}">
{{ form }} {{ form }}
<a href="{ url 'borg_list'}">Cancel</a>
</form> </form>
{% endblock %} {% endblock %}

View file

@ -1,21 +1,19 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
<nav class="level"> <div class="d-flex">
<div class="level-left"> <h1>Your Borg Repositories</h1>
<h1 class="level-item">Your Borg Repositories</h1> <div class="p-2 ms-auto">
<a class="button is-primary" href="{% url 'borg_add' %}" role="button">Add Repository</a>
</div> </div>
<div class="level-right">
<a class="level-item button is-primary" href="{% url 'borg_add' %}" role="button">Add Repository</a>
</div> </div>
</nav>
<section class="section"> <row>
<p>Create a borg repository by specifying a name and the SSH public key that is allowed to access this repository. The name is only for your convenience. To set up the repository please follow the <a href="https://borgbackup.readthedocs.io/en/stable/">BorgBackup documentation</a>. There is also a <a href="https://borgbackup.readthedocs.io/en/stable/quickstart.html">Quick start guide</a> available. <p>Create a borg repository by specifying a name and the SSH public key that is allowed to access this repository. The name is only for your convenience. To set up the repository please follow the <a href="https://borgbackup.readthedocs.io/en/stable/">BorgBackup documentation</a>. There is also a <a href="https://borgbackup.readthedocs.io/en/stable/quickstart.html">Quick start guide</a> available.
<b>Always use encrypted backups!</b></p> <b>Always use encrypted backups!</b></p>
</section> </row>
<section class="section"> <section>
<table class="table is-striped is-fullwidth is-hoverable"> <table class="table is-striped is-fullwidth is-hoverable">
<thead> <thead>
<th>Name</th> <th>Name</th>
@ -40,7 +38,7 @@
</section> </section>
{% if BORG_SERVER_PUBKEYS %} {% if BORG_SERVER_PUBKEYS %}
<section class="section"> <section>
<div class="card"> <div class="card">
<header class="card-header"> <header class="card-header">
<p class="card-header-title">Borg Server Public Keys</p> <p class="card-header-title">Borg Server Public Keys</p>

View file

@ -1,12 +1,13 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
<row class="p-2">
<h1>Welcome to Community Backup!</h1>
</row>
<h1 class="has-text-centered">Welcome to Community Backup!</h1> <row>
<section class="section">
<p>This is a service offering space for backups free of charge. This is a hobby project. It comes with no guarantees for anything, especially availability of the service. This service is in a testing phase at the moment. It might be unavailable at times and features might change quickly.</p> <p>This is a service offering space for backups free of charge. This is a hobby project. It comes with no guarantees for anything, especially availability of the service. This service is in a testing phase at the moment. It might be unavailable at times and features might change quickly.</p>
<p>Currently this service offers backups only via <a href="https://www.borgbackup.org/">Borg Backup</a>.</p> <p>Currently this service offers only backups via <a href="https://www.borgbackup.org/">Borg Backup</a>.</p>
<p>To access this service you need an account. To register for an account you need a voucher. Vouchers are required to control the amount of users, so that there is enough space available for everyone.</p> <p>To access this service you need an account. To register for an account you need a voucher. Vouchers are required to control the amount of users, so that there is enough space available for everyone.</p>
</section> </row>
{% endblock %} {% endblock %}

View file

@ -1,7 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
<section class="section"> <row class="p-2">
{{ markdown_content|safe }} {{ markdown_content|safe }}
</section > </row>
{% endblock %} {% endblock %}

View file

@ -2,7 +2,7 @@
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block content %} {% block content %}
<section class="section">
{% if form.errors %} {% if form.errors %}
{% for error in form.errors %} {% for error in form.errors %}
<p>{{ error }}</p> <p>{{ error }}</p>
@ -15,5 +15,4 @@
<input class="button is-primary" type="submit" value="Register"> <input class="button is-primary" type="submit" value="Register">
</form> </form>
</section>
{% endblock %} {% endblock %}

View file

@ -2,12 +2,10 @@
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block content %} {% block content %}
<section class="section">
<form method="post">{% csrf_token %} <form method="post">{% csrf_token %}
<p>Are you sure you want to delete "{{ object.name }}"?</p> <p>Are you sure you want to delete "{{ object.name }}"?</p>
{{ form }} {{ form }}
<input class="button is-danger" type="submit" value="Confirm"> <input class="button is-danger" type="submit" value="Confirm">
</form> </form>
</section>
{% endblock %} {% endblock %}

View file

@ -2,7 +2,6 @@
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block content %} {% block content %}
<section class="section">
<form method="post"> <form method="post">
{% csrf_token %} {% csrf_token %}
{{ form|crispy }} {{ form|crispy }}
@ -11,7 +10,5 @@
{% else %} {% else %}
<input class="button is-primary" type="submit" value="Add"> <input class="button is-primary" type="submit" value="Add">
{% endif %} {% endif %}
<a class="button" href="{% url 'borg_list' %}">Cancel</a>
</form> </form>
</section>
{% endblock %} {% endblock %}