👅
This commit is contained in:
parent
3605f0af24
commit
fb9a6b1b1e
8 changed files with 646 additions and 98 deletions
114
index.html
114
index.html
|
@ -6,86 +6,28 @@
|
|||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>prigoana.lol</title>
|
||||
<style>
|
||||
body {
|
||||
user-select: none;
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
font-family: monospace;
|
||||
cursor: url(./cursor.cur), auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
img {
|
||||
pointer-events: none;
|
||||
}
|
||||
.terminal {
|
||||
background-color: #000;
|
||||
color: green;
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
.terminal h1 {
|
||||
color: lightgreen;
|
||||
}
|
||||
.terminal .command {
|
||||
color: lightblue;
|
||||
}
|
||||
.terminal ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin: 0;
|
||||
}
|
||||
.terminal li {
|
||||
margin: 0 15px;
|
||||
}
|
||||
.terminal a {
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
.terminal a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
#widget {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
#album-cover img {
|
||||
max-width: 150px;
|
||||
max-height: 150px;
|
||||
}
|
||||
#song {
|
||||
text-align: center;
|
||||
}
|
||||
.spacer230p {
|
||||
height: 230px;
|
||||
}
|
||||
.model {
|
||||
color: #ff2ef1;
|
||||
height: 230px;
|
||||
font-family: monospace;
|
||||
white-space: pre;
|
||||
}
|
||||
a{ cursor: url(./link.cur), auto;}
|
||||
</style>
|
||||
<link rel="stylesheet" href="./common.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="terminal">
|
||||
<ul>
|
||||
<li><a href="./projects.html">projects</a></li>
|
||||
<li><a href="./about.html">about</a></li>
|
||||
<!--<li><a href="./guides.html">guides</a></li>-->
|
||||
<ul class="navbar">
|
||||
<li><a href="./projects">projects</a></li>
|
||||
<li><a href="./about">about</a></li>
|
||||
<li><a href="./guides">guides</a></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropbtn">playlists</a>
|
||||
<div class="dropdown-content">
|
||||
<a href="./">Eduard (👅)</a>
|
||||
<a href="./noah">Noah (Yep)</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</header>
|
||||
<main><p style="line-height: 50px; height: 200px;"> </p>
|
||||
<div id="app" ></div>
|
||||
<main>
|
||||
<p style="line-height: 50px; height: 200px;"> </p>
|
||||
<div id="app"></div>
|
||||
<p style="line-height: 50px; height: 230px;"> </p>
|
||||
<div id="lastfm-widget"></div>
|
||||
<div id="widget">
|
||||
|
@ -104,17 +46,23 @@
|
|||
let url = 'https://lastfm-last-played.biancarosa.com.br/yetiuard/latest-song';
|
||||
let songElement = document.querySelector('#song');
|
||||
let albumCoverElement = document.querySelector('#album-cover');
|
||||
fetch(url).then(response => response.json()).then(json => {
|
||||
songElement.innerHTML = json.track.name + ' - ' + json.track.artist['#text'];
|
||||
songElement.innerHTML += '<div>' + json.track.album['#text'] + '</div>';
|
||||
albumCoverElement.innerHTML = '<img src="' + json.track.image[2]['#text'] + '" alt="Album Cover">';
|
||||
});
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register('./service-worker.js').then(registration => {
|
||||
console.log('Service Worker registered with scope:', registration.scope);
|
||||
}).catch(error => {
|
||||
console.log('Service Worker registration failed:', error);
|
||||
|
||||
fetch(url)
|
||||
.then(response => response.json())
|
||||
.then(json => {
|
||||
songElement.innerHTML = `${json.track.name} - ${json.track.artist['#text']}`;
|
||||
songElement.innerHTML += `<div>${json.track.album['#text']}</div>`;
|
||||
albumCoverElement.innerHTML = `<img src="${json.track.image[2]['#text']}" alt="Album Cover">`;
|
||||
});
|
||||
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register('./service-worker.js')
|
||||
.then(registration => {
|
||||
console.log('Service Worker registered with scope:', registration.scope);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log('Service Worker registration failed:', error);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue