From dbd5ebc7982e4cfa2395f1fa8f675afe76c8a928 Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Fri, 30 Sep 2022 00:50:19 -0400 Subject: [PATCH] Move logged-in info to top of page. --- undercover/static/styles.css | 6 ++++++ undercover/templates/base.jinja2 | 8 ++++++++ undercover/templates/writing.jinja2 | 9 +-------- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/undercover/static/styles.css b/undercover/static/styles.css index e03c165..adb50d5 100644 --- a/undercover/static/styles.css +++ b/undercover/static/styles.css @@ -182,6 +182,7 @@ div.user form input { flex-direction: row; justify-content: end; align-items: center; + font-size: 90%; } dl { @@ -336,4 +337,9 @@ textarea { .login-button { padding: 0; } + .logged-in { + position: absolute; + top: 0.5em; + right: 1em; + } } diff --git a/undercover/templates/base.jinja2 b/undercover/templates/base.jinja2 index 04a760e..254a281 100644 --- a/undercover/templates/base.jinja2 +++ b/undercover/templates/base.jinja2 @@ -10,6 +10,14 @@ +{% if username %} +
+

{{ username }}

+
+ +
+
+{% endif %}

diff --git a/undercover/templates/writing.jinja2 b/undercover/templates/writing.jinja2 index efae5c7..a2d94a5 100644 --- a/undercover/templates/writing.jinja2 +++ b/undercover/templates/writing.jinja2 @@ -38,14 +38,7 @@ {% endblock head %} {% block content %} - {% if username %} -
-

{{ username }}

-
- -
-
- {% else %} + {% if not username %}

You are working as a Guest.