From 3ed4f24e7e4c00853ae1cd2cbe743a8902bc8373 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Wed, 15 Nov 2023 16:00:30 +1100 Subject: [PATCH] feat: Add new layout for account page --- main.py | 6 +++++- templates/account.html | 35 +++++++++++++++++------------------ 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/main.py b/main.py index 06b2ecf..c7aeeeb 100644 --- a/main.py +++ b/main.py @@ -75,7 +75,7 @@ def login(): if not user['success']: return error(user['message']) # Redirect to dashboard with cookie - resp = make_response(redirect('/edit')) + resp = make_response(redirect('/account')) resp.set_cookie('token', user['token']) return resp @@ -183,6 +183,10 @@ def catch_all(path): site = user['domain'] + "." + CITY_DOMAIN elif path != "signup" and path != "login": return redirect('/') + + if path == "account": + account_link = "logout" + account_link_name = "Logout" # If file exists, load it if os.path.isfile('templates/' + path): diff --git a/templates/account.html b/templates/account.html index 3d4ef26..924c208 100644 --- a/templates/account.html +++ b/templates/account.html @@ -1,5 +1,5 @@ - + @@ -9,24 +9,23 @@ - - + +
+
+
+
+
Create your page{{account}}
+
+
+
Create a new page{{account_link_name}}
+
+
+
+
-

Email: {{account}}
Site: {{site}}

Logout +

Welcome to ShakeCities

+

Congratulations your site is ready for use.

+
Visit your siteEdit your siteLogout