This commit is contained in:
zyqunix 2025-05-11 14:54:11 +02:00
parent 537161e621
commit 13de9931b0
No known key found for this signature in database
GPG key ID: 134A8DEEA83B80E6
3 changed files with 23 additions and 9 deletions

View file

@ -43,7 +43,8 @@ strong {
margin-top: 10px; margin-top: 10px;
} }
.time { .time,
.weather {
font-size: 18px; font-size: 18px;
margin-bottom: 10px; margin-bottom: 10px;
color: #cccccc; color: #cccccc;
@ -560,7 +561,7 @@ div[class="cards sitemap shadow"] > h4 {
.banan { .banan {
position: fixed; position: fixed;
left: 30px !important; right: 30px !important;
bottom: 30px !important; bottom: 30px !important;
width: 64px; width: 64px;
cursor: pointer; cursor: pointer;

View file

@ -43,6 +43,7 @@ function lan() {
}).then(data => { }).then(data => {
const statusElem = document.getElementById('status'); const statusElem = document.getElementById('status');
const pfpElem = document.getElementById('profile-picture'); const pfpElem = document.getElementById('profile-picture');
const activity = document.querySelector('.activity');
const activityNameElem = document.getElementById('activity-name'); const activityNameElem = document.getElementById('activity-name');
const activityImageElem = document.getElementById('activity-image'); const activityImageElem = document.getElementById('activity-image');
@ -73,10 +74,7 @@ function lan() {
} else { } else {
activityImageElem.style.display = "none"; activityImageElem.style.display = "none";
} }
} else { } else activity.style.display = "none";
activityNameElem.innerHTML = "<strong>Playing</strong> No Game Activity";
activityImageElem.style.display = "none";
}
}); });
} }
@ -213,7 +211,6 @@ function fetchSong() {
fetch(url) fetch(url)
.then(response => response.json()) .then(response => response.json())
.then(data => { .then(data => {
console.log(data);
const track = data?.recenttracks?.track?.[0]; const track = data?.recenttracks?.track?.[0];
if (!track) return; if (!track) return;
const artist = track.artist["#text"]; const artist = track.artist["#text"];
@ -230,6 +227,22 @@ function fetchSong() {
}); });
} }
function fetchWeather(location) {
if (!location) {
fetch(`https://wttr.in/muc?format=%t | %C`)
.then(response => response.text())
.then(data => {
document.getElementById('weather').innerText = data;
})
} else {
fetch(`https://wttr.in/${location}?format=%t | %C`)
.then(data => {
document.getElementById('weather').innerText = data;
})
}
}
fetchWeather();
fetchSong(); fetchSong();
setInterval(() => { setInterval(() => {

View file

@ -16,8 +16,8 @@
id="profile-picture" id="profile-picture"
/> />
<h1 class="name tooltip" data-tooltip="zyqunix / Fabio / Laetitia / fentboiswag / монгол / 192.168.2.217">zyqunix</h1> <h1 class="name tooltip" data-tooltip="zyqunix / Fabio / Laetitia / fentboiswag / монгол / 192.168.2.217">zyqunix</h1>
<div class="time tooltip" id="time"> </div> <span><div class="time tooltip" id="time"></div><div class="weather" id="weather"></div></span></span>
<div class="age tooltip" id="age" data-tooltip="December 13th"></div> <div class="age" id="age"></div>
<div class="hobbies"> <div class="hobbies">
Coding, Listening to Music, Reverse Engineering, Playing Counter-Strike Coding, Listening to Music, Reverse Engineering, Playing Counter-Strike
</div> </div>