Skip to content
Open
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
7 changes: 7 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ <h3 class="card__heading">Weather Website</h3>
<h3 class="card__heading">Portfolio</h3>
</div>
</a>
<a class="card" href="projects/Benzify/index.html">
<div class="card__background" style="background-image: url(projects/Benzify/images/music.jpg)"></div>
<div class="card__content">
<p class="card__category">Music</p>
<h3 class="card__heading">Benzify</h3>
</div>
</a>
<div>
</section>

Expand Down
Binary file added projects/Benzify/images/careless.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added projects/Benzify/images/grateful.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added projects/Benzify/images/landscape.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added projects/Benzify/images/music.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions projects/Benzify/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Mali:ital@1&display=swap" rel="stylesheet">
<title>Benzify</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<div class="main">
<div class="title"><h1>Welcome to Benzify</h1></div>
<div class="img">
<img src="images/grateful.jpg" id="img" alt="">
</div>
<audio id="audioPlayer" src="music/grateful.mp3"></audio>
<div class="controls">
<button class="pause" onclick="pauseMusic()"><h2>Pause</h2></button>
<button class="play" onclick="playMusic()"><h2>Play</h2></button>
<button class="next" onclick="nextMusic()"><h2>Next</h2></button>
</div>
</div>
<script src="script.js"></script>
</body>
</html>
Binary file added projects/Benzify/music/careless.mp3
Binary file not shown.
Binary file added projects/Benzify/music/grateful.mp3
Binary file not shown.
Binary file added projects/Benzify/music/landscape.mp3
Binary file not shown.
23 changes: 23 additions & 0 deletions projects/Benzify/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const audioPlayer = document.getElementById('audioPlayer');
const play = document.getElementsByClassName('play');
const pause = document.getElementsByClassName('pause');
const next = document.getElementsByClassName('next');
const img = document.getElementById('img');

const music = ["music/grateful","music/careless","music/landscape"]
const images = ["grateful.jpg","careless.jpg","landscape.jpeg"]
let i = 0;
let playMusic = () => {
audioPlayer.play();
}

let pauseMusic = () => {
audioPlayer.pause();
}

let nextMusic = () => {
audioPlayer.pause();
img.src = "images/" + images[++i%3] ;
audioPlayer.src = music[i%3] + ".mp3";
playMusic();
}
37 changes: 37 additions & 0 deletions projects/Benzify/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: blueviolet;
font-family: 'Mali';
}
.main {
text-align: center;
background-color: aliceblue;
padding: 50px;
}

.title {
font-size: 24px;
margin-bottom: 2rem;
}
button{
height: 150px;
width: 250px;
margin: 30px;
font-family: 'Mali';
}
.img{
margin: 100px;
}
img{
height: 500px;
}
h1{
font-size: 5rem;
}
h2{
font-size: 3rem;
}