ux: More style (bulma / fork-awesome) for logged in users

This commit is contained in:
selfhoster selfhoster 2026-09-21 21:17:44 +02:00
commit a60434e662
14 changed files with 275 additions and 62 deletions

View file

@ -1,30 +1,48 @@
{% extends 'base.html' %}
{% extends 'app.html' %}
{% block main %}
<main id="center">
<img src="/assets/img/logo.png" id="logo">
<p style="text-align: center;">You are logged in as {{ user.username }}</p>
<div id="login-line">
<a href="/logout" id="submit-login" value="Logout">Logout</a>
</div>
{% if can_create_user %}
<div>
<h2>Create user</h2>
<form action="/user" method="POST">
<input type="hidden" name="domain" value="{{ domain.name }}">
<input type="text" name="username" placeholder="username">
<input type="password" name="password" placeholder="password">
<button type="submit" class="button is-info">Create</button>
</form>
<main>
<section class="section">
<div class="container is-widescreen mt-5">
<div class="card">
<header class="card-header">
<p class="card-header-title">{{ domain.name }}</p>
</header>
<div class="card-content">
<div class="content">
<p><i class="fa fa-user mr-3" aria-hidden="true"></i>{{ users|length() }} users</p>
</div>
</div>
</div>
</div>
{% endif %}
<div>
<h2>Users on {{ domain.name }}</h2>
<ul>
{% for user in users %}
<li>{{ user.mail }}</li>
{% endfor %}
</ul>
</div>
{% if can_create_user %}
{% include 'partials/create_user_form.html' %}
{% endif %}
<div class="container is-widescreen mt-5">
<article class="message is-info">
<header class="message-header">
<p class="card-header-title">List of all users on this domain</p>
</header>
<div class="message-body">
<table class="table is-fullwidth is-striped">
<thead>
<tr>
<th>Username</th>
<th>Role</th>
</tr>
</thead>
<tbody>
{% for user in users %}
<tr>
<td>{{ user.username }}</td>
<td>{{ user.role }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</article>
</div>
</section>
</main>
{% endblock %}