fix: Old generator path
All checks were successful
Build Docker / Build Image (push) Successful in 26s

This commit is contained in:
Nathan Woodburn 2023-11-02 21:37:18 +11:00
parent 607e51c481
commit f001691283
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
2 changed files with 10 additions and 8 deletions

View File

@ -52,14 +52,16 @@ def handshake():
# return request.path
return send_from_directory('templates/assets/js', request.path.split('/')[-1])
@app.route('/generator/')
def removeTrailingSlash():
return render_template(request.path.split('/')[-2] + '.html')
# Main routes
@app.route('/')
def index():
handshake_scripts = "<script src=\"https://nathan.woodburn/handshake.js\" domain=\"nathan.woodburn\"></script><script src=\"https://nathan.woodburn/https.js\"></script>"
# If localhost, don't load handshake
if request.host == "localhost:5000" or request.host == "127.0.0.1:5000" or os.getenv('dev') == "true":
if request.host == "localhost:5000" or request.host == "127.0.0.1:5000" or os.getenv('dev') == "true" or request.host == "test.nathan.woodburn.au":
handshake_scripts = ""
return render_template('index.html', handshake_scripts=handshake_scripts)
@ -68,7 +70,7 @@ def index():
def catch_all(path):
handshake_scripts = "<script src=\"https://nathan.woodburn/handshake.js\" domain=\"nathan.woodburn\"></script><script src=\"https://nathan.woodburn/https.js\"></script>"
# If localhost, don't load handshake
if request.host == "localhost:5000" or request.host == "127.0.0.1:5000" or os.getenv('dev') == "true":
if request.host == "localhost:5000" or request.host == "127.0.0.1:5000" or os.getenv('dev') == "true" or request.host == "test.nathan.woodburn.au":
handshake_scripts = ""
# If file exists, load it
if os.path.isfile('templates/' + path):

View File

@ -12,11 +12,11 @@
<meta name="twitter:description" content="G'day, this is my personal website. You can find out who I am or check some of my projects.">
<meta name="twitter:card" content="summary">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="assets/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/img/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="assets/img/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="180x180" href="assets/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="192x192" href="assets/img/android-chrome-192x192.png">
<link rel="icon" type="image/png" sizes="512x512" href="assets/img/android-chrome-512x512.png">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/img/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="/assets/img/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="180x180" href="/assets/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="192x192" href="/assets/img/android-chrome-192x192.png">
<link rel="icon" type="image/png" sizes="512x512" href="/assets/img/android-chrome-512x512.png">
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css'>
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Montserrat&amp;display=swap'>
<link rel="stylesheet" href="/assets/css/generator.css">