From eaa4075a3997d2aa7ca0cbb66b481b4c19523422 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Wed, 15 Nov 2023 16:24:56 +1100 Subject: [PATCH] feat: Finish adding v2 layout --- main.py | 20 +++++++++++++++++++- templates/account.html | 5 +++++ templates/edit.html | 43 +++++++++++++++++++++++------------------- templates/index.html | 5 +++++ templates/login.html | 5 +++++ templates/signup.html | 5 +++++ 6 files changed, 63 insertions(+), 20 deletions(-) diff --git a/main.py b/main.py index c7aeeeb..2450206 100644 --- a/main.py +++ b/main.py @@ -100,6 +100,10 @@ def edit(): hns = "" btc = "" eth = "" + hnschat = "" + location = "" + avatar = "" + bg_colour = "" if 'data' in data: html = data['data'].encode('utf-8').decode('unicode-escape') @@ -109,8 +113,18 @@ def edit(): btc = data['BTC'] if 'ETH' in data: eth = data['ETH'] + if 'hnschat' in data: + hnschat = data['hnschat'] + if 'location' in data: + location = data['location'] + if 'avatar' in data: + avatar = data['avatar'] + if 'bg_colour' in data: + bg_colour = data['bg_colour'] - return render_template('edit.html',account=user['email'],account_link="account",account_link_name="Account",data=html,hns=hns,btc=btc,eth=eth) + return render_template('edit.html',account=user['email'],account_link="account",account_link_name="Account",data=html, + hns=hns,btc=btc,eth=eth,hnschat=hnschat,location=location,avatar=avatar, + bg_colour=bg_colour,CITY_DOMAIN=CITY_DOMAIN,domain=user['domain']) @app.route('/edit', methods=['POST']) @@ -132,6 +146,10 @@ def send_edit(): data['HNS'] = request.form['hns'] data['BTC'] = request.form['btc'] data['ETH'] = request.form['eth'] + data['hnschat'] = request.form['hnschat'] + data['location'] = request.form['location'] + data['avatar'] = request.form['avatar'] + data['bg_colour'] = request.form['bg_colour'] # Convert to json data = json.dumps(data) diff --git a/templates/account.html b/templates/account.html index 924c208..973db3a 100644 --- a/templates/account.html +++ b/templates/account.html @@ -27,6 +27,11 @@

Congratulations your site is ready for use.

Visit your siteEdit your siteLogout
+
+
+

Copyright © ShakeCities 2023

+
+
diff --git a/templates/edit.html b/templates/edit.html index d69cc94..bafc314 100644 --- a/templates/edit.html +++ b/templates/edit.html @@ -1,5 +1,5 @@ - + @@ -9,27 +9,32 @@ - - + +
+
+
+
+
Create your page{{account}}
+
+
+
Create a new page{{account_link_name}}
+
+
+
+
-

Edit your page

+

Edit your page

-
+
+
+
+
+
+
+
+

Copyright © ShakeCities 2023

+
diff --git a/templates/index.html b/templates/index.html index cfcda16..6775880 100644 --- a/templates/index.html +++ b/templates/index.html @@ -71,6 +71,11 @@ +
+
+

Copyright © ShakeCities 2023

+
+
diff --git a/templates/login.html b/templates/login.html index 5631b6d..3a7d4a9 100644 --- a/templates/login.html +++ b/templates/login.html @@ -30,6 +30,11 @@
+
+
+

Copyright © ShakeCities 2023

+
+
diff --git a/templates/signup.html b/templates/signup.html index b448399..c60305a 100644 --- a/templates/signup.html +++ b/templates/signup.html @@ -32,6 +32,11 @@ +
+
+

Copyright © ShakeCities 2023

+
+