fix: Update some routes
All checks were successful
Build Docker / Build Image (push) Successful in 31s
All checks were successful
Build Docker / Build Image (push) Successful in 31s
This commit is contained in:
parent
5bed9dbbc8
commit
d32dcc701b
36
server.py
36
server.py
@ -5,24 +5,56 @@ import dotenv
|
||||
app = Flask(__name__)
|
||||
dotenv.load_dotenv()
|
||||
|
||||
#Assets routes
|
||||
@app.route('/assets/<path:path>')
|
||||
def send_report(path):
|
||||
return send_from_directory('templates/assets', path)
|
||||
|
||||
|
||||
# Special routes
|
||||
@app.route('/links')
|
||||
def links():
|
||||
return render_template('link.html')
|
||||
|
||||
@app.route('/sitemap')
|
||||
@app.route('/sitemap.xml')
|
||||
def sitemap():
|
||||
# Remove all .html from sitemap
|
||||
with open('templates/sitemap.xml') as file:
|
||||
sitemap = file.read()
|
||||
|
||||
sitemap = sitemap.replace('.html', '')
|
||||
return make_response(sitemap, 200, {'Content-Type': 'application/xml'})
|
||||
|
||||
@app.route('/favicon.png')
|
||||
def faviconPNG():
|
||||
return send_from_directory('templates/assets/img', 'android-chrome-512x512.png')
|
||||
|
||||
@app.route('/favicon.ico')
|
||||
def favicon():
|
||||
return send_from_directory('templates/assets/img', 'favicon.ico')
|
||||
|
||||
@app.route('/favicon.svg')
|
||||
def faviconSVG():
|
||||
return send_from_directory('templates/assets/img', 'favicon.svg')
|
||||
|
||||
|
||||
# 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":
|
||||
if request.host == "localhost:5000" or request.host == "127.0.0.1:5000" or os.getenv('dev') == "true":
|
||||
handshake_scripts = ""
|
||||
return render_template('index.html', handshake_scripts=handshake_scripts)
|
||||
|
||||
|
||||
@app.route('/<path:path>')
|
||||
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":
|
||||
if request.host == "localhost:5000" or request.host == "127.0.0.1:5000" or os.getenv('dev') == "true":
|
||||
handshake_scripts = ""
|
||||
# If file exists, load it
|
||||
if os.path.isfile('templates/' + path):
|
||||
|
BIN
templates/assets/img/favicon.ico
Normal file
BIN
templates/assets/img/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
@ -1,63 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html data-bs-theme="light" lang="en-au">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<!-- Google Tag Manager -->
|
||||
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
||||
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
||||
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
||||
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
||||
})(window,document,'script','dataLayer','GTM-NNXTCKW');</script>
|
||||
<!-- End Google Tag Manager -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
||||
<title>Nathan.Woodburn/</title>
|
||||
<meta name="theme-color" content="#97009a">
|
||||
<link rel="canonical" href="https://nathan.woodburn.au/info.html">
|
||||
<meta property="og:url" content="https://nathan.woodburn.au/info.html">
|
||||
<meta http-equiv="onion-location" content="http://wdbrncwefot4hd7bdrz5rzb74mefay7zvrjn2vmkpdm44l7fwnih5ryd.onion">
|
||||
<meta name="twitter:description" content="G'day, this is my personal website. You can find out about me or check out some of my projects.">
|
||||
<meta name="description" content="G'day, this is my personal website. You can find out about me or check out some of my projects.">
|
||||
<meta property="og:title" content="Nathan.Woodburn/">
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:image" content="https://nathan.woodburn.au/assets/img/profile.jpg">
|
||||
<meta property="og:image" content="https://nathan.woodburn.au/assets/img/profile.jpg">
|
||||
<meta property="og:type" content="website">
|
||||
<meta name="twitter:title" content="Nathan.Woodburn/">
|
||||
<meta property="og:description" content="G'day, this is my personal website. You can find out about me or check out some of my projects.">
|
||||
<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="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
|
||||
<link rel="manifest" href="manifest.json">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic&display=swap">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Cabin:700&display=swap">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Anonymous+Pro&display=swap">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700">
|
||||
<link rel="stylesheet" href="assets/css/styles.min.css">
|
||||
<link rel="stylesheet" href="assets/css/profile.min.css">
|
||||
<link rel="me" href="https://mastodon.woodburn.au/@nathanwoodburn" />
|
||||
</head>
|
||||
|
||||
<body style="background: url("assets/img/bg/back.webp") center / cover no-repeat;">
|
||||
<div style="height: 10%;"></div>
|
||||
<div style="margin-right: 2%;margin-left: 2%;">
|
||||
<div style="text-align: right;">
|
||||
<h1>Docker Status</h1>
|
||||
<p id="containers">Docker status</p>
|
||||
<p style="margin-bottom: 0px;">Uptime</p>
|
||||
<p id="uptime">0:00</p>
|
||||
<p id="mem" style="margin-bottom: 0px;">0% RAM Used</p>
|
||||
<p id="cpu" style="margin-bottom: 0px;">0% CPU Used</p>
|
||||
<p id="disk" style="margin-bottom: 0px;">0% Disk Used</p>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="assets/js/script.min.js"></script>
|
||||
<script src="assets/js/info.min.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -70,7 +70,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
</div>
|
||||
</header>
|
||||
<section class="text-center content-section" id="projects" style="padding-bottom: 100px;">
|
||||
<p style="font-size: 28px;">Check out my <a href="https://github.com/nathanwoodburn" target="_blank">Github</a> for all my projects</p>
|
||||
<p style="font-size: 28px;">Check out my <a href="https://git.woodburn.au/nathanwoodburn" target="_blank">Git</a> for all my projects</p>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col" style="padding-top: 20px;">
|
||||
|
@ -12,9 +12,6 @@
|
||||
<url>
|
||||
<loc>https://nathan.woodburn.au/</loc>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://nathan.woodburn.au/info.html</loc>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://nathan.woodburn.au/link.html</loc>
|
||||
</url>
|
||||
|
Loading…
Reference in New Issue
Block a user