updated website

This commit is contained in:
Alex Frantz
2022-06-22 20:30:39 -04:00
parent bce362c430
commit f3943205f3
14 changed files with 66 additions and 382 deletions
-49
View File
@@ -1,49 +0,0 @@
body {
font-family: 'Fira Sans', sans-serif;
font-size:30px;
background-color: #111;
color:azure;
text-align:center;
}
a {
color:white;
}
p {
font-size:20px;
}
li {
font-size:25px;
list-style-type:none;
}
hr {
width:20%;
}
#querydiv {
padding-top:40px;
}
.welcome {
width: 100%;
background-image: url('../../static/img/profile.png');
background-repeat: no-repeat;
background-size: cover;
height: 305px;
background-color: purple;
background-position: center;
position:relative;
top:0px;
left:0px;
right:0px;
display:block;
}
#welcome-text {
position:relative;
text-align:center;
}
-117
View File
@@ -1,117 +0,0 @@
html, body {
margin: 0;
height: 100%;
font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
top:50%;
}
html{
background-color:black;
background-size:cover;
}
a {
color:white;
}
a:hover {
color:gray;
}
body {
background-size: 400% 400%;
padding-top:35px;
padding-bottom:35px;
height:fit-content;
min-height:100%;
}
@keyframes gradient {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
:root {
--accentColor: #E6E6E6;
--delay: .3s;
}
.description, .source{
color:white;
text-align:center;
margin: 27px auto;
margin-top:10px;
width:90%;
max-width: 500px;
}
.source{
font-size:small;
margin-top:50px;
}
.profilePicture, .profilePicture img {
position: relative;
width: 130px;
height: 130px;
display: block;
margin: 35px auto 20px;
border-radius: 50%;
}
.userName {
color: var(--accentColor);
font-size: x-large;
font-weight: bold;
line-height: 1.25;
display: block;
width: 100%;
text-align: center;
text-decoration: none;
}
.links {
max-width: 675px;
width: auto;
display: block;
margin: 27px auto;
}
.link {
position: relative;
background-color: transparent;
color: var(--accentColor);
border: solid var(--accentColor) 2px;
border-radius: 10px;
font-size: 1rem;
text-align: center;
display: block;
margin-left: 10px;
margin-right: 10px;
margin-bottom: 10px;
padding: 10px;
text-decoration: none;
-webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
.link:hover {
background-color: var(--accentColor);
color: #000; /* Fallback for older browsers */
color: rgba(0, 0, 0, 0.5);
}
}
.link:active {
background-color: var(--accentColor);
color: #000; /* Fallback for older browsers */
color: rgba(0, 0, 0, 0.5);
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 726 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

-12
View File
@@ -1,12 +0,0 @@
const clipSpan = document.getElementById("clip");
fetch("https://developers.medal.tv/v1/latest?userId=215577&limit=1", {
method: "GET",
headers: {
"authorization": "pub_ecEyOlY5G2u9476DMGOxcxiNcaOTEjmq",
"Content-Type": "application/json"
}
}).then(async function(response) {
const data = await response.json();
if(screen.width < 1920) { clipSpan.innerHTML = `<h3><a href="${data.contentObjects[0].directClipUrl}" target="_blank">${data.contentObjects[0].contentTitle}</a></h3>` }
else clipSpan.innerHTML = `${data.contentObjects[0].embedIframeCode}<br><hr><h3>${data.contentObjects[0].contentTitle}</h3>`;
});
-10
View File
@@ -1,10 +0,0 @@
const urlSearchParams = new URLSearchParams(window.location.search);
const params = Object.fromEntries(urlSearchParams.entries());
const div = document.getElementById("querydiv");
console.log(params)
if (params.reason) {
if (params.reason == "old_domain") {
div.innerHTML = '<p style="color:red;">You have been redirected here from an old domain. Please use this domain.</p>';
}
}
-17
View File
@@ -1,17 +0,0 @@
async function getState() {
const data = await fetch("https://api.thatalex.dev/v0/web/spotify/player/state", {
method: "GET"
}).then(response => response.json())
.catch(async function(response) {
const d = await response.json();
if (response.status == 401 && d.message == "Access Token was invalid. Token was refreshed & next request should succeed.") {
location.reload();
} else if (response.status != 200 || response.status != 204) {
console.log(`Uh oh, a little fucky wucky owo occurred\n\n${d}`)
document.getElementById("songContent").innerHTML = `<p style="color:red;">Uh oh! There was an error fetching song content.<br>The API may be temporarily down.</p>`
}
});
if(data.playing) document.getElementById("songContent").innerHTML = `<p><strong>${data.data.songData.songName}</strong> by <strong>${data.data.songData.artists[0].name}</strong> at <strong>${data.data.device.volume}%</strong> volume.`
else document.getElementById("songContent").innerHTML = `<p><strong>${data.data.songData.songName}</strong> by <strong>${data.data.songData.artists[0].name}</strong> is <strong>paused</strong>.`
}
+58
View File
@@ -0,0 +1,58 @@
body {
font-family: 'Cairo', sans-serif;
font-size:30px;
background-color:black;
color:white;
}
a {
padding-left:25px;
}
i {
color:white;
}
#container {
/* margin: 0 auto; */
top:50%;
left:50%;
position:absolute;
transform: translate(-50%, -50%)
}
#textDiv {
/* display:inline-block; */
float:left;
animation: typingEffect 2s forwards;
width:0%;
border-width:1px;
overflow:hidden;
white-space:nowrap;
}
#box {
background-color:gray;
width:15px;
opacity:0%;
height:35px;
border: 1px solid gray;
animation-name: cursorBlink;
animation-duration:0.5s;
animation-iteration-count: infinite;
margin: -25;
z-index:1;
position:absolute;
transform: translate(-65%, 100%);
}
@keyframes cursorBlink {
0% {opacity:0%;}
25% {opacity:50%;}
75% {opacity:0%;}
}
@keyframes typingEffect {
from {width:0%;}
to {width:34%;}
}