95 lines
3 KiB
HTML
95 lines
3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<link rel="icon" type="image/x-icon" href="./favicon.png">
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>prigoana.lol</title>
|
|
<style>
|
|
body {
|
|
background-color: black;
|
|
color: white;
|
|
font-family: monospace;
|
|
}
|
|
.terminal {
|
|
background-color: black;
|
|
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: white;
|
|
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;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="terminal">
|
|
<ul>
|
|
<li><a href="/CS/">CS</a></li>
|
|
</ul>
|
|
<p style="line-height: 50px; height: 210px;"> </p>
|
|
</div>
|
|
<div id="app"></div>
|
|
<script src="https://unpkg.com/webamp/built/webamp.bundle.min.js"></script>
|
|
<script src="https://unpkg.com/butterchurn/lib/butterchurn.min.js"></script>
|
|
<script src="https://unpkg.com/butterchurn-presets/lib/butterchurnPresets.min.js"></script>
|
|
<script src="./index.js"></script>
|
|
<p style="line-height: 50px; height: 210px;"> </p>
|
|
<div id="lastfm-widget"></div>
|
|
<div id="widget">
|
|
<p>Last played song</p>
|
|
<span id="song"></span><br>
|
|
<div id="album-cover"></div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
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(function (response) {
|
|
return response.json();
|
|
}).then(function (json) {
|
|
songElement.innerHTML = json['track']['name'] + ' - ' + json['track']['artist']['#text'];
|
|
let albumName = json['track']['album']['#text'];
|
|
let albumHtml = '<div>' + albumName + '</div>';
|
|
songElement.innerHTML += albumHtml;
|
|
let albumImageUrl = json['track']['image'][2]['#text'];
|
|
albumCoverElement.innerHTML = '<img src="' + albumImageUrl + '" alt="Album Cover">';
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|