2023-07-25 20:26:51 +01:00
<!DOCTYPE html>
2024-07-16 08:54:12 +01:00
< html lang = "en" class = "reftest-wait" >
2023-12-30 15:43:40 +00:00
< head >
< meta charset = "UTF-8" >
2024-03-31 02:30:53 +01:00
< meta name = "viewport" content = "width=device-width, initial-scale=1" / >
< meta name = "description" content = "I'm a silly dog" >
2024-04-14 23:49:51 +01:00
< title > arch.dog< / title >
2023-12-30 15:43:40 +00:00
< link rel = "stylesheet" href = "./styles.css" >
< / head >
< body >
< main >
2024-03-31 02:30:53 +01:00
< form >
2024-04-14 23:49:51 +01:00
< label > < input type = "checkbox" name = "language" / > Dog Mode< / label >
2024-03-31 02:30:53 +01:00
< / form >
2023-12-30 15:43:40 +00:00
< header >
2024-03-31 02:30:53 +01:00
< img src = "./avatar.png" alt = "A cute golden retriever with a stylish blue hairstyle and glasses" >
2024-04-14 23:49:51 +01:00
< h1 > Arch is a dog< / h1 >
2023-12-30 15:43:40 +00:00
< / header >
2024-04-14 23:49:51 +01:00
< p id = "social" > < i > hi!< / i > follow me on the < a href = "https://floofy.tech/@arch" rel = "me" > fedi< / a > < / p >
< p id = "fursona" > < a href = "https://fursona.gmem.ca/gmem.ca" > check out my fursona< / a > < / p >
< p id = "projects" > < a href = "https://gabrielsimmer.com" > check out my projects< / a > < / p >
2024-07-13 12:40:32 +01:00
< noscript >
< h2 > < a href = "/friends/" > friends!< / a > < / h2 >
< / noscript >
< div id = "friends" > < / div >
2024-04-15 09:14:45 +01:00
< p > < a href = "https://arch.dog" > < img src = "./arch.dog.png" alt = "pixel art website button for this very website! black text on a background matching my fursona that says arch.dog" > < / a > < / p >
2024-03-31 02:03:03 +01:00
< p > < a href = 'https://ko-fi.com/N4N4I73HI' target = '_blank' >
2024-04-15 09:14:45 +01:00
< img height = '36' style = 'border:0px;height:36px;' src = './kofi.png' border = '0' alt = 'Buy Me a Coffee at ko-fi.com' / >
2024-03-31 02:03:03 +01:00
< / a > < / p >
2024-07-13 12:40:32 +01:00
< / main >
2023-12-30 15:43:40 +00:00
< script >
const checkbox = document.querySelector("input[name=language]");
const header = document.querySelector("h1");
const social = document.querySelector("#social");
const fursona = document.querySelector("#fursona");
2024-04-14 23:49:51 +01:00
const projects = document.querySelector("#projects");
2023-12-30 15:43:40 +00:00
2024-07-13 12:40:32 +01:00
addEventListener("load", (event) => {
loadfriends();
2024-07-16 08:54:12 +01:00
reloaddog();
2024-07-13 12:40:32 +01:00
});
2023-12-30 15:43:40 +00:00
checkbox.addEventListener('change', function() {
toggledog(this.checked);
});
const toggledog = (status) => {
localStorage.setItem("dog", status);
reloaddog();
}
const reloaddog = () => {
2024-04-15 17:58:00 +01:00
checkbox.value = localStorage.getItem == "true";
2023-12-30 15:43:40 +00:00
if (localStorage.getItem("dog") == "true") {
header.innerHTML = "arf arf!";
social.innerHTML = "< i > *wags tail*< / i > awoo woof woof < a href = \"https://floofy.tech/@arch\" rel = \"me\" > bark< / a > "
fursona.innerHTML = "< a href = \"https://fursona.gmem.ca/gmem.ca\" > yip arf< / a > "
2024-04-14 23:49:51 +01:00
projects.innerHTML = "< a href = \"https://gabrielsimmer.com\" > grrr ruff< / a > "
2023-12-30 15:43:40 +00:00
} else {
header.innerHTML = "Arch is a dog";
social.innerHTML = "< i > hi!< / i > follow me on the < a href = \"https://floofy.tech/@arch\" rel = \"me\" > fedi< / a > "
fursona.innerHTML = "< a href = \"https://fursona.gmem.ca/gmem.ca\" > check out my fursona< / a > "
2024-04-14 23:49:51 +01:00
projects.innerHTML = "< a href = \"https://gabrielsimmer.com\" > check out my projects< / a > "
2023-12-30 15:43:40 +00:00
}
}
2024-07-13 12:40:32 +01:00
const loadfriends = () => {
// Fetch the content of the dynamic page
fetch("https://arch.dog/friends/embed")
.then(response => response.text())
.then(data => {
if (data) {
// Inject the dynamic content into the static page
document.getElementById("friends").innerHTML = data;
} else {
console.error(`Element with selector #friends not found in the dynamic page.`);
}
2024-07-16 08:54:12 +01:00
// Capture clean screenshots with Servo.
setTimeout(() => document.querySelector("html").classList.remove("reftest-wait"), 2000);
2024-07-13 12:40:32 +01:00
})
2024-07-16 08:54:12 +01:00
.catch(error => console.error('Error fetching dynamic content:', error));
2024-07-13 12:40:32 +01:00
}
2023-12-30 15:43:40 +00:00
< / script >
< / body >
2023-07-25 20:26:51 +01:00
< / html >