scratch
All checks were successful
Build and push container image / build-and-push-image (push) Successful in 6m3s
All checks were successful
Build and push container image / build-and-push-image (push) Successful in 6m3s
This commit is contained in:
BIN
static/content/fonts/avali-scratch.otf.woff2
Normal file
BIN
static/content/fonts/avali-scratch.otf.woff2
Normal file
Binary file not shown.
@@ -5,6 +5,12 @@
|
||||
font-weight:normal;
|
||||
font-style:normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family:"Scratch";
|
||||
src:url("/static/content/fonts/avali-scratch.otf.woff2") format("woff2");
|
||||
font-weight:normal;
|
||||
font-style:normal;
|
||||
}
|
||||
|
||||
:root {
|
||||
--primary-color: #5cdd8b;
|
||||
@@ -17,6 +23,7 @@
|
||||
--font-family: "Space Mono", "serif";
|
||||
--title-font: 'Roboto Mono', sans-serif;
|
||||
--irken-font: 'Irken';
|
||||
--scratch-font: 'Scratch';
|
||||
}
|
||||
|
||||
body {
|
||||
@@ -244,6 +251,10 @@ main section a {
|
||||
font-family: var(--irken-font);
|
||||
}
|
||||
|
||||
.scratch {
|
||||
font-family: var(--scratch-font);
|
||||
}
|
||||
|
||||
#alt-nav {
|
||||
display: none;
|
||||
backdrop-filter: blur(2px) brightness(0.6);
|
||||
|
||||
@@ -72,41 +72,58 @@ typing();
|
||||
|
||||
// HIDDEN STUFF (shh don't tell anyone >:3)
|
||||
|
||||
let last5Chars = "";
|
||||
let last15Chars = "";
|
||||
|
||||
document.addEventListener('keydown', function(event) {
|
||||
last5Chars += event.key;
|
||||
if (last5Chars == "furry") {
|
||||
last15Chars += event.key;
|
||||
if (last15Chars.includes("furry")) {
|
||||
console.log("owo, whats this?");
|
||||
document.getElementById('furry').style.display = 'block';
|
||||
last15Chars = "";
|
||||
}
|
||||
if (last5Chars == "irken") {
|
||||
if (last15Chars.includes("irken")) {
|
||||
console.log("doom doom doom!");
|
||||
document.querySelector(":root").style.setProperty('--font-family', 'Irken');
|
||||
document.querySelector(":root").style.setProperty('--title-font', '1.5em');
|
||||
last15Chars = "";
|
||||
}
|
||||
while (last5Chars.length >= 5) {
|
||||
last5Chars = last5Chars.slice(1);
|
||||
if (last15Chars.includes("scratch")) {
|
||||
console.log("space chicken");
|
||||
document.querySelector(":root").style.setProperty('--font-family', 'Scratch');
|
||||
document.querySelector(":root").style.setProperty('--title-font', '1em');
|
||||
last15Chars = "";
|
||||
}
|
||||
while (last15Chars.length >= 15) {
|
||||
last15Chars = last15Chars.slice(1);
|
||||
}
|
||||
});
|
||||
|
||||
// Spotify API (now lastfm)
|
||||
|
||||
function getSpotify() {
|
||||
fetch('/lastfm/info').then(response => {
|
||||
fetch('https://api.alfieking.dev/spotify/nowplaying/xz02oolstlvwxqu1pfcua9exz').then(response => {
|
||||
return response.json();
|
||||
}).then(data => {
|
||||
document.getElementById('spotify').style.backgroundImage = "url(" + data.image + ")";
|
||||
document.getElementById('spotify-title').innerHTML = data.track;
|
||||
document.getElementById('spotify-artist').innerHTML = data.artist;
|
||||
if (data.item == null) {
|
||||
document.getElementById('spotify').style.backgroundImage = "none";
|
||||
document.getElementById('spotify-title').innerHTML = "Spotify is not playing anything";
|
||||
document.getElementById('spotify-artist').innerHTML = ":(";
|
||||
document.getElementById('spotify-link').href = "https://open.spotify.com/";
|
||||
return;
|
||||
}
|
||||
document.getElementById('spotify').style.backgroundImage = "url(" + data.item.album.images[0].url + ")";
|
||||
document.getElementById('spotify-title').innerHTML = data.item.name;
|
||||
document.getElementById('spotify-artist').innerHTML = data.item.artists[0].name;
|
||||
document.getElementById('spotify-link').href = data.item.external_urls.spotify;
|
||||
});
|
||||
}
|
||||
|
||||
if (document.getElementById('spotify')) {
|
||||
getSpotify();
|
||||
setInterval(getSpotify, 60000);
|
||||
setInterval(getSpotify, 15000);
|
||||
}
|
||||
|
||||
|
||||
// load buttons
|
||||
|
||||
function loadButtons() {
|
||||
|
||||
Reference in New Issue
Block a user