diff --git a/about.html b/about.html new file mode 100644 index 0000000..99bdf2a --- /dev/null +++ b/about.html @@ -0,0 +1,75 @@ + + + + + + about | aidxn + + + + + + + +
+ + + + + + \ No newline at end of file diff --git a/cloud.html b/cloud.html new file mode 100644 index 0000000..764fc8c --- /dev/null +++ b/cloud.html @@ -0,0 +1,67 @@ + + + + + + cloud | aidxn + + + + + + + +
+ + + + + + \ No newline at end of file diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..7a73a41 --- /dev/null +++ b/composer.json @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file diff --git a/contact.html b/contact.html new file mode 100644 index 0000000..b1294f8 --- /dev/null +++ b/contact.html @@ -0,0 +1,57 @@ + + + + + + contact | aidxn + + + + + + + +
+ + + + + + \ No newline at end of file diff --git a/css/about.css b/css/about.css new file mode 100644 index 0000000..035466f --- /dev/null +++ b/css/about.css @@ -0,0 +1,11 @@ +.os-list { + list-style-type: none; + margin: 0; + padding: 0; +} + +.space-li { + margin-top: 0.75%; + margin-bottom: 0.75%; + font-size: 95%; +} \ No newline at end of file diff --git a/css/cloud.css b/css/cloud.css new file mode 100644 index 0000000..309026e --- /dev/null +++ b/css/cloud.css @@ -0,0 +1,7 @@ +aside li { + font-size: 95%; +} + +.space { + margin-top: 3%; +} \ No newline at end of file diff --git a/css/contact.css b/css/contact.css new file mode 100644 index 0000000..f93c78a --- /dev/null +++ b/css/contact.css @@ -0,0 +1,8 @@ +ul { + list-style-type: circle; + padding-left: 5%; +} + +aside li { + font-size: 95%; +} \ No newline at end of file diff --git a/css/index.css b/css/index.css new file mode 100644 index 0000000..0543d45 --- /dev/null +++ b/css/index.css @@ -0,0 +1,6 @@ +/* This fixes a weird issue with an offset album art image */ +/* You know me: "I'll get to it later" */ + +#album-art { + margin-top: 1%; +} \ No newline at end of file diff --git a/css/main.css b/css/main.css new file mode 100644 index 0000000..511e1d6 --- /dev/null +++ b/css/main.css @@ -0,0 +1,176 @@ +/* Loading animation */ + +#loading { + display: block; + position: absolute; + top: 0; + left: 0; + z-index: 100; + width: 100vw; + height: 100vh; + background-color: black; + background-image: url("https://aidxn.fun/img/loading2.gif"); + background-repeat: no-repeat; + background-position: center; +} + +/* Used across all different parts of the site */ + +body { + font-family: "VT323", monospace; + font-weight: 400; + font-style: normal; + overflow: auto; + background-color: black; +} + +a { + color: white; +} + +blockquote { + font-size: 80%; + font-weight: bold; + text-align: left; +} + +/* Sidebar only */ + +.sidebar { + height: 93.7%; + width: 20%; + background-color: rgb(77, 69, 69); + position: fixed; + padding-top: 2%; + padding-left: 2%; +} + +.sidebar a { + color: white; + font-size: 100%; +} + +.sidebar b { + font-size: 110%; +} + +/* Used for varying font sizes */ +.extra-text { + color: white; + font-size: 90%; +} + +.extra-text p { + margin-top: 0%; +} + +header ul { + list-style-type: none; + margin: 0; + padding: 0; +} + +header li a { + text-decoration: none; + color: white; + display: inline; + padding-left: 2% +} + +header li b { + color: white; + display: inline; + padding-left: 2% +} + +.logo { + width: 88%; +} + +.cap { + font-size: 90%; + color: white; +} + +.mm-label { + padding-top: 5%; +} + +.bullet { + width: 5%; + padding-top: 5%; +} + +#date { + color: white; + font-size: 90%; + margin-top: 2%; + margin-bottom: 3%; +} + +/* Main content only */ + +.main-content { + color: white; + width: 72.5%; + max-height: 100%; + margin-left: 23%; + margin-right: 20%; + padding-left: 2%; + padding-right: 2%; + border: 1px white solid; + overflow: hidden; +} + +.main-content a { + text-decoration-color: white; +} + +.main-content h1 { + font-size: 215%; +} + +.main-content h3 { + font-size: 140%; +} + +.main-content p { + font-size: 95%; +} + +.quote { + margin-left: 7%; + margin-top: -1%; + margin-bottom: 1%; +} + +/* Used for now playing display */ + +.music-section { + margin: 0; + padding: 0; + color: white; + font-size: 105%; + margin-top: 5%; +} + +#album-art { + float: left; + margin-right: 3%; + margin-top: 3%; +} + +#song { + font-size: 91%; + margin-top: 1%; +} + +#album { + font-size: 75%; + margin: 0%; +} + +#artist { + font-size: 75%; + margin-top: 0%; +} \ No newline at end of file diff --git a/design.html b/design.html new file mode 100644 index 0000000..50557ea --- /dev/null +++ b/design.html @@ -0,0 +1,48 @@ + + + + + + design | aidxn + + + + + + + +
+ + + + + + \ No newline at end of file diff --git a/img/bullet.gif b/img/bullet.gif new file mode 100644 index 0000000..eeca6fd Binary files /dev/null and b/img/bullet.gif differ diff --git a/img/information.gif b/img/information.gif new file mode 100644 index 0000000..989e065 Binary files /dev/null and b/img/information.gif differ diff --git a/img/links.gif b/img/links.gif new file mode 100644 index 0000000..a53287e Binary files /dev/null and b/img/links.gif differ diff --git a/img/loading.gif b/img/loading.gif new file mode 100644 index 0000000..747574a Binary files /dev/null and b/img/loading.gif differ diff --git a/img/loading2.gif b/img/loading2.gif new file mode 100644 index 0000000..94fd825 Binary files /dev/null and b/img/loading2.gif differ diff --git a/img/logo.gif b/img/logo.gif new file mode 100644 index 0000000..e614991 Binary files /dev/null and b/img/logo.gif differ diff --git a/img/os/arch.png b/img/os/arch.png new file mode 100644 index 0000000..bde1483 Binary files /dev/null and b/img/os/arch.png differ diff --git a/img/os/debian.png b/img/os/debian.png new file mode 100644 index 0000000..67e5c08 Binary files /dev/null and b/img/os/debian.png differ diff --git a/img/os/gentoo.png b/img/os/gentoo.png new file mode 100644 index 0000000..98bcf88 Binary files /dev/null and b/img/os/gentoo.png differ diff --git a/img/os/mint.png b/img/os/mint.png new file mode 100644 index 0000000..bf4969a Binary files /dev/null and b/img/os/mint.png differ diff --git a/img/os/opensuse.png b/img/os/opensuse.png new file mode 100644 index 0000000..85330a5 Binary files /dev/null and b/img/os/opensuse.png differ diff --git a/img/os/oracle.png b/img/os/oracle.png new file mode 100644 index 0000000..ebb8726 Binary files /dev/null and b/img/os/oracle.png differ diff --git a/img/os/ubuntu.png b/img/os/ubuntu.png new file mode 100644 index 0000000..88a5d34 Binary files /dev/null and b/img/os/ubuntu.png differ diff --git a/img/os/void.png b/img/os/void.png new file mode 100644 index 0000000..60aa27f Binary files /dev/null and b/img/os/void.png differ diff --git a/img/os/windows-server.png b/img/os/windows-server.png new file mode 100644 index 0000000..ca97774 Binary files /dev/null and b/img/os/windows-server.png differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..2e522be --- /dev/null +++ b/index.html @@ -0,0 +1,65 @@ + + + + + + home | aidxn + + + + + + + +
+ + + + + + \ No newline at end of file diff --git a/js/main.js b/js/main.js new file mode 100644 index 0000000..23c8780 --- /dev/null +++ b/js/main.js @@ -0,0 +1,43 @@ +let currentDT = ``; +function displayTime(){ + let date = new Date(); + let d = date.getDate(); + let m = date.toLocaleString('default', {month: 'long'}); + let y = date.getFullYear(); + let t = date.toLocaleString([], { + hour: '2-digit', + minute: '2-digit', + second: '2-digit', + }); + + currentDT = `${d} ${m}, ${y} ${t}`; + document.getElementById('date').innerHTML = currentDT; + setTimeout(displayTime, 1000); +} + +/* Credits to MrPolywhirl (jsfiddle.net/MrPolywhirl/cbLsc81f) for the loading functions */ +/* Modified to suit my craziness */ + +function onReady(callback) { + let intervalID = window.setInterval(checkReady, 1000); + + function checkReady() { + if (document.getElementsByTagName('body')[0] !== undefined) { + window.clearInterval(intervalID); + callback.call(this); + } + } + +} + +function show(id, value) { + document.getElementById("loading").style.display = value ? 'block' : 'none'; + document.getElementById("page").style.display = 'block'; +} + +displayTime(); + +onReady(function () { + show('page', true); + show('loading', false); +}); \ No newline at end of file diff --git a/js/music.js b/js/music.js new file mode 100644 index 0000000..c998da5 --- /dev/null +++ b/js/music.js @@ -0,0 +1,31 @@ +const alblabel = document.getElementById("albLabel"); +const albumart = document.getElementById("album-art"); +const song = document.getElementById("song"); +const artist = document.getElementById("artist"); +const album = document.getElementById("album"); + +async function getLatestSong() { + const api = "https://lastfm-last-played.biancarosa.com.br/aidxn_/latest-song"; + try { + const lsResponse = await fetch(api); + if (lsResponse.ok) { + const latestSongJSON = await lsResponse.json(); + if (!latestSongJSON.track["@attr"]) { + alblabel.textContent = "Last Listen:"; + } else if (latestSongJSON.track["@attr"].nowplaying) { + alblabel.textContent = "Now Playing:"; + } else { + console.log("[WARN] Invalid value in now playing status, or something else messed up"); + alblabel.textContent = "Last Listen:"; + } + albumart.src = latestSongJSON.track.image[1]["#text"]; + song.textContent = latestSongJSON.track.name; + artist.textContent = latestSongJSON.track.artist["#text"]; + album.textContent = latestSongJSON.track.album["#text"]; + } else throw new Error(`Error, response status: ${lsResponse.status}`); + } catch (error) { + console.log(`Error: ${error.message}`); + } +} + +getLatestSong(); \ No newline at end of file diff --git a/js/ping.js b/js/ping.js new file mode 100644 index 0000000..2dead66 --- /dev/null +++ b/js/ping.js @@ -0,0 +1,37 @@ +async function ping(url) { + const start = performance.now(); + try { + await fetch(url); + const end = performance.now(); + return end - start; + } catch (error) { + console.error(`Error pinging ${url}:`, error); + return Infinity; + } +} + +async function testPing() { + const urls = [ + 'https://aidxn.fun/ping', + 'https://kantor.aidxn.fun/ping', + 'https://api.aidxn.fun/ping' + ]; + + const pingResults = await Promise.all( + urls.map(async (url) => { + const time = await ping(url); + return { url, time }; + }) + ); + + pingResults.sort((a, b) => a.time - b.time); + + console.log('Fastest server:', pingResults[0].url); + pingResults.forEach(result => { + console.log(`${result.url}: ${result.time.toFixed(2)} ms`); + }); +} + +window.onload = () => { + testPing(); +}; \ No newline at end of file diff --git a/js/status.js b/js/status.js new file mode 100644 index 0000000..491759e --- /dev/null +++ b/js/status.js @@ -0,0 +1,67 @@ +const pings = []; + +async function ping(url) { + const start = performance.now(); + try { + await fetch(url); + const end = performance.now(); + return end - start; + } catch (error) { + console.error(`Error pinging ${url}:`, error); + return Infinity; + } +} + +async function testPing() { + const urls = [ + 'https://aidxn.fun/ping', + 'https://kantor.aidxn.fun/ping', + 'https://api.aidxn.fun/ping' + ]; + + const pingResults = await Promise.all( + urls.map(async (url) => { + const time = await ping(url); + if (url === 'https://aidxn.fun/ping') { + const website = document.getElementById("website"); + website.textContent = `[ONLINE - ${time} ms]` + } + if (url === 'https://kantor.aidxn.fun/ping') { + const status1 = document.getElementById("status1"); + status1.textContent = `[ONLINE - ${time} ms]` + status1.style = 'color: green;'; + } + if (url === 'https://api.aidxn.fun/ping') { + const api = document.getElementById("api"); + api.textContent = `[ONLINE - ${time} ms]` + api.style = 'color: green;'; + } + return { url, time }; + }) + ); + + pingResults.sort((a, b) => a.time - b.time); + + console.log('Fastest server:', pingResults[0].url); + pingResults.forEach(result => { + console.log(`${result.url}: ${result.time.toFixed(2)} ms`); + }); + const fastestServer = pingResults[0].url; + if (fastestServer === 'https://aidxn.fun/ping') { + oldText = website.textContent; + website.textContent = oldText + ' [FASTEST]'; + } + if (fastestServer === 'https://kantor.aidxn.fun/ping') { + oldText = status1.textContent; + status1.textContent = oldText + ' [FASTEST]'; + } + if (fastestServer === 'https://api.aidxn.fun/ping') { + oldText = api.textContent; + api.textContent = oldText + ' [FASTEST]'; + } +} + +window.onload = () => { + + testPing(); +}; \ No newline at end of file diff --git a/status.html b/status.html new file mode 100644 index 0000000..8223425 --- /dev/null +++ b/status.html @@ -0,0 +1,52 @@ + + + + + + status | aidxn + + + + + + + +
+ + + + + + \ No newline at end of file diff --git a/verify.html b/verify.html new file mode 100644 index 0000000..e825e66 --- /dev/null +++ b/verify.html @@ -0,0 +1,51 @@ + + + + + + verify | aidxn + + + + + + +
+ + + + + + \ No newline at end of file