From af93330bf5c42d60c17d2f9558a36653b34b222e Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Thu, 3 Jul 2025 13:17:38 +1000 Subject: [PATCH 1/4] feat: Preloader inital test --- server.py | 28 ---- templates/assets/js/loading-enhanced.js | 154 ++++++++++++++++++++ templates/assets/js/loading-enhanced.min.js | 1 + templates/loading.html | 29 ++++ 4 files changed, 184 insertions(+), 28 deletions(-) create mode 100644 templates/assets/js/loading-enhanced.js create mode 100644 templates/assets/js/loading-enhanced.min.js diff --git a/server.py b/server.py index c315cea..411b061 100644 --- a/server.py +++ b/server.py @@ -831,34 +831,6 @@ def blog_path(path): return blog.render_blog_page(path,handshake_scripts) -#TODO add rss json and xml for blog -# @app.route("/blog.rss") -# @app.route("/blog.xml") -# @app.route("/rss.xml") -# def blog_rss(): -# host = "https://" + request.host -# if ":" in request.host: -# host = "http://" + request.host -# # Generate RSS feed -# blog_pages = blog.list_blog_page_files() -# rss = f'Nathan.Woodburn/{host}See what I\'ve been up toen-us{datetime.datetime.blog(tz=datetime.timezone.utc).strftime("%a, %d %b %Y %H:%M:%S %z")}' -# for page in blog_pages: -# link = page.strip(".html") -# date = datetime.datetime.strptime(link, "%y_%m_%d") -# date = date.strftime("%A, %B %d, %Y") -# rss += f'What\'s Happening {date}{host}/blog/{link}Latest updates for {date}{host}/blog/{link}' -# rss += "" -# return make_response(rss, 200, {"Content-Type": "application/rss+xml"}) - -# @app.route("/blog.json") -# def blog_json(): -# blog_pages = blog.list_blog_page_files() -# host = "https://" + request.host -# if ":" in request.host: -# host = "http://" + request.host -# blog_pages = [{"url":host+"/blog/"+page.strip(".html"), "date":datetime.datetime.strptime(page.strip(".html"), "%y_%m_%d").strftime("%A, %B %d, %Y"), "title":"What's Happening "+datetime.datetime.strptime(page.strip(".html"), "%y_%m_%d").strftime("%A, %B %d, %Y")} for page in blog_pages] -# return jsonify(blog_pages) - # endregion diff --git a/templates/assets/js/loading-enhanced.js b/templates/assets/js/loading-enhanced.js new file mode 100644 index 0000000..8ee1aaf --- /dev/null +++ b/templates/assets/js/loading-enhanced.js @@ -0,0 +1,154 @@ +document.addEventListener("DOMContentLoaded", function() { + const loadingScreen = document.getElementById("loading-screen"); + + // Terminal simulation data + const commands = [ + { pre: '┌──(nathan@NWTux)-[~]', message: "cd Git" }, + { pre: '┌──(nathan@NWTux)-[~/Git]', message: "cd Nathanwoodburn.github.io" }, + { pre: '┌──(nathan@NWTux)-[~/Git/Nathanwoodburn.github.io]', message: "python3 main.py" } + ]; + + const serverMessages = [ + "Starting server with 1 workers and 2 threads", + "+0000] [1] [INFO] Starting gunicorn 22.0.0", + "+0000] [1] [INFO] Listening at: http://0.0.0.0:5000 (1)", + "+0000] [1] [INFO] Using worker: gthread", + "+0000] [8] [INFO] Booting worker with pid: 8", + "Preloading assets for faster navigation..." + ]; + + let currentCommand = 0; + let assetsLoaded = false; + let terminalComplete = false; + + // Enhanced asset preloading function + function preloadAssets() { + const assets = [ + // Additional CSS files that might not be in preload + '/assets/css/animate.min.min.css', + '/assets/css/fixes.min.css', + '/assets/css/Footer-Dark-icons.min.css', + '/assets/css/GridSystem-1.min.css', + // Font files + '/assets/fonts/fa-solid-900.woff2', + '/assets/fonts/fa-brands-400.woff2', + '/assets/fonts/fa-regular-400.woff2' + ]; + + let loadedCount = 0; + const totalAssets = assets.length; + + function onAssetLoad() { + loadedCount++; + if (loadedCount === totalAssets) { + assetsLoaded = true; + checkReadyToRedirect(); + } + } + + // Load additional assets + assets.forEach(assetUrl => { + const link = document.createElement('link'); + link.rel = 'preload'; + link.as = assetUrl.endsWith('.css') ? 'style' : + assetUrl.endsWith('.js') ? 'script' : + assetUrl.includes('/fonts/') ? 'font' : 'fetch'; + if (link.as === 'font') { + link.crossOrigin = 'anonymous'; + } + link.href = assetUrl; + link.onload = onAssetLoad; + link.onerror = onAssetLoad; // Count errors as loaded to prevent hanging + document.head.appendChild(link); + }); + + // If no additional assets, mark as loaded + if (totalAssets === 0) { + assetsLoaded = true; + checkReadyToRedirect(); + } + } + + function checkReadyToRedirect() { + if (assetsLoaded && terminalComplete) { + setTimeout(redirectToIndex, 200); + } + } + + function getCurrentTime() { + const now = new Date(); + return `${now.getUTCFullYear()}-${String(now.getUTCMonth() + 1).padStart(2, '0')}-${String(now.getUTCDate()).padStart(2, '0')} ${String(now.getUTCHours()).padStart(2, '0')}:${String(now.getUTCMinutes()).padStart(2, '0')}:${String(now.getUTCSeconds()).padStart(2, '0')}`; + } + + function displayServerMessages(messages, callback) { + const timestamp = getCurrentTime(); + + for (let i = 0; i < messages.length; i++) { + const messageDiv = document.createElement("div"); + messageDiv.classList.add("loading-line"); + messageDiv.innerHTML = i !== 0 ? "[" + timestamp + "] " + messages[i] : messages[i]; + loadingScreen.appendChild(messageDiv); + } + + callback(); + } + + function redirectToIndex() { + if (window.location.pathname === "/") { + window.location.reload(); + } else { + window.location.href = "/"; + } + } + + // Event listeners for manual redirect + window.addEventListener("keypress", redirectToIndex); + + if (window.innerWidth < 768) { + console.log("Screen width is less than 768px, allowing click to redirect"); + window.addEventListener("click", redirectToIndex); + } + + function typeCommand(command, callback) { + const preDiv = document.createElement("div"); + preDiv.classList.add("loading-pre"); + preDiv.innerHTML = command.pre; + loadingScreen.appendChild(preDiv); + + const commandDiv = document.createElement("div"); + commandDiv.classList.add("loading-line"); + commandDiv.innerHTML = '└─$ '; + loadingScreen.appendChild(commandDiv); + + let charIndex = 0; + const typeInterval = setInterval(() => { + commandDiv.removeChild(commandDiv.querySelector(".cursor")); + commandDiv.innerHTML += command.message[charIndex] + ''; + charIndex++; + + if (charIndex === command.message.length) { + commandDiv.removeChild(commandDiv.querySelector(".cursor")); + clearInterval(typeInterval); + callback(); + } + }, 50); + } + + function runTerminalSimulation() { + if (currentCommand < commands.length) { + typeCommand(commands[currentCommand], () => { + currentCommand++; + setTimeout(runTerminalSimulation, 200); + }); + } else { + displayServerMessages(serverMessages, () => { + terminalComplete = true; + checkReadyToRedirect(); + }); + } + } + + // Start the loading process + preloadAssets(); + runTerminalSimulation(); +}); diff --git a/templates/assets/js/loading-enhanced.min.js b/templates/assets/js/loading-enhanced.min.js new file mode 100644 index 0000000..9707582 --- /dev/null +++ b/templates/assets/js/loading-enhanced.min.js @@ -0,0 +1 @@ +document.addEventListener("DOMContentLoaded",(function(){const e=document.getElementById("loading-screen"),t=[{pre:'┌──(nathan@NWTux)-[~]',message:"cd Git"},{pre:'┌──(nathan@NWTux)-[~/Git]',message:"cd Nathanwoodburn.github.io"},{pre:'┌──(nathan@NWTux)-[~/Git/Nathanwoodburn.github.io]',message:"python3 main.py"}],n=["Starting server with 1 workers and 2 threads","+0000] [1] [INFO] Starting gunicorn 22.0.0","+0000] [1] [INFO] Listening at: http://0.0.0.0:5000 (1)","+0000] [1] [INFO] Using worker: gthread","+0000] [8] [INFO] Booting worker with pid: 8","Preloading assets for faster navigation..."];let a=0,s=!1,o=!1;function r(){s&&o&&setTimeout(c,200)}function l(){const t=["/assets/css/animate.min.min.css","/assets/css/fixes.min.css","/assets/css/Footer-Dark-icons.min.css","/assets/css/GridSystem-1.min.css","/assets/fonts/fa-solid-900.woff2","/assets/fonts/fa-brands-400.woff2","/assets/fonts/fa-regular-400.woff2"];let n=0;const a=t.length;function s(){n++,n===a&&(s=!0,r())}t.forEach((t=>{const n=document.createElement("link");n.rel="preload",n.as=t.endsWith(".css")?"style":t.endsWith(".js")?"script":t.includes("/fonts/")?"font":"fetch","font"===n.as&&(n.crossOrigin="anonymous"),n.href=t,n.onload=s,n.onerror=s,document.head.appendChild(n)})),0===a&&(s=!0,r())}function i(){const t=new Date;return`${t.getUTCFullYear()}-${String(t.getUTCMonth()+1).padStart(2,"0")}-${String(t.getUTCDate()).padStart(2,"0")} ${String(t.getUTCHours()).padStart(2,"0")}:${String(t.getUTCMinutes()).padStart(2,"0")}:${String(t.getUTCSeconds()).padStart(2,"0")}`}function d(t,n){const a=i();for(let n=0;n$ ',e.appendChild(s);let o=0;const r=setInterval((()=>{s.removeChild(s.querySelector(".cursor")),s.innerHTML+=t.message[o]+'',o++,o===t.message.length&&(s.removeChild(s.querySelector(".cursor")),clearInterval(r),n())}),50)}function g(){a{a++,setTimeout(g,200)})):d(n,(()=>{o=!0,r()}))}window.addEventListener("keypress",c),window.innerWidth<768&&(console.log("Screen width is less than 768px, allowing click to redirect"),window.addEventListener("click",c)),l(),g()})); diff --git a/templates/loading.html b/templates/loading.html index 1617046..8435206 100644 --- a/templates/loading.html +++ b/templates/loading.html @@ -33,6 +33,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From c2a1995292bdb86a3a9e8ff2296e50d984fe737e Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Thu, 3 Jul 2025 13:37:51 +1000 Subject: [PATCH 2/4] feat: Initial working preloader --- templates/404.html | 3 +++ templates/about.html | 3 +++ templates/assets/css/Social-Icons.min.css | 1 + templates/assets/css/brand-reveal.min.css | 1 + templates/assets/css/styles.min.css | 2 +- templates/assets/js/grayscale.min.js | 1 + templates/assets/js/loading-enhanced.min.js | 1 - templates/assets/js/loading.min.js | 2 +- templates/assets/js/script.min.js | 2 +- templates/blog/blog.html | 3 +++ templates/blog/template.html | 3 +++ templates/donate.html | 3 +++ templates/gitpgp.html | 3 +++ templates/index.html | 3 +++ templates/link.html | 3 +++ templates/loading.html | 30 --------------------- templates/now.html | 3 +++ templates/now/24_02_18.html | 3 +++ templates/now/24_02_25.html | 3 +++ templates/now/24_04_19.html | 3 +++ templates/now/24_05_20.html | 3 +++ templates/now/24_05_28.html | 3 +++ templates/now/24_06_06.html | 3 +++ templates/now/24_06_17.html | 3 +++ templates/now/24_06_24.html | 3 +++ templates/now/24_07_15.html | 3 +++ templates/now/24_08_05.html | 3 +++ templates/now/24_09_07.html | 3 +++ templates/now/24_09_27.html | 3 +++ templates/now/24_10_07.html | 3 +++ templates/now/24_10_15.html | 3 +++ templates/now/24_10_22.html | 3 +++ templates/now/24_12_19.html | 3 +++ templates/now/25_01_01.html | 3 +++ templates/now/25_01_30.html | 3 +++ templates/now/25_03_27.html | 3 +++ templates/now/25_05_28.html | 3 +++ templates/now/25_06_19.html | 3 +++ templates/now/old.html | 3 +++ templates/now/template.html | 3 +++ templates/pgp.html | 3 +++ templates/podcast.html | 3 +++ templates/projects.html | 3 +++ templates/resume.html | 3 +++ templates/servers.html | 3 +++ templates/signalQR.html | 3 +++ 46 files changed, 120 insertions(+), 34 deletions(-) create mode 100644 templates/assets/css/Social-Icons.min.css create mode 100644 templates/assets/css/brand-reveal.min.css create mode 100644 templates/assets/js/grayscale.min.js delete mode 100644 templates/assets/js/loading-enhanced.min.js diff --git a/templates/404.html b/templates/404.html index efd649b..5bcd979 100644 --- a/templates/404.html +++ b/templates/404.html @@ -32,7 +32,9 @@ + + @@ -44,6 +46,7 @@ + diff --git a/templates/about.html b/templates/about.html index 7d951ac..193002d 100644 --- a/templates/about.html +++ b/templates/about.html @@ -33,8 +33,10 @@ + + @@ -109,6 +111,7 @@

Hi, I am Nathan Woodburn and I live in Canberra
I am currently studying at the Australian National University
I enjoy 3D printing and CAD
I code stuff with C#, Linux Bash and tons of other languages
I'm a co-founder of Handshake Australia
I currently work for Namebase

+ diff --git a/templates/assets/css/Social-Icons.min.css b/templates/assets/css/Social-Icons.min.css new file mode 100644 index 0000000..a9015b8 --- /dev/null +++ b/templates/assets/css/Social-Icons.min.css @@ -0,0 +1 @@ +.social-icons{color:#313437;background-color:#fff;padding:70px 0}@media (max-width:767px){.social-icons{padding:50px 0}}@media (max-width:500px){img.profile{width:200px;margin-left:-100px}.profile-container{height:200px;margin-top:2em!important}}.social-div{display:flex;justify-content:center;align-items:center}.social-list-sml{display:flex;list-style:none;gap:1rem}.social-list{display:flex;list-style:none;gap:2.5rem}.social-icons i{color:#757980;margin:0 10px;width:60px;height:60px;border:1px solid #c8ced7;text-align:center;border-radius:50%;line-height:60px;display:inline-block}.social-link-sml a{text-decoration:none;width:3.5rem;height:3.5rem;background-color:#f0f9fe;border-radius:50%;display:flex;justify-content:center;align-items:center;position:relative;z-index:1;border:3px solid #f0f9fe;overflow:hidden}.social-link a{text-decoration:none;width:4.8rem;height:4.8rem;background-color:#f0f9fe;border-radius:50%;display:flex;justify-content:center;align-items:center;position:relative;z-index:1;border:3px solid #f0f9fe;overflow:hidden}.social-link a::before,.social-link-sml a::before{content:"";position:absolute;width:100%;height:100%;background:var(--bg-color);z-index:0;scale:1 0;transform-origin:bottom;transition:scale .5s}.social-link-sml:hover a::before,.social-link:hover a::before{scale:1 1}.icon-sml{font-size:1.5rem;color:#011827;transition:.5s;z-index:2}.icon{font-size:2rem;color:#011827;transition:.5s;z-index:2}.social-link a:hover .icon{color:#fff;transform:rotateY(360deg)}.social-link,.social-link-sml{--bg-color:#000}.social-link-sml.discord,.social-link.discord{--bg-color:#5865f2}.social-link-sml.mastodon,.social-link.mastodon{--bg-color:#6364ff}.social-link-sml.youtube,.social-link.youtube{--bg-color:#ff0000}.social-link-sml.signal,.social-link.signal{--bg-color:#365eb6} \ No newline at end of file diff --git a/templates/assets/css/brand-reveal.min.css b/templates/assets/css/brand-reveal.min.css new file mode 100644 index 0000000..1d2261d --- /dev/null +++ b/templates/assets/css/brand-reveal.min.css @@ -0,0 +1 @@ +.name-container{display:inline-flex;align-items:center;overflow:hidden;position:absolute;width:fit-content;left:50%;transform:translateX(-50%)}.slider{position:relative;left:0;animation:1s linear 1s forwards slide}@keyframes slide{0%{left:0}100%{left:calc(100%)}}.brand{mask-image:linear-gradient(to right,black 50%,transparent 50%);-webkit-mask-image:linear-gradient(to right,black 50%,transparent 50%);mask-position:100% 0;-webkit-mask-position:100% 0;mask-size:200%;-webkit-mask-size:200%;animation:1s linear 1s forwards reveal}@keyframes reveal{0%{mask-position:100% 0;-webkit-mask-position:100% 0}100%{mask-position:0 0;-webkit-mask-position:0 0}} \ No newline at end of file diff --git a/templates/assets/css/styles.min.css b/templates/assets/css/styles.min.css index 951d30f..3597ccf 100644 --- a/templates/assets/css/styles.min.css +++ b/templates/assets/css/styles.min.css @@ -1 +1 @@ -:root,[data-bs-theme=light]{--bs-primary:#6E0E9C;--bs-primary-rgb:110,14,156;--bs-primary-text-emphasis:#2C063E;--bs-primary-bg-subtle:#E2CFEB;--bs-primary-border-subtle:#C59FD7;--bs-link-color:#6E0E9C;--bs-link-color-rgb:110,14,156;--bs-link-hover-color:#a41685;--bs-link-hover-color-rgb:164,22,133}.btn-primary{--bs-btn-color:#fff;--bs-btn-bg:#6E0E9C;--bs-btn-border-color:#6E0E9C;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#5E0C85;--bs-btn-hover-border-color:#580B7D;--bs-btn-focus-shadow-rgb:233,219,240;--bs-btn-active-color:#fff;--bs-btn-active-bg:#580B7D;--bs-btn-active-border-color:#530B75;--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#6E0E9C;--bs-btn-disabled-border-color:#6E0E9C}.btn-outline-primary{--bs-btn-color:#6E0E9C;--bs-btn-border-color:#6E0E9C;--bs-btn-focus-shadow-rgb:110,14,156;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#6E0E9C;--bs-btn-hover-border-color:#6E0E9C;--bs-btn-active-color:#fff;--bs-btn-active-bg:#6E0E9C;--bs-btn-active-border-color:#6E0E9C;--bs-btn-disabled-color:#6E0E9C;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#6E0E9C}.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}@media (min-width:992px){.py-lg-5{padding-top:3rem!important;padding-bottom:3rem!important}}.name-container{display:inline-flex;align-items:center;overflow:hidden;position:absolute;width:fit-content;left:50%;transform:translateX(-50%)}.slider{position:relative;left:0;animation:1s linear 1s forwards slide}@keyframes slide{0%{left:0}100%{left:calc(100%)}}.brand{mask-image:linear-gradient(to right,black 50%,transparent 50%);-webkit-mask-image:linear-gradient(to right,black 50%,transparent 50%);mask-position:100% 0;-webkit-mask-position:100% 0;mask-size:200%;-webkit-mask-size:200%;animation:1s linear 1s forwards reveal}@keyframes reveal{0%{mask-position:100% 0;-webkit-mask-position:100% 0}100%{mask-position:0 0;-webkit-mask-position:0 0}}.social-icons{color:#313437;background-color:#fff;padding:70px 0}@media (max-width:767px){.social-icons{padding:50px 0}}@media (max-width:500px){img.profile{width:200px;margin-left:-100px}.profile-container{height:200px;margin-top:2em!important}}.social-div{display:flex;justify-content:center;align-items:center}.social-list-sml{display:flex;list-style:none;gap:1rem}.social-list{display:flex;list-style:none;gap:2.5rem}.social-icons i{color:#757980;margin:0 10px;width:60px;height:60px;border:1px solid #c8ced7;text-align:center;border-radius:50%;line-height:60px;display:inline-block}.social-link-sml a{text-decoration:none;width:3.5rem;height:3.5rem;background-color:#f0f9fe;border-radius:50%;display:flex;justify-content:center;align-items:center;position:relative;z-index:1;border:3px solid #f0f9fe;overflow:hidden}.social-link a{text-decoration:none;width:4.8rem;height:4.8rem;background-color:#f0f9fe;border-radius:50%;display:flex;justify-content:center;align-items:center;position:relative;z-index:1;border:3px solid #f0f9fe;overflow:hidden}.social-link a::before,.social-link-sml a::before{content:"";position:absolute;width:100%;height:100%;background:var(--bg-color);z-index:0;scale:1 0;transform-origin:bottom;transition:scale .5s}.social-link-sml:hover a::before,.social-link:hover a::before{scale:1 1}.icon-sml{font-size:1.5rem;color:#011827;transition:.5s;z-index:2}.icon{font-size:2rem;color:#011827;transition:.5s;z-index:2}.social-link a:hover .icon{color:#fff;transform:rotateY(360deg)}.social-link,.social-link-sml{--bg-color:#000}.social-link-sml.discord,.social-link.discord{--bg-color:#5865f2}.social-link-sml.mastodon,.social-link.mastodon{--bg-color:#6364ff}.social-link-sml.youtube,.social-link.youtube{--bg-color:#ff0000}.social-link-sml.signal,.social-link.signal{--bg-color:#365eb6} \ No newline at end of file +:root,[data-bs-theme=light]{--bs-primary:#6E0E9C;--bs-primary-rgb:110,14,156;--bs-primary-text-emphasis:#2C063E;--bs-primary-bg-subtle:#E2CFEB;--bs-primary-border-subtle:#C59FD7;--bs-link-color:#6E0E9C;--bs-link-color-rgb:110,14,156;--bs-link-hover-color:#a41685;--bs-link-hover-color-rgb:164,22,133}.btn-primary{--bs-btn-color:#fff;--bs-btn-bg:#6E0E9C;--bs-btn-border-color:#6E0E9C;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#5E0C85;--bs-btn-hover-border-color:#580B7D;--bs-btn-focus-shadow-rgb:233,219,240;--bs-btn-active-color:#fff;--bs-btn-active-bg:#580B7D;--bs-btn-active-border-color:#530B75;--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#6E0E9C;--bs-btn-disabled-border-color:#6E0E9C}.btn-outline-primary{--bs-btn-color:#6E0E9C;--bs-btn-border-color:#6E0E9C;--bs-btn-focus-shadow-rgb:110,14,156;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#6E0E9C;--bs-btn-hover-border-color:#6E0E9C;--bs-btn-active-color:#fff;--bs-btn-active-bg:#6E0E9C;--bs-btn-active-border-color:#6E0E9C;--bs-btn-disabled-color:#6E0E9C;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#6E0E9C}.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}@media (min-width:992px){.py-lg-5{padding-top:3rem!important;padding-bottom:3rem!important}} \ No newline at end of file diff --git a/templates/assets/js/grayscale.min.js b/templates/assets/js/grayscale.min.js new file mode 100644 index 0000000..1d90354 --- /dev/null +++ b/templates/assets/js/grayscale.min.js @@ -0,0 +1 @@ +!function(){"use strict";var e=document.querySelector("#mainNav");if(e){var o=e.querySelector(".navbar-collapse");if(o){var n=new bootstrap.Collapse(o,{toggle:!1}),t=o.querySelectorAll("a");for(var a of t)a.addEventListener("click",(function(e){n.hide()}))}var r=function(){(void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop)>100?e.classList.add("navbar-shrink"):e.classList.remove("navbar-shrink")};r(),document.addEventListener("scroll",r)}}(); \ No newline at end of file diff --git a/templates/assets/js/loading-enhanced.min.js b/templates/assets/js/loading-enhanced.min.js deleted file mode 100644 index 9707582..0000000 --- a/templates/assets/js/loading-enhanced.min.js +++ /dev/null @@ -1 +0,0 @@ -document.addEventListener("DOMContentLoaded",(function(){const e=document.getElementById("loading-screen"),t=[{pre:'┌──(nathan@NWTux)-[~]',message:"cd Git"},{pre:'┌──(nathan@NWTux)-[~/Git]',message:"cd Nathanwoodburn.github.io"},{pre:'┌──(nathan@NWTux)-[~/Git/Nathanwoodburn.github.io]',message:"python3 main.py"}],n=["Starting server with 1 workers and 2 threads","+0000] [1] [INFO] Starting gunicorn 22.0.0","+0000] [1] [INFO] Listening at: http://0.0.0.0:5000 (1)","+0000] [1] [INFO] Using worker: gthread","+0000] [8] [INFO] Booting worker with pid: 8","Preloading assets for faster navigation..."];let a=0,s=!1,o=!1;function r(){s&&o&&setTimeout(c,200)}function l(){const t=["/assets/css/animate.min.min.css","/assets/css/fixes.min.css","/assets/css/Footer-Dark-icons.min.css","/assets/css/GridSystem-1.min.css","/assets/fonts/fa-solid-900.woff2","/assets/fonts/fa-brands-400.woff2","/assets/fonts/fa-regular-400.woff2"];let n=0;const a=t.length;function s(){n++,n===a&&(s=!0,r())}t.forEach((t=>{const n=document.createElement("link");n.rel="preload",n.as=t.endsWith(".css")?"style":t.endsWith(".js")?"script":t.includes("/fonts/")?"font":"fetch","font"===n.as&&(n.crossOrigin="anonymous"),n.href=t,n.onload=s,n.onerror=s,document.head.appendChild(n)})),0===a&&(s=!0,r())}function i(){const t=new Date;return`${t.getUTCFullYear()}-${String(t.getUTCMonth()+1).padStart(2,"0")}-${String(t.getUTCDate()).padStart(2,"0")} ${String(t.getUTCHours()).padStart(2,"0")}:${String(t.getUTCMinutes()).padStart(2,"0")}:${String(t.getUTCSeconds()).padStart(2,"0")}`}function d(t,n){const a=i();for(let n=0;n$ ',e.appendChild(s);let o=0;const r=setInterval((()=>{s.removeChild(s.querySelector(".cursor")),s.innerHTML+=t.message[o]+'',o++,o===t.message.length&&(s.removeChild(s.querySelector(".cursor")),clearInterval(r),n())}),50)}function g(){a{a++,setTimeout(g,200)})):d(n,(()=>{o=!0,r()}))}window.addEventListener("keypress",c),window.innerWidth<768&&(console.log("Screen width is less than 768px, allowing click to redirect"),window.addEventListener("click",c)),l(),g()})); diff --git a/templates/assets/js/loading.min.js b/templates/assets/js/loading.min.js index 2651e5f..51d5eee 100644 --- a/templates/assets/js/loading.min.js +++ b/templates/assets/js/loading.min.js @@ -1 +1 @@ -document.addEventListener("DOMContentLoaded",(function(){const n=document.getElementById("loading-screen"),e=[{pre:'┌──(nathan@NWTux)-[~]',message:"cd Git"},{pre:'┌──(nathan@NWTux)-[~/Git]',message:"cd Nathanwoodburn.github.io"},{pre:'┌──(nathan@NWTux)-[~/Git/Nathanwoodburn.github.io]',message:"python3 main.py"}],t=["Starting server with 1 workers and 2 threads","+0000] [1] [INFO] Starting gunicorn 22.0.0","+0000] [1] [INFO] Listening at: http://0.0.0.0:5000 (1)","+0000] [1] [INFO] Using worker: gthread","+0000] [8] [INFO] Booting worker with pid: 8"];let a=0;function s(e,t){const a=function(){const n=new Date;return`${n.getUTCFullYear()}-${String(n.getUTCMonth()+1).padStart(2,"0")}-${String(n.getUTCDate()).padStart(2,"0")} ${String(n.getUTCHours()).padStart(2,"0")}:${String(n.getUTCMinutes()).padStart(2,"0")}:${String(n.getUTCSeconds()).padStart(2,"0")}`}();for(let t=0;t$ ',n.appendChild(s);let i=0;const r=setInterval((()=>{s.removeChild(s.querySelector(".cursor")),s.innerHTML+=e.message[i]+'',i++,i===e.message.length&&(s.removeChild(s.querySelector(".cursor")),clearInterval(r),t())}),50)}(e[a],(()=>{a++,setTimeout(r,200)})):s(t,(()=>{setTimeout(i,200)}))}()})); \ No newline at end of file +document.addEventListener("DOMContentLoaded",(function(){const s=document.getElementById("loading-screen"),e=[{pre:'┌──(nathan@NWTux)-[~]',message:"cd Git"},{pre:'┌──(nathan@NWTux)-[~/Git]',message:"cd Nathanwoodburn.github.io"},{pre:'┌──(nathan@NWTux)-[~/Git/Nathanwoodburn.github.io]',message:"python3 main.py"}],t=["Starting server with 1 workers and 2 threads","+0000] [1] [INFO] Starting gunicorn 22.0.0","+0000] [1] [INFO] Listening at: http://0.0.0.0:5000 (1)","+0000] [1] [INFO] Using worker: gthread","+0000] [8] [INFO] Booting worker with pid: 8","Preloading assets for faster navigation..."];let n=0,a=!1,i=!1;function r(){i&&setTimeout(l,200)}function o(e,t){const n=function(){const s=new Date;return`${s.getUTCFullYear()}-${String(s.getUTCMonth()+1).padStart(2,"0")}-${String(s.getUTCDate()).padStart(2,"0")} ${String(s.getUTCHours()).padStart(2,"0")}:${String(s.getUTCMinutes()).padStart(2,"0")}:${String(s.getUTCSeconds()).padStart(2,"0")}`}();for(let t=0;t{const e=document.createElement("link");e.rel="preload",e.as=s.type,e.href=s.url,"font"===s.type&&(e.crossOrigin="anonymous"),e.onload=n,e.onerror=n,document.head.appendChild(e)}))}),100),function a(){n$ ',s.appendChild(a);let i=0;const r=setInterval((()=>{a.removeChild(a.querySelector(".cursor")),a.innerHTML+=e.message[i]+'',i++,i===e.message.length&&(a.removeChild(a.querySelector(".cursor")),clearInterval(r),t())}),50)}(e[n],(()=>{n++,setTimeout(a,200)})):o(t,(()=>{r()}))}()})); \ No newline at end of file diff --git a/templates/assets/js/script.min.js b/templates/assets/js/script.min.js index d92f0f3..a3db82d 100644 --- a/templates/assets/js/script.min.js +++ b/templates/assets/js/script.min.js @@ -1 +1 @@ -window.innerWidth<768&&[].slice.call(document.querySelectorAll("[data-bss-disabled-mobile]")).forEach((function(e){e.classList.remove("animated"),e.removeAttribute("data-bss-hover-animate"),e.removeAttribute("data-aos"),e.removeAttribute("data-bss-parallax-bg"),e.removeAttribute("data-bss-scroll-zoom")})),document.addEventListener("DOMContentLoaded",(function(){[].slice.call(document.querySelectorAll("[data-bss-hover-animate]")).forEach((function(e){e.addEventListener("mouseenter",(function(e){e.target.classList.add("animated",e.target.dataset.bssHoverAnimate)})),e.addEventListener("mouseleave",(function(e){e.target.classList.remove("animated",e.target.dataset.bssHoverAnimate)}))})),[].slice.call(document.querySelectorAll("[data-bss-tooltip]")).map((function(e){return new bootstrap.Tooltip(e)}))}),!1),function(){"use strict";var e=document.querySelector("#mainNav");if(e){var t=e.querySelector(".navbar-collapse");if(t){var a=new bootstrap.Collapse(t,{toggle:!1}),o=t.querySelectorAll("a");for(var n of o)n.addEventListener("click",(function(e){a.hide()}))}var r=function(){(void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop)>100?e.classList.add("navbar-shrink"):e.classList.remove("navbar-shrink")};r(),document.addEventListener("scroll",r)}}(); \ No newline at end of file +window.innerWidth<768&&[].slice.call(document.querySelectorAll("[data-bss-disabled-mobile]")).forEach((function(e){e.classList.remove("animated"),e.removeAttribute("data-bss-hover-animate"),e.removeAttribute("data-aos"),e.removeAttribute("data-bss-parallax-bg"),e.removeAttribute("data-bss-scroll-zoom")})),document.addEventListener("DOMContentLoaded",(function(){[].slice.call(document.querySelectorAll("[data-bss-hover-animate]")).forEach((function(e){e.addEventListener("mouseenter",(function(e){e.target.classList.add("animated",e.target.dataset.bssHoverAnimate)})),e.addEventListener("mouseleave",(function(e){e.target.classList.remove("animated",e.target.dataset.bssHoverAnimate)}))})),[].slice.call(document.querySelectorAll("[data-bss-tooltip]")).map((function(e){return new bootstrap.Tooltip(e)}))}),!1); \ No newline at end of file diff --git a/templates/blog/blog.html b/templates/blog/blog.html index 57ff4a2..b3f1480 100644 --- a/templates/blog/blog.html +++ b/templates/blog/blog.html @@ -36,7 +36,9 @@ Find something interesting to read. Or maybe check one of my tutorials"> + + @@ -144,6 +146,7 @@ Find something interesting to read. Or maybe check one of my tutorials"> + diff --git a/templates/blog/template.html b/templates/blog/template.html index 06eefd8..9a585af 100644 --- a/templates/blog/template.html +++ b/templates/blog/template.html @@ -37,7 +37,9 @@ Find something interesting to read. Or maybe check one of my tutorials"> + + @@ -142,6 +144,7 @@ Find something interesting to read. Or maybe check one of my tutorials"> + diff --git a/templates/donate.html b/templates/donate.html index 95af39b..58815a5 100644 --- a/templates/donate.html +++ b/templates/donate.html @@ -34,7 +34,9 @@ + + @@ -196,6 +198,7 @@ {{custom | safe}} + diff --git a/templates/gitpgp.html b/templates/gitpgp.html index ba7e16f..6b3f5d1 100644 --- a/templates/gitpgp.html +++ b/templates/gitpgp.html @@ -31,7 +31,9 @@ + + @@ -49,6 +51,7 @@

All commits changing this page have been signed with my PGP key as shown on Keybase https://keybase.io/nathanwoodburn

+ diff --git a/templates/index.html b/templates/index.html index e118463..afe5f0b 100644 --- a/templates/index.html +++ b/templates/index.html @@ -43,8 +43,10 @@ + + @@ -287,6 +289,7 @@ Check them out here!{{time|safe}} + diff --git a/templates/link.html b/templates/link.html index 7c85f19..9496ec9 100644 --- a/templates/link.html +++ b/templates/link.html @@ -34,8 +34,10 @@ + + @@ -102,6 +104,7 @@ + diff --git a/templates/loading.html b/templates/loading.html index 8435206..b527886 100644 --- a/templates/loading.html +++ b/templates/loading.html @@ -32,36 +32,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/now.html b/templates/now.html index 42824ec..491439a 100644 --- a/templates/now.html +++ b/templates/now.html @@ -32,7 +32,9 @@ + + @@ -40,6 +42,7 @@ + diff --git a/templates/now/24_02_18.html b/templates/now/24_02_18.html index 76d8b00..bd57719 100644 --- a/templates/now/24_02_18.html +++ b/templates/now/24_02_18.html @@ -36,8 +36,10 @@ Find out what I've been up to in the last week"> + + @@ -162,6 +164,7 @@ Find out what I've been up to in the last week"> + diff --git a/templates/now/24_02_25.html b/templates/now/24_02_25.html index cc2c903..597a1cb 100644 --- a/templates/now/24_02_25.html +++ b/templates/now/24_02_25.html @@ -36,8 +36,10 @@ Find out what I've been up to in the last week"> + + @@ -129,6 +131,7 @@ Find out what I've been up to in the last week"> + diff --git a/templates/now/24_04_19.html b/templates/now/24_04_19.html index 18090bf..c16052b 100644 --- a/templates/now/24_04_19.html +++ b/templates/now/24_04_19.html @@ -36,8 +36,10 @@ Find out what I've been up to in the last week"> + + @@ -142,6 +144,7 @@ Find out what I've been up to in the last week"> + diff --git a/templates/now/24_05_20.html b/templates/now/24_05_20.html index 1b1fd87..e52f274 100644 --- a/templates/now/24_05_20.html +++ b/templates/now/24_05_20.html @@ -36,7 +36,9 @@ Find out what I've been up to in the last week"> + + @@ -111,6 +113,7 @@ Find out what I've been up to in the last week"> + diff --git a/templates/now/24_05_28.html b/templates/now/24_05_28.html index 8555df8..b52127e 100644 --- a/templates/now/24_05_28.html +++ b/templates/now/24_05_28.html @@ -36,7 +36,9 @@ Find out what I've been up to in the last week"> + + @@ -111,6 +113,7 @@ Find out what I've been up to in the last week"> + diff --git a/templates/now/24_06_06.html b/templates/now/24_06_06.html index c5ca5c9..222e19b 100644 --- a/templates/now/24_06_06.html +++ b/templates/now/24_06_06.html @@ -36,7 +36,9 @@ Find out what I've been up to in the last week"> + + @@ -127,6 +129,7 @@ Find out what I've been up to in the last week"> + diff --git a/templates/now/24_06_17.html b/templates/now/24_06_17.html index e83f4a6..8763e2c 100644 --- a/templates/now/24_06_17.html +++ b/templates/now/24_06_17.html @@ -36,7 +36,9 @@ Find out what I've been up to in the last week"> + + @@ -127,6 +129,7 @@ Find out what I've been up to in the last week"> + diff --git a/templates/now/24_06_24.html b/templates/now/24_06_24.html index 7f01107..6b63503 100644 --- a/templates/now/24_06_24.html +++ b/templates/now/24_06_24.html @@ -36,7 +36,9 @@ Find out what I've been up to in the last week"> + + @@ -127,6 +129,7 @@ Find out what I've been up to in the last week"> + diff --git a/templates/now/24_07_15.html b/templates/now/24_07_15.html index 141e444..33e5e29 100644 --- a/templates/now/24_07_15.html +++ b/templates/now/24_07_15.html @@ -36,7 +36,9 @@ Find out what I've been up to in the last week"> + + @@ -127,6 +129,7 @@ Find out what I've been up to in the last week"> + diff --git a/templates/now/24_08_05.html b/templates/now/24_08_05.html index 455536e..2b94a0d 100644 --- a/templates/now/24_08_05.html +++ b/templates/now/24_08_05.html @@ -36,7 +36,9 @@ Find out what I've been up to in the last week"> + + @@ -156,6 +158,7 @@ Find out what I've been up to in the last week"> + diff --git a/templates/now/24_09_07.html b/templates/now/24_09_07.html index 905b37f..c6093cf 100644 --- a/templates/now/24_09_07.html +++ b/templates/now/24_09_07.html @@ -36,7 +36,9 @@ Find out what I've been up to in the last week"> + + @@ -164,6 +166,7 @@ Find out what I've been up to in the last week"> + diff --git a/templates/now/24_09_27.html b/templates/now/24_09_27.html index 35f5be3..5c5bf72 100644 --- a/templates/now/24_09_27.html +++ b/templates/now/24_09_27.html @@ -36,7 +36,9 @@ Find out what I've been up to in the last week"> + + @@ -162,6 +164,7 @@ Find out what I've been up to in the last week"> + diff --git a/templates/now/24_10_07.html b/templates/now/24_10_07.html index 26c9f15..8c7fead 100644 --- a/templates/now/24_10_07.html +++ b/templates/now/24_10_07.html @@ -36,7 +36,9 @@ Find out what I've been up to in the last week"> + + @@ -174,6 +176,7 @@ Find out what I've been up to in the last week"> + diff --git a/templates/now/24_10_15.html b/templates/now/24_10_15.html index 0cdae19..a7f8b98 100644 --- a/templates/now/24_10_15.html +++ b/templates/now/24_10_15.html @@ -36,7 +36,9 @@ Find out what I've been up to in the last week"> + + @@ -156,6 +158,7 @@ Find out what I've been up to in the last week"> + diff --git a/templates/now/24_10_22.html b/templates/now/24_10_22.html index 786092c..204f8bf 100644 --- a/templates/now/24_10_22.html +++ b/templates/now/24_10_22.html @@ -36,7 +36,9 @@ Find out what I've been up to in the last week"> + + @@ -156,6 +158,7 @@ Find out what I've been up to in the last week"> + diff --git a/templates/now/24_12_19.html b/templates/now/24_12_19.html index 712ddf1..487e95a 100644 --- a/templates/now/24_12_19.html +++ b/templates/now/24_12_19.html @@ -36,7 +36,9 @@ Find out what I've been up to in the last week"> + + @@ -156,6 +158,7 @@ Find out what I've been up to in the last week"> + diff --git a/templates/now/25_01_01.html b/templates/now/25_01_01.html index 0d6b578..eb6169d 100644 --- a/templates/now/25_01_01.html +++ b/templates/now/25_01_01.html @@ -36,7 +36,9 @@ Find out what I've been up to in the last week"> + + @@ -162,6 +164,7 @@ Find out what I've been up to in the last week"> + diff --git a/templates/now/25_01_30.html b/templates/now/25_01_30.html index c80fad3..54ac2b9 100644 --- a/templates/now/25_01_30.html +++ b/templates/now/25_01_30.html @@ -36,7 +36,9 @@ Find out what I've been up to in the last week"> + + @@ -156,6 +158,7 @@ Find out what I've been up to in the last week"> + diff --git a/templates/now/25_03_27.html b/templates/now/25_03_27.html index 46c41f1..e9f402a 100644 --- a/templates/now/25_03_27.html +++ b/templates/now/25_03_27.html @@ -36,7 +36,9 @@ Find out what I've been up to in the last week"> + + @@ -156,6 +158,7 @@ Find out what I've been up to in the last week"> + diff --git a/templates/now/25_05_28.html b/templates/now/25_05_28.html index 7b6e851..f46abf9 100644 --- a/templates/now/25_05_28.html +++ b/templates/now/25_05_28.html @@ -36,7 +36,9 @@ Find out what I've been up to in the last week"> + + @@ -162,6 +164,7 @@ Find out what I've been up to in the last week"> + diff --git a/templates/now/25_06_19.html b/templates/now/25_06_19.html index c7839c5..8e4a5f0 100644 --- a/templates/now/25_06_19.html +++ b/templates/now/25_06_19.html @@ -36,7 +36,9 @@ Find out what I've been up to in the last week"> + + @@ -174,6 +176,7 @@ Find out what I've been up to in the last week"> + diff --git a/templates/now/old.html b/templates/now/old.html index 42f8637..053d0f9 100644 --- a/templates/now/old.html +++ b/templates/now/old.html @@ -36,8 +36,10 @@ Find out what I've been up to in the last week"> + + @@ -105,6 +107,7 @@ Find out what I've been up to in the last week"> + diff --git a/templates/now/template.html b/templates/now/template.html index b98b9b1..0f23f7a 100644 --- a/templates/now/template.html +++ b/templates/now/template.html @@ -36,8 +36,10 @@ Find out what I've been up to in the last little bit"> + + @@ -151,6 +153,7 @@ Find out what I've been up to in the last little bit"> + diff --git a/templates/pgp.html b/templates/pgp.html index d63e068..f9e7618 100644 --- a/templates/pgp.html +++ b/templates/pgp.html @@ -31,7 +31,9 @@ + + @@ -40,6 +42,7 @@

This key's fingerprint is 203B000478AD0EF1 (or 1C7AAF75F5333B3E484940B7203B000478AD0EF1)
All commits changing pgp pages have been signed with my PGP key as shown on Keybase https://keybase.io/nathanwoodburn

+ diff --git a/templates/podcast.html b/templates/podcast.html index e1e1443..d8bbb41 100644 --- a/templates/podcast.html +++ b/templates/podcast.html @@ -31,8 +31,10 @@ + + @@ -80,6 +82,7 @@ + diff --git a/templates/projects.html b/templates/projects.html index 2928484..a8448f1 100644 --- a/templates/projects.html +++ b/templates/projects.html @@ -32,7 +32,9 @@ + + @@ -83,6 +85,7 @@ {{handshake_scripts | safe}} + diff --git a/templates/resume.html b/templates/resume.html index 898598a..e6afe2c 100644 --- a/templates/resume.html +++ b/templates/resume.html @@ -30,8 +30,10 @@ + + @@ -262,6 +264,7 @@ + \ No newline at end of file diff --git a/templates/servers.html b/templates/servers.html index 5ab8524..7b7b70e 100644 --- a/templates/servers.html +++ b/templates/servers.html @@ -31,7 +31,9 @@ + + @@ -250,6 +252,7 @@ {{handshake_scripts | safe}} + diff --git a/templates/signalQR.html b/templates/signalQR.html index 7123660..e96f61c 100644 --- a/templates/signalQR.html +++ b/templates/signalQR.html @@ -31,7 +31,9 @@ + + @@ -40,6 +42,7 @@
Create a chat with my username or
scan this QR code on your phone
to chat with me on signal
+ From 21f725baf30805c379420f04c8f794f42e0d9860 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Thu, 3 Jul 2025 13:56:01 +1000 Subject: [PATCH 3/4] feat: Add option to force load page to show --- server.py | 9 ++++++++- templates/assets/js/loading.min.js | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index 411b061..1ce8cad 100644 --- a/server.py +++ b/server.py @@ -536,6 +536,13 @@ def index(): # Check if referrer includes nathan.woodburn.au if "nathan.woodburn.au" in request.referrer: loaded = True + if request.cookies.get("loaded"): + loaded = True + + # Always load if load=true is in the query string + if request.args.get("load").lower() == "true": + loaded = False + # Check if crawler if request.headers and request.headers.get("User-Agent"): @@ -554,7 +561,7 @@ def index(): "User-Agent" ) and "Bingbot" not in request.headers.get("User-Agent"): # Check if cookie is set - if not request.cookies.get("loaded") and not loaded: + if not loaded: # Set cookie resp = make_response( render_template("loading.html").replace( diff --git a/templates/assets/js/loading.min.js b/templates/assets/js/loading.min.js index 51d5eee..13156e4 100644 --- a/templates/assets/js/loading.min.js +++ b/templates/assets/js/loading.min.js @@ -1 +1 @@ -document.addEventListener("DOMContentLoaded",(function(){const s=document.getElementById("loading-screen"),e=[{pre:'┌──(nathan@NWTux)-[~]',message:"cd Git"},{pre:'┌──(nathan@NWTux)-[~/Git]',message:"cd Nathanwoodburn.github.io"},{pre:'┌──(nathan@NWTux)-[~/Git/Nathanwoodburn.github.io]',message:"python3 main.py"}],t=["Starting server with 1 workers and 2 threads","+0000] [1] [INFO] Starting gunicorn 22.0.0","+0000] [1] [INFO] Listening at: http://0.0.0.0:5000 (1)","+0000] [1] [INFO] Using worker: gthread","+0000] [8] [INFO] Booting worker with pid: 8","Preloading assets for faster navigation..."];let n=0,a=!1,i=!1;function r(){i&&setTimeout(l,200)}function o(e,t){const n=function(){const s=new Date;return`${s.getUTCFullYear()}-${String(s.getUTCMonth()+1).padStart(2,"0")}-${String(s.getUTCDate()).padStart(2,"0")} ${String(s.getUTCHours()).padStart(2,"0")}:${String(s.getUTCMinutes()).padStart(2,"0")}:${String(s.getUTCSeconds()).padStart(2,"0")}`}();for(let t=0;t{const e=document.createElement("link");e.rel="preload",e.as=s.type,e.href=s.url,"font"===s.type&&(e.crossOrigin="anonymous"),e.onload=n,e.onerror=n,document.head.appendChild(e)}))}),100),function a(){n$ ',s.appendChild(a);let i=0;const r=setInterval((()=>{a.removeChild(a.querySelector(".cursor")),a.innerHTML+=e.message[i]+'',i++,i===e.message.length&&(a.removeChild(a.querySelector(".cursor")),clearInterval(r),t())}),50)}(e[n],(()=>{n++,setTimeout(a,200)})):o(t,(()=>{r()}))}()})); \ No newline at end of file +document.addEventListener("DOMContentLoaded",(function(){const s=document.getElementById("loading-screen"),e=[{pre:'┌──(nathan@NWTux)-[~]',message:"cd Git"},{pre:'┌──(nathan@NWTux)-[~/Git]',message:"cd Nathanwoodburn.github.io"},{pre:'┌──(nathan@NWTux)-[~/Git/Nathanwoodburn.github.io]',message:"python3 main.py"}],t=["Starting server with 1 workers and 2 threads","+0000] [1] [INFO] Starting gunicorn 22.0.0","+0000] [1] [INFO] Listening at: http://0.0.0.0:5000 (1)","+0000] [1] [INFO] Using worker: gthread","+0000] [8] [INFO] Booting worker with pid: 8"];let n=0,a=!1,i=!1;function r(){i&&setTimeout(l,200)}function o(e,t){const n=function(){const s=new Date;return`${s.getUTCFullYear()}-${String(s.getUTCMonth()+1).padStart(2,"0")}-${String(s.getUTCDate()).padStart(2,"0")} ${String(s.getUTCHours()).padStart(2,"0")}:${String(s.getUTCMinutes()).padStart(2,"0")}:${String(s.getUTCSeconds()).padStart(2,"0")}`}();for(let t=0;t{const e=document.createElement("link");e.rel="preload",e.as=s.type,e.href=s.url,"font"===s.type&&(e.crossOrigin="anonymous"),e.onload=n,e.onerror=n,document.head.appendChild(e)}))}),100),function a(){n$ ',s.appendChild(a);let i=0;const r=setInterval((()=>{a.removeChild(a.querySelector(".cursor")),a.innerHTML+=e.message[i]+'',i++,i===e.message.length&&(a.removeChild(a.querySelector(".cursor")),clearInterval(r),t())}),50)}(e[n],(()=>{n++,setTimeout(a,200)})):o(t,(()=>{r()}))}()})); \ No newline at end of file From e65fe8cd30abf0bac96348a413c43edfc8ff308b Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Thu, 3 Jul 2025 13:57:19 +1000 Subject: [PATCH 4/4] fix: Load arg get returns None which causes exception --- server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index 1ce8cad..3deb957 100644 --- a/server.py +++ b/server.py @@ -539,8 +539,8 @@ def index(): if request.cookies.get("loaded"): loaded = True - # Always load if load=true is in the query string - if request.args.get("load").lower() == "true": + # Always load if load is in the query string + if request.args.get("load"): loaded = False