feat: Add mastodon link
This commit is contained in:
parent
565e824902
commit
e0e3cd4102
@ -41,6 +41,7 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|||||||
<link rel="stylesheet" href="assets/css/styles.min.css">
|
<link rel="stylesheet" href="assets/css/styles.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/fixes.min.css">
|
<link rel="stylesheet" href="assets/css/fixes.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/profile.min.css">
|
<link rel="stylesheet" href="assets/css/profile.min.css">
|
||||||
|
<link rel="me" href="https://mastodon.woodburn.au/@nathanwoodburn" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="about-body" style="text-align: center;color: rgb(255,255,255);background: transparent;"><script src="https://nathan.woodburn/handshake.js" domain="nathan.woodburn"></script>
|
<body class="about-body" style="text-align: center;color: rgb(255,255,255);background: transparent;"><script src="https://nathan.woodburn/handshake.js" domain="nathan.woodburn"></script>
|
||||||
|
@ -38,6 +38,7 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700">
|
<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/styles.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/profile.min.css">
|
<link rel="stylesheet" href="assets/css/profile.min.css">
|
||||||
|
<link rel="me" href="https://mastodon.woodburn.au/@nathanwoodburn" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
@ -2,3 +2,12 @@ img.no-drag {
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img.fog {
|
||||||
|
pointer-events: none;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -1,31 +1,31 @@
|
|||||||
const letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ/.?!@#$%^&*()_+";
|
const letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ/.?!@#$%^&*()_+";
|
||||||
|
|
||||||
let interval = null;
|
let interval = null;
|
||||||
let interval2 = null;
|
let interval2 = null;
|
||||||
let interval3 = null;
|
let interval3 = null;
|
||||||
|
|
||||||
|
|
||||||
document.querySelector(".copyright").onmouseover = event => {
|
document.querySelector(".copyright").onmouseover = event => {
|
||||||
let iteration2 = 0;
|
let iteration2 = 0;
|
||||||
let old2 = "Copyright © Nathan Woodburn 2023";
|
let old2 = "Copyright © Nathan Woodburn 2023";
|
||||||
clearInterval(interval2);
|
clearInterval(interval2);
|
||||||
|
|
||||||
interval2 = setInterval(() => {
|
interval2 = setInterval(() => {
|
||||||
event.target.innerText = event.target.innerText
|
event.target.innerText = event.target.innerText
|
||||||
.split("")
|
.split("")
|
||||||
.map((letter, index2) => {
|
.map((letter, index2) => {
|
||||||
if(index2 < iteration2) {
|
if(index2 < iteration2) {
|
||||||
return old2[index2];
|
return old2[index2];
|
||||||
}
|
}
|
||||||
|
|
||||||
return letters[Math.floor(Math.random() * 41)]
|
return letters[Math.floor(Math.random() * 41)]
|
||||||
})
|
})
|
||||||
.join("");
|
.join("");
|
||||||
|
|
||||||
if(iteration2 >= old2.length){
|
if(iteration2 >= old2.length){
|
||||||
clearInterval(interval2);
|
clearInterval(interval2);
|
||||||
}
|
}
|
||||||
|
|
||||||
iteration2 += 1/3;
|
iteration2 += 1/3;
|
||||||
}, 10);
|
}, 10);
|
||||||
}
|
}
|
@ -1,84 +1,84 @@
|
|||||||
const letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ/.?!@#$%^&*()_+";
|
const letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ/.?!@#$%^&*()_+";
|
||||||
|
|
||||||
let interval = null;
|
let interval = null;
|
||||||
let interval2 = null;
|
let interval2 = null;
|
||||||
let interval3 = null;
|
let interval3 = null;
|
||||||
|
|
||||||
|
|
||||||
window.onload = (event) => {
|
window.onload = (event) => {
|
||||||
|
|
||||||
target = document.querySelector(".nathanwoodburn");
|
target = document.querySelector(".nathanwoodburn");
|
||||||
let iteration = 0;
|
let iteration = 0;
|
||||||
let final = "NATHAN.WOODBURN/";
|
let final = "NATHAN.WOODBURN/";
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
|
|
||||||
interval = setInterval(() => {
|
interval = setInterval(() => {
|
||||||
target.innerText = target.innerText
|
target.innerText = target.innerText
|
||||||
.split("")
|
.split("")
|
||||||
.map((letter, index) => {
|
.map((letter, index) => {
|
||||||
if(index < iteration) {
|
if(index < iteration) {
|
||||||
return final[index];
|
return final[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
return letters[Math.floor(Math.random() * 41)]
|
return letters[Math.floor(Math.random() * 41)]
|
||||||
})
|
})
|
||||||
.join("");
|
.join("");
|
||||||
|
|
||||||
if(iteration >= final.length){
|
if(iteration >= final.length){
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
}
|
}
|
||||||
|
|
||||||
iteration += 1 / 3;
|
iteration += 1 / 3;
|
||||||
}, 30);
|
}, 30);
|
||||||
};
|
};
|
||||||
|
|
||||||
document.querySelector(".copyright").onmouseover = event => {
|
document.querySelector(".copyright").onmouseover = event => {
|
||||||
let iteration2 = 0;
|
let iteration2 = 0;
|
||||||
let old2 = "Copyright © Nathan Woodburn 2023";
|
let old2 = "Copyright © Nathan Woodburn 2023";
|
||||||
console.log(old2);
|
console.log(old2);
|
||||||
clearInterval(interval2);
|
clearInterval(interval2);
|
||||||
|
|
||||||
interval2 = setInterval(() => {
|
interval2 = setInterval(() => {
|
||||||
event.target.innerText = event.target.innerText
|
event.target.innerText = event.target.innerText
|
||||||
.split("")
|
.split("")
|
||||||
.map((letter, index2) => {
|
.map((letter, index2) => {
|
||||||
if(index2 < iteration2) {
|
if(index2 < iteration2) {
|
||||||
return old2[index2];
|
return old2[index2];
|
||||||
}
|
}
|
||||||
|
|
||||||
return letters[Math.floor(Math.random() * 41)]
|
return letters[Math.floor(Math.random() * 41)]
|
||||||
})
|
})
|
||||||
.join("");
|
.join("");
|
||||||
|
|
||||||
if(iteration2 >= old2.length){
|
if(iteration2 >= old2.length){
|
||||||
clearInterval(interval2);
|
clearInterval(interval2);
|
||||||
}
|
}
|
||||||
|
|
||||||
iteration2 += 1/3;
|
iteration2 += 1/3;
|
||||||
}, 10);
|
}, 10);
|
||||||
}
|
}
|
||||||
// document.querySelector(".hacker3").onmouseover = event => {
|
// document.querySelector(".hacker3").onmouseover = event => {
|
||||||
// let iteration3 = 0;
|
// let iteration3 = 0;
|
||||||
// let old3 = event.target.innerText;
|
// let old3 = event.target.innerText;
|
||||||
// console.log(old3);
|
// console.log(old3);
|
||||||
// clearInterval(interval3);
|
// clearInterval(interval3);
|
||||||
|
|
||||||
// interval3 = setInterval(() => {
|
// interval3 = setInterval(() => {
|
||||||
// event.target.innerText = event.target.innerText
|
// event.target.innerText = event.target.innerText
|
||||||
// .split("")
|
// .split("")
|
||||||
// .map((letter, index3) => {
|
// .map((letter, index3) => {
|
||||||
// if(index3 < iteration3) {
|
// if(index3 < iteration3) {
|
||||||
// return old3[index3];
|
// return old3[index3];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// return letters[Math.floor(Math.random() * 41)]
|
// return letters[Math.floor(Math.random() * 41)]
|
||||||
// })
|
// })
|
||||||
// .join("");
|
// .join("");
|
||||||
|
|
||||||
// if(iteration3 >= old3.length){
|
// if(iteration3 >= old3.length){
|
||||||
// clearInterval(interval3);
|
// clearInterval(interval3);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// iteration3 += 1 / 3;
|
// iteration3 += 1 / 3;
|
||||||
// }, 10);
|
// }, 10);
|
||||||
// }
|
// }
|
89
assets/js/info.js
Normal file
89
assets/js/info.js
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
// On load
|
||||||
|
onload = function() {
|
||||||
|
dockerInfo();
|
||||||
|
systemUptime();
|
||||||
|
systemLoad();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// On tick
|
||||||
|
setInterval(function() {
|
||||||
|
dockerInfo();
|
||||||
|
systemUptime();
|
||||||
|
systemLoad();
|
||||||
|
|
||||||
|
console.log("Updated");
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
const api = "https://glances.woodburn.au/api/3/";
|
||||||
|
|
||||||
|
// Docker info function
|
||||||
|
function dockerInfo() {
|
||||||
|
// Get the containers.name values from the json
|
||||||
|
// Replace the interHTML for #containers with the container name
|
||||||
|
fetch(api + "docker")
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => {
|
||||||
|
// Loop through the containers and get the name and the status
|
||||||
|
// Display in a containers running and containers stopped
|
||||||
|
let runningContainers = [];
|
||||||
|
let stoppedContainers = [];
|
||||||
|
for (let i = 0; i < data.containers.length; i++) {
|
||||||
|
if (data.containers[i].Status === "running") {
|
||||||
|
runningContainers.push(data.containers[i].name);
|
||||||
|
} else {
|
||||||
|
stoppedContainers.push(data.containers[i].name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Create the containersName variable
|
||||||
|
let containersName = "Total Containers: " + data.containers.length + "<br>";
|
||||||
|
containersName += "Running Containers: " + runningContainers.length + "<br>";
|
||||||
|
containersName += "Stopped Containers: " + stoppedContainers.length + "<br><br>";
|
||||||
|
// Loop through the running containers and add them to the containersName variable
|
||||||
|
|
||||||
|
document.getElementById("containers").innerHTML = containersName;
|
||||||
|
})
|
||||||
|
.catch(err => console.log(err));
|
||||||
|
};
|
||||||
|
|
||||||
|
// System uptime function
|
||||||
|
function systemUptime() {
|
||||||
|
fetch(api + "uptime")
|
||||||
|
.then(response => response.text())
|
||||||
|
.then(data => {
|
||||||
|
// Get text data remove the quotes
|
||||||
|
let uptime = data.replace(/['"]+/g, '');
|
||||||
|
document.getElementById("uptime").innerHTML = uptime;
|
||||||
|
})
|
||||||
|
.catch(err => console.log(err));
|
||||||
|
};
|
||||||
|
|
||||||
|
function systemLoad() {
|
||||||
|
fetch(api + "mem").then(response => response.json()).then(data => {
|
||||||
|
// Get percentage of memory used
|
||||||
|
let memPercent = data.percent + "% RAM";
|
||||||
|
document.getElementById("mem").innerHTML = memPercent;
|
||||||
|
}).catch(err => console.log(err));
|
||||||
|
|
||||||
|
fetch(api + "cpu").then(response => response.json()).then(data => {
|
||||||
|
// Get total CPU used
|
||||||
|
let cpuPercent = data.total + "% CPU";
|
||||||
|
document.getElementById("cpu").innerHTML = cpuPercent;
|
||||||
|
}).catch(err => console.log(err));
|
||||||
|
|
||||||
|
fetch(api + "fs").then(response => response.json()).then(data => {
|
||||||
|
// For each file system get percent disk used
|
||||||
|
let diskPercent = data[0].percent + "% Disk";
|
||||||
|
// Get GB of storage left
|
||||||
|
let diskFree = data[0].free;
|
||||||
|
// Convert to GB
|
||||||
|
diskFree = diskFree / 1000000000;
|
||||||
|
// Round to 2 decimal places
|
||||||
|
diskFree = diskFree.toFixed(2);
|
||||||
|
// Add to the diskPercent variable
|
||||||
|
diskPercent += "<br>" + diskFree + " GB Free";
|
||||||
|
document.getElementById("disk").innerHTML = diskPercent;
|
||||||
|
}).catch(err => console.log(err));
|
||||||
|
};
|
@ -38,6 +38,7 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700">
|
<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/styles.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/profile.min.css">
|
<link rel="stylesheet" href="assets/css/profile.min.css">
|
||||||
|
<link rel="me" href="https://mastodon.woodburn.au/@nathanwoodburn" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="text-align: center;">
|
<body style="text-align: center;">
|
||||||
|
@ -51,6 +51,7 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|||||||
<link rel="stylesheet" href="assets/css/styles.min.css">
|
<link rel="stylesheet" href="assets/css/styles.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/index.min.css">
|
<link rel="stylesheet" href="assets/css/index.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/profile.min.css">
|
<link rel="stylesheet" href="assets/css/profile.min.css">
|
||||||
|
<link rel="me" href="https://mastodon.woodburn.au/@nathanwoodburn" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body id="page-top" data-bs-spy="scroll" data-bs-target="#mainNav" data-bs-offset="77"><script src="https://nathan.woodburn/handshake.js" domain="nathan.woodburn"></script>
|
<body id="page-top" data-bs-spy="scroll" data-bs-target="#mainNav" data-bs-offset="77"><script src="https://nathan.woodburn/handshake.js" domain="nathan.woodburn"></script>
|
||||||
|
@ -38,6 +38,7 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700">
|
<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/styles.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/profile.min.css">
|
<link rel="stylesheet" href="assets/css/profile.min.css">
|
||||||
|
<link rel="me" href="https://mastodon.woodburn.au/@nathanwoodburn" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="background: url("assets/img/bg/back.webp") center / cover no-repeat;">
|
<body style="background: url("assets/img/bg/back.webp") center / cover no-repeat;">
|
||||||
|
@ -42,6 +42,7 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|||||||
<link rel="stylesheet" href="assets/css/animate.min.min.css">
|
<link rel="stylesheet" href="assets/css/animate.min.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/GridSystem-1.min.css">
|
<link rel="stylesheet" href="assets/css/GridSystem-1.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/profile.min.css">
|
<link rel="stylesheet" href="assets/css/profile.min.css">
|
||||||
|
<link rel="me" href="https://mastodon.woodburn.au/@nathanwoodburn" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="background: url("assets/img/links-bg.webp") center / cover no-repeat, #000000;">
|
<body style="background: url("assets/img/links-bg.webp") center / cover no-repeat, #000000;">
|
||||||
|
@ -39,6 +39,7 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|||||||
<link rel="stylesheet" href="assets/css/styles.min.css">
|
<link rel="stylesheet" href="assets/css/styles.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/podcast.min.css">
|
<link rel="stylesheet" href="assets/css/podcast.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/profile.min.css">
|
<link rel="stylesheet" href="assets/css/profile.min.css">
|
||||||
|
<link rel="me" href="https://mastodon.woodburn.au/@nathanwoodburn" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body id="page-top" data-bs-spy="scroll" data-bs-target="#mainNav" data-bs-offset="77">
|
<body id="page-top" data-bs-spy="scroll" data-bs-target="#mainNav" data-bs-offset="77">
|
||||||
|
@ -39,6 +39,7 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|||||||
<link rel="stylesheet" href="assets/fonts/font-awesome.min.css">
|
<link rel="stylesheet" href="assets/fonts/font-awesome.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/styles.min.css">
|
<link rel="stylesheet" href="assets/css/styles.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/profile.min.css">
|
<link rel="stylesheet" href="assets/css/profile.min.css">
|
||||||
|
<link rel="me" href="https://mastodon.woodburn.au/@nathanwoodburn" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body id="page-top" data-bs-spy="scroll" data-bs-target="#mainNav" data-bs-offset="77"><!-- Google Tag Manager (noscript) -->
|
<body id="page-top" data-bs-spy="scroll" data-bs-target="#mainNav" data-bs-offset="77"><!-- Google Tag Manager (noscript) -->
|
||||||
|
@ -39,6 +39,7 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|||||||
<link rel="stylesheet" href="assets/css/styles.min.css">
|
<link rel="stylesheet" href="assets/css/styles.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/Footer-Dark-icons.min.css">
|
<link rel="stylesheet" href="assets/css/Footer-Dark-icons.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/resume.min.css">
|
<link rel="stylesheet" href="assets/css/resume.min.css">
|
||||||
|
<link rel="me" href="https://mastodon.woodburn.au/@nathanwoodburn" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="width: 90%;margin-left: 5%;margin-right: 5%;">
|
<body style="width: 90%;margin-left: 5%;margin-right: 5%;">
|
||||||
|
Loading…
Reference in New Issue
Block a user