forked from shivaylamba/Hacktoberfest
-
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
1 parent
f58397f
commit 0d95feb
Showing
2,784 changed files
with
2,905 additions
and
376,866 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
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 |
---|---|---|
@@ -1,62 +1,62 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Beatbox</title> | ||
<link type="text/css" rel="stylesheet" href="style.css" /> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="beatbox"> | ||
<div class="beat"> | ||
<div id="65" class="button aqua"> | ||
A | ||
</div> | ||
</div> | ||
<div class="beat"> | ||
<div id="83" class="button aqua"> | ||
S | ||
</div> | ||
</div> | ||
<div class="beat"> | ||
<div id="68" class="button aqua"> | ||
D | ||
</div> | ||
</div> | ||
<div class="beat"> | ||
<div id="70" class="button purple"> | ||
F | ||
</div> | ||
</div> | ||
<div class="beat"> | ||
<div id="71" class="button purple"> | ||
G | ||
</div> | ||
</div> | ||
<div class="beat"> | ||
<div id="72" class="button purple"> | ||
H | ||
</div> | ||
</div> | ||
<div class="beat"> | ||
<div id="74" class="button purple"> | ||
J | ||
</div> | ||
</div> | ||
<div class="beat"> | ||
<div id="75" class="button white"> | ||
K | ||
</div> | ||
</div> | ||
<div class="beat"> | ||
<div id="76" class="button white"> | ||
L | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<script type="text/javascript" src="script.js"></script> | ||
</body> | ||
</html> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Beatbox</title> | ||
<link type="text/css" rel="stylesheet" href="style.css" /> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="beatbox"> | ||
<div class="beat"> | ||
<div id="65" class="button aqua"> | ||
A | ||
</div> | ||
</div> | ||
<div class="beat"> | ||
<div id="83" class="button aqua"> | ||
S | ||
</div> | ||
</div> | ||
<div class="beat"> | ||
<div id="68" class="button aqua"> | ||
D | ||
</div> | ||
</div> | ||
<div class="beat"> | ||
<div id="70" class="button purple"> | ||
F | ||
</div> | ||
</div> | ||
<div class="beat"> | ||
<div id="71" class="button purple"> | ||
G | ||
</div> | ||
</div> | ||
<div class="beat"> | ||
<div id="72" class="button purple"> | ||
H | ||
</div> | ||
</div> | ||
<div class="beat"> | ||
<div id="74" class="button purple"> | ||
J | ||
</div> | ||
</div> | ||
<div class="beat"> | ||
<div id="75" class="button white"> | ||
K | ||
</div> | ||
</div> | ||
<div class="beat"> | ||
<div id="76" class="button white"> | ||
L | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<script type="text/javascript" src="script.js"></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 |
---|---|---|
@@ -1,103 +1,103 @@ | ||
document.addEventListener("keydown", (event) => { | ||
console.log(event.keyCode); | ||
var key = event.keyCode; | ||
if (key == 65) { | ||
var audio = new Audio("Piano Chord 208.mp3"); | ||
audio.currentTime = 0; | ||
audio.play(); | ||
document.getElementById("65").style.backgroundColor = "aqua"; | ||
document.getElementById("65").style.boxShadow = "0px 0px 20px 0px aqua"; | ||
setTimeout(function () { | ||
document.getElementById("65").style.backgroundColor = "transparent"; | ||
document.getElementById("65").style.boxShadow = "none"; | ||
}, 500); | ||
} | ||
if (key == 83) { | ||
var audio = new Audio("Piano Chord 209.mp3"); | ||
audio.currentTime = 0; | ||
audio.play(); | ||
document.getElementById("83").style.backgroundColor = "aqua"; | ||
document.getElementById("83").style.boxShadow = "0px 0px 20px 0px aqua"; | ||
setTimeout(function () { | ||
document.getElementById("83").style.backgroundColor = "transparent"; | ||
document.getElementById("83").style.boxShadow = "none"; | ||
}, 500); | ||
} | ||
if (key == 68) { | ||
var audio = new Audio("Piano Chord 331.mp3"); | ||
audio.currentTime = 0; | ||
audio.play(); | ||
document.getElementById("68").style.backgroundColor = "aqua"; | ||
document.getElementById("68").style.boxShadow = "0px 0px 20px 0px aqua"; | ||
setTimeout(function () { | ||
document.getElementById("68").style.backgroundColor = "transparent"; | ||
document.getElementById("68").style.boxShadow = "none"; | ||
}, 500); | ||
} | ||
if (key == 70) { | ||
var audio = new Audio("Drum Sticks Hit 3.mp3"); | ||
audio.currentTime = 0; | ||
audio.play(); | ||
document.getElementById("70").style.backgroundColor = "#ff00ff"; | ||
document.getElementById("70").style.boxShadow = "0px 0px 20px 0px #ff00ff"; | ||
setTimeout(function () { | ||
document.getElementById("70").style.backgroundColor = "transparent"; | ||
document.getElementById("70").style.boxShadow = "none"; | ||
}, 500); | ||
} | ||
if (key == 71) { | ||
var audio = new Audio("Drum Snare Roll.mp3"); | ||
audio.currentTime = 0; | ||
audio.play(); | ||
document.getElementById("71").style.backgroundColor = "#ff00ff"; | ||
document.getElementById("71").style.boxShadow = "0px 0px 20px 0px #ff00ff"; | ||
setTimeout(function () { | ||
document.getElementById("71").style.backgroundColor = "transparent"; | ||
document.getElementById("71").style.boxShadow = "none"; | ||
}, 500); | ||
} | ||
if (key == 72) { | ||
var audio = new Audio("PREL Musical 57.mp3"); | ||
audio.currentTime = 0; | ||
audio.play(); | ||
document.getElementById("72").style.backgroundColor = "#ff00ff"; | ||
document.getElementById("72").style.boxShadow = "0px 0px 20px 0px #ff00ff"; | ||
setTimeout(function () { | ||
document.getElementById("72").style.backgroundColor = "transparent"; | ||
document.getElementById("72").style.boxShadow = "none"; | ||
}, 500); | ||
} | ||
if (key == 74) { | ||
var audio = new Audio("Cymbal Suspended 2.mp3"); | ||
audio.currentTime = 0; | ||
audio.play(); | ||
document.getElementById("74").style.backgroundColor = "#ff00ff"; | ||
document.getElementById("74").style.boxShadow = "0px 0px 20px 0px #ff00ff"; | ||
setTimeout(function () { | ||
document.getElementById("74").style.backgroundColor = "transparent"; | ||
document.getElementById("74").style.boxShadow = "none"; | ||
}, 500); | ||
} | ||
if (key == 75) { | ||
var audio = new Audio("Musical Compos 33.mp3"); | ||
audio.currentTime = 0; | ||
audio.play(); | ||
document.getElementById("75").style.backgroundColor = "white"; | ||
document.getElementById("75").style.boxShadow = "0px 0px 20px 0px white"; | ||
setTimeout(function () { | ||
document.getElementById("75").style.backgroundColor = "transparent"; | ||
document.getElementById("75").style.boxShadow = "none"; | ||
}, 500); | ||
} | ||
if (key == 76) { | ||
var audio = new Audio("Musical Orches 4.mp3"); | ||
audio.currentTime = 0; | ||
audio.play(); | ||
document.getElementById("76").style.backgroundColor = "white"; | ||
document.getElementById("76").style.boxShadow = "0px 0px 20px 0px white"; | ||
setTimeout(function () { | ||
document.getElementById("76").style.backgroundColor = "transparent"; | ||
document.getElementById("76").style.boxShadow = "none"; | ||
}, 500); | ||
} | ||
}); | ||
document.addEventListener("keydown", (event) => { | ||
console.log(event.keyCode); | ||
var key = event.keyCode; | ||
if (key == 65) { | ||
var audio = new Audio("Piano Chord 208.mp3"); | ||
audio.currentTime = 0; | ||
audio.play(); | ||
document.getElementById("65").style.backgroundColor = "aqua"; | ||
document.getElementById("65").style.boxShadow = "0px 0px 20px 0px aqua"; | ||
setTimeout(function () { | ||
document.getElementById("65").style.backgroundColor = "transparent"; | ||
document.getElementById("65").style.boxShadow = "none"; | ||
}, 500); | ||
} | ||
if (key == 83) { | ||
var audio = new Audio("Piano Chord 209.mp3"); | ||
audio.currentTime = 0; | ||
audio.play(); | ||
document.getElementById("83").style.backgroundColor = "aqua"; | ||
document.getElementById("83").style.boxShadow = "0px 0px 20px 0px aqua"; | ||
setTimeout(function () { | ||
document.getElementById("83").style.backgroundColor = "transparent"; | ||
document.getElementById("83").style.boxShadow = "none"; | ||
}, 500); | ||
} | ||
if (key == 68) { | ||
var audio = new Audio("Piano Chord 331.mp3"); | ||
audio.currentTime = 0; | ||
audio.play(); | ||
document.getElementById("68").style.backgroundColor = "aqua"; | ||
document.getElementById("68").style.boxShadow = "0px 0px 20px 0px aqua"; | ||
setTimeout(function () { | ||
document.getElementById("68").style.backgroundColor = "transparent"; | ||
document.getElementById("68").style.boxShadow = "none"; | ||
}, 500); | ||
} | ||
if (key == 70) { | ||
var audio = new Audio("Drum Sticks Hit 3.mp3"); | ||
audio.currentTime = 0; | ||
audio.play(); | ||
document.getElementById("70").style.backgroundColor = "#ff00ff"; | ||
document.getElementById("70").style.boxShadow = "0px 0px 20px 0px #ff00ff"; | ||
setTimeout(function () { | ||
document.getElementById("70").style.backgroundColor = "transparent"; | ||
document.getElementById("70").style.boxShadow = "none"; | ||
}, 500); | ||
} | ||
if (key == 71) { | ||
var audio = new Audio("Drum Snare Roll.mp3"); | ||
audio.currentTime = 0; | ||
audio.play(); | ||
document.getElementById("71").style.backgroundColor = "#ff00ff"; | ||
document.getElementById("71").style.boxShadow = "0px 0px 20px 0px #ff00ff"; | ||
setTimeout(function () { | ||
document.getElementById("71").style.backgroundColor = "transparent"; | ||
document.getElementById("71").style.boxShadow = "none"; | ||
}, 500); | ||
} | ||
if (key == 72) { | ||
var audio = new Audio("PREL Musical 57.mp3"); | ||
audio.currentTime = 0; | ||
audio.play(); | ||
document.getElementById("72").style.backgroundColor = "#ff00ff"; | ||
document.getElementById("72").style.boxShadow = "0px 0px 20px 0px #ff00ff"; | ||
setTimeout(function () { | ||
document.getElementById("72").style.backgroundColor = "transparent"; | ||
document.getElementById("72").style.boxShadow = "none"; | ||
}, 500); | ||
} | ||
if (key == 74) { | ||
var audio = new Audio("Cymbal Suspended 2.mp3"); | ||
audio.currentTime = 0; | ||
audio.play(); | ||
document.getElementById("74").style.backgroundColor = "#ff00ff"; | ||
document.getElementById("74").style.boxShadow = "0px 0px 20px 0px #ff00ff"; | ||
setTimeout(function () { | ||
document.getElementById("74").style.backgroundColor = "transparent"; | ||
document.getElementById("74").style.boxShadow = "none"; | ||
}, 500); | ||
} | ||
if (key == 75) { | ||
var audio = new Audio("Musical Compos 33.mp3"); | ||
audio.currentTime = 0; | ||
audio.play(); | ||
document.getElementById("75").style.backgroundColor = "white"; | ||
document.getElementById("75").style.boxShadow = "0px 0px 20px 0px white"; | ||
setTimeout(function () { | ||
document.getElementById("75").style.backgroundColor = "transparent"; | ||
document.getElementById("75").style.boxShadow = "none"; | ||
}, 500); | ||
} | ||
if (key == 76) { | ||
var audio = new Audio("Musical Orches 4.mp3"); | ||
audio.currentTime = 0; | ||
audio.play(); | ||
document.getElementById("76").style.backgroundColor = "white"; | ||
document.getElementById("76").style.boxShadow = "0px 0px 20px 0px white"; | ||
setTimeout(function () { | ||
document.getElementById("76").style.backgroundColor = "transparent"; | ||
document.getElementById("76").style.boxShadow = "none"; | ||
}, 500); | ||
} | ||
}); |
Oops, something went wrong.