From e50ffa50eeb24fa5eb80e08f665bccbce5f2af40 Mon Sep 17 00:00:00 2001 From: cellarspoon Date: Mon, 10 Jan 2022 09:59:48 +0100 Subject: [PATCH] fix: basic styles, dont list table if no entries --- keycloak_collective_portal/static/default.css | 9 +++++ keycloak_collective_portal/static/lumbung.css | 9 +++++ .../templates/admin.html | 37 ++++++++++--------- .../templates/register.html | 4 +- 4 files changed, 40 insertions(+), 19 deletions(-) diff --git a/keycloak_collective_portal/static/default.css b/keycloak_collective_portal/static/default.css index d6b5cb0..7fab53f 100644 --- a/keycloak_collective_portal/static/default.css +++ b/keycloak_collective_portal/static/default.css @@ -1,3 +1,12 @@ input { display: block; + margin-bottom: 15px; +} + +th, td { + padding: 15px; +} + +table, th, td { + border: 1px solid black; } diff --git a/keycloak_collective_portal/static/lumbung.css b/keycloak_collective_portal/static/lumbung.css index d6b5cb0..7fab53f 100644 --- a/keycloak_collective_portal/static/lumbung.css +++ b/keycloak_collective_portal/static/lumbung.css @@ -1,3 +1,12 @@ input { display: block; + margin-bottom: 15px; +} + +th, td { + padding: 15px; +} + +table, th, td { + border: 1px solid black; } diff --git a/keycloak_collective_portal/templates/admin.html b/keycloak_collective_portal/templates/admin.html index f98b2f2..841a602 100644 --- a/keycloak_collective_portal/templates/admin.html +++ b/keycloak_collective_portal/templates/admin.html @@ -1,27 +1,30 @@ {% extends "base.html" %} {% block content %}

- Hello, {{ user.preferred_username }} + Hello, {{ user.preferred_username }} 👋 (logout)

- - - - - - - {% for invite in invites[user.preferred_username] %} + + {% if user.preferred_username in invites and invites[user.preferred_username]|length > 0 %} +
LinkValidityOperations
- - - + + + - {% endfor %} -
- - {{ url_for('register_invite', invite=invite.link) }} - - {{ invite.validity }} delete LinkValidityActions
+ {% for invite in invites[user.preferred_username] %} + + + + {{ url_for('register_invite', invite=invite.link) }} + + + {{ invite.validity }} + delete + + {% endfor %} + + {% endif %}

Generate an invite link

diff --git a/keycloak_collective_portal/templates/register.html b/keycloak_collective_portal/templates/register.html index db5476c..51d7fb9 100644 --- a/keycloak_collective_portal/templates/register.html +++ b/keycloak_collective_portal/templates/register.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% block content %}

- You've been invited by {{ username }} to register an account! + You've been invited by {{ username }} 🎉

@@ -22,7 +22,7 @@ - +
{% endblock %}