diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..40b878d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+node_modules/
\ No newline at end of file
diff --git a/audioplayer/assets/maile.mp3 b/audioplayer/assets/maile.mp3
new file mode 100644
index 0000000..c16df20
Binary files /dev/null and b/audioplayer/assets/maile.mp3 differ
diff --git a/audioplayer/audioplayer.html b/audioplayer/audioplayer.html
new file mode 100644
index 0000000..1cf558f
--- /dev/null
+++ b/audioplayer/audioplayer.html
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+ Audio Player
+
+
+
+
+
+
+
+ Hi, this is audio or music player build using ismple html, css, and javascript
+ This is a simple audio player with the functinality of play, pause, next, and farward. Here i have used
+ custom timing, next, pause, play and back functionality.
+
+
+
+
+
+
+
+
+
+ Maile Covered by John Chamling Rai
+
+
+
+ 00:00
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/audioplayer/js/audioplayer.js b/audioplayer/js/audioplayer.js
new file mode 100644
index 0000000..3fef5ca
--- /dev/null
+++ b/audioplayer/js/audioplayer.js
@@ -0,0 +1,77 @@
+let audioPlayer = document.getElementById("audio-player")
+let progressBar = document.getElementById("progressBar")
+let timer = document.querySelector(".audio-player-wrapper__timer")
+let audioPlayerWrapper = document.querySelector(".audio-player-wrapper")
+
+// controls
+let playBtn = document.querySelector(".audio-player-wrapper__play")
+let skipPrev = document.querySelector(".audio-player-wrapper__skipPrev")
+let skipNext = document.querySelector(".audio-player-wrapper__nextSkip")
+
+document.addEventListener("DOMContentLoaded", () => {
+ // Update progress bar as the audio plays
+ audioPlayer.addEventListener("timeupdate", () => {
+ const progress = (audioPlayer.currentTime / audioPlayer.duration) * 100
+ progressBar.value = progress
+
+ // Calculate total time and current time
+ let totalSeconds = Math.floor(audioPlayer.duration || 0)
+ let minutes = Math.floor(totalSeconds / 60)
+ let seconds = totalSeconds % 60
+
+ let currentSeconds = Math.floor(audioPlayer.currentTime || 0)
+ let currentMinutes = Math.floor(currentSeconds / 60)
+ let currentDisplaySeconds = currentSeconds % 60
+
+ timer.innerHTML = `${currentMinutes
+ .toString()
+ .padStart(2, "0")}:${currentDisplaySeconds
+ .toString()
+ .padStart(2, "0")} / ${minutes}:${seconds.toString().padStart(2, "0")}`
+ })
+
+ // Play and pause functionality
+ playBtn.addEventListener("click", () => {
+ if (audioPlayer.paused) {
+ audioPlayer.play()
+ } else {
+ audioPlayer.pause()
+ }
+ })
+
+ // Update play/pause button icon
+ audioPlayer.addEventListener("play", () => {
+ playBtn.innerHTML = ` `
+ })
+
+ audioPlayer.addEventListener("pause", () => {
+ playBtn.innerHTML = ` `
+ })
+
+ // Skip functionality
+ skipPrev.addEventListener("click", () => {
+ audioPlayer.currentTime = Math.max(0, audioPlayer.currentTime - 10)
+ })
+
+ skipNext.addEventListener("click", () => {
+ audioPlayer.currentTime = Math.min(
+ audioPlayer.duration,
+ audioPlayer.currentTime + 10
+ )
+ })
+
+ // Dragging progress bar
+ progressBar.addEventListener("input", (e) => {
+ const newTime = (progressBar.value / 100) * audioPlayer.duration
+ audioPlayer.currentTime = newTime
+ })
+
+ // Update progress bar and handle drag
+ progressBar.addEventListener("mousedown", () => {
+ audioPlayer.pause() // Pause audio while dragging
+ })
+
+ progressBar.addEventListener("mouseup", () => {
+ audioPlayer.play() // Resume audio after dragging
+ })
+})
diff --git a/audioplayer/styles/audioplayer.css b/audioplayer/styles/audioplayer.css
new file mode 100644
index 0000000..96195d8
--- /dev/null
+++ b/audioplayer/styles/audioplayer.css
@@ -0,0 +1,110 @@
+@import url("https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");
+* {
+ margin: 0px;
+ padding: 0px;
+ box-sizing: border-box;
+ font-family: "Courier Prime", monospace;
+ font-weight: 400;
+ font-style: normal;
+}
+
+.audio-player-wrapper {
+ min-height: 100vh;
+ width: 100vw;
+ height: 100%;
+ padding-top: 50px;
+ padding-inline: 50px;
+ margin-bottom: 100px;
+ display: flex;
+ align-items: center;
+ flex-direction: column;
+ gap: 50px;
+}
+.audio-player-wrapper__heading {
+ text-align: center;
+ line-height: 40px;
+}
+.audio-player-wrapper__heading h1 {
+ font-size: 32px;
+}
+.audio-player-wrapper__heading p {
+ font-size: 20px;
+}
+.audio-player-wrapper__audio-wrapper {
+ border: 1px solid #c1d8c3;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: space-around;
+ gap: 20px;
+ height: 500px;
+ width: 400px;
+ border-radius: 10px;
+ padding: 0px 50px;
+ box-shadow: 0px 10px 15px -3px rgba(0, 0, 0, 0.1);
+}
+.audio-player-wrapper figure {
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ gap: 15px;
+}
+.audio-player-wrapper figure figcaption {
+ line-height: 30px;
+ text-transform: capitalize;
+}
+.audio-player-wrapper__image {
+ border: 1px solid orangered;
+ overflow: hidden;
+ height: 180px;
+ width: 180px;
+ border-radius: 100%;
+ filter: drop-shadow(0 0 1.5rem #94c0f3);
+ animation: circle 2s infinite alternate;
+}
+@keyframes circle {
+ 0% {
+ scale: 1;
+ }
+ 50% {
+ scale: 0.98;
+ }
+ 100% {
+ scale: 1;
+ }
+}
+.audio-player-wrapper__image img {
+ height: 100%;
+ width: 100%;
+ -o-object-fit: cover;
+ object-fit: cover;
+ -o-object-position: top;
+ object-position: top;
+}
+.audio-player-wrapper__controls {
+ display: flex;
+ justify-content: space-between;
+ padding-block: 20px;
+}
+.audio-player-wrapper__controls button {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 30px;
+ width: 30px;
+ border: none;
+ background: none;
+}
+.audio-player-wrapper__controls button svg {
+ height: 50px;
+ width: 50px;
+ fill: #0075ff;
+}
+
+#audio-player-wrapper__progressContainer {
+ width: 100%;
+}
+#audio-player-wrapper__progressContainer input[type=range] {
+ width: 100%;
+ height: 100%;
+}/*# sourceMappingURL=audioplayer.css.map */
\ No newline at end of file
diff --git a/audioplayer/styles/audioplayer.css.map b/audioplayer/styles/audioplayer.css.map
new file mode 100644
index 0000000..cf1b4e6
--- /dev/null
+++ b/audioplayer/styles/audioplayer.css.map
@@ -0,0 +1 @@
+{"version":3,"sources":["audioplayer.scss","audioplayer.css"],"names":[],"mappings":"AAAQ,oLAAA;AAER;EACE,WAAA;EACA,YAAA;EACA,sBAAA;EACA,uCAAA;EACA,gBAAA;EACA,kBAAA;ACAF;;ADGA;EACE,iBAAA;EACA,YAAA;EACA,YAAA;EACA,iBAAA;EACA,oBAAA;EACA,oBAAA;EAEA,aAAA;EACA,mBAAA;EACA,sBAAA;EACA,SAAA;ACDF;ADGE;EACE,kBAAA;EACA,iBAAA;ACDJ;ADEI;EACE,eAAA;ACAN;ADGI;EACE,eAAA;ACDN;ADKE;EACE,yBAAA;EACA,aAAA;EACA,sBAAA;EACA,mBAAA;EACA,6BAAA;EACA,SAAA;EACA,aAAA;EACA,YAAA;EACA,mBAAA;EACA,iBAAA;EACA,iDAAA;ACHJ;ADME;EACE,WAAA;EACA,aAAA;EACA,sBAAA;EACA,SAAA;ACJJ;ADMI;EACE,iBAAA;EACA,0BAAA;ACJN;ADQE;EACE,2BAAA;EACA,gBAAA;EACA,aAAA;EACA,YAAA;EACA,mBAAA;EACA,uCAAA;EACA,uCAAA;ACNJ;ADQI;EACE;IACE,QAAA;ECNN;EDQI;IACE,WAAA;ECNN;EDQI;IACE,QAAA;ECNN;AACF;ADSI;EACE,YAAA;EACA,WAAA;EACA,oBAAA;KAAA,iBAAA;EACA,uBAAA;KAAA,oBAAA;ACPN;ADWE;EACE,aAAA;EACA,8BAAA;EACA,mBAAA;ACTJ;ADWI;EACE,aAAA;EACA,uBAAA;EACA,mBAAA;EACA,YAAA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;ACTN;ADWM;EACE,YAAA;EACA,WAAA;EACA,aAAA;ACTR;;ADkBA;EACE,WAAA;ACfF;ADiBE;EACE,WAAA;EACA,YAAA;ACfJ","file":"audioplayer.css"}
\ No newline at end of file
diff --git a/audioplayer/styles/audioplayer.scss b/audioplayer/styles/audioplayer.scss
new file mode 100644
index 0000000..d5da5c1
--- /dev/null
+++ b/audioplayer/styles/audioplayer.scss
@@ -0,0 +1,125 @@
+@import url("https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");
+
+* {
+ margin: 0px;
+ padding: 0px;
+ box-sizing: border-box;
+ font-family: "Courier Prime", monospace;
+ font-weight: 400;
+ font-style: normal;
+}
+
+.audio-player-wrapper {
+ min-height: 100vh;
+ width: 100vw;
+ height: 100%;
+ padding-top: 50px;
+ padding-inline: 50px;
+ margin-bottom: 100px;
+
+ display: flex;
+ align-items: center;
+ flex-direction: column;
+ gap: 50px;
+
+ &__heading {
+ text-align: center;
+ line-height: 40px;
+ h1 {
+ font-size: 32px;
+ }
+
+ p {
+ font-size: 20px;
+ }
+ }
+
+ &__audio-wrapper {
+ border: 1px solid #c1d8c3;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: space-around;
+ gap: 20px;
+ height: 500px;
+ width: 400px;
+ border-radius: 10px;
+ padding: 0px 50px;
+ box-shadow: 0px 10px 15px -3px rgba(0, 0, 0, 0.1);
+ }
+
+ figure {
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ gap: 15px;
+
+ figcaption {
+ line-height: 30px;
+ text-transform: capitalize;
+ }
+ }
+
+ &__image {
+ border: 1px solid orangered;
+ overflow: hidden;
+ height: 180px;
+ width: 180px;
+ border-radius: 100%;
+ filter: drop-shadow(0 0 1.5rem #94c0f3);
+ animation: circle 2s infinite alternate;
+
+ @keyframes circle {
+ 0% {
+ scale: 1;
+ }
+ 50% {
+ scale: 0.98;
+ }
+ 100% {
+ scale: 1;
+ }
+ }
+
+ img {
+ height: 100%;
+ width: 100%;
+ object-fit: cover;
+ object-position: top;
+ }
+ }
+
+ &__controls {
+ display: flex;
+ justify-content: space-between;
+ padding-block: 20px;
+
+ button {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 30px;
+ width: 30px;
+ border: none;
+ background: none;
+
+ svg {
+ height: 50px;
+ width: 50px;
+ fill: #0075ff;
+ }
+ }
+ }
+
+ // &__timer {
+ // }
+}
+
+#audio-player-wrapper__progressContainer {
+ width: 100%;
+
+ input[type="range"] {
+ width: 100%;
+ height: 100%;
+ }
+}
diff --git a/day1/assignment1.js b/day1/assignment.js
similarity index 96%
rename from day1/assignment1.js
rename to day1/assignment.js
index 72a5cb1..9589b5b 100644
--- a/day1/assignment1.js
+++ b/day1/assignment.js
@@ -1,3 +1,4 @@
+let result = document.getElementsByClassName("result")
// Define Array and objects and console them with appropriate console tools.
// Defining an array
diff --git a/day1/assignment2.js b/day1/assignment2.js
index b9bf00f..0445c4d 100644
--- a/day1/assignment2.js
+++ b/day1/assignment2.js
@@ -11,5 +11,7 @@ let resultc = temperatureConversion(45, "c")
let resultf = temperatureConversion(90, "f")
// consoling the results
+console.log("Start of the consoles of question 2")
console.log(resultc)
console.log(resultf)
+console.log("End of the consoles of questions 2")
diff --git a/day1/assignment3.js b/day1/assignment3.js
index 2dfcf03..0f30bea 100644
--- a/day1/assignment3.js
+++ b/day1/assignment3.js
@@ -5,8 +5,8 @@
function percentageGrade(mark) {
let grade = mark
+ let percentage = (mark / 100) * 100
if (grade > 90) {
- let percentage = grade
console.log(`You received ${grade} and its ${percentage}% in overall.`)
}
diff --git a/day1/day1.html b/day1/day1.html
new file mode 100644
index 0000000..bfb31db
--- /dev/null
+++ b/day1/day1.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+ Day 1 Assignments
+
+
+
+ Question 1 to 5 Consoles.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/day2/day2.html b/day2/day2.html
new file mode 100644
index 0000000..5c4e567
--- /dev/null
+++ b/day2/day2.html
@@ -0,0 +1,153 @@
+
+
+
+
+
+
+ Day Assignments
+
+
+
+ Day2 - Assignment 1
+
+ function isEven(num) {
+ let evenNumbers = []
+ for (let i = 1; i <= num; i++) { if (i % 2==0) { evenNumbers.push(i) } } return evenNumbers } // calling function and
+ function returns an array of even numbers. so we to loop through it. var even=isEven(100) // printing the array of
+ even numbers. console.log(even) // consoling each even number using for each loop. even.forEach((e)=> {
+ console.log(e)
+ })
+
+
+ Day2 - Assignment 2
+
+ // Create an array. Remove 3 elements starting from index 4, and insert 5 new elements at that position using the
+ appropriate method.
+
+ let fruits = [
+ "orange",
+ "apple",
+ "mango",
+ "grapes",
+ "pineaples",
+ "watermelon",
+ "guava",
+ "kiwi",
+ "strawberry",
+ ]
+ // removing the three elements from the fruits array.
+ fruits.pop() //this remove n-1 element
+ fruits.pop() // this remove n-2 element
+ fruits.pop() // this remove n-3 element
+
+ // ===== note that is implementing below
+ // or we can use splice() to remove the element from an array.
+ console.table(fruits)
+
+ // adding the element from index 4
+
+ fruits.splice(4, 0, "newFruit1", "newFruit2", "newFruit3") //starting from index 4 and remove 0 element from the array.
+ console.table(fruits)
+
+
+ Day2 - Assignment 3
+ // Create an array.
+ // Remove first element
+ // Remove last element
+ // Add new element at the beginning
+ // Add a new element at the end
+ // Console log all the arrays along with the original modified array.
+
+ const sampleArray = [
+ "apple",
+ "banana",
+ "cherry",
+ "date",
+ "elderberry",
+ "fig",
+ "grape",
+ "honeydew",
+ "kiwi",
+ "lemon",
+ ]
+ console.log("original array")
+ console.table(sampleArray)
+
+ // removing the first element of the array
+ sampleArray.shift()
+ console.log("removing the first element")
+ console.log(sampleArray)
+
+ // removing the last element
+ sampleArray.pop()
+ console.log("removing the element from the last")
+ console.log(sampleArray)
+
+ // adding the new element add the beginning
+ sampleArray.unshift("guava")
+ console.log("adding new element at the beginning")
+ console.log(sampleArray)
+
+ //add new element at the end
+ sampleArray.push("lastelement")
+ console.log("adding new element at last")
+ console.log(sampleArray)
+
+ Day2 -Assignment 4
+
+ // Create a new array element.
+ // Create a new array with the multiplication of 5
+ // Create a new array finding the maximum number of new array (task number 4.a)
+ // Also list out the even numbers of both new and original array.
+
+ const arrayNumbers = [1, 2, 3, 4, 5, 20, 6, 7, 8, 9, 10, 40, 60, 90, 200]
+
+ // creating a new array that is multiple of 5
+ let newArrayNumbers = arrayNumbers.map((x) => x * 5)
+
+ // creating new array based on newArrayNumbers, finding the maximum number.
+
+ // ========= METHOD 1
+ let maxNumber = newArrayNumbers.reduce((acc, curr) => (acc > curr ? acc : curr))
+ let newMaxArray = []
+ newMaxArray.push(maxNumber)
+
+ // ======== METHOD 2
+ let max = 0
+ for (let i = 0; i < newArrayNumbers.length; i++) { if (max> newArrayNumbers[i]) {
+ max = max
+ } else {
+ max = newArrayNumbers[i]
+ }
+ }
+
+ // defining new array
+ let newMaxArray1 = []
+ newMaxArray1.push(max)
+ // Consoling the output
+ // original array
+ console.log("Original array: ")
+ console.log(arrayNumbers)
+
+ // multiple of five
+ console.log("Multiple of 5 array:")
+ console.log(newArrayNumbers)
+
+ // max array
+ console.log("Finding the max array element using reduce function")
+ console.log(newMaxArray)
+ // second method console
+ console.log("Finding the max array elemment using loop:")
+ console.log(newMaxArray1)
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/day5/assets/css/slider.css b/day5/assets/css/slider.css
new file mode 100644
index 0000000..24c765d
--- /dev/null
+++ b/day5/assets/css/slider.css
@@ -0,0 +1,55 @@
+* {
+ margin: 0px;
+ padding: 0px;
+ box-sizing: border-box;
+}
+
+.swiper {
+ width: 100%;
+ height: 400px;
+}
+
+.thumbs-swiper {
+ width: 100%;
+ height: 150px;
+ margin-bottom: 20px;
+ padding: 20px 30px;
+}
+
+.swiper-slide img {
+ width: 100%;
+ height: 100%;
+ -o-object-fit: cover;
+ object-fit: cover;
+ -o-object-position: center;
+ object-position: center;
+ overflow: hidden;
+}
+.swiper-slide img:hover {
+ cursor: pointer;
+}
+
+.thumbs-swiper .swiper-slide img {
+ border-radius: 10px;
+}
+
+@media screen and (min-width: 768px) {
+ .swiper {
+ height: 500px;
+ }
+ .thumbs-swiper {
+ height: 120px;
+ }
+}
+@media screen and (min-width: 1024px) {
+ .swiper,
+ .thumbs-swiper {
+ max-width: 1920px;
+ }
+ .swiper {
+ height: 760px;
+ }
+ .thumbs-swiper {
+ height: 200px;
+ }
+}/*# sourceMappingURL=slider.css.map */
\ No newline at end of file
diff --git a/day5/assets/css/slider.css.map b/day5/assets/css/slider.css.map
new file mode 100644
index 0000000..c6ee941
--- /dev/null
+++ b/day5/assets/css/slider.css.map
@@ -0,0 +1 @@
+{"version":3,"sources":["slider.scss","slider.css"],"names":[],"mappings":"AAAA;EACE,WAAA;EACA,YAAA;EACA,sBAAA;ACCF;;ADEA;EACE,WAAA;EACA,aAAA;ACCF;;ADEA;EACE,WAAA;EACA,aAAA;EACA,mBAAA;EACA,kBAAA;ACCF;;ADEA;EACE,WAAA;EACA,YAAA;EACA,oBAAA;KAAA,iBAAA;EACA,0BAAA;KAAA,uBAAA;EAEA,gBAAA;ACAF;ADEE;EACE,eAAA;ACAJ;;ADIA;EACE,mBAAA;ACDF;;ADIA;EACE;IACE,aAAA;ECDF;EDIA;IACE,aAAA;ECFF;AACF;ADKA;EACE;;IAEE,iBAAA;ECHF;EDMA;IACE,aAAA;ECJF;EDOA;IACE,aAAA;ECLF;AACF","file":"slider.css"}
\ No newline at end of file
diff --git a/day5/assets/css/slider.scss b/day5/assets/css/slider.scss
new file mode 100644
index 0000000..0082909
--- /dev/null
+++ b/day5/assets/css/slider.scss
@@ -0,0 +1,59 @@
+* {
+ margin: 0px;
+ padding: 0px;
+ box-sizing: border-box;
+}
+
+.swiper {
+ width: 100%;
+ height: 400px;
+}
+
+.thumbs-swiper {
+ width: 100%;
+ height: 150px;
+ margin-bottom: 20px;
+ padding: 20px 30px;
+}
+
+.swiper-slide img {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ object-position: center;
+
+ overflow: hidden;
+
+ &:hover {
+ cursor: pointer;
+ }
+}
+
+.thumbs-swiper .swiper-slide img {
+ border-radius: 10px;
+}
+
+@media screen and (min-width: 768px) {
+ .swiper {
+ height: 500px;
+ }
+
+ .thumbs-swiper {
+ height: 120px;
+ }
+}
+
+@media screen and (min-width: 1024px) {
+ .swiper,
+ .thumbs-swiper {
+ max-width: 1920px;
+ }
+
+ .swiper {
+ height: 760px;
+ }
+
+ .thumbs-swiper {
+ height: 200px;
+ }
+}
diff --git a/day5/assets/image1.jpg b/day5/assets/image1.jpg
new file mode 100644
index 0000000..c851391
Binary files /dev/null and b/day5/assets/image1.jpg differ
diff --git a/day5/assets/image2.jpg b/day5/assets/image2.jpg
new file mode 100644
index 0000000..3dc61b7
Binary files /dev/null and b/day5/assets/image2.jpg differ
diff --git a/day5/assets/image3.jpg b/day5/assets/image3.jpg
new file mode 100644
index 0000000..70ac4c1
Binary files /dev/null and b/day5/assets/image3.jpg differ
diff --git a/day5/assets/image4.jpg b/day5/assets/image4.jpg
new file mode 100644
index 0000000..6fa5bc8
Binary files /dev/null and b/day5/assets/image4.jpg differ
diff --git a/day5/assets/image5.jpg b/day5/assets/image5.jpg
new file mode 100644
index 0000000..68a4b6f
Binary files /dev/null and b/day5/assets/image5.jpg differ
diff --git a/day5/assets/image6.jpg b/day5/assets/image6.jpg
new file mode 100644
index 0000000..739faf5
Binary files /dev/null and b/day5/assets/image6.jpg differ
diff --git a/day5/assets/image7.jpg b/day5/assets/image7.jpg
new file mode 100644
index 0000000..739faf5
Binary files /dev/null and b/day5/assets/image7.jpg differ
diff --git a/day5/assets/image8.jpg b/day5/assets/image8.jpg
new file mode 100644
index 0000000..540d3e2
Binary files /dev/null and b/day5/assets/image8.jpg differ
diff --git a/day5/slider.html b/day5/slider.html
new file mode 100644
index 0000000..05b4f32
--- /dev/null
+++ b/day5/slider.html
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+ Slider using SwiperJS
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/day5/swiper.js b/day5/swiper.js
new file mode 100644
index 0000000..46906bc
--- /dev/null
+++ b/day5/swiper.js
@@ -0,0 +1,101 @@
+let swiperMain = document.querySelector(".main-swiper")
+let thumbSwiper = document.querySelector(".thumbs-swiper")
+
+let chessImages = [
+ "/javascript/day5/assets/image1.jpg",
+ "/javascript/day5/assets/image2.jpg",
+ "/javascript/day5/assets/image3.jpg",
+ "/javascript/day5/assets/image4.jpg",
+ "/javascript/day5/assets/image5.jpg",
+ "/javascript/day5/assets/image6.jpg",
+ "/javascript/day5/assets/image7.jpg",
+ "/javascript/day5/assets/image8.jpg",
+]
+
+// For main swiper
+if (swiperMain) {
+ chessImages.forEach((image) => {
+ // creating swiper-wrapper element.
+ let swiperWrapper = document.querySelector(".swiper-wrapper")
+ swiperWrapper.classList.add("swiper-wrapper")
+
+ // creating swiper-slide element.
+ let swiperSlide = document.createElement("div")
+ swiperSlide.classList.add("swiper-slide")
+
+ // creating img element.
+ let imageTag = document.createElement("img")
+ imageTag.src = image
+ imageTag.alt = image
+
+ // appending the childs.
+ swiperSlide.appendChild(imageTag)
+ swiperWrapper.appendChild(swiperSlide)
+ })
+} else {
+ console.log("swiper-main element is not found in the dom.")
+}
+
+// For thumbsSwiper
+
+if (thumbSwiper) {
+ chessImages.forEach((image) => {
+ // create swiper-slide element
+ let thumbSwiperSlide = document.createElement("div")
+ thumbSwiperSlide.classList.add("swiper-slide")
+
+ // create image
+ let thumbImage = document.createElement("img")
+ thumbImage.alt = image
+ thumbImage.src = image
+ thumbSwiperSlide.appendChild(thumbImage)
+ document.getElementById("swiper-wrapper").appendChild(thumbSwiperSlide)
+ })
+} else {
+ console.log("thumbs swiper dom is not loaded.")
+}
+
+// thumb swiper
+const thumbsSwiper = new Swiper(".thumbs-swiper", {
+ spaceBetween: 10,
+ slidesPerView: 8,
+ freeMode: true,
+ watchSlidesProgress: true,
+ loop: true,
+ autoplay: {
+ delay: 2000,
+ },
+ breakpoints: {
+ 768: {
+ slidesPerView: 6,
+ },
+ 400: {
+ slidesPerView: 4,
+ },
+ 200: {
+ slidesPerView: 2,
+ },
+ },
+})
+const mainSwiper = new Swiper(".main-swiper", {
+ spaceBetween: 10,
+ loop: true,
+ autoplay: {
+ delay: 2000,
+ },
+ navigation: {
+ nextEl: ".swiper-button-next",
+ prevEl: ".swiper-button-prev",
+ },
+ pagination: {
+ el: ".swiper-pagination",
+ clickable: true,
+ },
+ scrollbar: {
+ el: ".swiper-scrollbar",
+ draggable: true,
+ },
+ thumbs: {
+ swiper: thumbsSwiper,
+ },
+})
diff --git a/final/assets/announcement.png b/final/assets/announcement.png
new file mode 100644
index 0000000..58895d5
Binary files /dev/null and b/final/assets/announcement.png differ
diff --git a/final/assets/background.jpg b/final/assets/background.jpg
new file mode 100644
index 0000000..cf671c3
Binary files /dev/null and b/final/assets/background.jpg differ
diff --git a/final/assets/badge.png b/final/assets/badge.png
new file mode 100644
index 0000000..af2f4f0
Binary files /dev/null and b/final/assets/badge.png differ
diff --git a/final/assets/chess.png b/final/assets/chess.png
new file mode 100644
index 0000000..46758d8
Binary files /dev/null and b/final/assets/chess.png differ
diff --git a/final/assets/target.png b/final/assets/target.png
new file mode 100644
index 0000000..0af8ff3
Binary files /dev/null and b/final/assets/target.png differ
diff --git a/final/assets/team/team1.jpg b/final/assets/team/team1.jpg
new file mode 100644
index 0000000..2e5f004
Binary files /dev/null and b/final/assets/team/team1.jpg differ
diff --git a/final/assets/team/team2.jpg b/final/assets/team/team2.jpg
new file mode 100644
index 0000000..40de761
Binary files /dev/null and b/final/assets/team/team2.jpg differ
diff --git a/final/assets/team/team3.jpg b/final/assets/team/team3.jpg
new file mode 100644
index 0000000..5dad90c
Binary files /dev/null and b/final/assets/team/team3.jpg differ
diff --git a/final/assets/team/team4.jpg b/final/assets/team/team4.jpg
new file mode 100644
index 0000000..ad2e359
Binary files /dev/null and b/final/assets/team/team4.jpg differ
diff --git a/final/assets/trophy.png b/final/assets/trophy.png
new file mode 100644
index 0000000..17c6698
Binary files /dev/null and b/final/assets/trophy.png differ
diff --git a/final/index.html b/final/index.html
new file mode 100644
index 0000000..768314c
--- /dev/null
+++ b/final/index.html
@@ -0,0 +1,222 @@
+
+
+
+
+
+
+ JavaScript Final Assignment
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Sports. Week. Extravaganza.
+
+ 3 Teams.
+ 1 Category.
+ Endless Fun.
+
+
Discover the Teams
+
+
+
+
+
+
+
+
+
+ Featured Teams Members
+
+
+
+
+
+
+
+
Team Member 2
+
+
+
+
+
Team Member 3
+
+
+
+
+
Team Member 4
+
+
+
+
+
Team Member 1
+
+
+
+
+
Team Member 1
+
+
+
+
+
Team Member 1
+
+
+
+
+
Team Member 1
+
+
+
+
+
Team Member 1
+
+
+
+
+
+
+
+
+
+
+
+ Our Events Teams
+
+
+
+
+
+
+
+
Team 1
+
+
+
+
+
Team 1
+
+
+
+
+
Team 1
+
+
+
+
+
Team 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/final/js/bubble.js b/final/js/bubble.js
new file mode 100644
index 0000000..16f46f9
--- /dev/null
+++ b/final/js/bubble.js
@@ -0,0 +1,91 @@
+const canvas = document.getElementById("bubbleCanvas")
+const ctx = canvas.getContext("2d")
+
+canvas.width = window.innerWidth
+canvas.height =350
+
+// Bubble class for handling each bubble's properties
+class Bubble {
+ constructor(x, y, radius, speedX, speedY, color) {
+ this.x = x
+ this.y = y
+ this.radius = radius
+ this.speedX = speedX
+ this.speedY = speedY
+ this.color = color
+ }
+
+ // Update the bubble's position and handle collision
+ update(bubbles) {
+ this.x += this.speedX
+ this.y += this.speedY
+
+ // Check for collision with the left and right edges and reverse the direction
+ if (this.x + this.radius > canvas.width || this.x - this.radius < 0) {
+ this.speedX = -this.speedX // Reverse direction on collision with edges
+ }
+
+ // Check for collision with the top and bottom edges
+ if (this.y + this.radius > canvas.height || this.y - this.radius < 0) {
+ this.speedY = -this.speedY // Bounce vertically without resetting
+ }
+
+ // Check for collision with other bubbles
+ for (let i = 0; i < bubbles.length; i++) {
+ if (this === bubbles[i]) continue
+
+ let dx = this.x - bubbles[i].x
+ let dy = this.y - bubbles[i].y
+ let distance = Math.sqrt(dx * dx + dy * dy)
+
+ if (distance < this.radius + bubbles[i].radius) {
+ this.speedX = -this.speedX
+ this.speedY = -this.speedY
+ this.color = getRandomColor()
+ }
+ }
+ }
+
+ // Draw the bubble
+ draw() {
+ ctx.beginPath()
+ ctx.arc(this.x, this.y, this.radius, 0, Math.PI * 2)
+ ctx.fillStyle = this.color
+ ctx.fill()
+ ctx.closePath()
+ }
+}
+
+// Function to get random color
+function getRandomColor() {
+ const letters = "0123456789ABCDEF"
+ let color = "#"
+ for (let i = 0; i < 6; i++) {
+ color += letters[Math.floor(Math.random() * 16)]
+ }
+ return color
+}
+
+// Initialize bubbles
+let bubbles = []
+for (let i = 0; i < 6; i++) {
+ let radius = Math.random() * 30 + 10 // Bubble size between 10px and 40px
+ let x = Math.random() * canvas.width
+ let y = Math.random() * canvas.height
+ let speedX = (Math.random() - 0.5) * 3
+ let speedY = (Math.random() - 0.5) * 3
+ let color = getRandomColor()
+ bubbles.push(new Bubble(x, y, radius, speedX, speedY, color))
+}
+
+// Animation loop
+function animate() {
+ ctx.clearRect(0, 0, canvas.width, canvas.height)
+ for (let bubble of bubbles) {
+ bubble.update(bubbles)
+ bubble.draw()
+ }
+ requestAnimationFrame(animate)
+}
+
+animate()
diff --git a/final/js/gsap.js b/final/js/gsap.js
new file mode 100644
index 0000000..4e616bb
--- /dev/null
+++ b/final/js/gsap.js
@@ -0,0 +1,174 @@
+gsap.registerPlugin(ScrollTrigger)
+
+// gradient colors collection
+const gradients = [
+ "linear-gradient(90deg, #D3F1DF, #85A98F)",
+ "linear-gradient(180deg, #D3F1DF, #5A6C57)",
+ "linear-gradient(45deg, #D3F1DF, #525B44)",
+ "linear-gradient(135deg, #85A98F, #5A6C57)",
+ "linear-gradient(360deg, #85A98F, #525B44)",
+ "radial-gradient(circle, #D3F1DF, #5A6C57)",
+ "radial-gradient(ellipse, #85A98F, #525B44)",
+ "radial-gradient(circle at center, #5A6C57, #D3F1DF)",
+]
+
+// Popup Section
+
+let gradientIndex = 0
+
+function changeGradient() {
+ gradientIndex = (gradientIndex + 1) % gradients.length
+
+ gsap.to(".popup", {
+ background: gradients[gradientIndex],
+ duration: 1,
+ })
+
+ gsap.to("#navbar", {
+ background: gradients[gradientIndex],
+ duration: 0.5,
+ })
+}
+setInterval(changeGradient, 5000)
+
+const text = document.getElementById("popup")
+const textContent = text.textContent
+text.innerHTML = textContent
+ .split(" ")
+ .map((word) => {
+ const color = gsap.utils.random([
+ "#2C3E50",
+ "#4A4A4A",
+ "#4B6A52",
+ "#3E4E43",
+ "#333333",
+ "#2C3E47",
+ ])
+ return ``
+ })
+ .join("")
+
+gsap.from(".popup-word", {
+ opacity: 0,
+ y: 20,
+ duration: 1,
+ stagger: 0.5,
+ ease: "power1.out",
+ onComplete: () => {
+ document.querySelector(".container__navbar").scrollIntoView({
+ behavior: "smooth",
+ })
+
+ // Animate the navbar after scrolling
+ gsap.fromTo(".container__navbar", {
+ y: 0,
+ duration: 2,
+ ease: "power2.inOut",
+ })
+ },
+})
+// Popup Section End
+
+// Menu Open
+
+document.addEventListener("DOMContentLoaded", () => {
+ let menu = document.querySelector(".menu")
+ let navbar = document.querySelector(".navbar__list")
+ let close = document.querySelector(".close")
+ let tl = gsap.timeline()
+
+ tl.to(".navbar__list", {
+ right: 0,
+ duration: 1.5,
+ })
+
+ tl.from(".navbar__item", {
+ x: 100,
+ duration: 0.8,
+ stagger: 0.5,
+ opacity: 0,
+ })
+ tl.pause()
+
+ if (menu) {
+ menu.addEventListener("click", (e) => {
+ tl.play()
+ })
+ } else {
+ console.log("menu is not")
+ }
+
+ // for closing the menu bar
+
+ if (close) {
+ close.addEventListener("click", (e) => {
+ tl.reverse()
+ })
+ } else {
+ console.log("close is not loaded.")
+ }
+})
+
+// End of Menu Open
+
+// Leadspace section
+let leadspace__title = document.querySelector(".leadspace__title")
+leadspace__title.innerHTML = leadspace__title.textContent
+ .split(" ")
+ .map((word) => {
+ const color = gsap.utils.random([
+ "#2C3E50",
+ "#4A4A4A",
+ "#4B6A52",
+ "#3E4E43",
+ "#333333",
+ "#2C3E47",
+ ])
+ return `${word} `
+ })
+ .join(" ")
+
+gsap.from(".leadspace-title", {
+ opacity: 0,
+ duration: 3,
+ stagger: 0.5,
+ scrollTrigger: {
+ trigger: ".leadspace-title",
+ start: "100 90%",
+ end: "100 20%",
+ },
+})
+
+gsap.from(".leadspace__subtitle", {
+ x: -200,
+ opacity: 0,
+ duration: 3,
+ delay: 2,
+ stagger: 0.5,
+ scrollTrigger: {
+ trigger: ".leadspace__subtitle",
+ },
+})
+
+gsap.from(".leadspace__cta", {
+ opacity: 0,
+ duration: 3,
+ delay: 3,
+ x: -200,
+ scrollTrigger: {
+ trigger: ".leadspace__cta",
+ },
+})
+
+gsap.from(".trophy", {
+ opacity: 0,
+ x: 500,
+ duration: 4,
+ rotate: 360,
+ delay: 4,
+ scrollTrigger: {
+ trigger: ".trophy",
+ },
+})
+
+// End of leadspace section
diff --git a/final/js/slider.js b/final/js/slider.js
new file mode 100644
index 0000000..f858a32
--- /dev/null
+++ b/final/js/slider.js
@@ -0,0 +1,68 @@
+// For the progress bar
+window.addEventListener("scroll", function () {
+ const scrollHeight =
+ document.documentElement.scrollHeight - window.innerHeight
+ const scrollPosition = window.scrollY
+ const scrollPercent = (scrollPosition / scrollHeight) * 100
+
+ document.getElementById("progress-bar").style.width = scrollPercent + "%"
+})
+
+// end of progressbar.
+
+const swipers = document.querySelectorAll(".swiper")
+
+swipers.forEach((swiperContainer, index) => {
+ const paginationClass = `swiper-pagination-${index}`
+ const scrollbarClass = `swiper-scrollbar-${index}`
+ console.log(swipers)
+ console.log(swiperContainer)
+
+ // Add unique classes for each Swiper instance's pagination and scrollbar
+ const scrollbarEl = document.createElement("div")
+ scrollbarEl.className = `swiper-scrollbar ${scrollbarClass}`
+ swiperContainer.appendChild(scrollbarEl)
+
+ const paginationEl = document.createElement("div")
+ paginationEl.className = `swiper-pagination ${paginationClass}`
+ swiperContainer.appendChild(paginationEl)
+
+ // Initialize slider1
+ // if (typeof sliders !== "undefined") {
+ new Swiper(swiperContainer, {
+ loop: true,
+ spaceBetween: 30,
+ speed: 2000,
+ pauseOnMouseEnter: true,
+ effect: "fade",
+ fadeEffect: {
+ crossFade: true,
+ },
+ // coverflowEffect:
+ // sliders[index] !== 0
+ // ? {
+ // rotate: 50,
+ // stretch: 0,
+ // depth: 100,
+ // modifier: 1,
+ // slideShadows: true,
+ // }
+ // : undefined,
+ slidesPerView: "auto",
+ autoplay: {
+ delay: 2000,
+ disableOnInteraction: false,
+ },
+ pagination: {
+ el: `.${paginationClass}`,
+ clickable: true,
+ },
+ scrollbar: {
+ el: `.${scrollbarClass}`,
+ },
+ })
+
+ // Add event listeners for pausing autoplay on mouse enter and resume on mouse leave
+ swiperContainer.addEventListener("mouseenter", () => swiper.autoplay.stop())
+ swiperContainer.addEventListener("mouseleave", () => swiper.autoplay.start())
+})
diff --git a/index.html b/index.html
index 2caf4dc..307bfad 100644
--- a/index.html
+++ b/index.html
@@ -36,11 +36,7 @@ javascript Assignments
day 1
@@ -48,14 +44,11 @@ javascript Assignments
day 2
-
+