├── .gitignore ├── 3d-boxes-background ├── index.html ├── script.js └── style.css ├── CONTIBUTING.md ├── Calculater ├── README.md ├── calc.css ├── calc.js └── index.html ├── Drum--kit ├── Readme.md ├── images │ ├── crash.png │ ├── kick.png │ ├── snare.png │ ├── tom1.png │ ├── tom2.png │ ├── tom3.png │ └── tom4.png ├── index.css ├── index.html ├── index.js └── sounds │ ├── crash.mp3 │ ├── kick-bass.mp3 │ ├── snare.mp3 │ ├── tom-1.mp3 │ ├── tom-2.mp3 │ ├── tom-3.mp3 │ └── tom-4.mp3 ├── Ecommerce_Frontend ├── README.md ├── about.php ├── admin │ ├── admin_accounts.php │ ├── admin_login.php │ ├── dashboard.php │ ├── messages.php │ ├── placed_orders.php │ ├── products.php │ ├── register_admin.php │ ├── update_product.php │ ├── update_profile.php │ └── users_accounts.php ├── cart.php ├── category.php ├── checkout.php ├── components │ ├── admin_header.php │ ├── admin_logout.php │ ├── connect.php │ ├── footer.php │ ├── user_header.php │ ├── user_logout.php │ └── wishlist_cart.php ├── contact.php ├── css │ ├── admin_style.css │ └── style.css ├── images │ ├── about-img.svg │ ├── home-bg.png │ ├── home-img-1.png │ ├── home-img-2.png │ ├── home-img-3.png │ ├── icon-1.png │ ├── icon-2.png │ ├── icon-3.png │ ├── icon-4.png │ ├── icon-5.png │ ├── icon-6.png │ ├── icon-7.png │ ├── icon-8.png │ ├── pic-1.png │ ├── pic-2.png │ ├── pic-3.png │ ├── pic-4.png │ ├── pic-5.png │ └── pic-6.png ├── js │ ├── admin_script.js │ └── script.js ├── orders.php ├── project images │ ├── camera-1.webp │ ├── camera-2.webp │ ├── camera-3.webp │ ├── fridge-1.webp │ ├── fridge-2.webp │ ├── fridge-3.webp │ ├── laptop-1.webp │ ├── laptop-2.webp │ ├── laptop-3.webp │ ├── mixer-1.webp │ ├── mixer-2.webp │ ├── mixer-3.webp │ ├── mouse-1.webp │ ├── mouse-2.webp │ ├── mouse-3.webp │ ├── smartphone-1.webp │ ├── smartphone-2.webp │ ├── smartphone-3.webp │ ├── tv-01.webp │ ├── tv-02.webp │ ├── tv-03.webp │ ├── washing machine-1.webp │ ├── washing machine-2.webp │ ├── washing machine-3.webp │ ├── watch-1.webp │ ├── watch-2.webp │ └── watch-3.webp ├── quick_view.php ├── search_page.php ├── shop.php ├── shop_db.sql ├── update_user.php ├── user_login.php ├── user_register.php └── wishlist.php ├── Pizza-Shop ├── css │ └── style.css ├── images │ ├── about-1.svg │ ├── about-2.svg │ ├── about-3.svg │ ├── home-bg.jpg │ ├── home-img-1.png │ ├── home-img-2.png │ ├── home-img-3.png │ ├── pizza-1.jpg │ ├── pizza-2.jpg │ ├── pizza-3.jpg │ ├── pizza-4.jpg │ ├── pizza-5.jpg │ ├── pizza-6.jpg │ ├── pizza-7.jpg │ ├── pizza-8.jpg │ └── pizza-9.jpg ├── index.html └── js │ └── script.js ├── README.md ├── Random_Quote_Generator ├── README.md ├── css │ ├── normalize.css │ └── styles.css ├── index.html └── js │ └── script.js ├── SignUpSignInModule ├── README.md ├── Register.html ├── index.html ├── login.js ├── register.js └── welcome.html ├── Simon Game Challenge ├── index.html ├── index.js ├── sounds │ ├── blue.mp3 │ ├── green.mp3 │ ├── red.mp3 │ ├── wrong.mp3 │ └── yellow.mp3 └── styles.css ├── Sorting-Visualizer-main ├── index.html ├── index.js └── style.css ├── StopWatch ├── README.md ├── index.html ├── stopwatch.css └── stopwatch.js ├── Tic-Tac-Toe ├── index.html ├── script.js └── style.css ├── animated-countdown ├── index.html ├── script.js └── style.css ├── blackJackgame ├── index.css ├── index.html └── index.js ├── dad-jokes ├── index.html ├── script.js └── style.css ├── dropdown ├── README.md ├── index.html ├── index.js └── styles.css ├── food -api ├── food.jpg ├── index.html ├── script.js └── style.css ├── food-api ├── food.jpg ├── index.html ├── script.js └── style.css ├── keyboard-master ├── index.html ├── script.js └── style.css ├── lift-simulation ├── README.md ├── index.html ├── lift.js └── styles.css ├── notes-app ├── index.html ├── script.js └── style.css ├── online education ├── css │ └── style.css ├── images │ ├── about-img.svg │ ├── contact-img.svg │ ├── course-1.svg │ ├── course-2.svg │ ├── course-3.svg │ ├── course-4.svg │ ├── course-5.svg │ ├── course-6.svg │ ├── homg-img.svg │ ├── pic-1.png │ ├── pic-2.png │ ├── pic-3.png │ ├── pic-4.png │ ├── pic-5.png │ ├── pic-6.png │ ├── tutor-1.png │ ├── tutor-2.png │ ├── tutor-3.png │ ├── tutor-4.png │ ├── tutor-5.png │ └── tutor-6.png ├── index.html └── js │ └── script.js ├── password-generator ├── index.html ├── script.js └── style.css ├── password-strength-background ├── index.html ├── script.js └── style.css ├── real-estate website ├── css │ └── style.txt ├── images │ ├── home-bg.jpg │ ├── icon-1.png │ ├── icon-2.png │ ├── icon-3.png │ ├── img-1.jpg │ ├── img-2.jpg │ ├── img-3.jpg │ ├── img-4.jpg │ ├── img-5.jpg │ ├── img-6.jpg │ ├── pic-1.png │ ├── pic-2.png │ ├── pic-3.png │ ├── pic-4.png │ ├── s-1.png │ ├── s-2.png │ └── s-3.png └── index.txt ├── spotify_clone ├── ak.jpg ├── bg.png ├── covers │ ├── 1.jpg │ ├── 10.jpg │ ├── 2.jpg │ ├── 3.jpg │ ├── 4.jpg │ ├── 5.jpg │ ├── 6.jpg │ ├── 7.jpg │ ├── 8.jpg │ └── 9.jpg ├── index.html ├── logo.png ├── playing.gif ├── script.js ├── songs │ ├── 1.mp3 │ ├── 10.mp3 │ ├── 2.mp3 │ ├── 3.mp3 │ ├── 4.mp3 │ ├── 5.mp3 │ ├── 6.mp3 │ ├── 7.mp3 │ ├── 8.mp3 │ └── 9.mp3 └── style.css ├── to-do-list ├── README.md └── htm1.html └── tour and travel website ├── images ├── 1.jpg ├── 2.jpg ├── 3.jpg ├── 4.jpg ├── 5.jpg ├── 6.jpg ├── book-img.svg ├── contact-img.svg ├── g-1.jpg ├── g-2.jpg ├── g-3.jpg ├── g-4.jpg ├── g-5.jpg ├── g-6.jpg ├── g-7.jpg ├── g-8.jpg ├── g-9.jpg ├── p-1.jpg ├── p-2.jpg ├── p-3.jpg ├── p-4.jpg ├── p-5.jpg ├── p-6.jpg ├── pic1.png ├── pic2.png ├── pic3.png ├── pic4.png ├── vid-1.mp4 ├── vid-2.mp4 ├── vid-3.mp4 ├── vid-4.mp4 └── vid-5.mp4 ├── index.txt ├── script.txt └── style.txt /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | .DS_Store 3 | /*.env 4 | npm-debug.log 5 | /*.cpp -------------------------------------------------------------------------------- /3d-boxes-background/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | 13 | 3D Boxes Background 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /3d-boxes-background/script.js: -------------------------------------------------------------------------------- 1 | const boxesContainer = document.getElementById('boxes') 2 | const btn = document.getElementById('btn') 3 | 4 | btn.addEventListener('click', () => boxesContainer.classList.toggle('big')) 5 | 6 | function createBoxes() { 7 | for (let i = 0; i < 4; i++) { 8 | for (let j = 0; j < 4; j++) { 9 | const box = document.createElement('div') 10 | box.classList.add('box') 11 | box.style.backgroundPosition = `${-j * 125}px ${-i * 125}px` 12 | boxesContainer.appendChild(box) 13 | } 14 | } 15 | } 16 | 17 | createBoxes() 18 | -------------------------------------------------------------------------------- /3d-boxes-background/style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap'); 2 | @import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap'); 3 | 4 | * { 5 | box-sizing: border-box; 6 | } 7 | 8 | body { 9 | background-color: #fafafa; 10 | font-family: 'Roboto', sans-serif; 11 | display: flex; 12 | flex-direction: column; 13 | align-items: center; 14 | justify-content: center; 15 | height: 100vh; 16 | overflow: hidden; 17 | } 18 | 19 | .magic { 20 | background-color: #f9ca24; 21 | color: #fff; 22 | font-family: 'Poppins', sans-serif; 23 | border: 0; 24 | border-radius: 3px; 25 | font-size: 16px; 26 | padding: 12px 20px; 27 | cursor: pointer; 28 | position: fixed; 29 | top: 20px; 30 | letter-spacing: 1px; 31 | box-shadow: 0 3px rgba(249, 202, 36, 0.5); 32 | z-index: 100; 33 | } 34 | 35 | .magic:focus { 36 | outline: none; 37 | } 38 | 39 | .magic:active { 40 | box-shadow: none; 41 | transform: translateY(2px); 42 | } 43 | 44 | .boxes { 45 | display: flex; 46 | flex-wrap: wrap; 47 | justify-content: space-around; 48 | height: 500px; 49 | width: 500px; 50 | position: relative; 51 | transition: 0.4s ease; 52 | } 53 | 54 | .boxes.big { 55 | width: 600px; 56 | height: 600px; 57 | } 58 | 59 | .boxes.big .box { 60 | transform: rotateZ(360deg); 61 | } 62 | 63 | .box { 64 | background-image: url('https://media.giphy.com/media/EZqwsBSPlvSda/giphy.gif'); 65 | background-repeat: no-repeat; 66 | background-size: 500px 500px; 67 | position: relative; 68 | height: 125px; 69 | width: 125px; 70 | transition: 0.4s ease; 71 | } 72 | 73 | .box::after { 74 | content: ''; 75 | background-color: #f6e58d; 76 | position: absolute; 77 | top: 8px; 78 | right: -15px; 79 | height: 100%; 80 | width: 15px; 81 | transform: skewY(45deg); 82 | } 83 | 84 | .box::before { 85 | content: ''; 86 | background-color: #f9ca24; 87 | position: absolute; 88 | bottom: -15px; 89 | left: 8px; 90 | height: 15px; 91 | width: 100%; 92 | transform: skewX(45deg); 93 | } 94 | -------------------------------------------------------------------------------- /CONTIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guidelines 2 | 3 | ## Make sure to go through all the sections in README.md 4 | 5 | ## Contributing Guidelines: 6 | 7 | **1.** Fork the repository. 8 | 9 | **2.** Clone your forked copy of the project into your local system. 10 | 11 | ``` 12 | git clone https://github.com//.git 13 | ``` 14 | 15 | **3.** Navigate to the project directory. 📁 16 | 17 | ``` 18 | cd 19 | ``` 20 | 21 | **4.** Add a reference (remote) to the original repository. 22 | 23 | ``` 24 | git remote add upstream https://github.com// 25 | ``` 26 | 27 | **5.** Check the remotes for this repository. 28 | 29 | ``` 30 | git remote -v 31 | ``` 32 | 33 | **6.** Always take a pull from the upstream repository to your master branch to keep it at par with the main project (updated repository). 34 | 35 | ``` 36 | git pull upstream main 37 | ``` 38 | 39 | **7.** Create a new branch. 40 | 41 | ``` 42 | git checkout -b 43 | ``` 44 | 45 | **8.** Perform your desired changes to the code base. 46 | 47 | **9.** Track your changes. ✔️ 48 | 49 | ``` 50 | git add . 51 | ``` 52 | 53 | **10.** Commit your changes. 54 | 55 | ``` 56 | git commit -m "a Relevant message" 57 | ``` 58 | 59 | **11.** Push the committed changes in your feature branch to your remote repository. 60 | 61 | ``` 62 | git push -u origin 63 | ``` 64 | 65 | **12.** To create a pull request, click on `compare and pull requests`. Please ensure you compare your feature branch to the desired branch of the repository you are supposed to make a PR to. 66 | 67 | **13.** Add appropriate title and description to your pull request explaining your changes and efforts done. Also try to add the screenshot of the changes. 68 | 69 | **14.** Click on `Create Pull Request`. 70 | 71 | **15.** Voila! You have made a PR to the project. Sit back and relax while your PR is reviewed by the maintainers. 72 | -------------------------------------------------------------------------------- /Calculater/README.md: -------------------------------------------------------------------------------- 1 | # Calculator Mini_project 2 | - Calculator program can be built using any language but since the repo is all about java script , this project is made using java script with additional help of html and css. 3 | 4 | ## Features of the Calculator 5 | 6 | 1. It performs basic arithmetic operations like addition, subtraction, division, and multiplication. 7 | 2. It performs decimal operations. 8 | 3. The calculator will display Infinity if you try to divide any number by zero. 9 | 4. It will not display any result in case of invalid expression. For example, 5++9 will not display anything. 10 | 5. Clear screen feature to clear the display screen anytime you want. 11 | 12 | 13 | ## Do you want to run this project? 14 | 15 | Clone the repo to your System into your code editor and run the program :) 16 | -------------------------------------------------------------------------------- /Calculater/calc.css: -------------------------------------------------------------------------------- 1 | *, *::before, *::after { 2 | box-sizing: border-box; 3 | font-family: Gotham Rounded, sans-serif; 4 | font-weight: normal; 5 | } 6 | 7 | body { 8 | padding: 0; 9 | margin: 0; 10 | background-color:rgb(145, 254, 179) ; 11 | } 12 | 13 | .calculator-grid { 14 | display: grid; 15 | justify-content: center; 16 | align-content: center; 17 | min-height: 80vh; 18 | grid-template-columns: repeat(4, 100px); 19 | grid-template-rows: minmax(120px, auto) repeat(5, 100px); 20 | } 21 | 22 | .calculator-grid > button { 23 | cursor: pointer; 24 | font-size: 2rem; 25 | border: 1px solid white; 26 | outline: none; 27 | background-color: rgba(127, 195, 254, 0.75); 28 | } 29 | 30 | .calculator-grid > button:hover { 31 | background-color: rgba(255, 255, 255, .9); 32 | } 33 | 34 | .span-two { 35 | grid-column: span 2; 36 | } 37 | 38 | .output { 39 | grid-column: 1 / -1; 40 | background-color: rgba(0, 0, 0, .75); 41 | display: flex; 42 | align-items: flex-end; 43 | justify-content: space-around; 44 | flex-direction: column; 45 | padding: 10px; 46 | word-wrap: break-word; 47 | word-break: break-all; 48 | } 49 | 50 | .output .previous-operand { 51 | color: rgba(255, 255, 255, .75); 52 | font-size: 1.5rem; 53 | } 54 | 55 | .output .current-operand { 56 | color: white; 57 | font-size: 2.5rem; 58 | } 59 | -------------------------------------------------------------------------------- /Calculater/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Calculator 8 | 9 | 10 | 11 | 12 |
13 |
14 |
15 |
16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |
36 | 37 | -------------------------------------------------------------------------------- /Drum--kit/Readme.md: -------------------------------------------------------------------------------- 1 | # Drum-Kit 2 | > This is a JavaScript based Drum Kit WebApp where user can play different drum beats by key press or by m ouse stroke. 3 | > The app is optimized for the mobile view also. 4 | 5 | # Tech Stack Used are:- 6 | > HTML, CSS, JavaScript 7 | 8 | # To clone this project 9 | > Clone the repo 10 | > cd Drum--kit 11 | > Go live using the Live Server Extension 12 | -------------------------------------------------------------------------------- /Drum--kit/images/crash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Drum--kit/images/crash.png -------------------------------------------------------------------------------- /Drum--kit/images/kick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Drum--kit/images/kick.png -------------------------------------------------------------------------------- /Drum--kit/images/snare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Drum--kit/images/snare.png -------------------------------------------------------------------------------- /Drum--kit/images/tom1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Drum--kit/images/tom1.png -------------------------------------------------------------------------------- /Drum--kit/images/tom2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Drum--kit/images/tom2.png -------------------------------------------------------------------------------- /Drum--kit/images/tom3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Drum--kit/images/tom3.png -------------------------------------------------------------------------------- /Drum--kit/images/tom4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Drum--kit/images/tom4.png -------------------------------------------------------------------------------- /Drum--kit/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | text-align: center; 3 | background-color: #F10086; 4 | } 5 | 6 | h1 { 7 | font-size: 5rem; 8 | color: #DBEDF3; 9 | font-family: "Arvo", cursive; 10 | text-shadow: 3px 0 #DA0463; 11 | 12 | } 13 | 14 | footer { 15 | color: #DBEDF3; 16 | font-family: sans-serif; 17 | } 18 | 19 | .w { 20 | 21 | background-image: url("images/tom1.png"); 22 | 23 | } 24 | 25 | .a { 26 | 27 | background-image: url("images/tom2.png"); 28 | 29 | } 30 | 31 | .s { 32 | 33 | background-image: url("images/tom3.png"); 34 | 35 | } 36 | 37 | .d { 38 | 39 | background-image: url("images/tom4.png"); 40 | 41 | } 42 | 43 | .j { 44 | 45 | background-image: url("images/crash.png"); 46 | 47 | } 48 | 49 | .k { 50 | 51 | background-image: url("images/kick.png"); 52 | 53 | } 54 | 55 | .l { 56 | 57 | background-image: url("images/snare.png"); 58 | 59 | } 60 | 61 | .set { 62 | margin: 10% auto; 63 | } 64 | 65 | .game-over { 66 | background-color: red; 67 | opacity: 0.8; 68 | } 69 | 70 | .pressed { 71 | box-shadow: 0 3px 4px 0 #FFBDE6; 72 | opacity: 0.5; 73 | } 74 | 75 | .red { 76 | color: red; 77 | } 78 | 79 | .drum { 80 | outline: none; 81 | border: 10px solid #F582A7; 82 | font-size: 5rem; 83 | font-family: 'Arvo', cursive; 84 | line-height: 2; 85 | font-weight: 900; 86 | color: #DA0463; 87 | text-shadow: 3px 0 #DBEDF3; 88 | border-radius: 15px; 89 | display: inline-block; 90 | width: 150px; 91 | height: 150px; 92 | text-align: center; 93 | margin: 10px; 94 | background-color: white; 95 | } -------------------------------------------------------------------------------- /Drum--kit/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Drum kit 7 | 8 | 9 | 10 | 11 | 12 | 13 |

Drum 🥁 Kit

14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 |
26 | Made with ❤️ in Connecticut. 27 |
28 | 29 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Drum--kit/index.js: -------------------------------------------------------------------------------- 1 | var n=document.querySelectorAll(".drum").length 2 | for(var i =0;i 12 | 13 | ``` -------------------------------------------------------------------------------- /Ecommerce_Frontend/admin/admin_accounts.php: -------------------------------------------------------------------------------- 1 | prepare("DELETE FROM `admins` WHERE id = ?"); 16 | $delete_admins->execute([$delete_id]); 17 | header('location:admin_accounts.php'); 18 | } 19 | 20 | ?> 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | admin accounts 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
40 | 41 |

admin accounts

42 | 43 |
44 | 45 |
46 |

add new admin

47 | register admin 48 |
49 | 50 | prepare("SELECT * FROM `admins`"); 52 | $select_accounts->execute(); 53 | if($select_accounts->rowCount() > 0){ 54 | while($fetch_accounts = $select_accounts->fetch(PDO::FETCH_ASSOC)){ 55 | ?> 56 |
57 |

admin id :

58 |

admin name :

59 |
60 | delete 61 | update'; 64 | } 65 | ?> 66 |
67 |
68 | no accounts available!

'; 72 | } 73 | ?> 74 | 75 |
76 | 77 |
78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /Ecommerce_Frontend/admin/admin_login.php: -------------------------------------------------------------------------------- 1 | prepare("SELECT * FROM `admins` WHERE name = ? AND password = ?"); 15 | $select_admin->execute([$name, $pass]); 16 | $row = $select_admin->fetch(PDO::FETCH_ASSOC); 17 | 18 | if($select_admin->rowCount() > 0){ 19 | $_SESSION['admin_id'] = $row['id']; 20 | header('location:dashboard.php'); 21 | }else{ 22 | $message[] = 'incorrect username or password!'; 23 | } 24 | 25 | } 26 | 27 | ?> 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | login 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 49 | '.$message.' 50 | 51 | 52 | '; 53 | } 54 | } 55 | ?> 56 | 57 |
58 | 59 |
60 |

login now

61 |

default username = admin & password = 111

62 | 63 | 64 | 65 |
66 | 67 |
68 | 69 | 70 | -------------------------------------------------------------------------------- /Ecommerce_Frontend/admin/messages.php: -------------------------------------------------------------------------------- 1 | prepare("DELETE FROM `messages` WHERE id = ?"); 16 | $delete_message->execute([$delete_id]); 17 | header('location:messages.php'); 18 | } 19 | 20 | ?> 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | messages 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
40 | 41 |

messages

42 | 43 |
44 | 45 | prepare("SELECT * FROM `messages`"); 47 | $select_messages->execute(); 48 | if($select_messages->rowCount() > 0){ 49 | while($fetch_message = $select_messages->fetch(PDO::FETCH_ASSOC)){ 50 | ?> 51 |
52 |

user id :

53 |

name :

54 |

email :

55 |

number :

56 |

message :

57 | delete 58 |
59 | you have no messages

'; 63 | } 64 | ?> 65 | 66 |
67 | 68 |
69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /Ecommerce_Frontend/admin/placed_orders.php: -------------------------------------------------------------------------------- 1 | prepare("UPDATE `orders` SET payment_status = ? WHERE id = ?"); 18 | $update_payment->execute([$payment_status, $order_id]); 19 | $message[] = 'payment status updated!'; 20 | } 21 | 22 | if(isset($_GET['delete'])){ 23 | $delete_id = $_GET['delete']; 24 | $delete_order = $conn->prepare("DELETE FROM `orders` WHERE id = ?"); 25 | $delete_order->execute([$delete_id]); 26 | header('location:placed_orders.php'); 27 | } 28 | 29 | ?> 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | placed orders 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 |
49 | 50 |

placed orders

51 | 52 |
53 | 54 | prepare("SELECT * FROM `orders`"); 56 | $select_orders->execute(); 57 | if($select_orders->rowCount() > 0){ 58 | while($fetch_orders = $select_orders->fetch(PDO::FETCH_ASSOC)){ 59 | ?> 60 |
61 |

placed on :

62 |

name :

63 |

number :

64 |

address :

65 |

total products :

66 |

total price : $/-

67 |

payment method :

68 |
69 | 70 | 75 |
76 | 77 | delete 78 |
79 |
80 |
81 | no orders placed yet!

'; 85 | } 86 | ?> 87 | 88 |
89 | 90 |
91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /Ecommerce_Frontend/admin/register_admin.php: -------------------------------------------------------------------------------- 1 | prepare("SELECT * FROM `admins` WHERE name = ?"); 23 | $select_admin->execute([$name]); 24 | 25 | if($select_admin->rowCount() > 0){ 26 | $message[] = 'username already exist!'; 27 | }else{ 28 | if($pass != $cpass){ 29 | $message[] = 'confirm password not matched!'; 30 | }else{ 31 | $insert_admin = $conn->prepare("INSERT INTO `admins`(name, password) VALUES(?,?)"); 32 | $insert_admin->execute([$name, $cpass]); 33 | $message[] = 'new admin registered successfully!'; 34 | } 35 | } 36 | 37 | } 38 | 39 | ?> 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | register admin 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |
59 | 60 |
61 |

register now

62 | 63 | 64 | 65 | 66 |
67 | 68 |
69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /Ecommerce_Frontend/admin/update_profile.php: -------------------------------------------------------------------------------- 1 | prepare("UPDATE `admins` SET name = ? WHERE id = ?"); 19 | $update_profile_name->execute([$name, $admin_id]); 20 | 21 | $empty_pass = 'da39a3ee5e6b4b0d3255bfef95601890afd80709'; 22 | $prev_pass = $_POST['prev_pass']; 23 | $old_pass = sha1($_POST['old_pass']); 24 | $old_pass = filter_var($old_pass, FILTER_SANITIZE_STRING); 25 | $new_pass = sha1($_POST['new_pass']); 26 | $new_pass = filter_var($new_pass, FILTER_SANITIZE_STRING); 27 | $confirm_pass = sha1($_POST['confirm_pass']); 28 | $confirm_pass = filter_var($confirm_pass, FILTER_SANITIZE_STRING); 29 | 30 | if($old_pass == $empty_pass){ 31 | $message[] = 'please enter old password!'; 32 | }elseif($old_pass != $prev_pass){ 33 | $message[] = 'old password not matched!'; 34 | }elseif($new_pass != $confirm_pass){ 35 | $message[] = 'confirm password not matched!'; 36 | }else{ 37 | if($new_pass != $empty_pass){ 38 | $update_admin_pass = $conn->prepare("UPDATE `admins` SET password = ? WHERE id = ?"); 39 | $update_admin_pass->execute([$confirm_pass, $admin_id]); 40 | $message[] = 'password updated successfully!'; 41 | }else{ 42 | $message[] = 'please enter a new password!'; 43 | } 44 | } 45 | 46 | } 47 | 48 | ?> 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | update profile 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 |
68 | 69 |
70 |

update profile

71 | 72 | 73 | 74 | 75 | 76 | 77 |
78 | 79 |
80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /Ecommerce_Frontend/admin/users_accounts.php: -------------------------------------------------------------------------------- 1 | prepare("DELETE FROM `users` WHERE id = ?"); 16 | $delete_user->execute([$delete_id]); 17 | $delete_orders = $conn->prepare("DELETE FROM `orders` WHERE user_id = ?"); 18 | $delete_orders->execute([$delete_id]); 19 | $delete_messages = $conn->prepare("DELETE FROM `messages` WHERE user_id = ?"); 20 | $delete_messages->execute([$delete_id]); 21 | $delete_cart = $conn->prepare("DELETE FROM `cart` WHERE user_id = ?"); 22 | $delete_cart->execute([$delete_id]); 23 | $delete_wishlist = $conn->prepare("DELETE FROM `wishlist` WHERE user_id = ?"); 24 | $delete_wishlist->execute([$delete_id]); 25 | header('location:users_accounts.php'); 26 | } 27 | 28 | ?> 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | users accounts 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
48 | 49 |

user accounts

50 | 51 |
52 | 53 | prepare("SELECT * FROM `users`"); 55 | $select_accounts->execute(); 56 | if($select_accounts->rowCount() > 0){ 57 | while($fetch_accounts = $select_accounts->fetch(PDO::FETCH_ASSOC)){ 58 | ?> 59 |
60 |

user id :

61 |

username :

62 |

email :

63 | delete 64 |
65 | no accounts available!

'; 69 | } 70 | ?> 71 | 72 |
73 | 74 |
75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /Ecommerce_Frontend/category.php: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | category 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
37 | 38 |

category

39 | 40 |
41 | 42 | prepare("SELECT * FROM `products` WHERE name LIKE '%{$category}%'"); 45 | $select_products->execute(); 46 | if($select_products->rowCount() > 0){ 47 | while($fetch_product = $select_products->fetch(PDO::FETCH_ASSOC)){ 48 | ?> 49 |
50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 |
58 |
59 |
$/-
60 | 61 |
62 | 63 |
64 | no products found!

'; 68 | } 69 | ?> 70 | 71 |
72 | 73 |
74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /Ecommerce_Frontend/components/admin_header.php: -------------------------------------------------------------------------------- 1 | 6 | '.$message.' 7 | 8 | 9 | '; 10 | } 11 | } 12 | ?> 13 | 14 |
15 | 16 |
17 | 18 | 19 | 20 | 28 | 29 |
30 | 31 |
32 |
33 | 34 |
35 | prepare("SELECT * FROM `admins` WHERE id = ?"); 37 | $select_profile->execute([$admin_id]); 38 | $fetch_profile = $select_profile->fetch(PDO::FETCH_ASSOC); 39 | ?> 40 |

41 | update profile 42 |
43 | register 44 | login 45 |
46 | logout 47 |
48 | 49 |
50 | 51 |
-------------------------------------------------------------------------------- /Ecommerce_Frontend/components/admin_logout.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Ecommerce_Frontend/components/connect.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Ecommerce_Frontend/components/footer.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Ecommerce_Frontend/components/user_header.php: -------------------------------------------------------------------------------- 1 | 6 | '.$message.' 7 | 8 | 9 | '; 10 | } 11 | } 12 | ?> 13 | 14 |
15 | 16 |
17 | 18 | 19 | 20 | 27 | 28 |
29 | prepare("SELECT * FROM `wishlist` WHERE user_id = ?"); 31 | $count_wishlist_items->execute([$user_id]); 32 | $total_wishlist_counts = $count_wishlist_items->rowCount(); 33 | 34 | $count_cart_items = $conn->prepare("SELECT * FROM `cart` WHERE user_id = ?"); 35 | $count_cart_items->execute([$user_id]); 36 | $total_cart_counts = $count_cart_items->rowCount(); 37 | ?> 38 | 39 | 40 | () 41 | () 42 |
43 |
44 | 45 |
46 | prepare("SELECT * FROM `users` WHERE id = ?"); 48 | $select_profile->execute([$user_id]); 49 | if($select_profile->rowCount() > 0){ 50 | $fetch_profile = $select_profile->fetch(PDO::FETCH_ASSOC); 51 | ?> 52 |

53 | update profile 54 |
55 | register 56 | login 57 |
58 | logout 59 | 62 |

please login or register first!

63 |
64 | register 65 | login 66 |
67 | 70 | 71 | 72 |
73 | 74 |
75 | 76 |
-------------------------------------------------------------------------------- /Ecommerce_Frontend/components/user_logout.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Ecommerce_Frontend/components/wishlist_cart.php: -------------------------------------------------------------------------------- 1 | prepare("SELECT * FROM `wishlist` WHERE name = ? AND user_id = ?"); 19 | $check_wishlist_numbers->execute([$name, $user_id]); 20 | 21 | $check_cart_numbers = $conn->prepare("SELECT * FROM `cart` WHERE name = ? AND user_id = ?"); 22 | $check_cart_numbers->execute([$name, $user_id]); 23 | 24 | if($check_wishlist_numbers->rowCount() > 0){ 25 | $message[] = 'already added to wishlist!'; 26 | }elseif($check_cart_numbers->rowCount() > 0){ 27 | $message[] = 'already added to cart!'; 28 | }else{ 29 | $insert_wishlist = $conn->prepare("INSERT INTO `wishlist`(user_id, pid, name, price, image) VALUES(?,?,?,?,?)"); 30 | $insert_wishlist->execute([$user_id, $pid, $name, $price, $image]); 31 | $message[] = 'added to wishlist!'; 32 | } 33 | 34 | } 35 | 36 | } 37 | 38 | if(isset($_POST['add_to_cart'])){ 39 | 40 | if($user_id == ''){ 41 | header('location:user_login.php'); 42 | }else{ 43 | 44 | $pid = $_POST['pid']; 45 | $pid = filter_var($pid, FILTER_SANITIZE_STRING); 46 | $name = $_POST['name']; 47 | $name = filter_var($name, FILTER_SANITIZE_STRING); 48 | $price = $_POST['price']; 49 | $price = filter_var($price, FILTER_SANITIZE_STRING); 50 | $image = $_POST['image']; 51 | $image = filter_var($image, FILTER_SANITIZE_STRING); 52 | $qty = $_POST['qty']; 53 | $qty = filter_var($qty, FILTER_SANITIZE_STRING); 54 | 55 | $check_cart_numbers = $conn->prepare("SELECT * FROM `cart` WHERE name = ? AND user_id = ?"); 56 | $check_cart_numbers->execute([$name, $user_id]); 57 | 58 | if($check_cart_numbers->rowCount() > 0){ 59 | $message[] = 'already added to cart!'; 60 | }else{ 61 | 62 | $check_wishlist_numbers = $conn->prepare("SELECT * FROM `wishlist` WHERE name = ? AND user_id = ?"); 63 | $check_wishlist_numbers->execute([$name, $user_id]); 64 | 65 | if($check_wishlist_numbers->rowCount() > 0){ 66 | $delete_wishlist = $conn->prepare("DELETE FROM `wishlist` WHERE name = ? AND user_id = ?"); 67 | $delete_wishlist->execute([$name, $user_id]); 68 | } 69 | 70 | $insert_cart = $conn->prepare("INSERT INTO `cart`(user_id, pid, name, price, quantity, image) VALUES(?,?,?,?,?,?)"); 71 | $insert_cart->execute([$user_id, $pid, $name, $price, $qty, $image]); 72 | $message[] = 'added to cart!'; 73 | 74 | } 75 | 76 | } 77 | 78 | } 79 | 80 | ?> -------------------------------------------------------------------------------- /Ecommerce_Frontend/contact.php: -------------------------------------------------------------------------------- 1 | prepare("SELECT * FROM `messages` WHERE name = ? AND email = ? AND number = ? AND message = ?"); 25 | $select_message->execute([$name, $email, $number, $msg]); 26 | 27 | if($select_message->rowCount() > 0){ 28 | $message[] = 'already sent message!'; 29 | }else{ 30 | 31 | $insert_message = $conn->prepare("INSERT INTO `messages`(user_id, name, email, number, message) VALUES(?,?,?,?,?)"); 32 | $insert_message->execute([$user_id, $name, $email, $number, $msg]); 33 | 34 | $message[] = 'sent message successfully!'; 35 | 36 | } 37 | 38 | } 39 | 40 | 41 | ?> 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | contact 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 |
63 | 64 |
65 |

get in touch

66 | 67 | 68 | 69 | 70 | 71 |
72 | 73 |
74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /Ecommerce_Frontend/images/home-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/images/home-bg.png -------------------------------------------------------------------------------- /Ecommerce_Frontend/images/home-img-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/images/home-img-1.png -------------------------------------------------------------------------------- /Ecommerce_Frontend/images/home-img-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/images/home-img-2.png -------------------------------------------------------------------------------- /Ecommerce_Frontend/images/home-img-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/images/home-img-3.png -------------------------------------------------------------------------------- /Ecommerce_Frontend/images/icon-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/images/icon-1.png -------------------------------------------------------------------------------- /Ecommerce_Frontend/images/icon-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/images/icon-2.png -------------------------------------------------------------------------------- /Ecommerce_Frontend/images/icon-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/images/icon-3.png -------------------------------------------------------------------------------- /Ecommerce_Frontend/images/icon-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/images/icon-4.png -------------------------------------------------------------------------------- /Ecommerce_Frontend/images/icon-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/images/icon-5.png -------------------------------------------------------------------------------- /Ecommerce_Frontend/images/icon-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/images/icon-6.png -------------------------------------------------------------------------------- /Ecommerce_Frontend/images/icon-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/images/icon-7.png -------------------------------------------------------------------------------- /Ecommerce_Frontend/images/icon-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/images/icon-8.png -------------------------------------------------------------------------------- /Ecommerce_Frontend/images/pic-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/images/pic-1.png -------------------------------------------------------------------------------- /Ecommerce_Frontend/images/pic-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/images/pic-2.png -------------------------------------------------------------------------------- /Ecommerce_Frontend/images/pic-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/images/pic-3.png -------------------------------------------------------------------------------- /Ecommerce_Frontend/images/pic-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/images/pic-4.png -------------------------------------------------------------------------------- /Ecommerce_Frontend/images/pic-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/images/pic-5.png -------------------------------------------------------------------------------- /Ecommerce_Frontend/images/pic-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/images/pic-6.png -------------------------------------------------------------------------------- /Ecommerce_Frontend/js/admin_script.js: -------------------------------------------------------------------------------- 1 | let navbar = document.querySelector('.header .flex .navbar'); 2 | let profile = document.querySelector('.header .flex .profile'); 3 | 4 | document.querySelector('#menu-btn').onclick = () =>{ 5 | navbar.classList.toggle('active'); 6 | profile.classList.remove('active'); 7 | } 8 | 9 | document.querySelector('#user-btn').onclick = () =>{ 10 | profile.classList.toggle('active'); 11 | navbar.classList.remove('active'); 12 | } 13 | 14 | window.onscroll = () =>{ 15 | navbar.classList.remove('active'); 16 | profile.classList.remove('active'); 17 | } 18 | 19 | let mainImage = document.querySelector('.update-product .image-container .main-image img'); 20 | let subImages = document.querySelectorAll('.update-product .image-container .sub-image img'); 21 | 22 | subImages.forEach(images =>{ 23 | images.onclick = () =>{ 24 | src = images.getAttribute('src'); 25 | mainImage.src = src; 26 | } 27 | }); -------------------------------------------------------------------------------- /Ecommerce_Frontend/js/script.js: -------------------------------------------------------------------------------- 1 | let navbar = document.querySelector('.header .flex .navbar'); 2 | let profile = document.querySelector('.header .flex .profile'); 3 | 4 | document.querySelector('#menu-btn').onclick = () =>{ 5 | navbar.classList.toggle('active'); 6 | profile.classList.remove('active'); 7 | } 8 | 9 | document.querySelector('#user-btn').onclick = () =>{ 10 | profile.classList.toggle('active'); 11 | navbar.classList.remove('active'); 12 | } 13 | 14 | window.onscroll = () =>{ 15 | navbar.classList.remove('active'); 16 | profile.classList.remove('active'); 17 | } 18 | 19 | let mainImage = document.querySelector('.quick-view .box .row .image-container .main-image img'); 20 | let subImages = document.querySelectorAll('.quick-view .box .row .image-container .sub-image img'); 21 | 22 | subImages.forEach(images =>{ 23 | images.onclick = () =>{ 24 | src = images.getAttribute('src'); 25 | mainImage.src = src; 26 | } 27 | }); -------------------------------------------------------------------------------- /Ecommerce_Frontend/orders.php: -------------------------------------------------------------------------------- 1 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | orders 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 |
35 | 36 |

placed orders

37 | 38 |
39 | 40 | please login to see your orders

'; 43 | }else{ 44 | $select_orders = $conn->prepare("SELECT * FROM `orders` WHERE user_id = ?"); 45 | $select_orders->execute([$user_id]); 46 | if($select_orders->rowCount() > 0){ 47 | while($fetch_orders = $select_orders->fetch(PDO::FETCH_ASSOC)){ 48 | ?> 49 |
50 |

placed on :

51 |

name :

52 |

email :

53 |

number :

54 |

address :

55 |

payment method :

56 |

your orders :

57 |

total price : $/-

58 |

payment status :

59 |
60 | no orders placed yet!

'; 64 | } 65 | } 66 | ?> 67 | 68 |
69 | 70 |
71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/camera-1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/camera-1.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/camera-2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/camera-2.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/camera-3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/camera-3.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/fridge-1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/fridge-1.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/fridge-2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/fridge-2.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/fridge-3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/fridge-3.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/laptop-1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/laptop-1.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/laptop-2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/laptop-2.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/laptop-3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/laptop-3.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/mixer-1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/mixer-1.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/mixer-2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/mixer-2.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/mixer-3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/mixer-3.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/mouse-1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/mouse-1.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/mouse-2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/mouse-2.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/mouse-3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/mouse-3.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/smartphone-1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/smartphone-1.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/smartphone-2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/smartphone-2.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/smartphone-3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/smartphone-3.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/tv-01.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/tv-01.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/tv-02.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/tv-02.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/tv-03.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/tv-03.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/washing machine-1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/washing machine-1.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/washing machine-2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/washing machine-2.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/washing machine-3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/washing machine-3.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/watch-1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/watch-1.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/watch-2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/watch-2.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/project images/watch-3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Ecommerce_Frontend/project images/watch-3.webp -------------------------------------------------------------------------------- /Ecommerce_Frontend/quick_view.php: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | quick view 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
37 | 38 |

quick view

39 | 40 | prepare("SELECT * FROM `products` WHERE id = ?"); 43 | $select_products->execute([$pid]); 44 | if($select_products->rowCount() > 0){ 45 | while($fetch_product = $select_products->fetch(PDO::FETCH_ASSOC)){ 46 | ?> 47 |
48 | 49 | 50 | 51 | 52 |
53 |
54 |
55 | 56 |
57 |
58 | 59 | 60 | 61 |
62 |
63 |
64 |
65 |
66 |
$/-
67 | 68 |
69 |
70 |
71 | 72 | 73 |
74 |
75 |
76 |
77 | no products added yet!

'; 81 | } 82 | ?> 83 | 84 |
85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /Ecommerce_Frontend/search_page.php: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | search page 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
37 |
38 | 39 | 40 |
41 |
42 | 43 |
44 | 45 |
46 | 47 | prepare("SELECT * FROM `products` WHERE name LIKE '%{$search_box}%'"); 51 | $select_products->execute(); 52 | if($select_products->rowCount() > 0){ 53 | while($fetch_product = $select_products->fetch(PDO::FETCH_ASSOC)){ 54 | ?> 55 |
56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 |
64 |
65 |
$/-
66 | 67 |
68 | 69 |
70 | no products found!

'; 74 | } 75 | } 76 | ?> 77 | 78 |
79 | 80 |
81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /Ecommerce_Frontend/shop.php: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | shop 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
37 | 38 |

latest products

39 | 40 |
41 | 42 | prepare("SELECT * FROM `products`"); 44 | $select_products->execute(); 45 | if($select_products->rowCount() > 0){ 46 | while($fetch_product = $select_products->fetch(PDO::FETCH_ASSOC)){ 47 | ?> 48 |
49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 |
57 |
58 |
$/-
59 | 60 |
61 | 62 |
63 | no products found!

'; 67 | } 68 | ?> 69 | 70 |
71 | 72 |
73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /Ecommerce_Frontend/update_user.php: -------------------------------------------------------------------------------- 1 | prepare("UPDATE `users` SET name = ?, email = ? WHERE id = ?"); 21 | $update_profile->execute([$name, $email, $user_id]); 22 | 23 | $empty_pass = 'da39a3ee5e6b4b0d3255bfef95601890afd80709'; 24 | $prev_pass = $_POST['prev_pass']; 25 | $old_pass = sha1($_POST['old_pass']); 26 | $old_pass = filter_var($old_pass, FILTER_SANITIZE_STRING); 27 | $new_pass = sha1($_POST['new_pass']); 28 | $new_pass = filter_var($new_pass, FILTER_SANITIZE_STRING); 29 | $cpass = sha1($_POST['cpass']); 30 | $cpass = filter_var($cpass, FILTER_SANITIZE_STRING); 31 | 32 | if($old_pass == $empty_pass){ 33 | $message[] = 'please enter old password!'; 34 | }elseif($old_pass != $prev_pass){ 35 | $message[] = 'old password not matched!'; 36 | }elseif($new_pass != $cpass){ 37 | $message[] = 'confirm password not matched!'; 38 | }else{ 39 | if($new_pass != $empty_pass){ 40 | $update_admin_pass = $conn->prepare("UPDATE `users` SET password = ? WHERE id = ?"); 41 | $update_admin_pass->execute([$cpass, $user_id]); 42 | $message[] = 'password updated successfully!'; 43 | }else{ 44 | $message[] = 'please enter a new password!'; 45 | } 46 | } 47 | 48 | } 49 | 50 | ?> 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | register 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 |
72 | 73 |
74 |

update now

75 | "> 76 | "> 77 | "> 78 | 79 | 80 | 81 | 82 |
83 | 84 |
85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /Ecommerce_Frontend/user_login.php: -------------------------------------------------------------------------------- 1 | prepare("SELECT * FROM `users` WHERE email = ? AND password = ?"); 21 | $select_user->execute([$email, $pass]); 22 | $row = $select_user->fetch(PDO::FETCH_ASSOC); 23 | 24 | if($select_user->rowCount() > 0){ 25 | $_SESSION['user_id'] = $row['id']; 26 | header('location:home.php'); 27 | }else{ 28 | $message[] = 'incorrect username or password!'; 29 | } 30 | 31 | } 32 | 33 | ?> 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | login 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 |
55 | 56 |
57 |

login now

58 | 59 | 60 | 61 |

don't have an account?

62 | register now 63 |
64 | 65 |
66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /Ecommerce_Frontend/user_register.php: -------------------------------------------------------------------------------- 1 | prepare("SELECT * FROM `users` WHERE email = ?"); 25 | $select_user->execute([$email,]); 26 | $row = $select_user->fetch(PDO::FETCH_ASSOC); 27 | 28 | if($select_user->rowCount() > 0){ 29 | $message[] = 'email already exists!'; 30 | }else{ 31 | if($pass != $cpass){ 32 | $message[] = 'confirm password not matched!'; 33 | }else{ 34 | $insert_user = $conn->prepare("INSERT INTO `users`(name, email, password) VALUES(?,?,?)"); 35 | $insert_user->execute([$name, $email, $cpass]); 36 | $message[] = 'registered successfully, login now please!'; 37 | } 38 | } 39 | 40 | } 41 | 42 | ?> 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | register 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 |
64 | 65 |
66 |

register now

67 | 68 | 69 | 70 | 71 | 72 |

already have an account?

73 | login now 74 |
75 | 76 |
77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /Ecommerce_Frontend/wishlist.php: -------------------------------------------------------------------------------- 1 | prepare("DELETE FROM `wishlist` WHERE id = ?"); 19 | $delete_wishlist_item->execute([$wishlist_id]); 20 | } 21 | 22 | if(isset($_GET['delete_all'])){ 23 | $delete_wishlist_item = $conn->prepare("DELETE FROM `wishlist` WHERE user_id = ?"); 24 | $delete_wishlist_item->execute([$user_id]); 25 | header('location:wishlist.php'); 26 | } 27 | 28 | ?> 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | wishlist 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 |
50 | 51 |

your wishlist

52 | 53 |
54 | 55 | prepare("SELECT * FROM `wishlist` WHERE user_id = ?"); 58 | $select_wishlist->execute([$user_id]); 59 | if($select_wishlist->rowCount() > 0){ 60 | while($fetch_wishlist = $select_wishlist->fetch(PDO::FETCH_ASSOC)){ 61 | $grand_total += $fetch_wishlist['price']; 62 | ?> 63 |
64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 |
72 |
73 |
$/-
74 | 75 |
76 | 77 | 78 |
79 | your wishlist is empty

'; 83 | } 84 | ?> 85 |
86 | 87 |
88 |

grand total : $/-

89 | continue shopping 90 | delete all item 91 |
92 | 93 |
94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /Pizza-Shop/images/home-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Pizza-Shop/images/home-bg.jpg -------------------------------------------------------------------------------- /Pizza-Shop/images/home-img-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Pizza-Shop/images/home-img-1.png -------------------------------------------------------------------------------- /Pizza-Shop/images/home-img-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Pizza-Shop/images/home-img-2.png -------------------------------------------------------------------------------- /Pizza-Shop/images/home-img-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Pizza-Shop/images/home-img-3.png -------------------------------------------------------------------------------- /Pizza-Shop/images/pizza-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Pizza-Shop/images/pizza-1.jpg -------------------------------------------------------------------------------- /Pizza-Shop/images/pizza-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Pizza-Shop/images/pizza-2.jpg -------------------------------------------------------------------------------- /Pizza-Shop/images/pizza-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Pizza-Shop/images/pizza-3.jpg -------------------------------------------------------------------------------- /Pizza-Shop/images/pizza-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Pizza-Shop/images/pizza-4.jpg -------------------------------------------------------------------------------- /Pizza-Shop/images/pizza-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Pizza-Shop/images/pizza-5.jpg -------------------------------------------------------------------------------- /Pizza-Shop/images/pizza-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Pizza-Shop/images/pizza-6.jpg -------------------------------------------------------------------------------- /Pizza-Shop/images/pizza-7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Pizza-Shop/images/pizza-7.jpg -------------------------------------------------------------------------------- /Pizza-Shop/images/pizza-8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Pizza-Shop/images/pizza-8.jpg -------------------------------------------------------------------------------- /Pizza-Shop/images/pizza-9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Pizza-Shop/images/pizza-9.jpg -------------------------------------------------------------------------------- /Pizza-Shop/js/script.js: -------------------------------------------------------------------------------- 1 | let navbar = document.querySelector('.header .flex .navbar'); 2 | 3 | document.querySelector('#menu-btn').onclick = () =>{ 4 | navbar.classList.toggle('active'); 5 | } 6 | 7 | let account = document.querySelector('.user-account'); 8 | 9 | document.querySelector('#user-btn').onclick = () =>{ 10 | account.classList.add('active'); 11 | } 12 | 13 | document.querySelector('#close-account').onclick = () =>{ 14 | account.classList.remove('active'); 15 | } 16 | 17 | let myOrders = document.querySelector('.my-orders'); 18 | 19 | document.querySelector('#order-btn').onclick = () =>{ 20 | myOrders.classList.add('active'); 21 | } 22 | 23 | document.querySelector('#close-orders').onclick = () =>{ 24 | myOrders.classList.remove('active'); 25 | } 26 | 27 | let cart = document.querySelector('.shopping-cart'); 28 | 29 | document.querySelector('#cart-btn').onclick = () =>{ 30 | cart.classList.add('active'); 31 | } 32 | 33 | document.querySelector('#close-cart').onclick = () =>{ 34 | cart.classList.remove('active'); 35 | } 36 | 37 | window.onscroll = () =>{ 38 | navbar.classList.remove('active'); 39 | myOrders.classList.remove('active'); 40 | cart.classList.remove('active'); 41 | }; 42 | 43 | let slides = document.querySelectorAll('.home-bg .home .slide-container .slide'); 44 | let index = 0; 45 | 46 | function next(){ 47 | slides[index].classList.remove('active'); 48 | index = (index + 1) % slides.length; 49 | slides[index].classList.add('active'); 50 | } 51 | 52 | function prev(){ 53 | slides[index].classList.remove('active'); 54 | index = (index - 1 + slides.length) % slides.length; 55 | slides[index].classList.add('active'); 56 | } 57 | 58 | let accordion = document.querySelectorAll('.faq .accordion-container .accordion'); 59 | 60 | accordion.forEach(acco =>{ 61 | acco.onclick = () =>{ 62 | accordion.forEach(remove => remove.classList.remove('active')); 63 | acco.classList.add('active'); 64 | } 65 | }); -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🎃HACKTOBERFEST 2022🎃 2 | 3 | ![alt-text](https://img.shields.io/github/hacktoberfest/2022/iamakhileshmishra/Mini_Projects_JavaScript?style=flat-square) 4 | ![alt-text](https://img.shields.io/github/followers/iamakhileshmishra?style=social) 5 | ![alt-text](https://img.shields.io/github/forks/iamakhileshmishra/Mini_Projects_JavaScript?style=social) 6 | 7 | 8 | ![image](https://user-images.githubusercontent.com/106529748/195677844-d8ef2db0-53e9-43c9-be2e-4d2a8bbda20e.png) 9 | 10 | Well, its that month of the year where people from all over the world be it coder or no coder come together and contribute their knowledge in the form of codes, 11 | documents, share ideas etc. So, let's celebrate this fest by adding some javascript flavour in the form of Mini Projects :) 12 | 13 | 14 | 15 | # 📜Mini Projects using JavaScript📜 16 | This is a Repository Open for everyone/anyone to contribute your best JavaScript Mini Projects. 17 | 18 | 19 | 20 | # 🤔What Kind of projects ? (You may ask)🤔 21 | Well any kind of javascript project that will help many beginners to understand various topics on which a project can be made . 22 | This repo is created for the anyone who wants to contribute in Hacktoberfest 2022 by contributing 23 | JavaScript Projects you have worked upon. 24 | For Ex:- Calculator, Theme Toggler, To-do List , Games, etc 25 | 26 | 27 | 28 | # ✨How to Contribute to this repository✨ 29 | 30 | 1. Fork the repository (Click the Fork button in the top right of this page, 31 | click your Profile Image) 32 | 2. Clone the forked repository to your local machine. 33 | 34 | ```markdown 35 | git clone https://github.com/your-username/Mini_Projects_JavaScript.git 36 | ``` 37 | 38 | 3. change the present working directory 39 | 40 | ```markdown 41 | cd Mini_Projects_JavaScript 42 | ``` 43 | 44 | 5. Make your changes 45 | 46 | ```markdown 47 | git add . git commit -m "Your commit Message" git push origin branch-name 48 | ``` 49 | 50 | - Make a pull request. 51 | - Star the repository. 52 | 53 | # 📚RULES📚 54 | 1. All the contributors must first ask to assign themselves under any issue mentioned/or by creating one. 55 | 2. Once the issue has been assigned, then only one can work on that. 56 | 3. The PR raised should not have any Merge conflicts otherwise it will be marked as invalid. 57 | 4. One should create a seperate folder for each of their projects. 58 | 5. Do not forget to add your own Readme.md file in your project folder so that the maintainer could go through the guided steps for examining. 59 | 60 | ## For the process of Contributing one must visit CONTRIBUTING.md file. 61 | 62 | ### Keep Coding 💻☕ 63 | ### Happy Contributing!!😄 64 | 65 | ## REPO STATUS 66 | 67 | ![GitHub PR Open](https://img.shields.io/github/issues-pr/iamakhileshmishra/Mini_Projects_JavaScript?style=for-the-badge&color=aqua) 68 | ![GitHub PR closed](https://img.shields.io/github/issues-pr-closed-raw/iamakhileshmishra/Mini_Projects_JavaScript?style=for-the-badge&color=blue) 69 | ![GitHub language count](https://img.shields.io/github/languages/count/iamakhileshmishra/Mini_Projects_JavaScript?style=for-the-badge&color=brightgreen) 70 |

71 | 72 | ## Our Contributors 73 | 74 | 75 | 76 | 77 | 78 |
79 |
80 | Show some ❤️ by starring this awesome repository! 81 |
82 | -------------------------------------------------------------------------------- /Random_Quote_Generator/README.md: -------------------------------------------------------------------------------- 1 | # random-quote-generator 2 | ### Treehouse Techdegree Project #1 - Random Quote Generator 3 | 4 | In this project, you'll create an app that displays random famous quotes each time a button is clicked. You can display a quote from a famous athlete, politician, or historical figure: 5 | 6 | "The only thing we have to fear is fear itself." — Franklin Delano Roosevelt. 7 | 8 | You'll need to use your knowledge of basic JavaScript syntax, including variables, loops and object literals, to complete this project. 9 | 10 | This project is a fun and effective way for you to practice fundamental JavaScript skills. It also gives you a simple interactive portfolio piece to show off your understanding of JavaScript. 11 | 12 | 13 | # Project Requirements 14 | 15 | ### Create Array of Objects 16 | - [x] Array of objects is named quotes 17 | - [x] Array contains at least 5 quote objects 18 | ### Quote Object 19 | - [x] Objects in array include quote and source properties. If known, citation and date properties are present 20 | ### getRandomQuote function 21 | - [x] Function is named getRandomQuoteand returns a random object from the quotes array 22 | ### printQuote function 23 | - [x] Function named printQuote calls the randomQuote function 24 | - [x] Function prints the quote to the page using the template supplied in the project instructions 25 | ### Code comments 26 | - [x] Comments are included in the code. 27 | -------------------------------------------------------------------------------- /Random_Quote_Generator/css/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | /*text-align: center;*/ 3 | background-size: cover; 4 | color: white; 5 | font-family: 'Amatic SC', cursive; 6 | background-color: rgb(95,207,128); 7 | } 8 | #quote-box { 9 | position: absolute; 10 | top: 14%; 11 | left: 10%; 12 | right: 10%; 13 | width: 80%; 14 | line-height: .5; 15 | } 16 | .quote { 17 | font-size: 6rem; 18 | font-weight: 400; 19 | line-height: 1.1; 20 | text-shadow: 0 1px 1px rgba(0,0,0, .8); 21 | position: relative; 22 | margin: 0; 23 | } 24 | .quote:before, .quote:after { 25 | font-size: 6rem; 26 | line-height: 2.5rem; 27 | position: absolute; 28 | } 29 | .quote:before { 30 | content: "“"; 31 | top: .25em; 32 | left: -.5em; 33 | } 34 | .quote:after { 35 | content: "”"; 36 | bottom: -.1em; 37 | margin-left: .1em; 38 | position: absolute; 39 | } 40 | .source { 41 | font-size: 2.5rem; 42 | letter-spacing: 0.05em; 43 | line-height: 1.1; 44 | text-align: right; 45 | margin-right: 4em; 46 | } 47 | .source:before { 48 | content: "—"; 49 | } 50 | .citation { 51 | font-size: 2.5rem; 52 | font-style: italic; 53 | } 54 | .citation:before { 55 | content: ", "; 56 | font-style: normal; 57 | } 58 | .year:before { 59 | content: ", "; 60 | font-style: normal; 61 | } 62 | 63 | #loadQuote { 64 | font-size: 2.5rem;; 65 | position: fixed; 66 | width: 7em; 67 | display: inline-block; 68 | left: 50%; 69 | margin-left: -6em; 70 | bottom: 150px; 71 | border-radius: 4px; 72 | border: 2px solid #fff; 73 | color: #fff; 74 | background-color: rgba(255,255,255, 0); 75 | padding: 15px 0; 76 | transition: .5s ; 77 | } 78 | #loadQuote:hover { 79 | background-color: rgba(255,255,255,.25); 80 | } 81 | #loadQuote:focus { 82 | outline: none; 83 | } 84 | 85 | @media (max-width: 420px) { 86 | .quote { 87 | font-size: 2.5rem; 88 | } 89 | .quote:before, .quote:after { 90 | font-size: 3rem; 91 | } 92 | .source { 93 | font-size: 1rem; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /Random_Quote_Generator/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Random Quotes 6 | 7 | 8 | 9 | 10 | 11 |
12 |

You can do anything but not everything

13 |

David AllenMaking It All Work2009

14 |
15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /SignUpSignInModule/README.md: -------------------------------------------------------------------------------- 1 | This MiniProject is on a very basic login module that is found on most of the websites. 2 | To make it easy to understand the flow... heavy css is not used. 3 | Basic functionalities are like register form for new users and registered email validation registered user login etc... 4 | -------------------------------------------------------------------------------- /SignUpSignInModule/Register.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | Register Form 21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |

33 | 34 | 35 |
36 |
37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /SignUpSignInModule/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 |
11 |
12 | LogIn 13 |
14 |
15 |
16 |

17 | 18 |

19 | SignUp 20 |
21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /SignUpSignInModule/login.js: -------------------------------------------------------------------------------- 1 | document.getElementById('login-form').addEventListener('submit', login); 2 | 3 | function login(event) { 4 | event.preventDefault(); 5 | 6 | let email = document.getElementById('email').value; 7 | let pwd = document.getElementById('pwd').value; 8 | 9 | if (!(email && pwd)) { 10 | alert('Empty Fields...'); 11 | return; 12 | } 13 | 14 | let UserList = localStorage.getItem('UserList') ? JSON.parse(window.atob(localStorage.getItem('UserList'))) : []; 15 | 16 | let user = UserList.filter((user) => { 17 | return user['email'] === email && user['password'] === pwd; 18 | }); 19 | 20 | if (user.length === 0) { 21 | alert('Email or Password is Incorrect...'); 22 | return; 23 | } 24 | else { 25 | window.location.href = "welcome.html"; 26 | } 27 | } -------------------------------------------------------------------------------- /SignUpSignInModule/register.js: -------------------------------------------------------------------------------- 1 | 2 | document.getElementById('register-form').addEventListener('submit', register); 3 | 4 | function register(event) { 5 | 6 | event.preventDefault(); 7 | 8 | let UserList = localStorage.getItem('UserList') ? 9 | JSON.parse(window.atob(localStorage.getItem('UserList'))) : []; 10 | 11 | let name = document.getElementById('name').value; 12 | let email = document.getElementById('email').value; 13 | let contact = document.getElementById('contact').value; 14 | let country = document.getElementById('country').value; 15 | let pincode = document.getElementById('pincode').value; 16 | let password = document.getElementById('password').value; 17 | 18 | if (name && email && contact && country && pincode && password) { 19 | let user = { 20 | name: name, 21 | email: email, 22 | contact: contact, 23 | country: country, 24 | pincode: pincode, 25 | password: password, 26 | }; 27 | let checkUser = UserList.filter((each) => { 28 | return each['email'] === email; 29 | }); 30 | if (checkUser.length === 0) { 31 | UserList.push(user); 32 | let userListString = window.btoa(JSON.stringify(UserList)); 33 | localStorage.setItem("UserList", userListString); 34 | window.location.href = "index.html"; 35 | alert('Registered Successfully.....'); 36 | } else { 37 | alert('This email has been already Registered....'); 38 | return; 39 | } 40 | } 41 | else { 42 | alert("Empty Fields......"); 43 | return; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /SignUpSignInModule/welcome.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 |

This is Home Page

11 |

LogIn SuccessFul.....

12 | 13 | -------------------------------------------------------------------------------- /Simon Game Challenge/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Simon 9 | 10 | 11 | 12 | 13 | 14 |

15 | Press A Key to Start or click 16 |

17 |
Start
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | 33 |
34 |
This game is designed to test your memory power.
35 |
    36 |
  • Game starts with blink one of the four square.
  • 37 |
  • you have to press that square and remember also.
  • 38 |
  • Your level is up and again one square blink.
  • 39 |
  • Now, First you have to press all previously blinked square in order and then press the current blinked square
  • 40 |
  • Your level is up if you press the square in order correctly else game over.
  • 41 |
42 | 43 |
Hint : In every level make sure that no of square you press must be equal to level number.
44 | To know more about game click here. 45 |
46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /Simon Game Challenge/index.js: -------------------------------------------------------------------------------- 1 | var buttonColours = ["red", "blue", "green", "yellow"]; 2 | 3 | var gamePattern = []; 4 | var userClickedPattern = []; 5 | 6 | var started = false; 7 | var level = 0; 8 | 9 | $(document).keydown(function() { 10 | if (!started) { 11 | started = true; 12 | $("footer").hide(); 13 | $(".button").hide(); 14 | nextSequence(); 15 | } 16 | }); 17 | 18 | $(".button").click(function(){ 19 | if (!started) { 20 | started = true; 21 | $("footer").hide(); 22 | $(".button").hide(); 23 | nextSequence(); 24 | } 25 | }); 26 | 27 | function nextSequence() { 28 | userClickedPattern = []; 29 | $("#heading").text("Level " + ++level); 30 | var randomNumber = Math.floor(Math.random() * 4); 31 | var randomChosenColour = buttonColours[randomNumber]; 32 | gamePattern.push(randomChosenColour); 33 | 34 | $("#" + randomChosenColour).fadeIn(100).fadeOut(100).fadeIn(100); 35 | playSound(randomChosenColour); 36 | } 37 | 38 | $(".btn").click(function() { 39 | var userChosenColour = $(this).attr("id"); 40 | userClickedPattern.push(userChosenColour); 41 | 42 | playSound(userChosenColour); 43 | animatePress(userChosenColour); 44 | 45 | if(started) checkAnswer(userClickedPattern.length-1); 46 | }); 47 | 48 | function checkAnswer(currentLevel) { 49 | if (gamePattern[currentLevel] === userClickedPattern[currentLevel]) { 50 | if (userClickedPattern.length === gamePattern.length){ 51 | setTimeout(function () { 52 | nextSequence(); 53 | }, 1000); 54 | } 55 | } 56 | else { 57 | playSound("wrong"); 58 | $("body").addClass("game-over"); 59 | $("#heading").html('Game Over, Press Any Key to Restart or click'); 60 | 61 | setTimeout(function () { 62 | $("body").removeClass("game-over"); 63 | }, 200); 64 | 65 | startOver(); 66 | } 67 | } 68 | 69 | function animatePress(currentColor) { 70 | $("#" + currentColor).addClass("pressed"); 71 | setTimeout(function () { 72 | $("#" + currentColor).removeClass("pressed"); 73 | }, 100); 74 | } 75 | 76 | function playSound(name) { 77 | var audio = new Audio("sounds/" + name + ".mp3"); 78 | audio.play(); 79 | } 80 | 81 | function startOver() { 82 | level = 0; 83 | $(".button").show(); 84 | gamePattern = []; 85 | started = false; 86 | } -------------------------------------------------------------------------------- /Simon Game Challenge/sounds/blue.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Simon Game Challenge/sounds/blue.mp3 -------------------------------------------------------------------------------- /Simon Game Challenge/sounds/green.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Simon Game Challenge/sounds/green.mp3 -------------------------------------------------------------------------------- /Simon Game Challenge/sounds/red.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Simon Game Challenge/sounds/red.mp3 -------------------------------------------------------------------------------- /Simon Game Challenge/sounds/wrong.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Simon Game Challenge/sounds/wrong.mp3 -------------------------------------------------------------------------------- /Simon Game Challenge/sounds/yellow.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/Simon Game Challenge/sounds/yellow.mp3 -------------------------------------------------------------------------------- /Simon Game Challenge/styles.css: -------------------------------------------------------------------------------- 1 | html{ 2 | min-height: 100vh; 3 | 4 | } 5 | 6 | body { 7 | min-height: 100vh; 8 | margin: 0; 9 | line-height:1.5; 10 | text-align: center; 11 | background-color: #011F3F; 12 | font-family: 'Press Start 2P', cursive; 13 | } 14 | 15 | #heading { 16 | font-size: 3rem; 17 | margin: 2% 5%; 18 | color: #FEF2BF; 19 | } 20 | 21 | .button{ 22 | margin-top: 0; 23 | font-weight: 700; 24 | font-size: 1.5rem; 25 | display: inline-block; 26 | border: 2px solid black; 27 | padding: 1% 5%; 28 | background-color: rgba(46, 186, 241, 0.664); 29 | color: rgb(24, 24, 26); 30 | box-shadow: 0 0 2px 2px white; 31 | border-radius: 50px; 32 | cursor: pointer; 33 | } 34 | 35 | .button:hover{ 36 | opacity: 0.8; 37 | background-color: rgba(84, 90, 87, 0.664); 38 | color: rgb(101, 126, 238); 39 | } 40 | 41 | .container{ 42 | display: block; 43 | margin: 50px 0; 44 | } 45 | 46 | .btn { 47 | margin: 25px; 48 | display: inline-block; 49 | height: 200px; 50 | width: 200px; 51 | border: 10px solid black; 52 | border-radius: 20%; 53 | } 54 | 55 | #red { background-color: red;} 56 | #green { background-color: green;} 57 | #blue { background-color: blue;} 58 | #yellow { background-color: yellow;} 59 | 60 | .pressed { 61 | box-shadow: 0 0 20px white; 62 | background-color: grey; 63 | } 64 | 65 | .game-over { 66 | background-color: red; 67 | opacity: 0.8; 68 | } 69 | 70 | footer{ 71 | font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; 72 | background-color: black; 73 | padding: 10px 0; 74 | color:white; 75 | } 76 | 77 | footer .top{ 78 | font-size: 1.5rem; 79 | text-align: center; 80 | margin: 20px 20px; 81 | color: #FEF2BF; 82 | } 83 | 84 | footer div{ 85 | text-align: left; 86 | margin: 20px 20px; 87 | color: rgb(185, 148, 245); 88 | } 89 | 90 | footer ul{ 91 | text-align: left; 92 | } 93 | 94 | ul li{ 95 | list-style-type: '👉 '; 96 | } 97 | 98 | footer a{ 99 | text-decoration: none; 100 | color:rgb(38, 230, 31); 101 | font-size: 2rem; 102 | } 103 | 104 | footer a:hover{ 105 | text-decoration:underline; 106 | color:rgb(197, 236, 145); 107 | } 108 | 109 | /* -------------------------------------------------- */ 110 | 111 | @media only screen and (max-width:565px) { 112 | .btn{ 113 | margin: 10px; 114 | border-width: 5px; 115 | height: 100px; 116 | width: 100px; 117 | } 118 | #heading{ font-size: 2rem;} 119 | footer a{ font-size: 1.5rem;} 120 | footer .top{font-size: 1rem;} 121 | footer { font-size: 0.7rem;} 122 | .button{ font-size: 1rem;} 123 | } 124 | 125 | @media only screen and (max-width:300px) { 126 | .btn{ 127 | margin: 5px; 128 | height: 50px; 129 | width: 50px; 130 | } 131 | #heading{ font-size: 1rem;} 132 | .container{margin: 30px 0;} 133 | footer a{ font-size: 0.7rem;} 134 | footer .top{font-size: 0.7rem;} 135 | footer { font-size: 0.5rem;} 136 | .button{ font-size: 0.7rem;} 137 | } -------------------------------------------------------------------------------- /Sorting-Visualizer-main/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Sorting Visualizer 9 | 10 | 11 |
12 |
13 | 14 |
15 | 16 | 24 | 25 | 30 | 37 | 38 | 39 |
40 |
41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /Sorting-Visualizer-main/style.css: -------------------------------------------------------------------------------- 1 | *{ 2 | padding: 0; 3 | margin: 0; 4 | box-sizing: border-box; 5 | } 6 | 7 | 8 | .container{ 9 | max-width: 100vw; 10 | height: 100vh; 11 | width: 95%; 12 | margin: 0 auto; 13 | display: flex; 14 | flex-direction: column; 15 | align-items: center; 16 | justify-content: space-between; 17 | padding: 20px 0px; 18 | } 19 | 20 | .bars_container{ 21 | display: flex; 22 | flex-direction: row; 23 | } 24 | 25 | .bar{ 26 | width: 10px; 27 | background-color: aqua; 28 | /* margin: 0 2px; */ 29 | border-radius: 2px; 30 | } 31 | 32 | body{ 33 | background-color: #2c3e50; 34 | } 35 | 36 | .buttons_container > button, select{ 37 | width: 200px; 38 | height: 30px; 39 | background-color: #677685; 40 | border: none; 41 | border-radius: 5px; 42 | color: white; 43 | font-size: 14px; 44 | cursor: pointer; 45 | text-align: center; 46 | transition: 0.2s ease-in-out; 47 | } 48 | 49 | button:hover{ 50 | background-color: #56697b; 51 | } 52 | -------------------------------------------------------------------------------- /StopWatch/README.md: -------------------------------------------------------------------------------- 1 | # StopWatch 2 | 3 | ## To Clone this repo just use 4 | ``` 5 | git clone 6 | 7 | ``` 8 | 9 | -------------------------------------------------------------------------------- /StopWatch/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Stopwatch 8 | 9 | 10 | 11 |
12 |
13 |
14 |

01

15 |

Hour

16 |
17 |
18 |

30

19 |

Min

20 |
21 |
22 |

01

23 |

Sec

24 |
25 |
26 |

99

27 |

Millis

28 |
29 |
30 |
31 | 32 | 33 | 34 |
35 |
36 | 37 | 43 | 44 | -------------------------------------------------------------------------------- /StopWatch/stopwatch.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Zen+Loop&display=swap'); 2 | :root { 3 | --mainColor1: #3DBE29; 4 | --mainColor2: #EDC126; 5 | } 6 | * { 7 | margin: 0; 8 | padding: 0; 9 | box-sizing: border-box; 10 | } 11 | html { 12 | height: 100%; 13 | width: 100%; 14 | } 15 | body { 16 | font-family: 'Zen Loop', cursive; 17 | background-color: #CAD5E2; 18 | text-transform: uppercase; 19 | min-height: 100%; 20 | overflow: hidden; 21 | } 22 | .container { 23 | width: 60%; 24 | height: 100%; 25 | margin: 0 auto; 26 | } 27 | .watch { 28 | text-align: center; 29 | font-size: 5rem; 30 | font-weight: lighter; 31 | color: #fff; 32 | display: flex; 33 | justify-content: space-between; 34 | align-items: center; 35 | } 36 | .hourDiv, 37 | .minuteDiv, 38 | .secondDiv, 39 | .milliSecondDiv { 40 | width: 20%; 41 | border-bottom-left-radius: 10px; 42 | border-bottom-right-radius: 10px; 43 | } 44 | .hour, 45 | .minute, 46 | .second, 47 | .milliSecond { 48 | padding: 5px; 49 | background-color: var(--mainColor1); 50 | } 51 | .hourTitle, 52 | .minuteTitle, 53 | .secondTitle, 54 | .milliSecondTitle { 55 | background-color: var(--mainColor2); 56 | font-size: 3rem; 57 | padding: 5px; 58 | font-weight: bold; 59 | border-bottom-left-radius: 10px; 60 | border-bottom-right-radius: 10px; 61 | } 62 | .button { 63 | border: none; 64 | border-radius: 10px; 65 | font-size: 3rem; 66 | padding: 10px; 67 | width: 180px; 68 | font-weight: bold; 69 | font-family: 'Zen Loop', cursive; 70 | } 71 | .start { 72 | margin-right: 5%; 73 | color: var(--mainColor1); 74 | transition: 0.5s ease-in-out; 75 | } 76 | .start:hover { 77 | background-color: var(--mainColor2); 78 | color: #fff; 79 | } 80 | .pause { 81 | transition: 0.5s ease-in-out; 82 | } 83 | .pause:hover { 84 | background-color: #E03B8B; 85 | color: #fff; 86 | } 87 | .stop { 88 | margin-left: 5%; 89 | color: var(--mainColor2); 90 | transition: 0.5s ease-in-out; 91 | } 92 | .stop:hover { 93 | background-color: var(--mainColor1); 94 | color: #fff; 95 | } 96 | .buttons { 97 | margin-top: 2%; 98 | margin-bottom: 2%; 99 | display: flex; 100 | justify-content: center; 101 | align-items: center; 102 | } 103 | @media screen and (max-width: 768px) { 104 | .container { 105 | width: 100%; 106 | } 107 | .watch { 108 | font-size: 2rem; 109 | display: flex; 110 | justify-content: space-between; 111 | align-items: center; 112 | } 113 | .hourTitle, 114 | .minuteTitle, 115 | .secondTitle, 116 | .milliSecondTitle { 117 | font-size: 2rem; 118 | } 119 | .button { 120 | margin-top: 5%; 121 | margin-bottom: 5%; 122 | width: 50%; 123 | } 124 | .start, .stop { 125 | margin: 0; 126 | } 127 | .buttons { 128 | margin-top: 10%; 129 | display: flex; 130 | justify-content: center; 131 | align-items: center; 132 | flex-direction: column; 133 | } 134 | } 135 | @media screen and (max-width: 550px) { 136 | .watch { 137 | font-size: 2rem; 138 | } 139 | .hourTitle, 140 | .minuteTitle, 141 | .secondTitle, 142 | .milliSecondTitle { 143 | font-size: 1.5rem; 144 | } 145 | } -------------------------------------------------------------------------------- /StopWatch/stopwatch.js: -------------------------------------------------------------------------------- 1 | // Timer Field 2 | let hourElement = document.querySelector(".hour"); 3 | let minuteElement = document.querySelector(".minute"); 4 | let secondElement = document.querySelector(".second"); 5 | let millisecondElement = document.querySelector(".milliSecond"); 6 | 7 | // Button Field 8 | let startButton = document.querySelector(".start"); 9 | let pauseButton = document.querySelector(".pause"); 10 | let stopButton = document.querySelector(".stop"); 11 | 12 | // Counter Variable 13 | let hour = 00; 14 | let minute = 00; 15 | let second = 00; 16 | let millisecond = 00; 17 | let interval; 18 | 19 | window.onload = () => clearFields(); 20 | 21 | startButton.onclick = function () { 22 | clearInterval(interval); // If Some Error Happen and Interval is Setup, It Will Clear That Interval 23 | interval = setInterval(startTimer, 10); // 24 | }; 25 | pauseButton.onclick = function () { 26 | clearInterval(interval); // On Clicking Pause Buttom We Will Clear Interval 27 | }; 28 | stopButton.onclick = function () { 29 | clearInterval(interval); // Clear Interval 30 | clearFields(); // Clear Timer Fields 31 | }; 32 | function startTimer() { 33 | millisecond++; 34 | if (millisecond < 9) { 35 | millisecondElement.innerText = "0" + millisecond; 36 | } 37 | if (millisecond > 99) { 38 | second++; 39 | secondElement.innerText = "0" + second; 40 | millisecond = 0; 41 | millisecondElement.innerText = "0" + millisecond; 42 | } 43 | if (second > 60) { 44 | minute++; 45 | minuteElement.innerText = "0" + minute; 46 | second = 0; 47 | secondElement.innerText = "0" + second; 48 | } 49 | 50 | if (millisecond > 9) { 51 | millisecondElement.innerText = millisecond; 52 | } 53 | if (second > 9) { 54 | secondElement.innerText = second; 55 | } 56 | if (minute > 9) { 57 | minuteElement.innerText = minute; 58 | } 59 | if (hour > 9) { 60 | hourElement.innerText = hour; 61 | } 62 | } 63 | 64 | function clearFields() { 65 | hourElement.innerText = "00"; 66 | minuteElement.innerText = "00"; 67 | secondElement.innerText = "00"; 68 | millisecondElement.innerText = "00"; 69 | } 70 | -------------------------------------------------------------------------------- /Tic-Tac-Toe/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | tic-tac-toe 8 | 9 | 10 | 11 | 12 |
13 |
14 |

Tic Tac Toe

15 |
16 |
17 | Scorecard :- X: 0 | O: 18 | 0 20 |
21 | Player X's turn 22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | 38 |
39 |
40 | 41 |
42 |
43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /Tic-Tac-Toe/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | font-family: Georgia, "Times New Roman", Times, serif; 5 | } 6 | .background { 7 | background-color: #12181b; 8 | height: 100vh; 9 | padding-top: 1px; 10 | } 11 | .title { 12 | color: white; 13 | text-align: center; 14 | font-size: 40px; 15 | margin-top: 10%; 16 | } 17 | .display { 18 | color: white; 19 | font-size: 25px; 20 | text-align: center; 21 | margin-top: 1em; 22 | margin-bottom: 1em; 23 | } 24 | .hide { 25 | display: none; 26 | } 27 | .container { 28 | margin: 0 auto; 29 | display: grid; 30 | grid-template-columns: 33% 33% 33%; 31 | grid-template-rows: 33% 33% 33%; 32 | max-width: 300px; 33 | height: 300px; 34 | } 35 | .tile { 36 | border: 1px solid white; 37 | max-width: 100px; 38 | max-height: 100px; 39 | display: flex; 40 | justify-content: center; 41 | align-items: center; 42 | font-size: 50px; 43 | cursor: pointer; 44 | } 45 | .playerX { 46 | color: #09c372; 47 | } 48 | .playerO { 49 | color: #498afb; 50 | } 51 | .controls { 52 | display: flex; 53 | flex-direction: row; 54 | justify-content: center; 55 | align-items: center; 56 | margin-top: 1em; 57 | } 58 | #reset { 59 | background-color: red; 60 | color: white; 61 | padding: 8px; 62 | border-radius: 8px; 63 | border: none; 64 | font-size: 20px; 65 | margin-left: 1em; 66 | cursor: pointer; 67 | } 68 | #result { 69 | background-color: rgb(68, 248, 173); 70 | color: rgb(30, 46, 48); 71 | padding: 8px; 72 | border-radius: 8px; 73 | border: none; 74 | font-size: 20px; 75 | margin-left: 1em; 76 | cursor: pointer; 77 | } 78 | #scorex { 79 | color: #09c372; 80 | font-family: "Courier New", Courier, monospace; 81 | font-weight: 900; 82 | font-size: 30px; 83 | } 84 | #scoreo { 85 | color: #498afb; 86 | font-family: "Courier New", Courier, monospace; 87 | font-weight: 900; 88 | font-size: 30px; 89 | } 90 | -------------------------------------------------------------------------------- /animated-countdown/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Animated Countdown 8 | 9 | 10 |
11 |
12 | 3 13 | 2 14 | 1 15 | 0 16 |
17 |

Get Ready

18 |
19 | 20 |
21 |

GO

22 | 25 |
26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /animated-countdown/script.js: -------------------------------------------------------------------------------- 1 | const nums = document.querySelectorAll('.nums span') 2 | const counter = document.querySelector('.counter') 3 | const finalMessage = document.querySelector('.final') 4 | const replay = document.querySelector('#replay') 5 | 6 | runAnimation() 7 | 8 | function resetDOM() { 9 | counter.classList.remove('hide') 10 | finalMessage.classList.remove('show') 11 | 12 | nums.forEach((num) => { 13 | num.classList.value = '' 14 | }) 15 | 16 | nums[0].classList.add('in') 17 | } 18 | 19 | function runAnimation() { 20 | nums.forEach((num, idx) => { 21 | const nextToLast = nums.length - 1 22 | 23 | num.addEventListener('animationend', (e) => { 24 | if (e.animationName === 'goIn' && idx !== nextToLast) { 25 | num.classList.remove('in') 26 | num.classList.add('out') 27 | } else if (e.animationName === 'goOut' && num.nextElementSibling) { 28 | num.nextElementSibling.classList.add('in') 29 | } else { 30 | counter.classList.add('hide') 31 | finalMessage.classList.add('show') 32 | } 33 | }) 34 | }) 35 | } 36 | 37 | replay.addEventListener('click', () => { 38 | resetDOM() 39 | runAnimation() 40 | }) 41 | -------------------------------------------------------------------------------- /animated-countdown/style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap'); 2 | 3 | * { 4 | box-sizing: border-box; 5 | } 6 | 7 | body { 8 | font-family: 'Roboto', sans-serif; 9 | margin: 0; 10 | height: 100vh; 11 | overflow: hidden; 12 | } 13 | 14 | h4 { 15 | font-size: 20px; 16 | margin: 5px; 17 | text-transform: uppercase; 18 | } 19 | 20 | .counter { 21 | position: fixed; 22 | top: 50%; 23 | left: 50%; 24 | transform: translate(-50%, -50%); 25 | text-align: center; 26 | } 27 | 28 | .counter.hide { 29 | transform: translate(-50%, -50%) scale(0); 30 | animation: hide 0.2s ease-out; 31 | } 32 | 33 | @keyframes hide { 34 | 0% { 35 | transform: translate(-50%, -50%) scale(1); 36 | } 37 | 38 | 100% { 39 | transform: translate(-50%, -50%) scale(0); 40 | } 41 | } 42 | 43 | .final { 44 | position: fixed; 45 | top: 50%; 46 | left: 50%; 47 | transform: translate(-50%, -50%) scale(0); 48 | text-align: center; 49 | } 50 | 51 | .final.show { 52 | transform: translate(-50%, -50%) scale(1); 53 | animation: show 0.2s ease-out; 54 | } 55 | 56 | @keyframes show { 57 | 0% { 58 | transform: translate(-50%, -50%) scale(0); 59 | } 60 | 61 | 30% { 62 | transform: translate(-50%, -50%) scale(1.4); 63 | } 64 | 65 | 100% { 66 | transform: translate(-50%, -50%) scale(1); 67 | } 68 | } 69 | 70 | .nums { 71 | color: #3498db; 72 | font-size: 50px; 73 | position: relative; 74 | overflow: hidden; 75 | width: 250px; 76 | height: 50px; 77 | } 78 | 79 | .nums span { 80 | position: absolute; 81 | top: 50%; 82 | left: 50%; 83 | transform: translate(-50%, -50%) rotate(120deg); 84 | transform-origin: bottom center; 85 | } 86 | 87 | .nums span.in { 88 | transform: translate(-50%, -50%) rotate(0deg); 89 | animation: goIn 0.5s ease-in-out; 90 | } 91 | 92 | .nums span.out { 93 | animation: goOut 0.5s ease-in-out; 94 | } 95 | 96 | @keyframes goIn { 97 | 0% { 98 | transform: translate(-50%, -50%) rotate(120deg); 99 | } 100 | 101 | 30% { 102 | transform: translate(-50%, -50%) rotate(-20deg); 103 | } 104 | 105 | 60% { 106 | transform: translate(-50%, -50%) rotate(10deg); 107 | } 108 | 109 | 100% { 110 | transform: translate(-50%, -50%) rotate(0deg); 111 | } 112 | } 113 | 114 | @keyframes goOut { 115 | 0% { 116 | transform: translate(-50%, -50%) rotate(0deg); 117 | } 118 | 119 | 60% { 120 | transform: translate(-50%, -50%) rotate(20deg); 121 | } 122 | 123 | 100% { 124 | transform: translate(-50%, -50%) rotate(-120deg); 125 | } 126 | } 127 | 128 | #replay{ 129 | background-color: #3498db; 130 | border-radius: 3px; 131 | border: none; 132 | color: aliceblue; 133 | padding: 5px; 134 | text-align: center; 135 | display: inline-block; 136 | cursor: pointer; 137 | transition: all 0.3s; 138 | } 139 | 140 | #replay span{ 141 | cursor: pointer; 142 | display: inline-block; 143 | position: relative; 144 | transition: 0.3s; 145 | } 146 | 147 | #replay span:after{ 148 | content: '\00bb'; 149 | position: absolute; 150 | opacity: 0; 151 | top: 0; 152 | right: -20px; 153 | transition: 0.5s; 154 | } 155 | 156 | #replay:hover span{ 157 | padding-right: 25px; 158 | } 159 | 160 | #replay:hover span:after{ 161 | opacity: 1; 162 | right: 0; 163 | } 164 | -------------------------------------------------------------------------------- /blackJackgame/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: green; 3 | text-align: center; 4 | font-size: large; 5 | } 6 | h1 { 7 | color: yellow; 8 | } 9 | p { 10 | color: azure; 11 | font-size: large; 12 | } 13 | #btn1 { 14 | color: #016f32; 15 | width: 150px; 16 | background: goldenrod; 17 | margin: 2px; 18 | } 19 | #btn2 { 20 | color: #016f32; 21 | width: 150px; 22 | background: goldenrod; 23 | margin: 2px; 24 | } 25 | /* button:hover{ 26 | border-color: blue; 27 | } */ 28 | -------------------------------------------------------------------------------- /blackJackgame/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 |

Blackjack

12 |

Do you want to play?

13 |

Cards:

14 |

Sum:

15 |
16 | 17 |

18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /blackJackgame/index.js: -------------------------------------------------------------------------------- 1 | let player = { 2 | name: 'Per', 3 | chip: 145, 4 | }; 5 | let cards = []; 6 | let sum = 0; 7 | let blackjack = false; 8 | let isAlive = false; 9 | let message = ''; 10 | let messageEl = document.getElementById('message-el'); 11 | let sumEl = document.getElementById('sum-el'); 12 | let cardsEl = document.getElementById('cards-el'); 13 | 14 | let playerEl = document.getElementById('player-el'); 15 | 16 | playerEl.textContent = player.name + ' : Rs.' + player.chip; 17 | 18 | function getrandomeCard() { 19 | let randomenum = Math.floor(Math.random() * 13) + 1; 20 | if (randomenum > 10) return 10; 21 | else if (randomenum === 1) return 11; 22 | return randomenum; 23 | } 24 | 25 | function startGame() { 26 | isAlive = true; 27 | let firstcard = getrandomeCard(); 28 | cards.push(firstcard); 29 | let secondcard = getrandomeCard(); 30 | cards.push(secondcard); 31 | sum = firstcard + secondcard; 32 | renderGame(); 33 | } 34 | function renderGame() { 35 | // cardsEl.textContent="Cards: "+cards[0]+" "+cards[1] 36 | cardsEl.textContent = 'Cards: '; 37 | for (let i = 0; i < cards.length; i++) { 38 | cardsEl.textContent += cards[i] + ' '; 39 | } 40 | sumEl.textContent = 'Sum: ' + sum; 41 | if (sum <= 20) { 42 | message = 'Do you want to draw a new card?'; 43 | } else if (sum == 21) { 44 | message = 'Wohho! you have got the Blackjack!'; 45 | blackjack = true; 46 | } else { 47 | message = "You're out of the game"; 48 | isAlive = false; 49 | } 50 | // console.log(message) 51 | messageEl.textContent = message; 52 | } 53 | 54 | function newcard() { 55 | if (isAlive == true && blackjack == false) { 56 | let ncard = getrandomeCard(); 57 | cards.push(ncard); 58 | sum += ncard; 59 | renderGame(); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /dad-jokes/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Dad Jokes 8 | 9 | 10 |
11 |

Don't Laugh Challenge

12 |
// Joke goes here
13 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /dad-jokes/script.js: -------------------------------------------------------------------------------- 1 | const jokeEl = document.getElementById('joke') 2 | const jokeBtn = document.getElementById('jokeBtn') 3 | 4 | jokeBtn.addEventListener('click', generateJoke) 5 | 6 | generateJoke() 7 | 8 | // USING ASYNC/AWAIT 9 | async function generateJoke() { 10 | const config = { 11 | headers: { 12 | Accept: 'application/json', 13 | }, 14 | } 15 | 16 | const res = await fetch('https://icanhazdadjoke.com', config) 17 | 18 | const data = await res.json() 19 | 20 | jokeEl.innerHTML = data.joke 21 | } 22 | 23 | // USING .then() 24 | // function generateJoke() { 25 | // const config = { 26 | // headers: { 27 | // Accept: 'application/json', 28 | // }, 29 | // } 30 | 31 | // fetch('https://icanhazdadjoke.com', config) 32 | // .then((res) => res.json()) 33 | // .then((data) => { 34 | // jokeEl.innerHTML = data.joke 35 | // }) 36 | // } 37 | -------------------------------------------------------------------------------- /dad-jokes/style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap'); 2 | 3 | * { 4 | box-sizing: border-box; 5 | } 6 | 7 | body { 8 | background-color: #686de0; 9 | font-family: 'Roboto', sans-serif; 10 | display: flex; 11 | flex-direction: column; 12 | align-items: center; 13 | justify-content: center; 14 | height: 100vh; 15 | overflow: hidden; 16 | margin: 0; 17 | padding: 20px; 18 | } 19 | 20 | .container { 21 | background-color: #fff; 22 | border-radius: 10px; 23 | box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.1); 24 | padding: 50px 20px; 25 | text-align: center; 26 | max-width: 100%; 27 | width: 800px; 28 | } 29 | 30 | h3 { 31 | margin: 0; 32 | opacity: 0.5; 33 | letter-spacing: 2px; 34 | } 35 | 36 | .joke { 37 | font-size: 30px; 38 | letter-spacing: 1px; 39 | line-height: 40px; 40 | margin: 50px auto; 41 | max-width: 600px; 42 | } 43 | 44 | .btn { 45 | background-color: #9f68e0; 46 | color: #fff; 47 | border: 0; 48 | border-radius: 10px; 49 | box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.1); 50 | padding: 14px 40px; 51 | font-size: 16px; 52 | cursor: pointer; 53 | } 54 | 55 | .btn:active { 56 | transform: scale(0.98); 57 | } 58 | 59 | .btn:focus { 60 | outline: 0; 61 | } 62 | -------------------------------------------------------------------------------- /dropdown/README.md: -------------------------------------------------------------------------------- 1 | this is a pure js ,css amd html dropdown menu with animations. 2 | made as a template for websites to copy. -------------------------------------------------------------------------------- /dropdown/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | dropdown menu 9 | 10 | 11 | 12 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /dropdown/index.js: -------------------------------------------------------------------------------- 1 | const button = document.querySelector(".dropdown-button"); 2 | button.addEventListener("click", function(e) { 3 | const dropData= document.querySelector(".dropdown-content"); 4 | dropData.style.setProperty("--openHeight",dropData.scrollHeight+'px'); 5 | dropData.classList.toggle('show'); 6 | dropData.classList.toggle('hide'); 7 | }); 8 | -------------------------------------------------------------------------------- /dropdown/styles.css: -------------------------------------------------------------------------------- 1 | 2 | *{ 3 | margin: 0; 4 | } 5 | 6 | body{ 7 | margin: 0; 8 | background-color: grey; 9 | } 10 | 11 | nav{ 12 | margin: 0; 13 | width: 100%; 14 | height: 60px; 15 | position: fixed; 16 | } 17 | 18 | .container{ 19 | display:flex; 20 | align-items: stretch; 21 | width: 100%; 22 | height: inherit; 23 | background-color: rgb(102, 102, 102); 24 | 25 | } 26 | 27 | .dropdown-button{ 28 | flex-direction: column;; 29 | width: 40px; 30 | height: 40px; 31 | } 32 | .dropdown-button div{ 33 | display: inline-block; 34 | height:10%; 35 | width: 100%; 36 | background-color: rgb(46, 46, 46); 37 | border-radius: 10px; 38 | margin-inline: 15%; 39 | transition: all 0.7s; 40 | margin:-5px,0,-5px,0; 41 | } 42 | 43 | .dropdown-button:hover .bar1{ 44 | transform:translateY(18px) rotate(45deg); 45 | } 46 | 47 | .dropdown-button:hover .bar2{ 48 | opacity: 0; 49 | } 50 | 51 | .dropdown-button:hover .bar3{ 52 | transform:translateY(-18px) rotate(-45deg); 53 | } 54 | 55 | .dropdown-content{ 56 | overflow: hidden; 57 | transition: height 0.3s ease-out; 58 | top:60px; 59 | left:-80px; 60 | 61 | } 62 | 63 | .dropdown-content.hide{ 64 | position: relative; 65 | height:0; 66 | } 67 | 68 | .dropdown-content.show{ 69 | height:var(--openHeight); 70 | position: relative; 71 | } 72 | 73 | .dropdown-content ul{ 74 | list-style-type: none; 75 | } 76 | a{ 77 | text-decoration: none; 78 | color:rgb(189, 189, 189); 79 | font-size: 1.5em; 80 | } 81 | .dropdown-content ul{ 82 | display:flex; 83 | flex-direction: column; 84 | } 85 | 86 | .dropdown-content ul li{ 87 | display: inline-block; 88 | background-color: rgb(48, 48, 48); 89 | text-align: center; 90 | padding: 10px; 91 | } 92 | 93 | .logo{ 94 | position: relative; 95 | left:80%; 96 | align-self: flex-end; 97 | width: 60px; 98 | height: 60px; 99 | background-image: none;/*enter logo here*/ 100 | border-radius: 50%; 101 | background-color: red; 102 | } 103 | -------------------------------------------------------------------------------- /food -api/food.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/food -api/food.jpg -------------------------------------------------------------------------------- /food -api/index.html: -------------------------------------------------------------------------------- 1 | nes (67 sloc) 2.82 KB 2 | 3 | 4 | 5 | 6 | 7 | 8 | Find Meal For Your Ingredients 9 | 15 | 16 | 17 | 18 |
19 |
20 | 39 | 40 |
41 |

Your Search Results:

42 |
43 | 44 | 53 | 54 |
55 |
56 | 57 |
58 | 59 | 66 | 67 | 68 |
69 | 82 |
83 |
84 |
85 |
86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /food -api/script.js: -------------------------------------------------------------------------------- 1 | const searchBtn = document.getElementById("search-btn"); 2 | const mealList = document.getElementById("meal"); 3 | const mealDetailsContent = document.querySelector(".meal-details-content"); 4 | const recipeCloseBtn = document.getElementById("recipe-close-btn"); 5 | 6 | // event listeners 7 | searchBtn.addEventListener("click", getMealList); 8 | mealList.addEventListener("click", getMealRecipe); 9 | recipeCloseBtn.addEventListener("click", () => { 10 | mealDetailsContent.parentElement.classList.remove("showRecipe"); 11 | }); 12 | 13 | // get meal list that matches with the ingredients 14 | function getMealList() { 15 | let searchInputTxt = document.getElementById("search-input").value.trim(); 16 | fetch( 17 | `https://www.themealdb.com/api/json/v1/1/filter.php?i=${searchInputTxt}` 18 | ) 19 | .then((response) => response.json()) 20 | .then((data) => { 21 | let html = ""; 22 | if (data.meals) { 23 | data.meals.forEach((meal) => { 24 | html += ` 25 |
26 |
27 | food 28 |
29 |
30 |

${meal.strMeal}

31 | Get Recipe 32 |
33 |
34 | `; 35 | }); 36 | mealList.classList.remove("notFound"); 37 | } else { 38 | html = "Oops, there is no such meal with us!"; 39 | mealList.classList.add("notFound"); 40 | } 41 | 42 | mealList.innerHTML = html; 43 | }); 44 | } 45 | 46 | // get recipe of the meal 47 | function getMealRecipe(e) { 48 | e.preventDefault(); 49 | if (e.target.classList.contains("recipe-btn")) { 50 | let mealItem = e.target.parentElement.parentElement; 51 | fetch( 52 | `https://www.themealdb.com/api/json/v1/1/lookup.php?i=${mealItem.dataset.id}` 53 | ) 54 | .then((response) => response.json()) 55 | .then((data) => mealRecipeModal(data.meals)); 56 | } 57 | } 58 | 59 | // create a modal 60 | function mealRecipeModal(meal) { 61 | console.log(meal); 62 | meal = meal[0]; 63 | let html = ` 64 |

${meal.strMeal}

65 |

${meal.strCategory}

66 |
67 |

Instructions:

68 |

${meal.strInstructions}

69 |
70 |
71 | 72 |
73 | 76 | `; 77 | mealDetailsContent.innerHTML = html; 78 | mealDetailsContent.parentElement.classList.add("showRecipe"); 79 | } 80 | -------------------------------------------------------------------------------- /food-api/food.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/food-api/food.jpg -------------------------------------------------------------------------------- /food-api/index.html: -------------------------------------------------------------------------------- 1 | nes (67 sloc) 2.82 KB 2 | 3 | 4 | 5 | 6 | 7 | 8 | Find Meal For Your Ingredients 9 | 15 | 16 | 17 | 18 |
19 |
20 | 39 | 40 |
41 |

Your Search Results:

42 |
43 | 44 | 53 | 54 |
55 |
56 | 57 |
58 | 59 | 66 | 67 | 68 |
69 | 82 |
83 |
84 |
85 |
86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /food-api/script.js: -------------------------------------------------------------------------------- 1 | const searchBtn = document.getElementById("search-btn"); 2 | const mealList = document.getElementById("meal"); 3 | const mealDetailsContent = document.querySelector(".meal-details-content"); 4 | const recipeCloseBtn = document.getElementById("recipe-close-btn"); 5 | 6 | // event listeners 7 | searchBtn.addEventListener("click", getMealList); 8 | mealList.addEventListener("click", getMealRecipe); 9 | recipeCloseBtn.addEventListener("click", () => { 10 | mealDetailsContent.parentElement.classList.remove("showRecipe"); 11 | }); 12 | 13 | // get meal list that matches with the ingredients 14 | function getMealList() { 15 | let searchInputTxt = document.getElementById("search-input").value.trim(); 16 | fetch( 17 | `https://www.themealdb.com/api/json/v1/1/filter.php?i=${searchInputTxt}` 18 | ) 19 | .then((response) => response.json()) 20 | .then((data) => { 21 | let html = ""; 22 | if (data.meals) { 23 | data.meals.forEach((meal) => { 24 | html += ` 25 |
26 |
27 | food 28 |
29 |
30 |

${meal.strMeal}

31 | Get Recipe 32 |
33 |
34 | `; 35 | }); 36 | mealList.classList.remove("notFound"); 37 | } else { 38 | html = "Oops, there is no such meal with us!"; 39 | mealList.classList.add("notFound"); 40 | } 41 | 42 | mealList.innerHTML = html; 43 | }); 44 | } 45 | 46 | // get recipe of the meal 47 | function getMealRecipe(e) { 48 | e.preventDefault(); 49 | if (e.target.classList.contains("recipe-btn")) { 50 | let mealItem = e.target.parentElement.parentElement; 51 | fetch( 52 | `https://www.themealdb.com/api/json/v1/1/lookup.php?i=${mealItem.dataset.id}` 53 | ) 54 | .then((response) => response.json()) 55 | .then((data) => mealRecipeModal(data.meals)); 56 | } 57 | } 58 | 59 | // create a modal 60 | function mealRecipeModal(meal) { 61 | console.log(meal); 62 | meal = meal[0]; 63 | let html = ` 64 |

${meal.strMeal}

65 |

${meal.strCategory}

66 |
67 |

Instructions:

68 |

${meal.strInstructions}

69 |
70 |
71 | 72 |
73 | 76 | `; 77 | mealDetailsContent.innerHTML = html; 78 | mealDetailsContent.parentElement.classList.add("showRecipe"); 79 | } 80 | -------------------------------------------------------------------------------- /keyboard-master/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KEYBOARD MASTER 6 | 7 | 8 | 9 | 10 | 11 | 12 |

Get Ready...

13 |
14 |
    15 |
  • ESC
  • 16 |
  • 1
  • 17 |
  • 2
  • 18 |
  • 3
  • 19 |
  • 4
  • 20 |
  • 5
  • 21 |
  • 6
  • 22 |
  • 7
  • 23 |
  • 8
  • 24 |
  • 9
  • 25 |
  • 0
  • 26 |
  • -
  • 27 |
  • +
  • 28 |
  • BACK
  • 29 |
30 |
    31 |
  • TAB
  • 32 |
  • Q
  • 33 |
  • W
  • 34 |
  • E
  • 35 |
  • R
  • 36 |
  • T
  • 37 |
  • Y
  • 38 |
  • U
  • 39 |
  • I
  • 40 |
  • O
  • 41 |
  • P
  • 42 |
  • [
  • 43 |
  • ]
  • 44 |
  • \
  • 45 |
46 |
    47 |
  • CAPS
  • 48 |
  • A
  • 49 |
  • S
  • 50 |
  • D
  • 51 |
  • F
  • 52 |
  • G
  • 53 |
  • H
  • 54 |
  • J
  • 55 |
  • K
  • 56 |
  • L
  • 57 |
  • :
  • 58 |
  • ''
  • 59 |
  • ENTER
  • 60 |
61 |
    62 |
  • SHIFT
  • 63 |
  • Z
  • 64 |
  • X
  • 65 |
  • C
  • 66 |
  • V
  • 67 |
  • B
  • 68 |
  • N
  • 69 |
  • M
  • 70 |
  • ,
  • 71 |
  • .
  • 72 |
  • ;
  • 73 |
  • SHIFT
  • 74 |
75 |
76 |

Goo...

77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /keyboard-master/script.js: -------------------------------------------------------------------------------- 1 | const keys = [..."ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"]; 2 | 3 | const timestamps = []; 4 | 5 | timestamps.unshift(getTimestamp()); 6 | 7 | function getRandomNumber(min, max) { 8 | min = Math.ceil(min); 9 | max = Math.floor(max); 10 | return Math.floor(Math.random() * (max - min + 1)) + min; 11 | } 12 | 13 | function getRandomKey() { 14 | return keys[getRandomNumber(0, keys.length-1)] 15 | } 16 | 17 | function targetRandomKey() { 18 | const key = document.getElementById(getRandomKey()); 19 | key.classList.add("selected"); 20 | let start = Date.now() 21 | } 22 | 23 | function getTimestamp() { 24 | return Math.floor(Date.now() / 1000) 25 | } 26 | 27 | document.addEventListener("keyup", event => { 28 | const keyPressed = String.fromCharCode(event.keyCode); 29 | const keyElement = document.getElementById(keyPressed); 30 | const highlightedKey = document.querySelector(".selected"); 31 | 32 | keyElement.classList.add("hit") 33 | keyElement.addEventListener('animationend', () => { 34 | keyElement.classList.remove("hit") 35 | }) 36 | 37 | if (keyPressed === highlightedKey.innerHTML) { 38 | timestamps.unshift(getTimestamp()); 39 | const elapsedTime = timestamps[0] - timestamps[1]; 40 | console.log(`Character per minute ${60/elapsedTime}`) 41 | highlightedKey.classList.remove("selected"); 42 | targetRandomKey(); 43 | } 44 | }) 45 | 46 | targetRandomKey(); 47 | -------------------------------------------------------------------------------- /lift-simulation/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Lift Simulation 3 | 4 | A web app where you can play along wit lift mechanics 5 | 6 | ## Features 7 | 8 | - Have a page where you input the number of floors and lifts from the user. 9 | - An interactive UI is generated, where we have visual depictons of lifts and buttons on floors 10 | Upon clicking a particular button on the floor, a lift goes to that floor. 11 | 12 | - Data store that contains the state of the application data 13 | JS Engine that is the controller for which lift goes where 14 | - Dumb UI that responds to controller's commands 15 | 16 | - Lift having doors open in 2.5s, then closing in another 2.5s 17 | - Lift moving at 2s per floor 18 | - Lift stopping at every floor where it was called 19 | - Mobile friendly design 20 | - Maximum 15 floors and 4 lifts can be generated. 21 | 22 | ## Tech Stack 23 | 24 | Language : vanilla javascript, CSS3, HTML5. 25 | Version Control : Git and Github. 26 | 27 | 28 | ## UML Diagram 29 | 30 |

Activity Diagram

31 | 32 | img 33 | 34 | ## Setup 35 | Step 1 : If you have git installed you can just clone or download the zip folder. 36 | 37 | Step 2 : To clone locally use this command in the terminal. 38 | 39 | git clone 40 | 41 | Step 3 : After getting all the files download the go live extension in vs code, and click go live. 42 | 43 | Step 4 : You are good to go and play around with lift simulation. -------------------------------------------------------------------------------- /lift-simulation/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Lift Simulation 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 |
29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /notes-app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Notes App 9 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /notes-app/script.js: -------------------------------------------------------------------------------- 1 | const addBtn = document.getElementById('add') 2 | 3 | const notes = JSON.parse(localStorage.getItem('notes')) 4 | 5 | if(notes) { 6 | notes.forEach(note => addNewNote(note)) 7 | } 8 | 9 | addBtn.addEventListener('click', () => addNewNote()) 10 | 11 | function addNewNote(text = '') { 12 | const note = document.createElement('div') 13 | note.classList.add('note') 14 | 15 | note.innerHTML = ` 16 |
17 | 18 | 19 |
20 | 21 |
22 | 23 | ` 24 | 25 | const editBtn = note.querySelector('.edit') 26 | const deleteBtn = note.querySelector('.delete') 27 | const main = note.querySelector('.main') 28 | const textArea = note.querySelector('textarea') 29 | 30 | textArea.value = text 31 | main.innerHTML = marked(text) 32 | 33 | deleteBtn.addEventListener('click', () => { 34 | note.remove() 35 | 36 | updateLS() 37 | }) 38 | 39 | editBtn.addEventListener('click', () => { 40 | main.classList.toggle('hidden') 41 | textArea.classList.toggle('hidden') 42 | }) 43 | 44 | textArea.addEventListener('input', (e) => { 45 | const { value } = e.target 46 | 47 | main.innerHTML = marked(value) 48 | 49 | updateLS() 50 | }) 51 | 52 | document.body.appendChild(note) 53 | } 54 | 55 | function updateLS() { 56 | const notesText = document.querySelectorAll('textarea') 57 | 58 | const notes = [] 59 | 60 | notesText.forEach(note => notes.push(note.value)) 61 | 62 | localStorage.setItem('notes', JSON.stringify(notes)) 63 | } -------------------------------------------------------------------------------- /notes-app/style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;400&display=swap'); 2 | 3 | * { 4 | box-sizing: border-box; 5 | outline: none; 6 | } 7 | 8 | body { 9 | background-color: #7bdaf3; 10 | font-family: 'Poppins', sans-serif; 11 | display: flex; 12 | flex-wrap: wrap; 13 | margin: 0; 14 | padding-top: 3rem; 15 | } 16 | 17 | .add { 18 | position: fixed; 19 | top: 1rem; 20 | right: 1rem; 21 | background-color: #9ec862; 22 | color: #fff; 23 | border: none; 24 | border-radius: 3px; 25 | padding: 0.5rem 1rem; 26 | cursor: pointer; 27 | } 28 | 29 | .add:active { 30 | transform: scale(0.98); 31 | } 32 | 33 | .note { 34 | background-color: #fff; 35 | box-shadow: 0 0 10px 4px rgba(0, 0, 0, 0.1); 36 | margin: 30px 20px; 37 | height: 400px; 38 | width: 400px; 39 | overflow-y: scroll; 40 | } 41 | 42 | .note .tools { 43 | background-color: #9ec862; 44 | display: flex; 45 | justify-content: flex-end; 46 | padding: 0.5rem; 47 | } 48 | 49 | .note .tools button { 50 | background-color: transparent; 51 | border: none; 52 | color: #fff; 53 | cursor: pointer; 54 | font-size: 1rem; 55 | margin-left: 0.5rem; 56 | } 57 | 58 | .note textarea { 59 | outline: none; 60 | font-family: inherit; 61 | font-size: 1.2rem; 62 | border: none; 63 | height: 400px; 64 | width: 100%; 65 | padding: 20px; 66 | } 67 | 68 | .main { 69 | padding: 20px; 70 | } 71 | 72 | .hidden { 73 | display: none; 74 | } 75 | -------------------------------------------------------------------------------- /online education/images/pic-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/online education/images/pic-1.png -------------------------------------------------------------------------------- /online education/images/pic-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/online education/images/pic-2.png -------------------------------------------------------------------------------- /online education/images/pic-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/online education/images/pic-3.png -------------------------------------------------------------------------------- /online education/images/pic-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/online education/images/pic-4.png -------------------------------------------------------------------------------- /online education/images/pic-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/online education/images/pic-5.png -------------------------------------------------------------------------------- /online education/images/pic-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/online education/images/pic-6.png -------------------------------------------------------------------------------- /online education/images/tutor-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/online education/images/tutor-1.png -------------------------------------------------------------------------------- /online education/images/tutor-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/online education/images/tutor-2.png -------------------------------------------------------------------------------- /online education/images/tutor-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/online education/images/tutor-3.png -------------------------------------------------------------------------------- /online education/images/tutor-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/online education/images/tutor-4.png -------------------------------------------------------------------------------- /online education/images/tutor-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/online education/images/tutor-5.png -------------------------------------------------------------------------------- /online education/images/tutor-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/online education/images/tutor-6.png -------------------------------------------------------------------------------- /online education/js/script.js: -------------------------------------------------------------------------------- 1 | let menuBtn = document.querySelector('#menu-btn'); 2 | let navbar = document.querySelector('.header .flex .navbar'); 3 | 4 | menuBtn.onclick = () =>{ 5 | menuBtn.classList.toggle('fa-times'); 6 | navbar.classList.toggle('active'); 7 | } 8 | 9 | window.onscroll = () =>{ 10 | menuBtn.classList.remove('fa-times'); 11 | navbar.classList.remove('active'); 12 | } 13 | 14 | var swiper = new Swiper(".course-slider", { 15 | spaceBetween: 20, 16 | grabCursor:true, 17 | loop:true, 18 | pagination: { 19 | el: ".swiper-pagination", 20 | clickable: true, 21 | }, 22 | breakpoints: { 23 | 540: { 24 | slidesPerView: 1, 25 | }, 26 | 768: { 27 | slidesPerView: 2, 28 | }, 29 | 1024: { 30 | slidesPerView: 3, 31 | }, 32 | }, 33 | }); 34 | 35 | var swiper = new Swiper(".teachers-slider", { 36 | spaceBetween: 20, 37 | grabCursor:true, 38 | loop:true, 39 | pagination: { 40 | el: ".swiper-pagination", 41 | clickable: true, 42 | }, 43 | breakpoints: { 44 | 540: { 45 | slidesPerView: 1, 46 | }, 47 | 768: { 48 | slidesPerView: 2, 49 | }, 50 | 1024: { 51 | slidesPerView: 3, 52 | }, 53 | }, 54 | }); 55 | 56 | var swiper = new Swiper(".reviews-slider", { 57 | spaceBetween: 20, 58 | grabCursor:true, 59 | loop:true, 60 | pagination: { 61 | el: ".swiper-pagination", 62 | clickable: true, 63 | }, 64 | breakpoints: { 65 | 540: { 66 | slidesPerView: 1, 67 | }, 68 | 768: { 69 | slidesPerView: 2, 70 | }, 71 | 1024: { 72 | slidesPerView: 3, 73 | }, 74 | }, 75 | }); -------------------------------------------------------------------------------- /password-generator/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Password Generator 9 | 10 | 11 |
12 |

Password Generator

13 |
14 | 15 | 18 |
19 |
20 |
21 | 22 | 23 |
24 |
25 | 26 | 27 |
28 |
29 | 30 | 31 |
32 |
33 | 34 | 35 |
36 |
37 | 38 | 39 |
40 |
41 | 42 | 45 |
46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /password-generator/script.js: -------------------------------------------------------------------------------- 1 | const resultEl = document.getElementById('result') 2 | const lengthEl = document.getElementById('length') 3 | const uppercaseEl = document.getElementById('uppercase') 4 | const lowercaseEl = document.getElementById('lowercase') 5 | const numbersEl = document.getElementById('numbers') 6 | const symbolsEl = document.getElementById('symbols') 7 | const generateEl = document.getElementById('generate') 8 | const clipboardEl = document.getElementById('clipboard') 9 | 10 | const randomFunc = { 11 | lower: getRandomLower, 12 | upper: getRandomUpper, 13 | number: getRandomNumber, 14 | symbol: getRandomSymbol 15 | } 16 | 17 | clipboardEl.addEventListener('click', () => { 18 | const password = resultEl.innerText; 19 | if (!password) { 20 | return; 21 | } 22 | navigator.clipboard.writeText(password); 23 | alert('Password copied to clipboard!') 24 | }) 25 | 26 | generateEl.addEventListener('click', () => { 27 | const length = +lengthEl.value 28 | const hasLower = lowercaseEl.checked 29 | const hasUpper = uppercaseEl.checked 30 | const hasNumber = numbersEl.checked 31 | const hasSymbol = symbolsEl.checked 32 | 33 | resultEl.innerText = generatePassword(hasLower, hasUpper, hasNumber, hasSymbol, length) 34 | }) 35 | 36 | function generatePassword(lower, upper, number, symbol, length) { 37 | let generatedPassword = '' 38 | const typesCount = lower + upper + number + symbol 39 | const typesArr = [{lower}, {upper}, {number}, {symbol}].filter(item => Object.values(item)[0]) 40 | 41 | if(typesCount === 0) { 42 | return '' 43 | } 44 | 45 | for(let i = 0; i < length; i += typesCount) { 46 | typesArr.forEach(type => { 47 | const funcName = Object.keys(type)[0] 48 | generatedPassword += randomFunc[funcName]() 49 | }) 50 | } 51 | 52 | const finalPassword = generatedPassword.slice(0, length) 53 | 54 | return finalPassword 55 | } 56 | 57 | function getRandomLower() { 58 | return String.fromCharCode(Math.floor(Math.random() * 26) + 97) 59 | } 60 | 61 | function getRandomUpper() { 62 | return String.fromCharCode(Math.floor(Math.random() * 26) + 65) 63 | } 64 | 65 | function getRandomNumber() { 66 | return String.fromCharCode(Math.floor(Math.random() * 10) + 48) 67 | } 68 | 69 | function getRandomSymbol() { 70 | const symbols = '!@#$%^&*(){}[]=<>/,.' 71 | return symbols[Math.floor(Math.random() * symbols.length)] 72 | } 73 | -------------------------------------------------------------------------------- /password-generator/style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css?family=Muli&display=swap'); 2 | 3 | * { 4 | box-sizing: border-box; 5 | } 6 | 7 | body { 8 | background-color: #3b3b98; 9 | color: #fff; 10 | font-family: 'Muli', sans-serif; 11 | display: flex; 12 | flex-direction: column; 13 | align-items: center; 14 | justify-content: center; 15 | height: 100vh; 16 | overflow: hidden; 17 | padding: 10px; 18 | margin: 0; 19 | } 20 | 21 | h2 { 22 | margin: 10px 0 20px; 23 | text-align: center; 24 | } 25 | 26 | .container { 27 | background-color: #23235b; 28 | box-shadow: 0px 2px 10px rgba(255, 255, 255, 0.2); 29 | padding: 20px; 30 | width: 350px; 31 | max-width: 100%; 32 | } 33 | 34 | .result-container { 35 | background-color: rgba(0, 0, 0, 0.4); 36 | display: flex; 37 | justify-content: flex-start; 38 | align-items: center; 39 | position: relative; 40 | font-size: 18px; 41 | letter-spacing: 1px; 42 | padding: 12px 10px; 43 | height: 50px; 44 | width: 100%; 45 | } 46 | 47 | .result-container #result { 48 | word-wrap: break-word; 49 | max-width: calc(100% - 40px); 50 | overflow-y: scroll; 51 | height: 100%; 52 | } 53 | 54 | #result::-webkit-scrollbar { 55 | width: 1rem; 56 | } 57 | 58 | .result-container .btn { 59 | position: absolute; 60 | top: 5px; 61 | right: 5px; 62 | width: 40px; 63 | height: 40px; 64 | font-size: 20px; 65 | } 66 | 67 | .btn { 68 | border: none; 69 | background-color: #3b3b98; 70 | color: #fff; 71 | font-size: 16px; 72 | padding: 8px 12px; 73 | cursor: pointer; 74 | } 75 | 76 | .btn-large { 77 | display: block; 78 | width: 100%; 79 | } 80 | 81 | .setting { 82 | display: flex; 83 | justify-content: space-between; 84 | align-items: center; 85 | margin: 15px 0; 86 | } 87 | -------------------------------------------------------------------------------- /password-strength-background/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | 13 | Password Strength Backround 14 | 15 | 16 |
17 |
18 |

Image Password Strength

19 |

Change the password to see the effect

20 |
21 | 22 | 28 |
29 | 30 |
31 | 32 | 38 |
39 | 40 | 46 |
47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /password-strength-background/script.js: -------------------------------------------------------------------------------- 1 | const password = document.getElementById('password') 2 | const background = document.getElementById('background') 3 | 4 | password.addEventListener('input', (e) => { 5 | const input = e.target.value 6 | const length = input.length 7 | const blurValue = 20 - length * 2 8 | background.style.filter = `blur(${blurValue}px)` 9 | }) 10 | -------------------------------------------------------------------------------- /password-strength-background/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | box-sizing: border-box; 3 | } 4 | 5 | body { 6 | display: flex; 7 | flex-direction: column; 8 | align-items: center; 9 | justify-content: center; 10 | height: 100vh; 11 | overflow: hidden; 12 | margin: 0; 13 | } 14 | 15 | .background { 16 | background: url('https://images.unsplash.com/photo-1556745757-8d76bdb6984b') 17 | no-repeat center center/cover; 18 | position: absolute; 19 | top: -20px; 20 | bottom: -20px; 21 | left: -20px; 22 | right: -20px; 23 | z-index: -1; 24 | filter: blur(20px); 25 | } 26 | -------------------------------------------------------------------------------- /real-estate website/images/home-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/real-estate website/images/home-bg.jpg -------------------------------------------------------------------------------- /real-estate website/images/icon-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/real-estate website/images/icon-1.png -------------------------------------------------------------------------------- /real-estate website/images/icon-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/real-estate website/images/icon-2.png -------------------------------------------------------------------------------- /real-estate website/images/icon-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/real-estate website/images/icon-3.png -------------------------------------------------------------------------------- /real-estate website/images/img-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/real-estate website/images/img-1.jpg -------------------------------------------------------------------------------- /real-estate website/images/img-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/real-estate website/images/img-2.jpg -------------------------------------------------------------------------------- /real-estate website/images/img-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/real-estate website/images/img-3.jpg -------------------------------------------------------------------------------- /real-estate website/images/img-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/real-estate website/images/img-4.jpg -------------------------------------------------------------------------------- /real-estate website/images/img-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/real-estate website/images/img-5.jpg -------------------------------------------------------------------------------- /real-estate website/images/img-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/real-estate website/images/img-6.jpg -------------------------------------------------------------------------------- /real-estate website/images/pic-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/real-estate website/images/pic-1.png -------------------------------------------------------------------------------- /real-estate website/images/pic-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/real-estate website/images/pic-2.png -------------------------------------------------------------------------------- /real-estate website/images/pic-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/real-estate website/images/pic-3.png -------------------------------------------------------------------------------- /real-estate website/images/pic-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/real-estate website/images/pic-4.png -------------------------------------------------------------------------------- /real-estate website/images/s-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/real-estate website/images/s-1.png -------------------------------------------------------------------------------- /real-estate website/images/s-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/real-estate website/images/s-2.png -------------------------------------------------------------------------------- /real-estate website/images/s-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/real-estate website/images/s-3.png -------------------------------------------------------------------------------- /spotify_clone/ak.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/ak.jpg -------------------------------------------------------------------------------- /spotify_clone/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/bg.png -------------------------------------------------------------------------------- /spotify_clone/covers/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/covers/1.jpg -------------------------------------------------------------------------------- /spotify_clone/covers/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/covers/10.jpg -------------------------------------------------------------------------------- /spotify_clone/covers/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/covers/2.jpg -------------------------------------------------------------------------------- /spotify_clone/covers/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/covers/3.jpg -------------------------------------------------------------------------------- /spotify_clone/covers/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/covers/4.jpg -------------------------------------------------------------------------------- /spotify_clone/covers/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/covers/5.jpg -------------------------------------------------------------------------------- /spotify_clone/covers/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/covers/6.jpg -------------------------------------------------------------------------------- /spotify_clone/covers/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/covers/7.jpg -------------------------------------------------------------------------------- /spotify_clone/covers/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/covers/8.jpg -------------------------------------------------------------------------------- /spotify_clone/covers/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/covers/9.jpg -------------------------------------------------------------------------------- /spotify_clone/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/logo.png -------------------------------------------------------------------------------- /spotify_clone/playing.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/playing.gif -------------------------------------------------------------------------------- /spotify_clone/songs/1.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/songs/1.mp3 -------------------------------------------------------------------------------- /spotify_clone/songs/10.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/songs/10.mp3 -------------------------------------------------------------------------------- /spotify_clone/songs/2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/songs/2.mp3 -------------------------------------------------------------------------------- /spotify_clone/songs/3.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/songs/3.mp3 -------------------------------------------------------------------------------- /spotify_clone/songs/4.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/songs/4.mp3 -------------------------------------------------------------------------------- /spotify_clone/songs/5.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/songs/5.mp3 -------------------------------------------------------------------------------- /spotify_clone/songs/6.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/songs/6.mp3 -------------------------------------------------------------------------------- /spotify_clone/songs/7.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/songs/7.mp3 -------------------------------------------------------------------------------- /spotify_clone/songs/8.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/songs/8.mp3 -------------------------------------------------------------------------------- /spotify_clone/songs/9.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/spotify_clone/songs/9.mp3 -------------------------------------------------------------------------------- /spotify_clone/style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Ubuntu&display=swap'); 2 | @import url('https://fonts.googleapis.com/css2?family=Varela+Round&display=swap'); 3 | body{ 4 | background-color: antiquewhite; 5 | } 6 | 7 | *{ 8 | margin: 0; 9 | padding: 0; 10 | } 11 | 12 | nav{ 13 | font-family: 'Ubuntu', sans-serif; 14 | } 15 | 16 | nav ul{ 17 | display: flex; 18 | align-items: center; 19 | list-style-type: none; 20 | height: 65px; 21 | background-color: black; 22 | color: rgb(113, 210, 81); 23 | } 24 | 25 | nav ul li{ 26 | padding: 0 12px; 27 | } 28 | .brand img{ 29 | width: 44px; 30 | padding: 0 8px; 31 | } 32 | 33 | .brand { 34 | display: flex; 35 | align-items: center; 36 | font-weight: bolder; 37 | font-size: 1.3rem; 38 | } 39 | 40 | .container{ 41 | min-height: 72vh; 42 | background-color: rgb(28, 173, 47); 43 | color: white; 44 | font-family: 'Varela Round', sans-serif; 45 | display: flex; 46 | margin: 23px auto; 47 | width: 70%; 48 | border-radius: 12px; 49 | padding: 34px; 50 | background-image: url('bg.png'); 51 | } 52 | 53 | .bottom{ 54 | position: sticky; 55 | bottom: 0; 56 | height: 130px; 57 | background-color: black; 58 | color: rgb(137, 208, 74); 59 | display: flex; 60 | justify-content: center; 61 | align-items: center; 62 | flex-direction: column; 63 | } 64 | 65 | .icons{ 66 | margin-top: 14px; 67 | } 68 | .icons i{ 69 | cursor: pointer; 70 | } 71 | 72 | #myProgressBar{ 73 | width: 80vw; 74 | cursor: pointer; 75 | } 76 | 77 | .songItemContainer{ 78 | margin-top: 74px; 79 | } 80 | 81 | .songItem{ 82 | height: 50px; 83 | display: flex; 84 | background-color: white; 85 | color: black; 86 | margin: 12px 0; 87 | justify-content: space-between; 88 | align-items: center; 89 | border-radius: 34px; 90 | } 91 | 92 | .songItem img{ 93 | width: 43px; 94 | margin: 0 23px; 95 | border-radius: 34px; 96 | } 97 | 98 | .timestamp{ 99 | margin: 0 23px; 100 | } 101 | 102 | .timestamp i{ 103 | cursor: pointer; 104 | } 105 | 106 | .songInfo{ 107 | position: absolute; 108 | left: 10vw; 109 | font-family: 'Varela Round', sans-serif; 110 | color: rgb(93, 202, 81); 111 | } 112 | 113 | .songInfo img{ 114 | opacity: 0; 115 | transition: opacity 0.4s ease-in; 116 | } 117 | 118 | @media only screen and (max-width: 1100px) { 119 | body { 120 | background-color: rgb(18, 164, 50); 121 | } 122 | } -------------------------------------------------------------------------------- /to-do-list/README.md: -------------------------------------------------------------------------------- 1 | # This is a To-Do App 2 | A user may add to todo task list, view all the tasks they have to complete,if the task is completed then just click on that task after clicking it will show as completed and the completed task can be deleted by "Delete Completed Button". 3 | 4 | ## Tech Stack Used 5 | 1. HTML 6 | 2. CSS 7 | 3. JavaScript 8 | 9 | # To clone this project 10 | ``` 11 | git clone 12 | 13 | ``` 14 | ``` 15 | cd MINI_PROJECTS_JAVASCRIPT 16 | cd to-do-list 17 | 18 | ``` 19 | 20 | # Thanks 21 | 22 | 23 | -------------------------------------------------------------------------------- /tour and travel website/images/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/1.jpg -------------------------------------------------------------------------------- /tour and travel website/images/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/2.jpg -------------------------------------------------------------------------------- /tour and travel website/images/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/3.jpg -------------------------------------------------------------------------------- /tour and travel website/images/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/4.jpg -------------------------------------------------------------------------------- /tour and travel website/images/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/5.jpg -------------------------------------------------------------------------------- /tour and travel website/images/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/6.jpg -------------------------------------------------------------------------------- /tour and travel website/images/g-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/g-1.jpg -------------------------------------------------------------------------------- /tour and travel website/images/g-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/g-2.jpg -------------------------------------------------------------------------------- /tour and travel website/images/g-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/g-3.jpg -------------------------------------------------------------------------------- /tour and travel website/images/g-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/g-4.jpg -------------------------------------------------------------------------------- /tour and travel website/images/g-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/g-5.jpg -------------------------------------------------------------------------------- /tour and travel website/images/g-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/g-6.jpg -------------------------------------------------------------------------------- /tour and travel website/images/g-7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/g-7.jpg -------------------------------------------------------------------------------- /tour and travel website/images/g-8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/g-8.jpg -------------------------------------------------------------------------------- /tour and travel website/images/g-9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/g-9.jpg -------------------------------------------------------------------------------- /tour and travel website/images/p-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/p-1.jpg -------------------------------------------------------------------------------- /tour and travel website/images/p-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/p-2.jpg -------------------------------------------------------------------------------- /tour and travel website/images/p-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/p-3.jpg -------------------------------------------------------------------------------- /tour and travel website/images/p-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/p-4.jpg -------------------------------------------------------------------------------- /tour and travel website/images/p-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/p-5.jpg -------------------------------------------------------------------------------- /tour and travel website/images/p-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/p-6.jpg -------------------------------------------------------------------------------- /tour and travel website/images/pic1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/pic1.png -------------------------------------------------------------------------------- /tour and travel website/images/pic2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/pic2.png -------------------------------------------------------------------------------- /tour and travel website/images/pic3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/pic3.png -------------------------------------------------------------------------------- /tour and travel website/images/pic4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/pic4.png -------------------------------------------------------------------------------- /tour and travel website/images/vid-1.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/vid-1.mp4 -------------------------------------------------------------------------------- /tour and travel website/images/vid-2.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/vid-2.mp4 -------------------------------------------------------------------------------- /tour and travel website/images/vid-3.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/vid-3.mp4 -------------------------------------------------------------------------------- /tour and travel website/images/vid-4.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/vid-4.mp4 -------------------------------------------------------------------------------- /tour and travel website/images/vid-5.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamakhileshmishra/Mini_Projects_JavaScript/dd07fc8e0c23ac099696f68633cb79ff25323ae3/tour and travel website/images/vid-5.mp4 -------------------------------------------------------------------------------- /tour and travel website/script.txt: -------------------------------------------------------------------------------- 1 | let searchBtn = document.querySelector('#search-btn'); 2 | let searchBar = document.querySelector('.search-bar-container'); 3 | let formBtn = document.querySelector('#login-btn'); 4 | let loginForm = document.querySelector('.login-form-container'); 5 | let formClose = document.querySelector('#form-close'); 6 | let menu = document.querySelector('#menu-bar'); 7 | let navbar = document.querySelector('.navbar'); 8 | let videoBtn = document.querySelectorAll('.vid-btn'); 9 | 10 | window.onscroll = () =>{ 11 | searchBtn.classList.remove('fa-times'); 12 | searchBar.classList.remove('active'); 13 | menu.classList.remove('fa-times'); 14 | navbar.classList.remove('active'); 15 | loginForm.classList.remove('active'); 16 | } 17 | 18 | menu.addEventListener('click', () =>{ 19 | menu.classList.toggle('fa-times'); 20 | navbar.classList.toggle('active'); 21 | }); 22 | 23 | searchBtn.addEventListener('click', () =>{ 24 | searchBtn.classList.toggle('fa-times'); 25 | searchBar.classList.toggle('active'); 26 | }); 27 | 28 | formBtn.addEventListener('click', () =>{ 29 | loginForm.classList.add('active'); 30 | }); 31 | 32 | formClose.addEventListener('click', () =>{ 33 | loginForm.classList.remove('active'); 34 | }); 35 | 36 | videoBtn.forEach(btn =>{ 37 | btn.addEventListener('click', ()=>{ 38 | document.querySelector('.controls .active').classList.remove('active'); 39 | btn.classList.add('active'); 40 | let src = btn.getAttribute('data-src'); 41 | document.querySelector('#video-slider').src = src; 42 | }); 43 | }); 44 | 45 | var swiper = new Swiper(".review-slider", { 46 | spaceBetween: 20, 47 | loop:true, 48 | autoplay: { 49 | delay: 2500, 50 | disableOnInteraction: false, 51 | }, 52 | breakpoints: { 53 | 640: { 54 | slidesPerView: 1, 55 | }, 56 | 768: { 57 | slidesPerView: 2, 58 | }, 59 | 1024: { 60 | slidesPerView: 3, 61 | }, 62 | }, 63 | }); 64 | 65 | var swiper = new Swiper(".brand-slider", { 66 | spaceBetween: 20, 67 | loop:true, 68 | autoplay: { 69 | delay: 2500, 70 | disableOnInteraction: false, 71 | }, 72 | breakpoints: { 73 | 450: { 74 | slidesPerView: 2, 75 | }, 76 | 768: { 77 | slidesPerView: 3, 78 | }, 79 | 991: { 80 | slidesPerView: 4, 81 | }, 82 | 1200: { 83 | slidesPerView: 5, 84 | }, 85 | }, 86 | }); --------------------------------------------------------------------------------