diff --git a/Photo Gallery/index.html b/Photo Gallery/index.html new file mode 100644 index 0000000..ca55ce9 --- /dev/null +++ b/Photo Gallery/index.html @@ -0,0 +1,35 @@ + + + + + + + Photo Gallery - BY NIDHI UPMAN + +
+

Photo Gallery - BY NIDHI UPMAN

+
+ +
+

Photo Gallery

+

Enter the number of photos

+ + Error Message + + +
+ +
+ \ No newline at end of file diff --git a/Photo Gallery/index.js b/Photo Gallery/index.js new file mode 100644 index 0000000..fe353ea --- /dev/null +++ b/Photo Gallery/index.js @@ -0,0 +1,48 @@ +const btnEl = document.getElementById("btn"); +const errorMessageEl = document.getElementById("errorMessage"); +const galleryEl = document.getElementById("gallery"); + +async function fetchImage() { + const inputValue = document.getElementById("input").value; + + if (inputValue > 10 || inputValue < 1) { + errorMessageEl.style.display = "block"; + errorMessageEl.innerText = "Number should be between 0 and 11"; + return; + } + + imgs = ""; + + try { + btnEl.style.display = "none"; + const loading = ``; + galleryEl.innerHTML = loading; + await fetch( + `https://api.unsplash.com/photos?per_page=${inputValue}&page=${Math.round( + Math.random() * 1000 + )}&client_id=B8S3zB8gCPVCvzpAhCRdfXg_aki8PZM_q5pAyzDUvlc` + ).then((res) => + res.json().then((data) => { + if (data) { + data.forEach((pic) => { + imgs += ` + image + `; + galleryEl.style.display = "block"; + galleryEl.innerHTML = imgs; + btnEl.style.display = "block"; + errorMessageEl.style.display = "none"; + }); + } + }) + ); + } catch (error) { + console.log(error); + errorMessageEl.style.display = "block"; + errorMessageEl.innerHTML = "An error happened, try again later"; + btnEl.style.display = "block"; + galleryEl.style.display = "none"; + } +} + +btnEl.addEventListener("click", fetchImage); \ No newline at end of file diff --git a/Photo Gallery/styles.css b/Photo Gallery/styles.css new file mode 100644 index 0000000..c4270f4 --- /dev/null +++ b/Photo Gallery/styles.css @@ -0,0 +1,75 @@ + +body{ + margin: 0; + font-family: 'Courier New', Courier, monospace; + background: linear-gradient(to bottom, lightgreen, lightblue); + display: flex; + min-height: 100vh; + justify-content: center; + align-items: center; + text-align: center; +} + +.container{ + background-color: aliceblue; + padding: 20px; + border-radius: 5px; + box-shadow: 0 10px 20px rgba(0,0,0,0.3); + width: 90%; + margin: 10px; + display: flex; + flex-direction: column; + text-align: center; + justify-content: center; + align-items: center; +} + +h2{ + font-weight: 400; +} + +.input{ + padding: 20px 10px; + font-size: 18px; + background-color: white; + border-radius: 5px; + text-align: center; + width: 100px; +} + +.errorMessage{ + color: red; + font-weight: 600; + margin: 10px; + display: none; +} + +.btn{ + text-transform: uppercase; + width: 250px; + height: 45px; + margin: 20px 0; + font-size: 18px; + border-radius: 5px; + background-color: black; + color: aliceblue; + +} + +.btn:hover{ + color: aliceblue; + background-color: green; + cursor: pointer; + transition: background-color 300ms ease-in-out; +} +.gallery img{ + width: 400px; + height: 250px; + object-fit: cover; + border-radius: 5px; + margin: 5px; +} + +.gallery{ + display: none; +} \ No newline at end of file diff --git a/animated-search-bar/index.html b/animated-search-bar/index.html new file mode 100644 index 0000000..55f0bdb --- /dev/null +++ b/animated-search-bar/index.html @@ -0,0 +1,35 @@ + + + + + + + Animated Search Bar - NIDHI UPMAN + + +
+
+
+

Animated Search Bar - NIDHI UPMAN

+
+
+
+
+ +
+ magnifier + + mic-icon +
+ +
+
+ diff --git a/animated-search-bar/index.js b/animated-search-bar/index.js new file mode 100644 index 0000000..037a29a --- /dev/null +++ b/animated-search-bar/index.js @@ -0,0 +1,7 @@ +const searchBarContainerEl = document.querySelector(".search-bar-container"); + +const magnifierEl = document.querySelector(".magnifier"); + +magnifierEl.addEventListener("click", () => { + searchBarContainerEl.classList.toggle("active"); +}); diff --git a/animated-search-bar/style.css b/animated-search-bar/style.css new file mode 100644 index 0000000..4fe3fbb --- /dev/null +++ b/animated-search-bar/style.css @@ -0,0 +1,61 @@ +body { + margin: 0; + display: flex; + justify-content: center; + height: 100vh; + align-items: center; + background-color: aliceblue; +} + +.search-bar-container { + display: flex; + align-items: center; + background-color: aliceblue; + padding: 5px; + width: 300px; + height: 50px; + border-radius: 50px; + box-shadow: 6px 6px 10px rgba(0, 0, 0, 0.2), + -6px -6px 10px rgba(255, 255, 255, 0.7); + margin: 10px; + position: relative; + transition: width 1.5s; +} + +.magnifier { + width: 25px; + cursor: pointer; + position: absolute; + left: 20px; +} + +.mic-icon { + width: 30px; + position: absolute; + right: 10px; + transition: width 0.4s; + transition-delay: 1s; +} + +.input { + background-color: transparent; + border: none; + margin: 10px 50px; + width: 100%; + outline: none; + color: rgb(100, 100, 100); + transition: width 1s; + transition-delay: 0.5s; +} + +.active.search-bar-container { + width: 50px; +} + +.active .input { + width: 0; +} + +.active .mic-icon { + width: 0; +} diff --git a/auto-text-effect-animation/index.html b/auto-text-effect-animation/index.html new file mode 100644 index 0000000..c6318fe --- /dev/null +++ b/auto-text-effect-animation/index.html @@ -0,0 +1,21 @@ + + + + + + + Auto Text Effect Animation - NIDHI UPMAN + +
+
+
+

Auto Text Effect Animation - NIDHI UPMAN

+
+
+ +


+ + +
+
+ diff --git a/auto-text-effect-animation/index.js b/auto-text-effect-animation/index.js new file mode 100644 index 0000000..9bd472c --- /dev/null +++ b/auto-text-effect-animation/index.js @@ -0,0 +1,28 @@ +const containerEl = document.querySelector(".container"); + +const careers = ["Software Developer", "Full Stack Web Developer", "Data Analyst", "Machine Learning Enginner"]; + +let careerIndex = 0; + +let characterIndex = 0; + +updateText(); + +function updateText() { + characterIndex++; + containerEl.innerHTML = ` +

I am ${careers[careerIndex].slice(0, 1) === "I" ? "an" : "a"} ${careers[ + careerIndex + ].slice(0, characterIndex)}

+ `; + + if (characterIndex === careers[careerIndex].length) { + careerIndex++; + characterIndex = 0; + } + + if (careerIndex === careers.length) { + careerIndex = 0; + } + setTimeout(updateText, 400); +} diff --git a/auto-text-effect-animation/style.css b/auto-text-effect-animation/style.css new file mode 100644 index 0000000..9d92f01 --- /dev/null +++ b/auto-text-effect-animation/style.css @@ -0,0 +1,11 @@ +@import url("https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap"); + +body { + margin: 0; + display: flex; + justify-content: center; + height: 100vh; + align-items: center; + background-color: salmon; + font-family: "Permanent Marker", cursive; +} diff --git a/background-image-scroll-effect/bg.jpg b/background-image-scroll-effect/bg.jpg new file mode 100644 index 0000000..1f37846 Binary files /dev/null and b/background-image-scroll-effect/bg.jpg differ diff --git a/background-image-scroll-effect/index.html b/background-image-scroll-effect/index.html new file mode 100644 index 0000000..4b265f8 --- /dev/null +++ b/background-image-scroll-effect/index.html @@ -0,0 +1,49 @@ + + + + + + + Background Image Scroll Effect - BY NIDHI UPMAN + + +
+
+

Background Image Scroll Effect - BY NIDHI UPMAN

+
+
+ +
+
+

Welcome to our website

+

+

About Me

+

+

+ Hi, I'm Nidhi Upman! +

+

+ I've graduated in Computer Science and Engineering . +

+

+ I'm passionate about software engineering, + +front-end development, full-stack development, and data analysis. I also have a bit of knowledge in machine learning. +

+

+ I'm currently seeking job opportunities where I can leverage my technical skills, strong communication abilities, and + +collaborative mindset. I thrive in dynamic, fast-paced environments and am eager to make a positive impact in software + +engineering. +

+

+ If you're looking for a dedicated and enthusiastic professional, let's connect! Reach out and let's create + +something amazing together. +

+
+ +
+
+ diff --git a/background-image-scroll-effect/index.js b/background-image-scroll-effect/index.js new file mode 100644 index 0000000..fe43f76 --- /dev/null +++ b/background-image-scroll-effect/index.js @@ -0,0 +1,10 @@ +const bgImageEl = document.getElementById("bg-image"); + +window.addEventListener("scroll", () => { + updateImage(); +}); + +function updateImage() { + bgImageEl.style.opacity = 1 - window.pageYOffset / 900; + bgImageEl.style.backgroundSize = 160 - window.pageYOffset / 12 + "%"; +} diff --git a/background-image-scroll-effect/style.css b/background-image-scroll-effect/style.css new file mode 100644 index 0000000..a272959 --- /dev/null +++ b/background-image-scroll-effect/style.css @@ -0,0 +1,30 @@ +body { + margin: 0; + font-family: sans-serif; +} + +.bg-image { + width: 100%; + height: 100vh; + background: url("https://images.unsplash.com/photo-1540206395-68808572332f?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=626&q=80"); + background-position: center; + background-attachment: fixed; + background-size: 160%; +} + +.container { + padding: 100px; +} + +h1 { + font-size: 50px; +} +p { + color: grey; +} + +@media (max-width: 500px) { + .container { + padding: 10px; + } +} diff --git a/background-video/background-video.mp4 b/background-video/background-video.mp4 new file mode 100644 index 0000000..d88abb5 Binary files /dev/null and b/background-video/background-video.mp4 differ diff --git a/background-video/index.html b/background-video/index.html new file mode 100644 index 0000000..5b684e5 --- /dev/null +++ b/background-video/index.html @@ -0,0 +1,39 @@ + + + + + + + Background Video - NIDHI UPMAN + + + + +
+
+

Background Video - BY NIDHI UPMAN

+
+
+ +
+ preloader +
+
+ +

+ Hi, I'm Nidhi Upman! I've graduated in Computer Science and Engineering and I'm passionate about software engineering, + front-end development, full-stack development, and data analysis. I also have a bit of knowledge in machine learning. + I'm currently seeking job opportunities where I can leverage my technical skills, strong communication abilities, and + collaborative mindset. I thrive in dynamic, fast-paced environments and am eager to make a positive impact in software + engineering. If you're looking for a dedicated and enthusiastic professional, let's connect! Reach out and let's create + something amazing together. +

+ + +
+ +
+
+ \ No newline at end of file diff --git a/background-video/index.js b/background-video/index.js new file mode 100644 index 0000000..efe7a85 --- /dev/null +++ b/background-video/index.js @@ -0,0 +1,22 @@ +const btn = document.querySelector(".btn"); +const video = document.querySelector(".background-video"); +const fa = document.querySelector(".fa"); +const preloader = document.querySelector(".preloader"); + +btn.addEventListener("click", () => { + if (btn.classList.contains("pause")) { + btn.classList.remove("pause"); + video.play(); + fa.classList.add("fa-pause"); + fa.classList.remove("fa-play"); + } else { + btn.classList.add("pause"); + video.pause(); + fa.classList.remove("fa-pause"); + fa.classList.add("fa-play"); + } +}); + +window.addEventListener("load", () => { + preloader.style.zIndex = "-999"; +}); diff --git a/background-video/preloader.gif b/background-video/preloader.gif new file mode 100644 index 0000000..a5f65cc Binary files /dev/null and b/background-video/preloader.gif differ diff --git a/background-video/styles.css b/background-video/styles.css new file mode 100644 index 0000000..d4bb684 --- /dev/null +++ b/background-video/styles.css @@ -0,0 +1,43 @@ +body { + margin: 0; + padding: 0; + font-family: sans-serif; +} + +h1 { + font-size: 2.5rem; + color: white; + letter-spacing: 0.277em; + font-weight: 300; +} + +.background-video { + position: absolute; + top: 0; + left: 0; + z-index: -1; + width: 100%; + height: 100%; + object-fit: cover; + filter: brightness(30%); +} + +header { + min-height: 100vh; + display: grid; + place-items: center; +} + +.preloader { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: white; + display: grid; + justify-content: center; + align-items: center; + z-index: 999; + transition: 0.1s linear; +} diff --git a/blurred-background-popup/index.html b/blurred-background-popup/index.html new file mode 100644 index 0000000..5c1140e --- /dev/null +++ b/blurred-background-popup/index.html @@ -0,0 +1,45 @@ + + + + + + + Blurred Background Popup - BY NIDHI UPMAN + + + +
+
+

Blurred Background Popup - BY NIDHI UPMAN

+
+
+ +
+

Welcome to our website

+ +
+ + + +
+
+ diff --git a/blurred-background-popup/index.js b/blurred-background-popup/index.js new file mode 100644 index 0000000..0952c09 --- /dev/null +++ b/blurred-background-popup/index.js @@ -0,0 +1,17 @@ +const containerEl = document.querySelector(".container"); + +const btnEl = document.querySelector(".btn"); + +const popupContainerEl = document.querySelector(".popup-container"); + +const closeIconEl = document.querySelector(".close-icon"); + +btnEl.addEventListener("click", () => { + containerEl.classList.add("active"); + popupContainerEl.classList.remove("active"); +}); + +closeIconEl.addEventListener("click", () => { + containerEl.classList.remove("active"); + popupContainerEl.classList.add("active"); +}); diff --git a/blurred-background-popup/style.css b/blurred-background-popup/style.css new file mode 100644 index 0000000..40ddad1 --- /dev/null +++ b/blurred-background-popup/style.css @@ -0,0 +1,108 @@ +body { + margin: 0; +} + +.container { + display: flex; + flex-direction: column; + align-items: center; + height: 100vh; + justify-content: center; + background: url("https://images.unsplash.com/photo-1560762484-813fc97650a0?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1074&q=80"); + background-size: cover; + text-align: center; + transition: filter 0.7s; +} + +h1 { + font-size: 60px; + color: white; + font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; + letter-spacing: 4px; + text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); +} + +.btn { + padding: 10px 20px; + width: 200px; + cursor: pointer; + background-color: orangered; + border: none; + border-radius: 5px; + font-size: 20px; +} + +.btn:hover { + filter: brightness(0.8); +} + +.active.container { + filter: blur(5px) brightness(0.7); +} + +.popup-container { + position: fixed; + left: 50%; + transform: translateX(-50%); + background-color: white; + width: 400px; + height: 200px; + top: 30%; + display: flex; + flex-direction: column; + padding: 20px; + background: url("https://images.unsplash.com/uploads/141103282695035fa1380/95cdfeef?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1730&q=80"); + background-size: cover; + border-radius: 10px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); + opacity: 1; + transition: all 0.7s; +} + +h4 { + font-size: 30px; + margin: 10px 0; + font-family: sans-serif; + color: blueviolet; +} + +label { + color: blueviolet; + font-family: sans-serif; +} + +.popup-btn { + background-color: orangered; + padding: 10px; + font-size: 20px; + cursor: pointer; + border: 2px solid; +} + +.input { + border: 2px solid; + padding: 10px; + margin: 10px 0; + font-size: 20px; + text-align: center; +} + +.input::placeholder { + color: lightgray; +} + +.close-icon { + position: absolute; + right: 20px; + cursor: pointer; +} + +.close-icon:hover { + color: orangered; +} + +.active.popup-container { + visibility: hidden; + opacity: 0; + top: 10%; +} diff --git a/button-ripple-effect/index.html b/button-ripple-effect/index.html new file mode 100644 index 0000000..ebd9f76 --- /dev/null +++ b/button-ripple-effect/index.html @@ -0,0 +1,20 @@ + + + + + + + Button Ripple Effect - NIDHI UPMAN + + +
+
+

Button Ripple Effect - NIDHI UPMAN

+
+








+
+ Button + +
+
+ diff --git a/button-ripple-effect/index.js b/button-ripple-effect/index.js new file mode 100644 index 0000000..69ab30a --- /dev/null +++ b/button-ripple-effect/index.js @@ -0,0 +1,9 @@ +const btnEl = document.querySelector(".btn"); + +btnEl.addEventListener("mouseover", (event) => { + const x = event.pageX - btnEl.offsetLeft; + const y = event.pageY - btnEl.offsetTop; + + btnEl.style.setProperty("--xPos", x + "px"); + btnEl.style.setProperty("--yPos", y + "px"); +}); diff --git a/button-ripple-effect/style.css b/button-ripple-effect/style.css new file mode 100644 index 0000000..4089395 --- /dev/null +++ b/button-ripple-effect/style.css @@ -0,0 +1,43 @@ +body { + margin: 0; + display: flex; + justify-content: center; + height: 100vh; + align-items: center; + background-color: aliceblue; + font-family: sans-serif; +} + +.btn { + background-color: pink; + padding: 20px 40px; + border-radius: 5px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); + text-decoration: none; + color: black; + position: relative; + overflow: hidden; +} + +.btn span { + position: relative; + z-index: 1; +} + +.btn::before { + content: ""; + position: absolute; + background-color: orangered; + width: 0; + height: 0; + left: var(--xPos); + top: var(--yPos); + transform: translate(-50%, -50%); + border-radius: 50%; + transition: width 0.5s, height 0.5s; +} + +.btn:hover::before { + width: 300px; + height: 300px; +} diff --git a/dice-roll-simulator/index.html b/dice-roll-simulator/index.html new file mode 100644 index 0000000..fe92c36 --- /dev/null +++ b/dice-roll-simulator/index.html @@ -0,0 +1,22 @@ + + + + + + + Dice Roll Simulator - BY NIDHI UPMAN + + + + +

Dice Roll Simulator

+

BY NIDHI UPMAN

+
+ + + + + diff --git a/dice-roll-simulator/index.js b/dice-roll-simulator/index.js new file mode 100644 index 0000000..8deecde --- /dev/null +++ b/dice-roll-simulator/index.js @@ -0,0 +1,53 @@ +const buttonEl = document.getElementById("roll-button"); + +const diceEl = document.getElementById("dice"); + +const rollHistoryEl = document.getElementById("roll-history"); + +let historyList = []; + +function rollDice() { + const rollResult = Math.floor(Math.random() * 6) + 1; + const diceFace = getDiceFace(rollResult); + diceEl.innerHTML = diceFace; + historyList.push(rollResult); + updateRollHistory(); +} + +function updateRollHistory() { + rollHistoryEl.innerHTML = ""; + for (let i = 0; i < historyList.length; i++) { + const listItem = document.createElement("li"); + listItem.innerHTML = `Roll ${i + 1}: ${getDiceFace( + historyList[i] + )}`; + rollHistoryEl.appendChild(listItem); + } +} + +function getDiceFace(rollResult) { + switch (rollResult) { + case 1: + return "⚀"; + case 2: + return "⚁"; + case 3: + return "⚂"; + case 4: + return "⚃"; + case 5: + return "⚄"; + case 6: + return "⚅"; + default: + return ""; + } +} + +buttonEl.addEventListener("click", () => { + diceEl.classList.add("roll-animation"); + setTimeout(() => { + diceEl.classList.remove("roll-animation"); + rollDice(); + }, 1000); +}); diff --git a/dice-roll-simulator/style.css b/dice-roll-simulator/style.css new file mode 100644 index 0000000..439ab24 --- /dev/null +++ b/dice-roll-simulator/style.css @@ -0,0 +1,70 @@ +body { + font-family: "Open Sans", sans-serif; + text-align: center; + margin: 0; +} + +h1 { + font-size: 3rem; + margin-top: 2rem; +} + +.dice { + font-size: 7rem; + margin: 5px; + animation-duration: 1s; + animation-fill-mode: forwards; +} + +.roll-animation { + animation-name: roll; +} + +@keyframes roll { + 0% { + transform: rotateY(0deg) rotateX(0deg); + } + + 100% { + transform: rotateY(720deg) rotateX(720deg); + } +} + +button { + background-color: #47a5c4; + color: white; + font-size: 1.5rem; + padding: 1rem 2rem; + border: none; + border-radius: 1rem; + cursor: pointer; + transition: background-color 0.3s ease; +} + +button:hover { + background-color: #2e8baf; +} + +ul { + list-style: none; + padding: 0; + max-width: 600px; + margin: 2rem auto; +} + +li { + font-size: 1.5rem; + padding: 0.5rem; + margin: 0.5rem; + background-color: #f2f2f2; + border-radius: 0.5rem; + box-shadow: 0 2px 2px rgba(0, 0, 0, 0.3); + display: flex; + justify-content: space-between; + align-items: center; +} + +li span { + font-size: 3rem; + margin-right: 1rem; +} diff --git a/double-landing-page/index.html b/double-landing-page/index.html new file mode 100644 index 0000000..0752029 --- /dev/null +++ b/double-landing-page/index.html @@ -0,0 +1,28 @@ + + + + + + + Double Landing Page - NIDHI UPMAN + + +
+
+

Double Landing Page - NIDHI UPMAN

+
+
+ +
+
+

Apple

+ +
+
+

Samsung

+ +
+
+ + + diff --git a/double-landing-page/index.js b/double-landing-page/index.js new file mode 100644 index 0000000..67a4c73 --- /dev/null +++ b/double-landing-page/index.js @@ -0,0 +1,20 @@ +const containerEl = document.querySelector(".container"); + +const leftEl = document.querySelector(".left"); +const rightEl = document.querySelector(".right"); + +leftEl.addEventListener("mouseenter", () => { + containerEl.classList.add("active-left"); +}); + +leftEl.addEventListener("mouseleave", () => { + containerEl.classList.remove("active-left"); +}); + +rightEl.addEventListener("mouseenter", () => { + containerEl.classList.add("active-right"); +}); + +rightEl.addEventListener("mouseleave", () => { + containerEl.classList.remove("active-right"); +}); diff --git a/double-landing-page/style.css b/double-landing-page/style.css new file mode 100644 index 0000000..0d37d66 --- /dev/null +++ b/double-landing-page/style.css @@ -0,0 +1,76 @@ +body { + margin: 0; + display: flex; + justify-content: center; + height: 100vh; + align-items: center; + text-align: center; + font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; +} + +h1 { + font-size: 100px; + color: aliceblue; + background-color: rgba(0, 0, 0, 0.3); + letter-spacing: 4px; +} + +.btn { + background-color: black; + color: white; + padding: 20px 40px; + font-size: 25px; + border: 4px solid; + cursor: pointer; + transition: 1s background-color; + white-space: nowrap; +} + +.btn:hover { + background-color: white; + color: black; +} + +.split { + width: 50%; + height: 100%; + top: 0; + overflow: hidden; +} + +.split.left { + position: absolute; + left: 0; + background-color: pink; + background-image: url("https://store.storeimages.cdn-apple.com/4982/as-images.apple.com/is/iphone-13-pro-family-hero?wid=940&hei=1112&fmt=png-alpha&.v=1631220221000"); + background-size: cover; +} + +.split.right { + position: absolute; + right: 0; + background-color: lightblue; + background-image: url("https://pisces.bbystatic.com/image2/BestBuy_US/images/products/6465/6465022_sd.jpg;maxHeight=640;maxWidth=550"); + background-size: cover; +} + +.active-left .left { + width: 75%; +} + +.active-left .right { + width: 25%; +} + +.active-right .left { + width: 25%; +} + +.active-right .right { + width: 75%; +} + +.left, +.right { + transition: width 2s ease-in-out; +} diff --git a/drum-kits/images/crash.png b/drum-kits/images/crash.png new file mode 100644 index 0000000..a992fa0 Binary files /dev/null and b/drum-kits/images/crash.png differ diff --git a/drum-kits/images/kick.png b/drum-kits/images/kick.png new file mode 100644 index 0000000..b64877e Binary files /dev/null and b/drum-kits/images/kick.png differ diff --git a/drum-kits/images/snare.png b/drum-kits/images/snare.png new file mode 100644 index 0000000..1e089ba Binary files /dev/null and b/drum-kits/images/snare.png differ diff --git a/drum-kits/images/tom.png b/drum-kits/images/tom.png new file mode 100644 index 0000000..855b211 Binary files /dev/null and b/drum-kits/images/tom.png differ diff --git a/drum-kits/index.html b/drum-kits/index.html new file mode 100644 index 0000000..36c4392 --- /dev/null +++ b/drum-kits/index.html @@ -0,0 +1,27 @@ + + + + + + + Drum Kits - BY NIDHI UPMAN + + + +
+
+

Drum Kits - BY NIDHI UPMAN

+
+
+ +

Drum Kits

+
+ + + diff --git a/drum-kits/index.js b/drum-kits/index.js new file mode 100644 index 0000000..9cbb6e8 --- /dev/null +++ b/drum-kits/index.js @@ -0,0 +1,26 @@ +const kits = ["crash", "kick", "snare", "tom"]; + +const containerEl = document.querySelector(".container"); + +kits.forEach((kit) => { + const btnEl = document.createElement("button"); + btnEl.classList.add("btn"); + btnEl.innerText = kit; + btnEl.style.backgroundImage = "url(images/" + kit + ".png)"; + containerEl.appendChild(btnEl); + const audioEl = document.createElement("audio"); + audioEl.src = "sounds/" + kit + ".mp3"; + containerEl.appendChild(audioEl); + btnEl.addEventListener("click", () => { + audioEl.play(); + }); + window.addEventListener("keydown", (event) => { + if (event.key === kit.slice(0, 1)) { + audioEl.play(); + btnEl.style.transform = "scale(.9)"; + setTimeout(() => { + btnEl.style.transform = "scale(1)"; + }, 100); + } + }); +}); diff --git a/drum-kits/sounds/crash.mp3 b/drum-kits/sounds/crash.mp3 new file mode 100644 index 0000000..d568062 Binary files /dev/null and b/drum-kits/sounds/crash.mp3 differ diff --git a/drum-kits/sounds/kick.mp3 b/drum-kits/sounds/kick.mp3 new file mode 100644 index 0000000..faf06c6 Binary files /dev/null and b/drum-kits/sounds/kick.mp3 differ diff --git a/drum-kits/sounds/snare.mp3 b/drum-kits/sounds/snare.mp3 new file mode 100644 index 0000000..e7cf5b8 Binary files /dev/null and b/drum-kits/sounds/snare.mp3 differ diff --git a/drum-kits/sounds/tom.mp3 b/drum-kits/sounds/tom.mp3 new file mode 100644 index 0000000..7dc3003 Binary files /dev/null and b/drum-kits/sounds/tom.mp3 differ diff --git a/drum-kits/style.css b/drum-kits/style.css new file mode 100644 index 0000000..a687ed4 --- /dev/null +++ b/drum-kits/style.css @@ -0,0 +1,48 @@ +body { + margin: 0; + display: flex; + flex-direction: column; + align-items: center; + height: 100vh; + justify-content: center; + background-color: pink; +} + +h1 { + font-size: 50px; + font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; + letter-spacing: 4px; + color: white; + text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); + white-space: nowrap; +} + +.container { + text-align: center; +} + +.btn { + padding: 30px 50px; + background-color: white; + border: none; + margin: 10px; + font-size: 30px; + min-width: 200px; + border-radius: 10px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); + background-image: url("images/tom.png"); + background-size: cover; + color: white; + font-family: cursive; + text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); + cursor: pointer; + text-transform: capitalize; +} + +.btn:hover { + color: pink; +} + +.btn:active { + background-size: 105%; +} diff --git a/emoji-rating/index.html b/emoji-rating/index.html new file mode 100644 index 0000000..db5261b --- /dev/null +++ b/emoji-rating/index.html @@ -0,0 +1,41 @@ + + + + + + + Emoji Rating - NIDHI UPMAN + + + +
+
+

Emoji Rating - NIDHI UPMAN

+
+
+ +
+
+ + + + + +
+
+ + + + + +
+
+ +
+ diff --git a/emoji-rating/index.js b/emoji-rating/index.js new file mode 100644 index 0000000..f11e228 --- /dev/null +++ b/emoji-rating/index.js @@ -0,0 +1,26 @@ +const starsEl = document.querySelectorAll(".fa-star"); +const emojisEl = document.querySelectorAll(".far"); +const colorsArray = ["red", "orange", "lightblue", "lightgreen", "green"]; + +updateRating(0); + +starsEl.forEach((starEl, index) => { + starEl.addEventListener("click", () => { + updateRating(index); + }); +}); + +function updateRating(index) { + starsEl.forEach((starEl, idx) => { + if (idx < index + 1) { + starEl.classList.add("active"); + } else { + starEl.classList.remove("active"); + } + }); + + emojisEl.forEach((emojiEl) => { + emojiEl.style.transform = `translateX(-${index * 50}px)`; + emojiEl.style.color = colorsArray[index]; + }); +} diff --git a/emoji-rating/style.css b/emoji-rating/style.css new file mode 100644 index 0000000..9100237 --- /dev/null +++ b/emoji-rating/style.css @@ -0,0 +1,51 @@ +body { + margin: 0; + display: flex; + justify-content: center; + height: 100vh; + align-items: center; + background-color: yellow; +} + +.feedback-container { + background-color: white; + width: 400px; + height: 200px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); + border-radius: 10px; + position: relative; +} + +.emoji-container { + position: absolute; + left: 50%; + transform: translateX(-50%); + top: 20%; + width: 50px; + height: 50px; + border-radius: 50%; + display: flex; + overflow: hidden; +} + +.far { + margin: 1px; + transform: translateX(0); + transition: transform 0.2s; +} + +.rating-container { + position: absolute; + left: 50%; + transform: translateX(-50%); + bottom: 20%; +} + +.fa-star { + color: lightgray; + cursor: pointer; +} + +.fa-star.active { + color: gold; +} diff --git a/feedback-ui/index.html b/feedback-ui/index.html new file mode 100644 index 0000000..2213596 --- /dev/null +++ b/feedback-ui/index.html @@ -0,0 +1,36 @@ + + + + + + + Feedback UI - NIDHI UPMAN + + +
+
+

Feedback UI - NIDHI UPMAN

+
+
+ +
+

Feedback UI

+
+
+ + Unhappy +
+
+ + Neutral +
+
+ + Satisfied +
+
+ +
+ +
+ diff --git a/feedback-ui/index.js b/feedback-ui/index.js new file mode 100644 index 0000000..5bf81a0 --- /dev/null +++ b/feedback-ui/index.js @@ -0,0 +1,34 @@ +const ratingEls = document.querySelectorAll(".rating"); +const btnEl = document.getElementById("btn"); + +const containerEl = document.getElementById("container"); + +let selectedRating = ""; + +ratingEls.forEach((ratingEl) => { + ratingEl.addEventListener("click", (event) => { + removeActive(); + selectedRating = + event.target.innerText || event.target.parentNode.innerText; + event.target.classList.add("active"); + event.target.parentNode.classList.add("active"); + }); +}); + +btnEl.addEventListener("click", () => { + if (selectedRating !== "") { + containerEl.innerHTML = ` + Thank you! +
+
+ Feedback: ${selectedRating} +

We'll use your feedback to improve our customer support.

+ `; + } +}); + +function removeActive() { + ratingEls.forEach((ratingEl) => { + ratingEl.classList.remove("active"); + }); +} diff --git a/feedback-ui/style.css b/feedback-ui/style.css new file mode 100644 index 0000000..7e1c812 --- /dev/null +++ b/feedback-ui/style.css @@ -0,0 +1,70 @@ +body { + margin: 0; + background-color: lightcyan; + color: darkgreen; + display: flex; + min-height: 100vh; + justify-content: center; + align-items: center; + font-family: monospace; +} + +.container { + background: rgba(255, 255, 255, 0.3); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3); + border-radius: 10px; + padding: 20px; + width: 85%; + max-width: 400px; + text-align: center; + font-size: 20px; +} + +.heading { + margin: 5px; + font-size: 30px; +} + +.ratings-container { + display: flex; + padding: 20px 0; +} + +.rating { + cursor: pointer; + padding: 10px; + margin: 10px 5px; +} + +.rating:hover, +.rating.active +{ + background: darkseagreen; + border-radius: 10px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); + color: aliceblue; + transition: all 300ms ease; +} + +.btn { + background-color: darkcyan; + color: aliceblue; + border: 0; + margin: 10px; + border-radius: 4px; + padding: 12px 30px; + cursor: pointer; +} + +.btn:hover { + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3); + transition: all 300ms ease; +} + +.btn:active { + transform: scale(0.96); +} + +.rating img { + width: 40px; +} diff --git a/loading-bar/index.html b/loading-bar/index.html new file mode 100644 index 0000000..3eb5cb7 --- /dev/null +++ b/loading-bar/index.html @@ -0,0 +1,24 @@ + + + + + + + Loading Bar - BY NIDHI UPMAN + + +
+
+

Loading Bar - BY NIDHI UPMAN

+
+
+ +
+

Loading

+
0%
+
+
+
+ +
+ diff --git a/loading-bar/index.js b/loading-bar/index.js new file mode 100644 index 0000000..7fb1555 --- /dev/null +++ b/loading-bar/index.js @@ -0,0 +1,16 @@ +const counterEl = document.querySelector(".counter"); + +const barEl = document.querySelector(".loading-bar-front"); + +let idx = 0; + +updateNum(); + +function updateNum() { + counterEl.innerText = idx + "%"; + barEl.style.width = idx + "%"; + idx++; + if (idx < 101) { + setTimeout(updateNum, 20); + } +} diff --git a/loading-bar/style.css b/loading-bar/style.css new file mode 100644 index 0000000..80d3266 --- /dev/null +++ b/loading-bar/style.css @@ -0,0 +1,38 @@ +body { + margin: 0; + display: flex; + justify-content: center; + height: 100vh; + align-items: center; + background-color: black; + color: lightgray; + font-family: cursive; +} + +.container { + text-align: center; + width: 400px; + position: relative; +} + +.counter { + font-size: 40px; +} + +.loading-bar-back { + position: absolute; + height: 8px; + background-color: lightgray; + width: 100%; + border-radius: 5px; + border: none; +} + +.loading-bar-front { + position: absolute; + height: 8px; + background-color: orangered; + width: 0%; + border-radius: 5px; + border: none; +} diff --git a/mini-calendar/index.html b/mini-calendar/index.html new file mode 100644 index 0000000..1f9fee7 --- /dev/null +++ b/mini-calendar/index.html @@ -0,0 +1,24 @@ + + + + + + + Mini Calendar - BY NIDHI UPMAN + + +
+
+

Mini Calendar - BY NIDHI UPMAN

+
+
+ +
+

April

+

Friday

+

20

+

2020

+
+ +
+ diff --git a/mini-calendar/index.js b/mini-calendar/index.js new file mode 100644 index 0000000..f3e5a3a --- /dev/null +++ b/mini-calendar/index.js @@ -0,0 +1,18 @@ +const monthNameEl = document.getElementById("month-name"); +const dayNameEl = document.getElementById("day-name"); +const dayNumEl = document.getElementById("day-number"); +const yearEl = document.getElementById("year"); + +const date = new Date(); +const month = date.getMonth(); +monthNameEl.innerText = date.toLocaleString("en", { + month: "long", +}); + +dayNameEl.innerText = date.toLocaleString("en", { + weekday: "long", +}); + +dayNumEl.innerText = date.getDate(); + +yearEl.innerText = date.getFullYear(); diff --git a/mini-calendar/style.css b/mini-calendar/style.css new file mode 100644 index 0000000..604dcab --- /dev/null +++ b/mini-calendar/style.css @@ -0,0 +1,45 @@ +body { + margin: 0; + display: flex; + justify-content: center; + height: 100vh; + align-items: center; + font-family: cursive; + background-color: slateblue; +} + +.calendar-container { + background-color: white; + width: 300px; + text-align: center; + border-radius: 10px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); + overflow: hidden; +} + +.month-name { + margin: 0; + background-color: orangered; + color: white; + padding: 10px; + font-size: 30px; + font-weight: bold; +} + +.day-name { + font-size: 20px; + color: darkgray; +} + +.day-number { + font-size: 80px; + margin: 0; + font-weight: bold; +} + +.year { + margin: 20px 0; + font-size: 20px; + color: darkgray; + font-weight: 500; +} diff --git a/month-calender/index.html b/month-calender/index.html new file mode 100644 index 0000000..93de517 --- /dev/null +++ b/month-calender/index.html @@ -0,0 +1,38 @@ + + + + + + + Month Calender - BY NIDHI UPMAN + + +
+
+

Month Calender - BY NIDHI UPMAN

+
+
+ +
+
+
+
+

+

+
+
+
+
Mon
+
Tue
+
Wed
+
Thu
+
Fri
+
Sat
+
Sun
+
+
+
+
+ + + diff --git a/month-calender/index.js b/month-calender/index.js new file mode 100644 index 0000000..30ee25d --- /dev/null +++ b/month-calender/index.js @@ -0,0 +1,41 @@ +const monthEl = document.querySelector(".date h1"); +const fullDateEl = document.querySelector(".date p"); +const daysEl = document.querySelector(".days"); + +const monthInx = new Date().getMonth(); +const lastDay = new Date(new Date().getFullYear(), monthInx + 1, 0).getDate(); +const firstDay = new Date(new Date().getFullYear(), monthInx, 1).getDay() - 1; + + +const months = [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December", +]; + +monthEl.innerText = months[monthInx]; +fullDateEl.innerText = new Date().toDateString(); + +let days = ""; + +for (let i = firstDay; i > 0; i--) { + days += `
`; +} +for (let i = 1; i <= lastDay; i++) { + if (i === new Date().getDate()) { + days += `
${i}
`; + } else { + days += `
${i}
`; + } +} + +daysEl.innerHTML = days; diff --git a/month-calender/style.css b/month-calender/style.css new file mode 100644 index 0000000..61fde6e --- /dev/null +++ b/month-calender/style.css @@ -0,0 +1,87 @@ +*{ + margin: 0; + padding: 0; + font-family: sans-serif; + box-sizing: border-box; +} + +.container{ + width: 100%; + height: 100vh; + background-color: salmon; + display: flex; + justify-content: center; + align-items: center; +} + +.calender{ + background-color: black; + color: lightgray; + width: 450px; + height: 520px; + border-radius: 10px; + box-shadow: 4px 4px 8px rgba(0, 0, 0, .4); +} + +.month{ + width: 100%; + height: 120px; + background-color: lightseagreen; + display: flex; + justify-content: center; + align-items: center; + text-align: center; + border-radius: 10px 10px 0 0; +} + +.month h1{ + font-size: 30px; + font-weight: 400; + text-transform: uppercase; +} + +.month p{ + font-size: 16px; +} + +.weekdays{ + width: 100%; + height: 50px; + display: flex; +} + +.weekdays div{ + font-size: 15px; + font-weight: bold; + letter-spacing: 1px; + width: 100%; + display: flex; + align-items: center; + justify-content: center; +} + +.days{ + width: 100%; + display: flex; + flex-wrap: wrap; + padding: 2px; +} + +.days div{ + font-size: 14px; + margin: 3px; + width: 57.5px; + height: 50px; + display: flex; + justify-content: center; + align-items: center; +} + +.days div:hover:not(.empty){ + border: 2px solid gray; + cursor: pointer; +} + +.today{ + background-color: lightseagreen; +} \ No newline at end of file diff --git a/mouse-event/index.html b/mouse-event/index.html new file mode 100644 index 0000000..a5e8453 --- /dev/null +++ b/mouse-event/index.html @@ -0,0 +1,29 @@ + + + + + + + Mouse Event - BY NIDHI UPMAN + + +
+
+

Mouse Event - BY NIDHI UPMAN

+
+
+ +
+
+ 20 +

Mouse X Prosition(px)

+
+
+ 20 +

Mouse Y Prosition(px)

+
+
+ + +
+ diff --git a/mouse-event/index.js b/mouse-event/index.js new file mode 100644 index 0000000..e0adc5a --- /dev/null +++ b/mouse-event/index.js @@ -0,0 +1,14 @@ +const containerEl = document.querySelector(".container"); + +window.addEventListener("mousemove", (event) => { + containerEl.innerHTML = ` +
+ ${event.clientX} +

Mouse X Prosition(px)

+
+
+ ${event.clientY} +

Mouse Y Prosition(px)

+
+ `; +}); diff --git a/mouse-event/style.css b/mouse-event/style.css new file mode 100644 index 0000000..9c6f74d --- /dev/null +++ b/mouse-event/style.css @@ -0,0 +1,44 @@ +body { + margin: 0; + display: flex; + justify-content: center; + height: 100vh; + align-items: center; + background-color: darkblue; + color: white; + font-family: cursive; +} + +.container { + display: flex; + text-align: center; +} + +.mouse-event { + border: solid 1px lightgray; + margin: 40px; + min-width: 180px; + min-height: 100px; + position: relative; + justify-content: center; + align-items: center; + display: flex; + font-size: 30px; +} + +.mouse-event h4 { + position: absolute; + top: -50px; + font-size: 14px; + left: 50%; + transform: translateX(-50%); + white-space: nowrap; + font-weight: 100; + color: lightgray; +} + +@media (max-width: 500px) { + .container { + flex-direction: column; + } +} diff --git a/multiplication-app/index.html b/multiplication-app/index.html new file mode 100644 index 0000000..c39d10b --- /dev/null +++ b/multiplication-app/index.html @@ -0,0 +1,31 @@ + + + + + + + Multiplication App - BY NIDHI UPMAN + + +
+
+

Multiplication App - BY NIDHI UPMAN

+
+
+ +
+

score: 0

+

What is 1 multiply by 1?

+ + +
+ +
+ diff --git a/multiplication-app/index.js b/multiplication-app/index.js new file mode 100644 index 0000000..c21dd2a --- /dev/null +++ b/multiplication-app/index.js @@ -0,0 +1,37 @@ +const num1 = Math.ceil(Math.random() * 10); +const num2 = Math.ceil(Math.random() * 10); + +const questionEl = document.getElementById("question"); + +const inputEl = document.getElementById("input"); + +const formEl = document.getElementById("form"); + +const scoreEl = document.getElementById("score"); + +let score = JSON.parse(localStorage.getItem("score")); + +if (!score) { + score = 0; +} + +scoreEl.innerText = `score: ${score}`; + +questionEl.innerText = `What is ${num1} multiply by ${num2}?`; + +const correctAns = num1 * num2; + +formEl.addEventListener("submit", () => { + const userAns = +inputEl.value; + if (userAns === correctAns) { + score++; + updateLocalStorage(); + } else { + score--; + updateLocalStorage(); + } +}); + +function updateLocalStorage() { + localStorage.setItem("score", JSON.stringify(score)); +} diff --git a/multiplication-app/style.css b/multiplication-app/style.css new file mode 100644 index 0000000..0331bca --- /dev/null +++ b/multiplication-app/style.css @@ -0,0 +1,58 @@ +body { + margin: 0; + display: flex; + justify-content: center; + height: 100vh; + align-items: center; + text-align: center; + background-color: yellow; + font-family: cursive; +} + +.form { + background-color: white; + padding: 20px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); + border-radius: 10px; + margin: 10px; +} + +.input { + display: block; + width: 100%; + box-sizing: border-box; + font-size: 30px; + text-align: center; + padding: 10px; + border: solid 4px green; + color: green; +} + +.input::placeholder { + color: lightgray; + font-family: cursive; +} + +.btn { + background-color: green; + color: white; + border: none; + display: block; + width: 100%; + padding: 10px; + font-size: 20px; + font-family: cursive; + margin: 20px 0; + border-radius: 5px; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); + cursor: pointer; +} + +.btn:hover { + filter: brightness(0.9); +} + +.score { + color: green; + text-align: right; +} diff --git a/music-player/index.html b/music-player/index.html new file mode 100644 index 0000000..0f8c6a7 --- /dev/null +++ b/music-player/index.html @@ -0,0 +1,39 @@ + + + + Music Player - BY NIDHI UPMAN + + +
+
+

Music Player - BY NIDHI UPMAN

+
+
+ +
+

Music Player

+
+ +
+ + +
+
+
+
+
+ +
+ + + diff --git a/music-player/pause.png b/music-player/pause.png new file mode 100644 index 0000000..3c877cc Binary files /dev/null and b/music-player/pause.png differ diff --git a/music-player/play.png b/music-player/play.png new file mode 100644 index 0000000..7019bf1 Binary files /dev/null and b/music-player/play.png differ diff --git a/music-player/script.js b/music-player/script.js new file mode 100644 index 0000000..c037a17 --- /dev/null +++ b/music-player/script.js @@ -0,0 +1,90 @@ +const playlist = [ + { title: "Song 1", src: "songs/song1.m4a" }, + { title: "Song 2", src: "songs/song2.m4a" }, + { title: "Song 3", src: "songs/song3.m4a" }, +]; + +const links = document.querySelectorAll(".playlist__item a"); + +links.forEach((link) => { + link.addEventListener("click", function (e) { + e.preventDefault(); + const source = this.getAttribute("data-src"); + document.querySelector("#player").setAttribute("src", source); + playSong(); + + // Remove active class from all links + links.forEach((link) => { + link.classList.remove("active-song"); + }); + + // Add active class to clicked link + this.classList.add("active-song"); + }); +}); + +function playSong() { + const player = document.querySelector("#player"); + const playButton = document.querySelector(".player__button--play"); + const pauseButton = document.querySelector(".player__button--pause"); + const progressBar = document.querySelector(".player__progress-bar"); + + if (player.paused) { + player.play(); + playButton.classList.remove("active"); + pauseButton.classList.add("active"); + } else { + player.pause(); + playButton.classList.add("active"); + pauseButton.classList.remove("active"); + } + + player.addEventListener("timeupdate", function () { + const progress = (player.currentTime / player.duration) * 100; + progressBar.style.width = `${progress}%`; + }); + + progressBar.addEventListener("click", function (e) { + const progressWidth = this.offsetWidth; + const clickedWidth = e.offsetX; + const percent = (clickedWidth / progressWidth) * 100; + player.currentTime = (player.duration / 100) * percent; + progressBar.style.width = `${percent}%`; + }); +} + +function playFirstSong() { + const firstSong = playlist[0].src; + document.querySelector("#player").setAttribute("src", firstSong); + playSong(); +} + +const playButton = document.querySelector(".player__button--play"); +const pauseButton = document.querySelector(".player__button--pause"); + +playButton.addEventListener("click", function () { + const player = document.querySelector("#player"); + player.play(); + playButton.classList.remove("active"); + pauseButton.classList.add("active"); +}); + +pauseButton.addEventListener("click", function () { + const player = document.querySelector("#player"); + player.pause(); + playButton.classList.add("active"); + pauseButton.classList.remove("active"); +}); + +const player = document.querySelector("#player"); +player.addEventListener("play", function () { + playButton.classList.remove("active"); + pauseButton.classList.add("active"); +}); + +player.addEventListener("pause", function () { + playButton.classList.add("active"); + pauseButton.classList.remove("active"); +}); + +playFirstSong(); diff --git a/music-player/songs/song1.m4a b/music-player/songs/song1.m4a new file mode 100644 index 0000000..90842b1 Binary files /dev/null and b/music-player/songs/song1.m4a differ diff --git a/music-player/songs/song2.m4a b/music-player/songs/song2.m4a new file mode 100644 index 0000000..13c7c3d Binary files /dev/null and b/music-player/songs/song2.m4a differ diff --git a/music-player/songs/song3.m4a b/music-player/songs/song3.m4a new file mode 100644 index 0000000..02ba7a4 Binary files /dev/null and b/music-player/songs/song3.m4a differ diff --git a/music-player/style.css b/music-player/style.css new file mode 100644 index 0000000..038d0b1 --- /dev/null +++ b/music-player/style.css @@ -0,0 +1,90 @@ +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +body { + font-family: Arial, sans-serif; + background-color: #f2f2f2; +} + +.container { + max-width: 600px; + margin: 0 auto; + padding: 0 20px; +} + +.title { + text-align: center; + margin-top: 50px; + margin-bottom: 50px; +} + +.player { + margin-bottom: 50px; +} + +.player__controls { + display: flex; + justify-content: center; + margin-bottom: 20px; +} + +.player__button { + width: 50px; + height: 50px; + background-color: #fff; + border: none; + cursor: pointer; + margin-right: 10px; + background-image: url("play.png"); + background-repeat: no-repeat; + background-position: center; + background-size: 60%; +} + +.player__button--pause { + background-image: url("pause.png"); +} + +.player__button.active { + background-color: #0074d9; + color: #fff; +} + +.player__progress { + height: 5px; + background-color: #f5f5f5; + position: relative; +} + +.player__progress-bar { + position: absolute; + top: 0; + left: 0; + height: 100%; + background-color: #0074d9; + width: 0%; +} + +.playlist__item { + margin-bottom: 10px; +} + +.playlist__item a { + display: block; + padding: 10px; + background-color: #fff; + color: #333; + text-decoration: none; +} + +.playlist__item a:hover { + background-color: #f5f5f5; +} + +.playlist__item a.active-song { + background-color: #0074d9; + color: #fff; +} diff --git a/new-year-countdown/index.html b/new-year-countdown/index.html new file mode 100644 index 0000000..ea56001 --- /dev/null +++ b/new-year-countdown/index.html @@ -0,0 +1,26 @@ + + + + + + + New Year Countdown - BY NIDHI UPMAN + + +
+
+

New Year Countdown - BY NIDHI UPMAN

+
+
+ +

Countdown to New Year

+
2025
+
+
00
+
00
+
00
+
00
+
+ + + diff --git a/new-year-countdown/index.js b/new-year-countdown/index.js new file mode 100644 index 0000000..3ee8cd0 --- /dev/null +++ b/new-year-countdown/index.js @@ -0,0 +1,28 @@ +const dayEl = document.getElementById("day"); +const hourEl = document.getElementById("hour"); +const minuteEl = document.getElementById("minute"); +const secondEl = document.getElementById("second"); + +const newYearTime = new Date("Jan 1, 2024 00:00:00").getTime(); + +updateCountdown(); + +function updateCountdown() { + const now = new Date().getTime(); + const gap = newYearTime - now; + + const second = 1000; + const minute = second * 60; + const hour = minute * 60; + const day = hour * 24; + + const d = Math.floor(gap / day); + const h = Math.floor((gap % day) / hour); + const m = Math.floor((gap % hour) / minute); + const s = Math.floor((gap % minute) / second); + dayEl.innerText = d; + hourEl.innerText = h; + minuteEl.innerText = m; + secondEl.innerText = s; + setTimeout(updateCountdown, 1000) +} diff --git a/new-year-countdown/style.css b/new-year-countdown/style.css new file mode 100644 index 0000000..ef6c66c --- /dev/null +++ b/new-year-countdown/style.css @@ -0,0 +1,72 @@ +body { + margin: 0; + display: flex; + flex-direction: column; + align-items: center; + height: 100vh; + justify-content: center; + font-family: cursive; + background-color: slateblue; + overflow: hidden; +} + +h2 { + color: white; + text-align: center; + text-transform: uppercase; + letter-spacing: 4px; +} + +.year { + font-size: 5em; + color: white; + font-weight: bold; +} + +.countdown { + margin: 30px; + background-color: rgba(0, 0, 0, 0.1); + width: 100%; + color: white; + height: 120px; + display: flex; + justify-content: center; + align-items: center; +} + +.countdown div { + margin: 0 15px; + font-size: 2.5em; + font-weight: 500; + margin-top: -25px; + position: relative; + text-align: center; + width: 100px; +} + +.countdown div::before { + content: ""; + position: absolute; + bottom: -30px; + left: 0; + font-size: 0.35em; + line-height: 35px; + text-transform: uppercase; + letter-spacing: 1px; + font-weight: 500; + width: 100%; + height: 35px; +} + +.countdown #day::before { + content: "Days"; +} +.countdown #hour::before { + content: "Hours"; +} +.countdown #minute::before { + content: "Minutes"; +} +.countdown #second::before { + content: "Seconds"; +} diff --git a/profile-statistics/index.html b/profile-statistics/index.html new file mode 100644 index 0000000..777ff62 --- /dev/null +++ b/profile-statistics/index.html @@ -0,0 +1,40 @@ + + + + + + + Profile Statistics - BY NIDHI UPMAN + + + +
+
+

Profile Statistics - BY NIDHI UPMAN

+
+
+ +
+ +
15
+

Years Exprerience

+
+
+ +
260
+

Websites Made

+
+
+ +
27
+

Apps Made

+
+ +
+ diff --git a/profile-statistics/index.js b/profile-statistics/index.js new file mode 100644 index 0000000..29a8da8 --- /dev/null +++ b/profile-statistics/index.js @@ -0,0 +1,19 @@ +const countersEl = document.querySelectorAll(".counter"); + +countersEl.forEach((counterEl) => { + counterEl.innerText = "0"; + incrementCounter(); + function incrementCounter() { + let currentNum = +counterEl.innerText; + const dataCeil = counterEl.getAttribute("data-ceil"); + const increment = dataCeil / 15; + currentNum = Math.ceil(currentNum + increment); + + if (currentNum < dataCeil) { + counterEl.innerText = currentNum; + setTimeout(incrementCounter, 50); + } else { + counterEl.innerText = dataCeil; + } + } +}); diff --git a/profile-statistics/style.css b/profile-statistics/style.css new file mode 100644 index 0000000..a6950d9 --- /dev/null +++ b/profile-statistics/style.css @@ -0,0 +1,48 @@ +body { + margin: 0; + display: flex; + justify-content: center; + height: 100vh; + align-items: center; + text-align: center; + background-color: yellow; + font-family: cursive; +} + +.stats-container { + margin: 20px; + border: dotted green; + min-width: 200px; + height: 100px; + position: relative; + padding: 20px; +} + +.stats-container h4 { + position: absolute; + bottom: 1px; + left: 50%; + transform: translateX(-50%); + white-space: nowrap; +} + +.icon { + position: absolute; + top: -30px; + left: 50%; + transform: translateX(-50%); +} + +.counter { + font-size: 50px; + position: absolute; + left: 50%; + transform: translateX(-50%); + color: green; +} + +@media (max-width: 600px) { + body { + flex-direction: column; + } +} diff --git a/q-and-a-section/app.js b/q-and-a-section/app.js new file mode 100644 index 0000000..84f8430 --- /dev/null +++ b/q-and-a-section/app.js @@ -0,0 +1,9 @@ +const questions = document.querySelectorAll(".question"); + +questions.forEach(function (question) { + const btn = question.querySelector(".question-btn"); + + btn.addEventListener("click", function () { + question.classList.toggle("show-text"); + }); +}); diff --git a/q-and-a-section/index.html b/q-and-a-section/index.html new file mode 100644 index 0000000..91a8106 --- /dev/null +++ b/q-and-a-section/index.html @@ -0,0 +1,105 @@ + + + + + + Q & A - BY NIDHI UPMAN + + + + + +
+
+

Q & A - BY NIDHI UPMAN

+
+
+ +
+ +
+ +
+ +
+

What is your name ?

+ +
+ +
+

+ My name is Nidhi Upman. +

+
+
+ + +
+ +
+

Tell me about yourself ?

+ +
+ +
+

+ I've graduated in Computer Science and Engineering and I'm passionate about software engineering, + +front-end development, full-stack development, and data analysis. I also have a bit of knowledge in machine learning. + +I'm currently seeking job opportunities where I can leverage my technical skills, strong communication abilities, and + +collaborative mindset. I thrive in dynamic, fast-paced environments and am eager to make a positive impact in software + +engineering. If you're looking for a dedicated and enthusiastic professional, let's connect! Reach out and let's create + +something amazing together. + + +

+
+
+ + +
+ +
+

Tell me about your skils ?

+ + +
+ +
+

+ C++,Python, java, Go Lang, OOPS,DSALGO,Web development...etc +

+
+
+ +
+ + + + + diff --git a/q-and-a-section/styles.css b/q-and-a-section/styles.css new file mode 100644 index 0000000..e802a47 --- /dev/null +++ b/q-and-a-section/styles.css @@ -0,0 +1,127 @@ +/* +=============== +Fonts +=============== +*/ + +/* +=============== +Variables +=============== +*/ + +:root { + /* dark shades of primary color*/ + --clr-primary-1: hsl(205, 86%, 17%); + --clr-primary-2: hsl(205, 77%, 27%); + --clr-primary-3: hsl(205, 72%, 37%); + --clr-primary-4: hsl(205, 63%, 48%); + /* primary/main color */ + --clr-primary-5: #49a6e9; + /* lighter shades of primary color */ + --clr-primary-6: hsl(205, 89%, 70%); + --clr-primary-7: hsl(205, 90%, 76%); + --clr-primary-8: hsl(205, 86%, 81%); + --clr-primary-9: hsl(205, 90%, 88%); + --clr-primary-10: hsl(205, 100%, 96%); + /* darkest grey - used for headings */ + --clr-grey-1: hsl(209, 61%, 16%); + --clr-grey-2: hsl(211, 39%, 23%); + --clr-grey-3: hsl(209, 34%, 30%); + --clr-grey-4: hsl(209, 28%, 39%); + /* grey used for paragraphs */ + --clr-grey-5: hsl(210, 22%, 49%); + --clr-grey-6: hsl(209, 23%, 60%); + --clr-grey-7: hsl(211, 27%, 70%); + --clr-grey-8: hsl(210, 31%, 80%); + --clr-grey-9: hsl(212, 33%, 89%); + --clr-grey-10: hsl(210, 36%, 96%); + --clr-white: #fff; + --clr-red-dark: hsl(360, 67%, 44%); + --clr-red-light: hsl(360, 71%, 66%); + --clr-green-dark: hsl(125, 67%, 44%); + --clr-green-light: hsl(125, 71%, 66%); + --clr-gold: #c59d5f; + --clr-black: #222; + --ff-primary: "Roboto", sans-serif; + --ff-secondary: "Open Sans", sans-serif; + --transition: all 0.3s linear; + --spacing: 0.25rem; + --radius: 0.5rem; + --light-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); + --dark-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); + --max-width: 1170px; + --fixed-width: 620px; +} +/* +=============== +Global Styles +=============== +*/ + +body { + margin: 0; + padding: 0; + font-family: sans-serif; + background: #ebebeb; +} + +p { + margin-bottom: 1.25rem; + color: grey; +} + +.section-center { + width: 90vw; + margin: 50px auto 0; + max-width: 620px; +} +.question { + background: white; + border-radius: 0.5rem; + box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); + padding: 1.5rem 1.5rem 0 1.5rem; + margin-bottom: 2rem; +} +.question-title { + display: flex; + justify-content: space-between; + align-items: center; + text-transform: capitalize; + padding-bottom: 1rem; +} + +.question-title p { + letter-spacing: 0.1rem; + color: yellowgreen; + font-weight: bolder; +} +.question-btn { + font-size: 1.5rem; + background: transparent; + border-color: transparent; + cursor: pointer; + color: yellowgreen; +} + +.question-text { + padding: 1rem 0 1.5rem 0; + border-top: 1px solid grey; +} + +/* hide text */ +.question-text { + display: none; +} +.show-text .question-text { + display: block; +} +.minus-icon { + display: none; +} +.show-text .minus-icon { + display: inline; +} +.show-text .plus-icon { + display: none; +} diff --git a/random-emoji/index.html b/random-emoji/index.html new file mode 100644 index 0000000..70e7d43 --- /dev/null +++ b/random-emoji/index.html @@ -0,0 +1,23 @@ + + + + + + + + Random Emoji - BY NIDHI UPMAN + +
+
+

Random Emoji - BY NIDHI UPMAN

+
+
+ +

Random Emoji

+
+ +

Emoji Name

+
+ + + \ No newline at end of file diff --git a/random-emoji/index.js b/random-emoji/index.js new file mode 100644 index 0000000..a768eb0 --- /dev/null +++ b/random-emoji/index.js @@ -0,0 +1,27 @@ +const btnEl = document.getElementById("btn"); +const emojiNameEl = document.getElementById("emoji-name"); + +const emoji = []; + +async function getEmoji() { + let response = await fetch( + "https://emoji-api.com/emojis?access_key=773b58f681fb786fafdb8392e8b8a75ddc177fd1" + ); + + data = await response.json(); + + for (let i = 0; i < 1500; i++) { + emoji.push({ + emojiName: data[i].character, + emojiCode: data[i].unicodeName, + }); + } +} + +getEmoji(); + +btnEl.addEventListener("click", () => { + const randomNum = Math.floor(Math.random() * emoji.length); + btnEl.innerText = emoji[randomNum].emojiName; + emojiNameEl.innerText = emoji[randomNum].emojiCode; +}); diff --git a/random-emoji/style.css b/random-emoji/style.css new file mode 100644 index 0000000..37b110b --- /dev/null +++ b/random-emoji/style.css @@ -0,0 +1,41 @@ +body{ + padding: 0; + margin: 0; + background: salmon; + display: flex; + flex-direction: column; + justify-content: center; + height: 100vh; + align-items: center; + font-family: 'Courier New', Courier, monospace; +} + +h2{ + font-size: 2rem; + color: aliceblue; +} + +.section{ + text-align: center; +} + +.btn{ + font-size: 5rem; + border: none; + background: rgb(255,255,255,.2); + border-radius: 10px; + padding: 15px; + filter: grayscale(); + transition: filter .2s ease-in-out; + cursor: pointer; + +} + +.btn:hover{ + filter: grayscale(0); +} + +.emoji-name{ + font-weight: 600; + color: darkblue; +} \ No newline at end of file diff --git a/random-photos/index.html b/random-photos/index.html new file mode 100644 index 0000000..422a9fb --- /dev/null +++ b/random-photos/index.html @@ -0,0 +1,28 @@ + + + + + + + Random Photos - BY NIDHI UPMAN + + +
+
+

Random Photos - BY NIDHI UPMAN

+
+
+ +
+ + + + + + +
+ + + + + diff --git a/random-photos/index.js b/random-photos/index.js new file mode 100644 index 0000000..905ae67 --- /dev/null +++ b/random-photos/index.js @@ -0,0 +1,18 @@ +const imageContainerEl = document.querySelector(".image-container"); + +const btnEl = document.querySelector(".btn"); + +btnEl.addEventListener("click", () => { + imageNum = 10; + addNewImages(); +}); + +function addNewImages() { + for (let index = 0; index < imageNum; index++) { + const newImgEl = document.createElement("img"); + newImgEl.src = `https://picsum.photos/300?random=${Math.floor( + Math.random() * 2000 + )}`; + imageContainerEl.appendChild(newImgEl); + } +} diff --git a/random-photos/style.css b/random-photos/style.css new file mode 100644 index 0000000..42161d6 --- /dev/null +++ b/random-photos/style.css @@ -0,0 +1,35 @@ +body { + margin: 0; + display: flex; + flex-direction: column; + align-items: center; + background-color: brown; +} + +.image-container { + text-align: center; +} + +.image-container img { + margin: 10px; + border-radius: 10px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); + background-color: lightgray; + width: 300px; + height: 300px; +} + +.btn { + background-color: slateblue; + border: none; + padding: 10px 20px; + margin: 20px; + color: white; + border-radius: 5px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); + cursor: pointer; +} + +.btn:hover { + opacity: 0.9; +} diff --git a/random-quote-generator/index.html b/random-quote-generator/index.html new file mode 100644 index 0000000..124981a --- /dev/null +++ b/random-quote-generator/index.html @@ -0,0 +1,30 @@ + + + + + + + Random Quote Generator - BY NIDHI UPMAN + + + +
+
+

Random Quote Generator - BY NIDHI UPMAN

+
+
+ +
+

Random Quote Generator

+

+ + Quote + + +

+

~ Author

+ +
+ +
+ \ No newline at end of file diff --git a/random-quote-generator/index.js b/random-quote-generator/index.js new file mode 100644 index 0000000..801cc29 --- /dev/null +++ b/random-quote-generator/index.js @@ -0,0 +1,33 @@ +const btnEl = document.getElementById("btn"); +const quoteEl = document.getElementById("quote"); +const authorEl = document.getElementById("author"); + +const apiURL = "https://api.quotable.io/random"; + +async function getQuote() { + try { + btnEl.innerText = "Loading..."; + btnEl.disabled = true; + quoteEl.innerText = "Updating..."; + authorEl.innerText = "Updating..."; + const response = await fetch(apiURL); + const data = await response.json(); + const quoteContent = data.content; + const quoteAuthor = data.author; + quoteEl.innerText = quoteContent; + authorEl.innerText = "~ " + quoteAuthor; + btnEl.innerText = "Get a quote"; + btnEl.disabled = false; + console.log(data); + } catch (error) { + console.log(error); + quoteEl.innerText = "An error happened, try again later"; + authorEl.innerText = "An error happened"; + btnEl.innerText = "Get a quote"; + btnEl.disabled = false; + } +} + +getQuote() + +btnEl.addEventListener("click", getQuote); diff --git a/random-quote-generator/style.css b/random-quote-generator/style.css new file mode 100644 index 0000000..e67e3f5 --- /dev/null +++ b/random-quote-generator/style.css @@ -0,0 +1,54 @@ +body { + margin: 0; + display: flex; + min-height: 100vh; + justify-content: center; + align-items: center; + font-family: "Courier New", Courier, monospace; + background: linear-gradient(to left bottom, lightgreen, lightblue); +} + +.container { + background-color: rgba(255, 255, 255, 0.1); + box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3); + padding: 30px; + border-radius: 15px; + width: 90%; + margin: 10px; + text-align: center; +} + +.heading { + font-size: 35px; + font-weight: 700; +} + +.quote { + font-size: 30px; + font-weight: 600; +} + +.author { + font-size: 25px; + margin: 10px; + font-style: italic; +} + +.btn { + font-size: 18px; + border-radius: 5px; + cursor: pointer; + padding: 10px; + margin-top: 15px; + background-color: rgba(255, 255, 255, 0.3); + border-color: rgba(255, 255, 255, 0.6); + text-transform: uppercase; + width: 300px; +} + +.btn:hover{ + background-color: rgba(255,255,255,.6); + box-shadow: 0 4px 4px rgba(0,0,0,.3); + transition: all 300ms ease-in-out; + color: green; +} diff --git a/recipe-book-app/index.html b/recipe-book-app/index.html new file mode 100644 index 0000000..027c6e5 --- /dev/null +++ b/recipe-book-app/index.html @@ -0,0 +1,62 @@ + + + + + + + Recipe Book App - BY NIDHI UPMAN + + +
+
+

Recipe Book App - BY NIDHI UPMAN

+
+
+ +
+

Recipe Book App

+
+ +
+ +
+ + + diff --git a/recipe-book-app/index.js b/recipe-book-app/index.js new file mode 100644 index 0000000..d35b3b8 --- /dev/null +++ b/recipe-book-app/index.js @@ -0,0 +1,50 @@ +const API_KEY = "275d58779ccf4e22af03e792e8819fff"; +const recipeListEl = document.getElementById("recipe-list"); + +function displayRecipes(recipes) { + recipeListEl.innerHTML = ""; + recipes.forEach((recipe) => { + const recipeItemEl = document.createElement("li"); + recipeItemEl.classList.add("recipe-item"); + recipeImageEl = document.createElement("img"); + recipeImageEl.src = recipe.image; + recipeImageEl.alt = "recipe image"; + + recipeTitleEl = document.createElement("h2"); + recipeTitleEl.innerText = recipe.title; + + recipeIngredientsEl = document.createElement("p"); + recipeIngredientsEl.innerHTML = ` + Ingredients: ${recipe.extendedIngredients + .map((ingredient) => ingredient.original) + .join(", ")} + `; + + recipeLinkEl = document.createElement("a"); + recipeLinkEl.href = recipe.sourceUrl; + recipeLinkEl.innerText = "View Recipe"; + + recipeItemEl.appendChild(recipeImageEl); + recipeItemEl.appendChild(recipeTitleEl); + recipeItemEl.appendChild(recipeIngredientsEl); + recipeItemEl.appendChild(recipeLinkEl); + recipeListEl.appendChild(recipeItemEl); + }); +} + +async function getRecipes() { + const response = await fetch( + `https://api.spoonacular.com/recipes/random?number=10&apiKey=${API_KEY}` + ); + + const data = await response.json(); + + return data.recipes; +} + +async function init() { + const recipes = await getRecipes(); + displayRecipes(recipes); +} + +init(); diff --git a/recipe-book-app/style.css b/recipe-book-app/style.css new file mode 100644 index 0000000..9e56d02 --- /dev/null +++ b/recipe-book-app/style.css @@ -0,0 +1,104 @@ +body { + margin: 0; + padding: 0; + font-family: Arial, sans-serif; +} + +header { + background: #0c2461; + color: #fff; + padding: 20px; + text-align: center; +} + +h1 { + margin: 0; + font-size: 36px; +} + +.container { + margin: 0 auto; + max-width: 1200px; + padding: 20px; +} + +.recipe-list { + list-style: none; + margin: 0; + padding: 0; +} + +.recipe-item { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 20px; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); + border-radius: 5px; + overflow: hidden; +} + +.recipe-item img { + width: 150px; + height: 150px; + object-fit: cover; +} + +.recipe-item h2 { + margin: 0; + font-size: 20px; + padding: 10px; + min-width: 200px; +} + +.recipe-item p { + margin: 0; + padding: 10px; + color: #777; +} + +.recipe-item a { + background: #0c2461; + color: #fff; + min-width: 150px; + padding: 10px; + text-decoration: none; + text-transform: uppercase; + font-size: 14px; + transition: background 0.3s ease; +} + +.recipe-item a:hover { + background: #1e3799; +} + +@media screen and (max-width: 768px) { + .container { + max-width: 90%; + } + .recipe-item { + flex-direction: column; + } + + .recipe-item img { + width: 100%; + height: auto; + margin-bottom: 10px; + } + + .recipe-item h2 { + font-size: 20px; + padding: 0; + margin-bottom: 10px; + } + + .recipe-item p { + font-size: 14px; + margin-bottom: 10px; + } + + .recipe-item a { + width: 100%; + text-align: center; + } +} diff --git a/rotating-image-gallery/index.html b/rotating-image-gallery/index.html new file mode 100644 index 0000000..4bfd03b --- /dev/null +++ b/rotating-image-gallery/index.html @@ -0,0 +1,50 @@ + + + + + + + Rotating Image Gallery - BY NIDHI UPMAN + + +
+
+

Rotating Image Gallery - BY NIDHI UPMAN

+ +
+




+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+ + + diff --git a/rotating-image-gallery/index.js b/rotating-image-gallery/index.js new file mode 100644 index 0000000..fa1fde4 --- /dev/null +++ b/rotating-image-gallery/index.js @@ -0,0 +1,26 @@ +const imageContainerEl = document.querySelector(".image-container"); + +const prevEl = document.getElementById("prev"); +const nextEl = document.getElementById("next"); +let x = 0; +let timer; +prevEl.addEventListener("click", () => { + x = x + 45; + clearTimeout(timer); + updateGallery(); +}); +nextEl.addEventListener("click", () => { + x = x - 45; + clearTimeout(timer); + updateGallery(); +}); + +function updateGallery() { + imageContainerEl.style.transform = `perspective(1000px) rotateY(${x}deg)`; + timer = setTimeout(() => { + x = x - 45; + updateGallery(); + }, 3000); +} + +updateGallery(); diff --git a/rotating-image-gallery/style.css b/rotating-image-gallery/style.css new file mode 100644 index 0000000..6dd8ffc --- /dev/null +++ b/rotating-image-gallery/style.css @@ -0,0 +1,63 @@ +body { + margin: 0; + display: flex; + flex-direction: column; + align-items: center; + text-align: center; + height: 100vh; + justify-content: center; + background-color: black; + overflow: hidden; +} + +.image-container { + position: relative; + width: 200px; + height: 200px; + transform-style: preserve-3d; + transform: perspective(1000px) rotateY(0deg); + transition: transform 0.7s; +} + +.image-container span { + position: absolute; + top: 0; + left: 0; + width: 100%; + transform: rotateY(calc(var(--i) * 45deg)) translateZ(400px); +} + +.image-container span img { + position: absolute; + left: 0; + top: 0; + width: 100%; +} + +.btn-container { + position: relative; + width: 80%; +} + +.btn { + position: absolute; + bottom: -80px; + background-color: slateblue; + color: white; + border: none; + padding: 10px 20px; + border-radius: 5px; + cursor: pointer; +} + +.btn:hover { + filter: brightness(1.5); +} + +#prev { + left: 20%; +} + +#next { + right: 20%; +} diff --git a/step-progress-bar/index.html b/step-progress-bar/index.html new file mode 100644 index 0000000..a60fed8 --- /dev/null +++ b/step-progress-bar/index.html @@ -0,0 +1,51 @@ + + + + + + + Step Progress Bar - BY NIDHI UPMAN + + + +
+
+

Step Progress Bar - BY NIDHI UPMAN

+
+
+ +
+
+
+
+
+ + Start +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+ +
+ diff --git a/step-progress-bar/index.js b/step-progress-bar/index.js new file mode 100644 index 0000000..23b3511 --- /dev/null +++ b/step-progress-bar/index.js @@ -0,0 +1,61 @@ +const nextEl = document.getElementById("next"); +const prevEl = document.getElementById("prev"); + +const progressEl = document.querySelector(".progress-bar-front"); + +const stepsEl = document.querySelectorAll(".step"); + +let currentChecked = 1; + +nextEl.addEventListener("click", () => { + currentChecked++; + if (currentChecked > stepsEl.length) { + currentChecked = stepsEl.length; + } + updateStepProgress(); +}); + +prevEl.addEventListener("click", () => { + currentChecked--; + if (currentChecked < 1) { + currentChecked = 1; + } + updateStepProgress(); +}); + +function updateStepProgress() { + stepsEl.forEach((stepEl, idx) => { + if (idx < currentChecked) { + stepEl.classList.add("checked"); + stepEl.innerHTML = ` + + ${ + idx === 0 + ? "Start" + : idx === stepsEl.length - 1 + ? "Final" + : "Step " + idx + } + `; + } else { + stepEl.classList.remove("checked"); + stepEl.innerHTML = ` + + `; + } + }); + + const checkedNumber = document.querySelectorAll(".checked"); + + progressEl.style.width = + ((checkedNumber.length - 1) / (stepsEl.length - 1)) * 100 + "%"; + + if (currentChecked === 1) { + prevEl.disabled = true; + } else if (currentChecked === stepsEl.length) { + nextEl.disabled = true; + } else { + prevEl.disabled = false; + nextEl.disabled = false; + } +} diff --git a/step-progress-bar/style.css b/step-progress-bar/style.css new file mode 100644 index 0000000..dcc340e --- /dev/null +++ b/step-progress-bar/style.css @@ -0,0 +1,97 @@ +body { + margin: 0; + display: flex; + justify-content: center; + height: 100vh; + align-items: center; + background-color: yellow; +} + +.container { + text-align: center; +} + +.progress-container { + width: 500px; + display: flex; + position: relative; + justify-content: space-between; +} + +.progress-bar-back { + position: absolute; + height: 4px; + width: 100%; + background-color: lightgray; + border: none; + z-index: -1; + margin: 0; + top: 50%; + transform: translateY(-50%); +} +.progress-bar-front { + position: absolute; + height: 4px; + width: 0%; + background-color: green; + border: none; + z-index: -1; + margin: 0; + top: 50%; + transform: translateY(-50%); + transition: 0.4s linear width; +} + +.step { + width: 30px; + height: 30px; + background-color: white; + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; + border: 4px solid lightgray; + color: lightgray; +} + +.step.checked { + color: green; + border-color: green; + transition: all 0.4s linear; + transition-delay: 0.3s; +} + +.step.checked small { + position: absolute; + bottom: -20px; + font-family: cursive; +} + +.btn { + background-color: slateblue; + border: none; + color: white; + padding: 10px 20px; + margin: 70px 10px 0; + border-radius: 5px; + cursor: pointer; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); +} + +.btn:hover { + opacity: 0.9; +} + +.btn:active { + transform: scale(0.97); +} + +.btn:disabled { + background-color: lightgray; +} + +@media (max-width: 500px) { + .progress-container { + width: 90vw; + } +} diff --git a/video-trailer-popup/index.html b/video-trailer-popup/index.html new file mode 100644 index 0000000..1598d6f --- /dev/null +++ b/video-trailer-popup/index.html @@ -0,0 +1,50 @@ + + + + + + + Video Trailer Popup - BY NIDHI UPMAN + + + +
+
+

Video Trailer Popup - BY NIDHI UPMAN

+
+
+ +
+ movie-image +

About Me

+

+ Hi, I'm Nidhi Upman! I've graduated in Computer Science and Engineering and I'm passionate about software engineering, + +front-end development, full-stack development, and data analysis. I also have a bit of knowledge in machine learning. + +I'm currently seeking job opportunities where I can leverage my technical skills, strong communication abilities, and + +collaborative mindset. I thrive in dynamic, fast-paced environments and am eager to make a positive impact in software + +engineering. If you're looking for a dedicated and enthusiastic professional, let's connect! Reach out and let's create + +something amazing together. +

+ +
+
+ + +
+ +
+ diff --git a/video-trailer-popup/index.js b/video-trailer-popup/index.js new file mode 100644 index 0000000..17c9771 --- /dev/null +++ b/video-trailer-popup/index.js @@ -0,0 +1,14 @@ +const btnEl = document.querySelector(".btn"); +const closeIconEl = document.querySelector(".close-icon"); +const trailerContainerEl = document.querySelector(".trailer-container"); +const videoEl = document.querySelector("video"); + +btnEl.addEventListener("click", () => { + trailerContainerEl.classList.remove("active"); +}); + +closeIconEl.addEventListener("click", () => { + trailerContainerEl.classList.add("active"); + videoEl.pause(); + videoEl.currentTime = 0; +}); diff --git a/video-trailer-popup/style.css b/video-trailer-popup/style.css new file mode 100644 index 0000000..82b012e --- /dev/null +++ b/video-trailer-popup/style.css @@ -0,0 +1,83 @@ +body { + margin: 0; + box-sizing: border-box; + font-family: sans-serif; + display: flex; + justify-content: center; + height: 100vh; + align-items: center; + background-color: black; +} + +.main-container { + max-width: 550px; + padding: 10px; +} + +.main-container img { + max-width: 100%; + margin-bottom: 15px; + border-radius: 10px; +} + +.main-container h1 { + color: white; + font-weight: 500; +} + +.main-container p { + color: white; + margin: 15px 0; +} + +.btn { + background-color: white; + border: none; + padding: 10px 20px; + cursor: pointer; + border-radius: 5px; +} + +.btn:hover { + background-color: orange; +} + +.trailer-container { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + background-color: black; + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + opacity: 1; + transition: opacity 0.7s; +} + +.active.trailer-container { + visibility: hidden; + opacity: 0; +} + +.trailer-container video { + position: relative; + max-width: 900px; + outline: none; +} + +@media (max-width: 991px) { + .trailer-container video { + max-width: 90%; + } +} + +.close-icon { + position: absolute; + top: 30px; + right: 30px; + color: white; + cursor: pointer; +} diff --git a/video-trailer-popup/trailer.mp4 b/video-trailer-popup/trailer.mp4 new file mode 100644 index 0000000..9712b6f Binary files /dev/null and b/video-trailer-popup/trailer.mp4 differ diff --git a/weight-converter/index.html b/weight-converter/index.html new file mode 100644 index 0000000..c447ada --- /dev/null +++ b/weight-converter/index.html @@ -0,0 +1,28 @@ + + + + + + + Weight Converter - BY NIDHI UPMAN + + +
+
+
+

Weight Converter - BY NIDHI UPMAN

+
+
+ +
+

Weight Converter

+
+ + +
+

Your weight in kg is:

+

+
+ +
+ \ No newline at end of file diff --git a/weight-converter/index.js b/weight-converter/index.js new file mode 100644 index 0000000..faf2a44 --- /dev/null +++ b/weight-converter/index.js @@ -0,0 +1,24 @@ +const inputEl = document.getElementById("input"); +const errorEl = document.getElementById("error"); +const resultEl = document.getElementById("result"); +let errorTime; +let resultTime; +function updateResults() { + if (inputEl.value <= 0 || isNaN(inputEl.value)) { + errorEl.innerText = "Please enter a valid number!"; + clearTimeout(errorTime); + errorTime = setTimeout(() => { + errorEl.innerText = ""; + inputEl.value = ""; + }, 2000); + } else { + resultEl.innerText = (+inputEl.value / 2.2).toFixed(2); + clearTimeout(resultTime); + resultTime = setTimeout(() => { + resultEl.innerText = ""; + inputEl.value = ""; + }, 10000); + } +} + +inputEl.addEventListener("input", updateResults); diff --git a/weight-converter/style.css b/weight-converter/style.css new file mode 100644 index 0000000..e69936b --- /dev/null +++ b/weight-converter/style.css @@ -0,0 +1,42 @@ +body{ + margin: 0; + background: linear-gradient(to left top, yellow, lightblue, yellow); + min-height: 100vh; + display: flex; + justify-content: center; + align-items: center; + font-family: 'Courier New', Courier, monospace; + color: darkcyan; +} + +.container{ + background: rgba(255,255,255,0.3); + padding: 20px; + box-shadow: 0 4px 10px rgba(0,0,0,.3); + border-radius: 10px; + width: 85%; + max-width: 450px; +} + +.input-container{ + display: flex; + justify-content: space-between; + align-items: center; + font-size: 18px; + font-weight: 700; +} + +.input{ + padding: 10px; + width: 70%; + background: rgba(255,255,255,0.3); + border-color: rgba(255,255,255,0.5); + font-size: 18px; + border-radius: 10px; + color: darkgreen; + outline: none; +} + +.error{ + color: red; +} \ No newline at end of file