Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
jeycaarce authored Nov 25, 2023
0 parents commit 5b8e521
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
16 changes: 16 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>my crush</title>
</head>
<body>
<div class="text" style="top: -50px;">
<h1 id="lyrics"></h1>
</div>

<script src="script.js" defer></script>
</body>
</html>
36 changes: 36 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
document.addEventListener("DOMContentLoaded", function () {
const lyrics = [
"Kissing, I hope they caught us",
"Whether they like or not",
"I wanna show you off",
"I wanna show you off",
"I wanna brag about it",
"I wanna tie the knot",
"I wanna show you off"

];

const delay = 33;
const lyricsElement = document.getElementById("lyrics");

async function displayLyrics() {
for (const line of lyrics) {
for (const char of line) {
lyricsElement.textContent += char;
await new Promise((resolve) => setTimeout(resolve, delay));
}

lyricsElement.innerHTML += "<br>";

await new Promise((resolve) => setTimeout(resolve, delay * 10));

lyricsElement.innerHTML = "";

await new Promise((resolve) => setTimeout(resolve, delay * 10));
}
}

displayLyrics();
});


25 changes: 25 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@import url('https://fonts.googleapis.com/css2?family=Righteous');

body {
background-image: url('video.gif');
background-size: cover;
margin: 0;
padding: 0;
height: 100vh;
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
position: relative;
font-family: 'Poppins', sans-serif;
}

.text h1 {
margin: -10%;
font-size: clamp(40px, 60vw, 60px);
text-align: center;
padding: 10px 20px;
font-weight: bold;
color: white;

}

0 comments on commit 5b8e521

Please sign in to comment.