diff --git a/sites/website.py b/sites/website.py index 427f466..6d56943 100644 --- a/sites/website.py +++ b/sites/website.py @@ -3,7 +3,7 @@ from bs4 import BeautifulSoup import os import dotenv -main_domain = "cities.hnshosting.au" +main_domain = "shakecities.com" if os.getenv('MAIN_DOMAIN') != None: main_domain = os.getenv('MAIN_DOMAIN') @@ -15,6 +15,8 @@ if os.path.exists("parts/footer.html"): def render(data,db_object): if data == False: return redirect("https://" + main_domain + '/claim?domain=' + request.host.split('.')[0]) + elif data == "": + return redirect("https://" + main_domain + '/empty_site') # Render as HTML html = "" @@ -24,16 +26,12 @@ def render(data,db_object): try: soup = BeautifulSoup(data, 'html.parser') - - # for script in soup.find_all('script'): - # script.extract() - # Inject SSL soup.append(BeautifulSoup(ssl, 'html.parser')) html = str(soup) except Exception as e: - return "

Invalid HTML


" + str(e) + return redirect("https://" + main_domain + '/empty_site') try: avatar = db_object['avatar'] @@ -106,7 +104,7 @@ def render(data,db_object): hns=hns,btc=btc,eth=eth, data=html,footer=footer) except Exception as e: - return "

Nothing here yet

" + "" + return redirect("https://" + main_domain + '/empty_site') def get_template(template,hide_addresses=False): file = "templates/" +get_template_file(template) diff --git a/templates/account.html b/templates/account.html index 0224461..f0ccd41 100644 --- a/templates/account.html +++ b/templates/account.html @@ -45,9 +45,9 @@
-
+
    -
  • Copyright © ShakeCities 2023
  • +
  • Copyright © ShakeCities 2023
diff --git a/templates/edit.html b/templates/edit.html index c8d84df..b74424a 100644 --- a/templates/edit.html +++ b/templates/edit.html @@ -68,9 +68,9 @@
-
+
    -
  • Copyright © ShakeCities 2023
  • +
  • Copyright © ShakeCities 2023
diff --git a/templates/empty_site.html b/templates/empty_site.html new file mode 100644 index 0000000..7fb00ab --- /dev/null +++ b/templates/empty_site.html @@ -0,0 +1,62 @@ + + + + + + + ShakeCities + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+

Nothing here yet

+
Back +
+
+
+
+
+
    +
  • Copyright © ShakeCities 2023
  • +
  • +
  • +
+
+
+ + + + + \ No newline at end of file diff --git a/templates/error.html b/templates/error.html index 2289a4a..2baf19d 100644 --- a/templates/error.html +++ b/templates/error.html @@ -48,9 +48,9 @@
-
+
    -
  • Copyright © ShakeCities 2023
  • +
  • Copyright © ShakeCities 2023
diff --git a/templates/hnschat.html b/templates/hnschat.html index ee9a3e3..2ea1c7e 100644 --- a/templates/hnschat.html +++ b/templates/hnschat.html @@ -49,9 +49,9 @@
-
+
    -
  • Copyright © ShakeCities 2023
  • +
  • Copyright © ShakeCities 2023
diff --git a/templates/index.html b/templates/index.html index f0f9c26..ed9e503 100644 --- a/templates/index.html +++ b/templates/index.html @@ -97,9 +97,9 @@
-
+
    -
  • Copyright © ShakeCities 2023
  • +
  • Copyright © ShakeCities 2023
diff --git a/templates/login.html b/templates/login.html index ace81c5..c34bcd0 100644 --- a/templates/login.html +++ b/templates/login.html @@ -48,9 +48,9 @@
-
+
    -
  • Copyright © ShakeCities 2023
  • +
  • Copyright © ShakeCities 2023
diff --git a/templates/signup.html b/templates/signup.html index d738c2a..17ecfe4 100644 --- a/templates/signup.html +++ b/templates/signup.html @@ -50,9 +50,9 @@
-
+
    -
  • Copyright © ShakeCities 2023
  • +
  • Copyright © ShakeCities 2023