This commit is contained in:
EduardSkibidiGooner 2024-09-29 15:52:53 +03:00
parent 59883061ca
commit 4a3e48aefa
6 changed files with 146 additions and 26 deletions

View file

@ -1,7 +0,0 @@
#080709
#e0ceed
#151217
#b657ff
#a29dfa
#211d26
#3b3442

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

View file

@ -2,42 +2,119 @@
<html lang="en">
<head>
<link rel="icon" type="image/x-icon" href="./favicon.png">
<link rel="manifest" href="./manifest.json">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Welcome to prigoana.lol, your go-to source for music and more.">
<meta name="author" content="Your Name">
<title>prigoana.lol</title>
<style>
body{background-color:#000;color:#fff;font-family:monospace;cursor:url(./cursor.cur),auto}.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;}
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;
}
</style>
</head>
<body>
<div class="terminal">
<ul>
<li><a href="/CS/">CS</a></li>
</ul>
<header>
<div class="terminal">
<ul>
<li><a href="/CS/">CS</a></li>
</ul>
</div>
</header>
<main>
<div class="model"></div>
<div id="app"></div>
<div id="lastfm-widget"></div>
<div id="widget">
<div class="spacer230p"></div>
<p>Last played song</p>
<span id="song"></span><br>
<div id="album-cover"></div>
</div>
</main>
<footer>
<p style="line-height: 50px; height: 210px;">&nbsp;</p>
</div>
<div id="app"></div>
</footer>
<script src="model.js"></script>
<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;">&nbsp;</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">
<script>
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'];songElement.innerHTML+='<div>'+albumName+'</div>';let albumImageUrl=json.track.image[2]['#text'];albumCoverElement.innerHTML='<img src="'+albumImageUrl+'" alt="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(function(registration) {
navigator.serviceWorker.register('./service-worker.js').then(registration => {
console.log('Service Worker registered with scope:', registration.scope);
}).catch(function(error) {
}).catch(error => {
console.log('Service Worker registration failed:', error);
});
}

22
manifest.json Normal file
View file

@ -0,0 +1,22 @@
{
"name": "Prigoana.lol",
"short_name": "Prigoana",
"start_url": "/",
"display": "standalone",
"background_color": "#000000",
"theme_color": "#000000",
"description": "Eduard Prigoana",
"icons": [
{
"src": "./favicon.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "./favicon.png",
"sizes": "512x512",
"type": "image/png"
}
]
}

1
model.js Normal file
View file

@ -0,0 +1 @@
window.wallpaperPropertyListener={applyUserProperties:function(a){if(a.model){clearTimeout(timer);timer=0;document.getElementsByClassName('model')[0].innerHTML='';model=a.model.value;balanceSpeed(model);generate()}if(a.color||a.backgroundcolor){const b=(c,d)=>{const e=d.split(' ').map(f=>Math.ceil(f*255));document.getElementsByClassName(c)[0].style.color=`rgb(${e})`};if(a.color)b('model',a.color.value);if(a.backgroundcolor)b('bg',a.backgroundcolor.value)}if(a.animationspeed){basedAnimationSpeed=a.animationspeed.value;balanceSpeed(model)}if(a.stopanimation){clearTimeout(timer);timer=0;stopA=a.stopanimation.value;if(!stopA){document.getElementsByClassName('model')[0].innerHTML='';generate()}}}};let animationSpeed=50,stopA=!1,timer;generate();function balanceSpeed(){animationSpeed=basedAnimationSpeed}function generate(){let A=1,B=1;const generateFrame=()=>{const b=Array(1760).fill(" "),z=Array(1760).fill(0);A+=.07;B+=.03;for(let j=0;j<6.28;j+=.07){const ct=Math.cos(j),st=Math.sin(j);for(let i=0;i<6.28;i+=.02){const sp=Math.sin(i),cp=Math.cos(i),h=ct+2,D=1/(sp*h*Math.sin(A)+st*Math.cos(A)+5),t=sp*h*Math.cos(A)-st*Math.sin(A);const x=Math.floor(40+21*D*(cp*h*Math.cos(B)-t*Math.sin(B))),y=Math.floor(12+10.5*D*(cp*h*Math.sin(B)+t*Math.cos(B))),o=x+80*y,N=Math.floor(8*((st*Math.sin(A)-sp*ct*Math.cos(A))*Math.cos(B)-sp*ct*Math.sin(A)-st*Math.cos(A)-cp*ct*Math.sin(B)));if(y<22&&y>=0&&x>=0&&x<79&&D>z[o]){z[o]=D;b[o]=".,-~:;=!*#$@"[Math.max(N,0)]}}}const formattedOutput=[];for(let i=0;i<22;i++)formattedOutput.push(b.slice(i*80,(i+1)*80).join(''));document.getElementsByClassName('model')[0].innerHTML=formattedOutput.join("\n")};const timeoutRender=()=>{generateFrame();if(!stopA)timer=setTimeout(timeoutRender,animationSpeed)};timeoutRender()}

27
webamp.html Normal file
View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="manifest" href="./manifest.json">
<title>WebAmp</title>
</head>
<body style="background-color: black;">
<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>
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('./service-worker.js').then(registration => {
console.log('ServiceWorker registration successful with scope: ', registration.scope);
}).catch(error => {
console.log('ServiceWorker registration failed: ', error);
});
});
}
</script>
</body>
</html>