Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file added MiniMusicPlayer/0Verlord-41/Russ - Civil War.mp3
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
145 changes: 145 additions & 0 deletions MiniMusicPlayer/0Verlord-41/musicworld.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
<html>

<title>Music world</title>
<style>

.title{
text-align: center;
}
body{
background-color: mistyrose;
}
.app{
justify-content: space-around;
display: flex;
align-items: center;
flex-direction: column;
height:100vh;

}
.pads{
display: flex;
width: 100%;
}
.pads > div{
height:150px;
width:100px;
flex:1;

}
.pad1{
background: #60d394;
}
.pad2{
background: #c060d3;

}
.pad3{
background: #d36060;

}
.pad4{
background: #d3d160;

}
.pad5{
background: #c060d3;

}
button{
box-sizing: border-box;
appearance: none;

border: 2px solid $red;
border-radius: 0.6em;
color: $red;
cursor: pointer;
display: flex;

font-size: 1rem;
font-weight: 500;
line-height: 1;
margin: 14px;
padding:15px 20px 15px 20px;

text-align: center;
text-transform: uppercase;
font-family: 'Montserrat', sans-serif;

width: 80px;
}
button:hover{
box-shadow: 0 0 10px 0 $blue inset, 0 0 10px 4px $blue;
}
.add{
background-color: blue;
}
.visual >div{
border-radius: 50%;
position: absolute;
width:50px;
height:50px;
}
@keyframes jump {
0%{
bottom:50%;
left:20%;
}
50%{
bottom:50%;
left:50%;
}
100%{
bottom:50%;
left:80%;
}

}
header{
background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
width:100%;
}
.play{
text-align: center;
}
.pla{
text-align: center;
}
</style>


<body>
<div class="app">
<header>
<div class="title"><h1>Music world</h1></div>
</header>
<div class="aud"><p>tap to play music</p></div>
<div class="visual"></div>
<div class="pads">
<div class="pad1">
<button class="play">play</button>
<button class="pla">pause</button>
<audio class="sound" src="Russ - Civil War.mp3"></audio>
</div>
<div class="pad2">
<button class="play">play</button>
<button class="pla">pause</button>
<audio class="sound" src="Russ - Best On Earth ft. BIA.mp3"></audio>
</div>
<div class="pad3">
<button class="play">play</button>
<button class="pla">pause</button>
<audio class="sound" src="Taylor Swift - Love Story(music.naij.com).mp3"></audio></div>
<div class="pad4">
<button class="play">play</button>
<button class="pla">pause</button><audio class="sound" src="Shawn Mendes - There s Nothing Holdin Me Back.mp3"></audio>
</div>
<div class="pad5">
<button class="play">play</button>
<button class="pla">pause</button><audio class="sound" src="Tiësto & KSHMR feat. Vassy - Secrets (Official Music Video).mp3"></audio>
</div>

</div>
</body>
<script src="script1.js"></script>
</html>
43 changes: 43 additions & 0 deletions MiniMusicPlayer/0Verlord-41/script1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
window.onload=fun;

function fun(){
const sound=document.querySelectorAll(".sound");
const visual=document.querySelector(".visual");
const pads=document.querySelectorAll(".play");
const pause=document.querySelectorAll(".pla");
var color=[
"#60d394","#c060d3","#d36060","#d3d160","#c060d3"
];

pads.forEach((v,index)=>{
console.log(index);
v.addEventListener('click',function(){
sound[index].currentTime=0;
sound[index].play();
v.classList.toggle('pow');
bubbles(index);
});

});
function bubbles(index){
const vis=document.createElement("div");
visual.appendChild(vis);

vis.style.backgroundColor=color[index];
vis.style.animation="jump 1s infinite";
vis.addEventListener("animationend",function(){
visual.removeChild(this);

});
}
pause.forEach((v,index)=>{
v.addEventListener('click',function(){

sound[index].pause();

v.classList.toggle('add');
});


});
}