changed CSS from Bootstrap to Bulma

This commit is contained in:
Johannes Erwerle 2026-10-02 19:03:08 +02:00
parent 9b971b0941
commit 5288815616
10 changed files with 90 additions and 43 deletions

View file

@ -116,6 +116,9 @@ 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

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

View file

@ -1,17 +1,48 @@
{% load static %}
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@1.0.4/css/bulma.min.css"> <link rel="stylesheet" href="{% static 'vendored/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"> <div class="navbar-menu" id="navMenu">
<div class="navbar-start"></div> <div class="navbar-start"></div>
<div class="navbar-end"> <div class="navbar-end">

View file

@ -1,19 +1,21 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
<div class="d-flex"> <nav class="level">
<h1>Your Borg Repositories</h1> <div class="level-left">
<div class="p-2 ms-auto"> <h1 class="level-item">Your Borg Repositories</h1>
<a class="button is-primary" href="{% url 'borg_add' %}" role="button">Add Repository</a>
</div> </div>
</div> <div class="level-right">
<a class="level-item button is-primary" href="{% url 'borg_add' %}" role="button">Add Repository</a>
</div>
</nav>
<row> <section class="section">
<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>
</row> </section>
<section> <section class="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>
@ -38,7 +40,7 @@
</section> </section>
{% if BORG_SERVER_PUBKEYS %} {% if BORG_SERVER_PUBKEYS %}
<section> <section class="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,13 +1,12 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
<row class="p-2">
<h1>Welcome to Community Backup!</h1>
</row>
<row> <h1 class="has-text-centered">Welcome to Community Backup!</h1>
<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 only backups via <a href="https://www.borgbackup.org/">Borg Backup</a>.</p> <p>Currently this service offers backups only 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>
</row> </section>
{% endblock %} {% endblock %}

View file

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

View file

@ -2,17 +2,18 @@
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block content %} {% block content %}
<section class="section">
{% if form.errors %}
{% for error in form.errors %}
<p>{{ error }}</p>
{% endfor %}
{% endif %}
{% if form.errors %} <form method="post" action="{% url 'register' %}">
{% for error in form.errors %} {% csrf_token %}
<p>{{ error }}</p> {{ form|crispy }}
{% endfor %} <input class="button is-primary" type="submit" value="Register">
{% endif %}
<form method="post" action="{% url 'register' %}">
{% csrf_token %}
{{ form|crispy }}
<input class="button is-primary" type="submit" value="Register">
</form> </form>
</section>
{% endblock %} {% endblock %}

View file

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

View file

@ -2,13 +2,16 @@
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block content %} {% block content %}
<form method="post"> <section class="section">
{% csrf_token %} <form method="post">
{{ form|crispy }} {% csrf_token %}
{% if form.initial %} {{ form|crispy }}
<input class="button is-primary" type="submit" value="Save"> {% if form.initial %}
{% else %} <input class="button is-primary" type="submit" value="Save">
<input class="button is-primary" type="submit" value="Add"> {% else %}
{% endif %} <input class="button is-primary" type="submit" value="Add">
</form> {% endif %}
<a class="button" href="{% url 'borg_list' %}">Cancel</a>
</form>
</section>
{% endblock %} {% endblock %}