diff --git a/main.py b/main.py index 8cbf0ff..06b2ecf 100644 --- a/main.py +++ b/main.py @@ -44,8 +44,8 @@ def index(): resp = make_response(redirect('/')) resp.set_cookie('token', '', expires=0) return resp - return render_template('index.html',account=user['email'],account_link="account",CITY_DOMAIN=CITY_DOMAIN) - return render_template('index.html',account="Login",account_link="login",CITY_DOMAIN=CITY_DOMAIN) + return render_template('index.html',account=user['email'],account_link="account",account_link_name="Account",CITY_DOMAIN=CITY_DOMAIN) + return render_template('index.html',account="Login",account_link="login",account_link_name="Login",CITY_DOMAIN=CITY_DOMAIN) @app.route('/signup', methods=['POST']) def signup(): @@ -82,7 +82,7 @@ def login(): @app.route('/edit') def edit(): if 'token' not in request.cookies: - return redirect('/') + return redirect('/login') token = request.cookies['token'] if not accounts.validate_token(token): @@ -91,7 +91,7 @@ def edit(): user = accounts.validate_token(token) if not user: # Remove cookie - resp = make_response(redirect('/')) + resp = make_response(redirect('/login')) resp.set_cookie('token', '', expires=0) return resp @@ -110,7 +110,7 @@ def edit(): if 'ETH' in data: eth = data['ETH'] - return render_template('edit.html',account=user['email'],account_link="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) @app.route('/edit', methods=['POST']) @@ -122,7 +122,7 @@ def send_edit(): user = accounts.validate_token(token) if not user: # Remove cookie - resp = make_response(redirect('/')) + resp = make_response(redirect('/login')) resp.set_cookie('token', '', expires=0) return resp @@ -163,6 +163,7 @@ def claim(): def catch_all(path): account = "Login" account_link = "login" + account_link_name = "Login" site = "Null" domain = "" if 'domain' in request.args: @@ -178,17 +179,18 @@ def catch_all(path): return resp account = user['email'] account_link = "account" + account_link_name = "Account" site = user['domain'] + "." + CITY_DOMAIN elif path != "signup" and path != "login": return redirect('/') # If file exists, load it if os.path.isfile('templates/' + path): - return render_template(path,account=account,account_link=account_link,site=site,CITY_DOMAIN=CITY_DOMAIN,domain=domain) + return render_template(path,account=account,account_link=account_link,account_link_name=account_link_name,site=site,CITY_DOMAIN=CITY_DOMAIN,domain=domain) # Try with .html if os.path.isfile('templates/' + path + '.html'): - return render_template(path + '.html',account=account,account_link=account_link,site=site,CITY_DOMAIN=CITY_DOMAIN,domain=domain) + return render_template(path + '.html',account=account,account_link=account_link,account_link_name=account_link_name,site=site,CITY_DOMAIN=CITY_DOMAIN,domain=domain) return redirect('/') # 404 catch all # 404 catch all diff --git a/templates/account.html b/templates/account.html index 1d7d623..3d4ef26 100644 --- a/templates/account.html +++ b/templates/account.html @@ -29,6 +29,7 @@

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

Logout + \ No newline at end of file diff --git a/templates/assets/css/styles.min.css b/templates/assets/css/styles.min.css index 704155c..b77d653 100644 --- a/templates/assets/css/styles.min.css +++ b/templates/assets/css/styles.min.css @@ -1 +1 @@ -.bs-icon{--bs-icon-size:.75rem;display:flex;flex-shrink:0;justify-content:center;align-items:center;font-size:var(--bs-icon-size);width:calc(var(--bs-icon-size) * 2);height:calc(var(--bs-icon-size) * 2);color:var(--bs-primary)}.bs-icon-xs{--bs-icon-size:1rem;width:calc(var(--bs-icon-size) * 1.5);height:calc(var(--bs-icon-size) * 1.5)}.bs-icon-sm{--bs-icon-size:1rem}.bs-icon-md{--bs-icon-size:1.5rem}.bs-icon-lg{--bs-icon-size:2rem}.bs-icon-xl{--bs-icon-size:2.5rem}.bs-icon.bs-icon-primary{color:var(--bs-white);background:var(--bs-primary)}.bs-icon.bs-icon-primary-light{color:var(--bs-primary);background:rgba(var(--bs-primary-rgb),.2)}.bs-icon.bs-icon-semi-white{color:var(--bs-primary);background:rgba(255,255,255,.5)}.bs-icon.bs-icon-rounded{border-radius:.5rem}.bs-icon.bs-icon-circle{border-radius:50%} \ No newline at end of file +.bs-icon{--bs-icon-size:.75rem;display:flex;flex-shrink:0;justify-content:center;align-items:center;font-size:var(--bs-icon-size);width:calc(var(--bs-icon-size) * 2);height:calc(var(--bs-icon-size) * 2);color:var(--bs-primary)}.bs-icon-xs{--bs-icon-size:1rem;width:calc(var(--bs-icon-size) * 1.5);height:calc(var(--bs-icon-size) * 1.5)}.bs-icon-sm{--bs-icon-size:1rem}.bs-icon-md{--bs-icon-size:1.5rem}.bs-icon-lg{--bs-icon-size:2rem}.bs-icon-xl{--bs-icon-size:2.5rem}.bs-icon.bs-icon-primary{color:var(--bs-white);background:var(--bs-primary)}.bs-icon.bs-icon-primary-light{color:var(--bs-primary);background:rgba(var(--bs-primary-rgb),.2)}.bs-icon.bs-icon-semi-white{color:var(--bs-primary);background:rgba(255,255,255,.5)}.bs-icon.bs-icon-rounded{border-radius:.5rem}.bs-icon.bs-icon-circle{border-radius:50%}.right-align{right:5%} \ No newline at end of file diff --git a/templates/assets/img/HNSW.png b/templates/assets/img/HNSW.png new file mode 100644 index 0000000..88ddd85 Binary files /dev/null and b/templates/assets/img/HNSW.png differ diff --git a/templates/assets/img/alexander-slattery-LI748t0BK8w-unsplash.webp b/templates/assets/img/alexander-slattery-LI748t0BK8w-unsplash.webp new file mode 100644 index 0000000..d0a4747 Binary files /dev/null and b/templates/assets/img/alexander-slattery-LI748t0BK8w-unsplash.webp differ diff --git a/templates/assets/js/script.min.js b/templates/assets/js/script.min.js new file mode 100644 index 0000000..2cdd347 --- /dev/null +++ b/templates/assets/js/script.min.js @@ -0,0 +1 @@ +document.addEventListener("DOMContentLoaded",(function(){[].slice.call(document.querySelectorAll("[data-bss-tooltip]")).map((function(t){return new bootstrap.Tooltip(t)}))}),!1); \ No newline at end of file diff --git a/templates/edit.html b/templates/edit.html index 475dd1e..d69cc94 100644 --- a/templates/edit.html +++ b/templates/edit.html @@ -32,6 +32,7 @@
+ \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 2040549..cfcda16 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,5 +1,5 @@ - + @@ -9,23 +9,70 @@ - - + +
+
+
+

Contact

+ +
+
+

Donate

+

hs1...

+
+
+
+
+

Contact

+ +
+
+

Donate

+

hs1.......

+
+
+
+ \ No newline at end of file diff --git a/templates/login.html b/templates/login.html index 3e4b58c..5631b6d 100644 --- a/templates/login.html +++ b/templates/login.html @@ -1,5 +1,5 @@ - + @@ -9,21 +9,19 @@ - - + +
+
+
+
+
Create your page{{account}}
+
+
+
Create a new page{{account_link_name}}
+
+
+
+
@@ -33,6 +31,7 @@
+ \ No newline at end of file diff --git a/templates/signup.html b/templates/signup.html index fce98ec..b448399 100644 --- a/templates/signup.html +++ b/templates/signup.html @@ -1,5 +1,5 @@ - + @@ -9,22 +9,19 @@ - - + +
+
+
+
+
Create your page{{account}}
+
+
+
Create a new page{{account_link_name}}
+
+
+
+
@@ -36,6 +33,7 @@
+ \ No newline at end of file