fix: Don't show loading animation on mobiles
All checks were successful
Build Docker / BuildImage (push) Successful in 53s

This commit is contained in:
Nathan Woodburn 2024-08-15 14:18:26 +10:00
parent c86bae36ad
commit 6b5fe4bc2f
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -1 +1 @@
document.addEventListener("DOMContentLoaded",(function(){const n=document.getElementById("loading-screen"),e=[{pre:'┌──(<span class="blue">nathan@NWTux</span>)-[<span class="white">~</span>]',message:"cd Git"},{pre:'┌──(<span class="blue">nathan@NWTux</span>)-[<span class="white">~/Git</span>]',message:"cd Nathanwoodburn.github.io"},{pre:'┌──(<span class="blue">nathan@NWTux</span>)-[<span class="white">~/Git/Nathanwoodburn.github.io</span>]',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<e.length;t++){const s=document.createElement("div");s.classList.add("loading-line"),s.innerHTML=0!==t?"["+a+e[t]:e[t],n.appendChild(s)}t()}function r(){window.location.reload()}!function i(){a<e.length?function(e,t){const a=document.createElement("div");a.classList.add("loading-pre"),a.innerHTML=e.pre,n.appendChild(a);const s=document.createElement("div");s.classList.add("loading-line"),s.innerHTML='└─<span class="blue">$</span> <span class="cursor"></span>',n.appendChild(s);let r=0;const i=setInterval((()=>{s.removeChild(s.querySelector(".cursor")),s.innerHTML+=e.message[r]+'<span class="cursor"></span>',r++,r===e.message.length&&(s.removeChild(s.querySelector(".cursor")),clearInterval(i),t())}),50)}(e[a],(()=>{a++,setTimeout(i,200)})):s(t,(()=>{setTimeout(r,200)}))}()}));
document.addEventListener("DOMContentLoaded",(function(){window.innerWidth<768&&(console.log("Screen width is less than 768px, reloading page"),window.location.reload());const n=document.getElementById("loading-screen"),e=[{pre:'┌──(<span class="blue">nathan@NWTux</span>)-[<span class="white">~</span>]',message:"cd Git"},{pre:'┌──(<span class="blue">nathan@NWTux</span>)-[<span class="white">~/Git</span>]',message:"cd Nathanwoodburn.github.io"},{pre:'┌──(<span class="blue">nathan@NWTux</span>)-[<span class="white">~/Git/Nathanwoodburn.github.io</span>]',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<e.length;t++){const s=document.createElement("div");s.classList.add("loading-line"),s.innerHTML=0!==t?"["+a+e[t]:e[t],n.appendChild(s)}t()}function i(){window.location.reload()}!function r(){a<e.length?function(e,t){const a=document.createElement("div");a.classList.add("loading-pre"),a.innerHTML=e.pre,n.appendChild(a);const s=document.createElement("div");s.classList.add("loading-line"),s.innerHTML='└─<span class="blue">$</span> <span class="cursor"></span>',n.appendChild(s);let i=0;const r=setInterval((()=>{s.removeChild(s.querySelector(".cursor")),s.innerHTML+=e.message[i]+'<span class="cursor"></span>',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)}))}()}));