From 78424f7f310cc3e5b45e97fee20b793d3a8f4b0e Mon Sep 17 00:00:00 2001
From: Dominic <git@msrd0.de>
Date: Mon, 16 Sep 2024 17:56:56 +0200
Subject: [PATCH] styling for login dialog

---
 frontend/src/main.less                      | 17 +++++++++++++++++
 schilder2000/templates/login.html.j2        |  4 +++-
 schilder2000/templates/login_select.html.j2 |  9 +++++----
 3 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/frontend/src/main.less b/frontend/src/main.less
index dd1d5f8..93fc283 100644
--- a/frontend/src/main.less
+++ b/frontend/src/main.less
@@ -340,3 +340,20 @@ main {
 		opacity: 1;
 	}
 }
+
+.login-providers {
+	max-width: 50rem;
+	margin: 1rem auto;
+
+	display: flex;
+	flex-direction: column;
+	align-items: stretch;
+
+	.provider + .provider {
+		margin-top: 0.5rem;
+	}
+
+	button {
+		width: 100%;
+	}
+}
diff --git a/schilder2000/templates/login.html.j2 b/schilder2000/templates/login.html.j2
index 452343c..cdedd1c 100644
--- a/schilder2000/templates/login.html.j2
+++ b/schilder2000/templates/login.html.j2
@@ -10,6 +10,8 @@
 			{{ render_field(field) }}
 		{%- endfor -%}
 
-		<input type="submit" value="Anmelden" />
+		<div class="buttons">
+			<input type="submit" value="Anmelden" />
+		</div>
 	</form>
 {%- endblock main %}
diff --git a/schilder2000/templates/login_select.html.j2 b/schilder2000/templates/login_select.html.j2
index a3cc536..19ca70a 100644
--- a/schilder2000/templates/login_select.html.j2
+++ b/schilder2000/templates/login_select.html.j2
@@ -5,10 +5,11 @@
 {%- endblock title %}
 
 {% block main -%}
-    Available login providers:
-    <ul>
+    <div class="login-providers">
         {% for provider in providers|sort(attribute='title') %}
-            <li><a href="{{ url_for(login_endpoint, provider=provider.name, next=next) }}">{{ provider.title }}</a></li>
+            <a class="provider" href="{{ url_for(login_endpoint, provider=provider.name, next=next) }}">
+                <button>Log In with {{ provider.title }}</button>
+            </a>
         {% endfor %}
-    </ul>
+    </div>
 {%- endblock %}
-- 
GitLab