forked from jeycaarce/lyrics
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5b8e521
Showing
3 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
}); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
|
||
} |