├── .gitignore
├── .vite
└── deps
│ ├── _metadata.json
│ ├── chunk-QPG7G3M7.js
│ ├── chunk-QPG7G3M7.js.map
│ ├── chunk-UTEJFLXC.js
│ ├── chunk-UTEJFLXC.js.map
│ ├── package.json
│ ├── react-dom_client.js
│ ├── react-dom_client.js.map
│ ├── react-router-dom.js
│ ├── react-router-dom.js.map
│ ├── react.js
│ └── react.js.map
├── 01-To-Do List App
├── index.html
├── script.js
└── style.css
├── 02-Simple Calculator
├── index.html
├── index.js
└── style.css
├── 03-Digital Clock
├── index.html
├── index.js
└── style.css
├── 04-Tip Calculator
├── index.html
├── index.js
└── style.css
├── 05-Temperature Converter
├── index.html
├── index.js
└── style.css
├── 06-Random Quote Generator
├── index.html
├── index.js
└── style.css
├── 07-Basic Image Slider
├── index.html
├── index.js
└── style.css
├── 08-Countdown Timer
├── index.html
├── script.js
└── style.css
├── 09-BMI Calculator
├── index.html
├── script.js
└── style.css
├── 10-Currency Converter
├── index.html
├── index.js
└── style.css
├── 100-Code Splitting
├── index.html
├── script.js
└── styles.css
├── 11-Weather App
├── index.html
├── index.js
└── style.css
├── 12-Expense Tracker
├── index.html
├── index.js
└── style.css
├── 13-Memory Game
├── index.html
├── index.js
└── style.css
├── 14-Chat Application
├── index.html
├── index.js
└── style.css
├── 15-Interactive Quiz
├── index.html
├── index.js
└── style.css
├── 16-Pomodoro Timer
├── index.html
├── index.js
└── style.css
├── 17-Music Player
├── index.html
├── index.js
└── style.css
├── 18-Recipe App
└── index.html
├── 19-Car Rental Website
├── index.html
├── script.js
└── styles.css
├── 20-Blogging Platform
├── index.html
├── script.js
└── styles.css
├── 21-Social Media Dashboard
├── index.html
├── script.js
└── styles.css
├── 22-E-commerce Website
├── index.html
├── script.js
└── styles.css
├── 23-Real-time Chat Room
├── index.html
├── script.js
└── styles.css
├── 24-Photo Editing Tool
├── index.html
├── script.js
└── styles.css
├── 25-Cryptocurrency Tracker
├── index.html
├── script.js
└── styles.css
├── 26-Fitness Tracker
├── index.html
├── script.js
└── styles.css
├── 27-Job Board Platform
├── index.html
├── script.js
└── style.css
├── 28-AI-powered Recommendation System
├── index.html
└── script.js
├── 29-Augmented Reality Game
└── index.html
├── 30-Video Streaming Platform
└── index.html
├── 31-Google Maps Integration
└── index.html
├── 32-Twitter API Integration
└── index.html
├── 33-YouTube Video Player
└── index.html
├── 34-GitHub Profile Viewer
├── app.js
├── index.html
└── style.css
├── 35-Weather Forecast using OpenWeatherMap API
├── app.js
├── index.html
└── style.css
├── 36-News Aggregator
├── index.html
├── index.js
└── style.css
├── 37-Currency Exchange Rates using API
├── index.html
├── index.js
└── style.css
├── 38-NASA API for Astronomy Data
├── index.html
├── index.js
└── style.css
├── 39-Random Joke Generator using Joke API
├── index.html
├── script.js
└── styles.css
├── 40-Recipe Finder using Food API
├── index.html
├── script.js
└── styles.css
├── 41-Drawing App
├── index.html
├── script.js
└── styles.css
├── 42-Virtual Piano
├── index.html
├── script.js
└── styles.css
├── 43-Interactive Storytelling
├── index.html
├── script.js
└── styles.css
├── 44-3D Cube Puzzle
├── index.html
├── script.js
└── styles.css
├── 45-Text-based Adventure Game
├── index.html
├── script.js
└── styles.css
├── 46-Music Visualizer
├── index.html
├── script.js
└── styles.css
├── 47-Meme Generator
├── index.html
├── script.js
└── styles.css
├── 48-Virtual Pet
├── index.html
├── script.js
└── styles.css
├── 49-Color Palette Generator
├── index.html
├── script.js
└── styles.css
├── 50-Emoji Translator
├── index.html
├── script.js
└── styles.css
├── 51-File Uploader
├── index.html
├── script.js
└── styles.css
├── 52-Password Generator
├── index.html
├── script.js
└── styles.css
├── 53-QR Code Generator
├── index.html
├── qrcode.min.js
├── script.js
└── styles.css
├── 54-Unit Converter
├── index.html
├── script.js
└── styles.css
├── 55-Markdown Editor
├── index.html
├── script.js
└── styles.css
├── 56-Voice Assistant
├── index.html
├── script.js
└── styles.css
├── 57-Note-taking App
├── index.html
├── script.js
└── styles.css
├── 58-Browser Extension
├── manifest.json
└── popup
│ ├── content.js
│ ├── popup.css
│ ├── popup.html
│ └── popup.js
├── 59-Calendar
├── index.html
├── script.js
└── styles.css
├── 60-Clipboard Manager
├── index.html
├── script.js
└── styles.css
├── 61-Interactive Charts
├── app.js
├── index.html
└── styles.css
├── 62-Heatmap Generator
├── heatmap.js
├── index.html
└── styles.css
├── 63-Dashboard with Graphs and Metrics
├── dashboard.js
├── index.html
└── styles.css
├── 64-Geographical Data Visualization
├── app.js
├── index.html
└── styles.css
├── 65-Network Traffic Analyzer
├── app.js
├── index.html
└── styles.css
├── 66-Stock Market Tracker with Graphs
├── app.js
├── index.html
└── styles.css
├── 67-Polls and Survey Data Visualization
├── app.js
├── index.html
└── styles.css
├── 68-Visualizing COVID-19 Dat
├── app.js
├── index.html
└── styles.css
├── 69-Population Density Map
├── app.js
├── index.html
└── styles.css
├── 70-Social Media Analytics Dashboard
├── app.js
├── index.html
└── styles.css
├── 71-Tic Tac Toe
├── app.js
├── index.html
└── styles.css
├── 72-Snake Game
├── index.html
├── script.js
└── styles.css
├── 73-2048
├── app.js
├── index.html
└── styles.css
├── 74-Sudoku Solver
└── index.html
├── 75-Chess Game
├── .gitignore
├── index.html
├── package-lock.json
├── package.json
├── script.js
├── server.js
└── style.css
├── 76-Hangman
├── images
│ └── hangman-2.png
├── index.html
├── script.js
└── style.css
├── 77-Memory Puzzle Game
├── index.html
├── script.js
└── style.css
├── 78-Battleship
├── index.html
├── script.js
└── style.css
├── 79-Crossword Puzzle
├── index.html
├── script.js
└── style.css
├── 80-Platformer Game
├── index.html
├── script.js
└── style.css
├── 81-Screen Reader Compatibility
├── app.js
├── index.html
├── readme.md
└── styles.css
├── 82-Keyboard Navigation Improvement
├── app.js
├── index.html
└── styles.css
├── 83-Contrast Checker
├── app.js
├── index.html
├── readme.md
└── styles.css
├── 84-Text Resize
├── app.js
├── index.html
└── styles.css
├── 85-Color Blindness Simulator
├── app.js
├── index.html
└── styles.css
├── 86-Speech Recognition Interface
├── index.html
├── script.js
└── styles.css
├── 87-Focus Management
├── index.html
├── script.js
└── styles.css
├── 88-High-Contrast Mode
├── index.html
├── script.js
├── styles-high-contrast.css
└── styles.css
├── 89-Aria Role Implementation
├── index.html
├── script.js
└── styles.css
├── 90-Responsive Design for Accessibility
├── index.html
├── readme.md
├── script.js
└── styles.css
├── 91-Code Profiler and Optimizer
├── index.html
├── readme.md
├── script.js
└── styles.css
├── 92-Lazy Loading Images
├── images
│ ├── image1.jpg
│ ├── image2.jpg
│ └── image3.jpg
├── index.html
├── readme.md
├── script.js
└── styles.css
├── 93-Debouncing and Throttling Functions
├── index.html
├── readme.md
├── script.js
└── styles.css
├── 94-Caching Mechanism
├── index.html
├── script.js
└── styles.css
├── 95-Reducing DOM Manipulations
├── index.html
├── script.js
└── styles.css
├── 96-Memory Leak Detection
├── index.html
├── script.js
└── styles.css
├── 97-Network Performance Analyzer
├── index.html
├── script.js
└── styles.css
├── 98-Minification and Bundling
├── index.html
├── script.js
└── styles.css
├── 99-Tree Shaking for Unused Code
├── index.html
├── script.js
└── styles.css
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── api.json
├── assets
├── css
│ └── index.css
├── images
│ ├── 100jsproject.jpg
│ ├── favicon.ico
│ ├── logo.png
│ ├── nike.avif
│ ├── og-image.png
│ ├── open-ai.avif
│ ├── project-images
│ │ ├── Digital Clock.jpg
│ │ ├── Simple Calculator.jpg
│ │ └── To-Do App.jpg
│ ├── sonos.avif
│ └── twitter-image.jpg
└── js
│ ├── demodata.js
│ └── index.js
├── index.html
├── note.txt
├── projects.json
├── screen.png
└── screenshot.png
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Logs
4 | logs
5 | *.log
6 | npm-debug.log*
7 | yarn-debug.log*
8 | yarn-error.log*
9 | pnpm-debug.log*
10 | lerna-debug.log*
11 |
12 | node_modules
13 | dist
14 | dist-ssr
15 | *.local
16 |
17 | # Editor directories and files
18 | .vscode/*
19 | !.vscode/extensions.json
20 | .idea
21 | .DS_Store
22 | *.suo
23 | *.ntvs*
24 | *.njsproj
25 | *.sln
26 | *.sw?
27 | .vscode/
28 | .vite
--------------------------------------------------------------------------------
/.vite/deps/_metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "hash": "45675ccd",
3 | "configHash": "6646ec49",
4 | "lockfileHash": "e5b6e486",
5 | "browserHash": "0c602c75",
6 | "optimized": {
7 | "react": {
8 | "src": "../../node_modules/react/index.js",
9 | "file": "react.js",
10 | "fileHash": "a1b3608a",
11 | "needsInterop": true
12 | },
13 | "react-dom/client": {
14 | "src": "../../node_modules/react-dom/client.js",
15 | "file": "react-dom_client.js",
16 | "fileHash": "ba7c6116",
17 | "needsInterop": true
18 | },
19 | "react-router-dom": {
20 | "src": "../../node_modules/react-router-dom/dist/index.js",
21 | "file": "react-router-dom.js",
22 | "fileHash": "bcb7a487",
23 | "needsInterop": false
24 | }
25 | },
26 | "chunks": {
27 | "chunk-QPG7G3M7": {
28 | "file": "chunk-QPG7G3M7.js"
29 | },
30 | "chunk-UTEJFLXC": {
31 | "file": "chunk-UTEJFLXC.js"
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/.vite/deps/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "module"
3 | }
4 |
--------------------------------------------------------------------------------
/.vite/deps/react-dom_client.js:
--------------------------------------------------------------------------------
1 | import {
2 | require_react_dom
3 | } from "./chunk-QPG7G3M7.js";
4 | import {
5 | __commonJS
6 | } from "./chunk-UTEJFLXC.js";
7 |
8 | // node_modules/react-dom/client.js
9 | var require_client = __commonJS({
10 | "node_modules/react-dom/client.js"(exports) {
11 | var m = require_react_dom();
12 | if (false) {
13 | exports.createRoot = m.createRoot;
14 | exports.hydrateRoot = m.hydrateRoot;
15 | } else {
16 | i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
17 | exports.createRoot = function(c, o) {
18 | i.usingClientEntryPoint = true;
19 | try {
20 | return m.createRoot(c, o);
21 | } finally {
22 | i.usingClientEntryPoint = false;
23 | }
24 | };
25 | exports.hydrateRoot = function(c, h, o) {
26 | i.usingClientEntryPoint = true;
27 | try {
28 | return m.hydrateRoot(c, h, o);
29 | } finally {
30 | i.usingClientEntryPoint = false;
31 | }
32 | };
33 | }
34 | var i;
35 | }
36 | });
37 | export default require_client();
38 | //# sourceMappingURL=react-dom_client.js.map
39 |
--------------------------------------------------------------------------------
/.vite/deps/react-dom_client.js.map:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "sources": ["../../node_modules/react-dom/client.js"],
4 | "sourcesContent": ["'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n exports.createRoot = m.createRoot;\n exports.hydrateRoot = m.hydrateRoot;\n} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function(c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function(c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n}\n"],
5 | "mappings": ";;;;;;;;AAAA;AAAA;AAEA,QAAI,IAAI;AACR,QAAI,OAAuC;AACzC,cAAQ,aAAa,EAAE;AACvB,cAAQ,cAAc,EAAE;AAAA,IAC1B,OAAO;AACD,UAAI,EAAE;AACV,cAAQ,aAAa,SAAS,GAAG,GAAG;AAClC,UAAE,wBAAwB;AAC1B,YAAI;AACF,iBAAO,EAAE,WAAW,GAAG,CAAC;AAAA,QAC1B,UAAE;AACA,YAAE,wBAAwB;AAAA,QAC5B;AAAA,MACF;AACA,cAAQ,cAAc,SAAS,GAAG,GAAG,GAAG;AACtC,UAAE,wBAAwB;AAC1B,YAAI;AACF,iBAAO,EAAE,YAAY,GAAG,GAAG,CAAC;AAAA,QAC9B,UAAE;AACA,YAAE,wBAAwB;AAAA,QAC5B;AAAA,MACF;AAAA,IACF;AAjBM;AAAA;AAAA;",
6 | "names": []
7 | }
8 |
--------------------------------------------------------------------------------
/.vite/deps/react.js:
--------------------------------------------------------------------------------
1 | import {
2 | require_react
3 | } from "./chunk-UTEJFLXC.js";
4 | export default require_react();
5 | //# sourceMappingURL=react.js.map
6 |
--------------------------------------------------------------------------------
/.vite/deps/react.js.map:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "sources": [],
4 | "sourcesContent": [],
5 | "mappings": "",
6 | "names": []
7 | }
8 |
--------------------------------------------------------------------------------
/01-To-Do List App/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | To-Do List App | 100 JavaScript Projects.
7 |
8 |
9 |
10 |
11 | To-Do List App
12 |
13 |
14 |
20 |
21 |
22 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/01-To-Do List App/script.js:
--------------------------------------------------------------------------------
1 | const buttonEl = document.querySelector("#button");
2 | const todoList = document.querySelector("#todo_list");
3 |
4 | function addTodo() {
5 | const li = document.createElement("li");
6 | let inputValue = document.querySelector(".input").value;
7 | const t = document.createTextNode(inputValue);
8 | li.appendChild(t);
9 |
10 | // Cheack input validation
11 | if (inputValue === "") {
12 | alert("Please enter a valid value");
13 | } else {
14 | todoList.appendChild(li);
15 | }
16 | console.log(inputValue);
17 | document.querySelector("input").value = "";
18 | }
19 |
20 | buttonEl.addEventListener("click", addTodo);
21 |
--------------------------------------------------------------------------------
/01-To-Do List App/style.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | box-sizing: border-box;
5 | }
6 | body {
7 | width: 100%;
8 | height: 100vh;
9 | background-color: #212121;
10 | color: #efefef;
11 | display: flex;
12 | flex-direction: column;
13 | align-items: center;
14 | font-family: sans-serif;
15 | }
16 | h1.title {
17 | margin-top: 20px;
18 | }
19 |
20 | #todo_app {
21 | margin-top: 15px;
22 | }
23 | #todo_app .todo .input {
24 | padding: 10px 20px;
25 | min-width: 400px;
26 | font-size: 1rem;
27 | }
28 | #todo_app .todo .input:focus {
29 | border: 2px solid #0e760e;
30 | outline: none;
31 | }
32 | .todo button {
33 | padding: 10px 20px;
34 | border: 1px solid #0c620c;
35 | font-size: 1rem;
36 | background-color: #0c620c;
37 | color: #efefef;
38 | cursor: pointer;
39 | animation: background-color 0.6s ease-in-out;
40 | }
41 | .todo button:hover {
42 | background-color: #0e760e;
43 | }
44 |
45 | ul#todo_list {
46 | list-style: none;
47 | margin: 15px 0;
48 | }
49 |
50 | ul#todo_list li {
51 | padding: 10px 0px;
52 | border-bottom: 1px solid #2e2e2e;
53 | }
54 |
--------------------------------------------------------------------------------
/02-Simple Calculator/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Simple Calculator || 100 JavaScript Projects
7 |
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 |
--------------------------------------------------------------------------------
/02-Simple Calculator/style.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | box-sizing: border-box;
5 | }
6 | body {
7 | font-family: "Arial", sans-serif;
8 | display: flex;
9 | justify-content: center;
10 | align-items: center;
11 | height: 100vh;
12 | margin: 0;
13 | background-color: #f4f4f4;
14 | }
15 | #calculator {
16 | border: 2px solid #333;
17 | border-radius: 8px;
18 | overflow: hidden;
19 | }
20 | #display {
21 | height: 60px;
22 | text-align: right;
23 | font-size: 1.5em;
24 | padding: 0 10px;
25 | background-color: #eee;
26 | }
27 | #keyboard {
28 | display: grid;
29 | grid-template-columns: repeat(4, 1fr);
30 | }
31 | button {
32 | border: none;
33 | font-size: 1.2em;
34 | padding: 15px;
35 | cursor: pointer;
36 | outline: none;
37 | background-color: #fff;
38 | }
39 | button:active {
40 | background-color: #ccc;
41 | }
42 | button.operator {
43 | background-color: #ff8c00;
44 | color: #fff;
45 | }
46 |
--------------------------------------------------------------------------------
/03-Digital Clock/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Digital Clock || 100 JavaScript Projects
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
:
16 |
17 |
21 |
22 |
23 |
24 | ,
25 |
26 | ,
27 |
28 | ,
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/04-Tip Calculator/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Tip Calculator || 100 JavaScript Projects
7 |
8 |
9 |
10 | Tip Calculator || 100 JavaScript Projects
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/04-Tip Calculator/index.js:
--------------------------------------------------------------------------------
1 | function initApp() {
2 | console.log("init app");
3 | }
4 |
5 | initApp();
6 |
--------------------------------------------------------------------------------
/04-Tip Calculator/style.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | box-sizing: border-box;
5 | }
6 |
--------------------------------------------------------------------------------
/05-Temperature Converter/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Temperature Converter || 100 JavaScript Projects
7 |
8 |
9 |
10 |
11 | Temperature Converter
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/05-Temperature Converter/index.js:
--------------------------------------------------------------------------------
1 | function initApp() {
2 | console.log("init App");
3 | }
4 |
5 | initApp();
6 |
--------------------------------------------------------------------------------
/05-Temperature Converter/style.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | box-sizing: border-box;
5 | }
6 |
--------------------------------------------------------------------------------
/06-Random Quote Generator/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Random Quote Generator
8 |
9 |
10 |
11 |
12 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/06-Random Quote Generator/index.js:
--------------------------------------------------------------------------------
1 | // DOM Element
2 | const btnEl = document.getElementById("btn");
3 | const quoteEl = document.getElementById("quote");
4 | const apiUrl = `https://api.api-ninjas.com/v1/quotes?category=happiness`;
5 | const apiKey = "MNemEr9THSVTCxISru9Snw==VJeeHWGzXAbYm3tw";
6 |
7 | const options = {
8 | method: "GET",
9 | headers: {
10 | "X-Api-Key": apiKey,
11 | },
12 | };
13 |
14 | const getJoke = async () => {
15 | try {
16 | quoteEl.innerText = "Loading...";
17 | const response = await fetch(apiUrl, options);
18 | const data = await response.json();
19 | const quote = data[0].quote;
20 | console.log(quote);
21 | quoteEl.innerText = quote;
22 | } catch (error) {
23 | quoteEl.innerText = "An error happened, try again later.";
24 | console.log(error);
25 | }
26 | };
27 | getJoke();
28 |
29 | btnEl.addEventListener("click", getJoke);
30 |
--------------------------------------------------------------------------------
/06-Random Quote Generator/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | background: linear-gradient(
4 | to left bottom,
5 | lightblue,
6 | lightpink,
7 | lightblue
8 | );
9 | font-family: monospace;
10 | min-height: 100vh;
11 | display: flex;
12 | justify-content: center;
13 | align-items: center;
14 | }
15 |
16 | .container {
17 | width: 100%;
18 | height: 100vh;
19 | display: flex;
20 | justify-content: center;
21 | align-items: center;
22 | text-align: center;
23 | }
24 | .container .header {
25 | font-weight: 700;
26 | font-size: 1.2rem;
27 | margin-bottom: 10px;
28 | }
29 | .container .header h1 {
30 | font-size: 3rem;
31 | margin-bottom: 3rem;
32 | }
33 | .container .header p.quote {
34 | font-size: 1.6rem;
35 | line-height: 1.8;
36 | width: 70%;
37 | min-width: 80%;
38 | margin: 30px auto;
39 | min-height: 200px;
40 | }
41 | .btn {
42 | padding: 16px;
43 | background: linear-gradient(
44 | to left bottom,
45 | lightblue,
46 | lightpink,
47 | lightblue
48 | );
49 | border-color: rgba(255, 255, 255, 0.3);
50 | box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
51 | color: #000;
52 | text-transform: uppercase;
53 | font-size: 16px;
54 | font-weight: 600;
55 | min-width: 280px;
56 | margin: 10px 0px;
57 | border-radius: 15px;
58 | cursor: pointer;
59 | transition: all 300ms ease-in-out;
60 | }
61 |
--------------------------------------------------------------------------------
/07-Basic Image Slider/index.js:
--------------------------------------------------------------------------------
1 | let currentIndex = 0;
2 | const slides = document.querySelector(".slider-wrapper").children;
3 | const totalSlides = slides.length;
4 |
5 | function changeSlide(direction) {
6 | currentIndex += direction;
7 |
8 | if (currentIndex < 0) {
9 | currentIndex = totalSlides - 1;
10 | } else if (currentIndex >= totalSlides) {
11 | currentIndex = 0;
12 | }
13 |
14 | updateSlider();
15 | }
16 |
17 | function updateSlider() {
18 | const newTransformValue = -currentIndex * 100 + "%";
19 | document.querySelector(".slider-wrapper").style.transform =
20 | "translateX(" + newTransformValue + ")";
21 | }
22 |
23 | // Optionally, you can add automatic sliding by uncommenting the line below:
24 | // setInterval(() => changeSlide(1), 3000);
25 |
--------------------------------------------------------------------------------
/07-Basic Image Slider/style.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | box-sizing: border-box;
5 | }
6 | body {
7 | font-family: Arial, sans-serif;
8 | margin: 0;
9 | padding: 0;
10 | text-align: center;
11 | }
12 |
13 | .slider-container {
14 | position: relative;
15 | max-width: 600px;
16 | margin: auto;
17 | overflow: hidden;
18 | }
19 |
20 | .slider-wrapper {
21 | display: flex;
22 | transition: transform 0.5s ease-in-out;
23 | }
24 |
25 | img {
26 | width: 100%;
27 | height: auto;
28 | }
29 |
30 | button {
31 | position: absolute;
32 | top: 50%;
33 | transform: translateY(-50%);
34 | font-size: 16px;
35 | padding: 10px 20px;
36 | cursor: pointer;
37 | }
38 |
39 | .prev {
40 | left: 10px;
41 | }
42 |
43 | .next {
44 | right: 10px;
45 | }
46 |
--------------------------------------------------------------------------------
/08-Countdown Timer/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Countdown Timer || 100 JavaScript Projects
8 |
9 |
10 |
11 |
12 |
13 |
00:00:00
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/08-Countdown Timer/script.js:
--------------------------------------------------------------------------------
1 | let timer;
2 | let seconds = 0;
3 |
4 | function startTimer() {
5 | if (!timer) {
6 | timer = setInterval(updateTimer, 1000);
7 | }
8 | }
9 |
10 | function stopTimer() {
11 | clearInterval(timer);
12 | timer = null;
13 | }
14 |
15 | function resetTimer() {
16 | stopTimer();
17 | seconds = 0;
18 | updateTimer();
19 | }
20 |
21 | function updateTimer() {
22 | const hours = Math.floor(seconds / 3600);
23 | const minutes = Math.floor((seconds % 3600) / 60);
24 | const remainingSeconds = seconds % 60;
25 |
26 | const formattedTime = `${String(hours).padStart(2, "0")}:${String(
27 | minutes
28 | ).padStart(2, "0")}:${String(remainingSeconds).padStart(2, "0")}`;
29 |
30 | document.getElementById("timer").textContent = formattedTime;
31 | seconds++;
32 | }
33 |
--------------------------------------------------------------------------------
/08-Countdown Timer/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | display: flex;
4 | align-items: center;
5 | justify-content: center;
6 | height: 100vh;
7 | margin: 0;
8 | }
9 |
10 | .timer-container {
11 | text-align: center;
12 | }
13 |
14 | #timer {
15 | font-size: 2em;
16 | margin-bottom: 20px;
17 | }
18 |
19 | button {
20 | font-size: 1em;
21 | margin: 5px;
22 | }
23 |
--------------------------------------------------------------------------------
/09-BMI Calculator/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | BMI Calculator || 100 JavaScript Projects
8 |
9 |
10 |
11 |
12 |
13 |
BMI Calculator
14 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/09-BMI Calculator/script.js:
--------------------------------------------------------------------------------
1 | function calculateBMI() {
2 | const heightInput = document.getElementById("height");
3 | const weightInput = document.getElementById("weight");
4 | const resultDiv = document.getElementById("result");
5 |
6 | const height = parseFloat(heightInput.value);
7 | const weight = parseFloat(weightInput.value);
8 |
9 | if (isNaN(height) || isNaN(weight) || height <= 0 || weight <= 0) {
10 | resultDiv.innerHTML =
11 | "Please enter valid values for height and weight.";
12 | return;
13 | }
14 |
15 | const bmi = calculateBMIValue(height, weight);
16 | const bmiCategory = getBMICategory(bmi);
17 |
18 | resultDiv.innerHTML = `Your BMI is ${bmi.toFixed(2)} (${bmiCategory}).`;
19 | }
20 |
21 | function calculateBMIValue(height, weight) {
22 | // BMI formula: weight (kg) / (height (m) * height (m))
23 | const heightInMeters = height / 100; // convert height from cm to meters
24 | return weight / (heightInMeters * heightInMeters);
25 | }
26 |
27 | function getBMICategory(bmi) {
28 | if (bmi < 18.5) {
29 | return "Underweight";
30 | } else if (bmi < 24.9) {
31 | return "Normal weight";
32 | } else if (bmi < 29.9) {
33 | return "Overweight";
34 | } else {
35 | return "Obese";
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/09-BMI Calculator/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | display: flex;
4 | align-items: center;
5 | justify-content: center;
6 | height: 100vh;
7 | margin: 0;
8 | }
9 |
10 | .calculator-container {
11 | text-align: center;
12 | }
13 |
14 | form {
15 | max-width: 300px;
16 | margin: 0 auto;
17 | }
18 |
19 | label,
20 | input,
21 | button {
22 | display: block;
23 | margin-bottom: 10px;
24 | }
25 |
26 | button {
27 | background-color: #4caf50;
28 | color: white;
29 | padding: 10px;
30 | border: none;
31 | cursor: pointer;
32 | }
33 |
34 | #result {
35 | margin-top: 20px;
36 | }
37 |
--------------------------------------------------------------------------------
/10-Currency Converter/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Currency Converter || 100 JavaScript Projects
7 |
8 |
9 |
10 |
11 |
12 |
Currency Converter
13 |
14 |
17 | to
18 |
21 |
22 |
23 | Result:
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/10-Currency Converter/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | display: flex;
4 | justify-content: center;
5 | align-items: center;
6 | height: 100vh;
7 | margin: 0;
8 | }
9 |
10 | #converter {
11 | text-align: center;
12 | padding: 20px;
13 | border: 1px solid #ccc;
14 | border-radius: 5px;
15 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
16 | }
17 |
18 | input {
19 | padding: 8px;
20 | margin: 5px;
21 | }
22 |
23 | button {
24 | padding: 10px;
25 | background-color: #4caf50;
26 | color: white;
27 | border: none;
28 | border-radius: 4px;
29 | cursor: pointer;
30 | }
31 |
--------------------------------------------------------------------------------
/100-Code Splitting/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Code Splitting App
8 |
9 |
10 |
11 |
Code Splitting App
12 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/100-Code Splitting/script.js:
--------------------------------------------------------------------------------
1 | function performCodeSplitting() {
2 | const inputCode = document.getElementById("inputCode").value;
3 |
4 | if (!inputCode.trim()) {
5 | alert("Please enter JavaScript code for code splitting.");
6 | return;
7 | }
8 |
9 | try {
10 | const splitFiles = splitCode(inputCode);
11 | displayResult(splitFiles);
12 | } catch (error) {
13 | alert(`Error during code splitting: ${error.message}`);
14 | }
15 | }
16 |
17 | function splitCode(code) {
18 | // Placeholder for code splitting logic
19 | // In a real-world scenario, you would use a build tool like Webpack to handle code splitting.
20 | // Here, we'll use a simplified logic to illustrate the concept.
21 |
22 | const splitFiles = code.split("\n\n"); // Split the code into files based on double line breaks
23 |
24 | if (splitFiles.length > 1) {
25 | return splitFiles;
26 | } else {
27 | throw new Error("Failed to perform code splitting.");
28 | }
29 | }
30 |
31 | function displayResult(files) {
32 | const outputFiles = document.getElementById("outputFiles");
33 | outputFiles.innerHTML = "Split Files:";
34 |
35 | files.forEach((file, index) => {
36 | outputFiles.innerHTML += `File ${
37 | index + 1
38 | }:${file}
`;
39 | });
40 | }
41 |
--------------------------------------------------------------------------------
/100-Code Splitting/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | display: flex;
4 | align-items: center;
5 | justify-content: center;
6 | height: 100vh;
7 | margin: 0;
8 | }
9 |
10 | .container {
11 | text-align: center;
12 | }
13 |
14 | textarea {
15 | width: 100%;
16 | height: 150px;
17 | margin: 10px 0;
18 | }
19 |
20 | button {
21 | padding: 10px 20px;
22 | font-size: 16px;
23 | margin: 10px;
24 | }
25 |
26 | #outputFiles {
27 | margin-top: 20px;
28 | font-size: 18px;
29 | }
30 |
--------------------------------------------------------------------------------
/11-Weather App/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Weather App || 100 JavaScript Projects
7 |
8 |
9 |
10 |
11 |
12 |
Weather App
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/11-Weather App/index.js:
--------------------------------------------------------------------------------
1 | // Replace 'YOUR_API_KEY' with your OpenWeatherMap API key
2 | const apiKey = "YOUR_API_KEY";
3 |
4 | function getWeather() {
5 | const city = document.getElementById("city").value;
6 |
7 | if (city === "") {
8 | alert("Please enter a city name.");
9 | return;
10 | }
11 |
12 | const apiUrl = `https://api.openweathermap.org/data/2.5/weather?q=${city}&appid=${apiKey}&units=metric`;
13 |
14 | fetch(apiUrl)
15 | .then((response) => response.json())
16 | .then((data) => {
17 | if (data.cod === "404") {
18 | alert("City not found. Please enter a valid city name.");
19 | return;
20 | }
21 |
22 | const weatherInfo = document.getElementById("weather-info");
23 | weatherInfo.innerHTML = `
24 | ${data.name}, ${data.sys.country}
25 | Temperature: ${data.main.temp} °C
26 | Weather: ${data.weather[0].description}
27 | `;
28 | })
29 | .catch((error) => {
30 | console.error("Error fetching weather data:", error);
31 | alert("Error fetching weather data. Please try again later.");
32 | });
33 | }
34 |
--------------------------------------------------------------------------------
/11-Weather App/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | display: flex;
4 | justify-content: center;
5 | align-items: center;
6 | height: 100vh;
7 | margin: 0;
8 | }
9 |
10 | #weather-container {
11 | text-align: center;
12 | padding: 20px;
13 | border: 1px solid #ccc;
14 | border-radius: 5px;
15 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
16 | }
17 |
18 | input {
19 | padding: 8px;
20 | margin: 5px;
21 | }
22 |
23 | button {
24 | padding: 10px;
25 | background-color: #4caf50;
26 | color: white;
27 | border: none;
28 | border-radius: 4px;
29 | cursor: pointer;
30 | }
31 |
--------------------------------------------------------------------------------
/13-Memory Game/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Memory Game || 100 JavaScript Projects
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/13-Memory Game/style.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | box-sizing: border-box;
5 | }
6 | body {
7 | display: flex;
8 | justify-content: center;
9 | align-items: center;
10 | height: 100vh;
11 | margin: 0;
12 | }
13 |
14 | #memory-game {
15 | display: grid;
16 | grid-template-columns: repeat(4, 100px);
17 | gap: 10px;
18 | }
19 |
20 | .memory-card {
21 | width: 100px;
22 | height: 100px;
23 | background-color: #ccc;
24 | display: flex;
25 | justify-content: center;
26 | align-items: center;
27 | font-size: 24px;
28 | cursor: pointer;
29 | }
30 |
--------------------------------------------------------------------------------
/14-Chat Application/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Simple Chat App || 100 JavaScript Projects
7 |
8 |
9 |
10 |
11 |
12 |
13 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/14-Chat Application/index.js:
--------------------------------------------------------------------------------
1 | const chatBox = document.getElementById("chat-box");
2 | const messageInput = document.getElementById("message-input");
3 | const sendButton = document.getElementById("send-button");
4 | let socket;
5 |
6 | function initWebSocket() {
7 | socket = new WebSocket("ws://localhost:3000");
8 |
9 | socket.addEventListener("open", (event) => {
10 | console.log("WebSocket connection opened:", event);
11 | });
12 |
13 | socket.addEventListener("message", (event) => {
14 | const message = JSON.parse(event.data);
15 | displayMessage(message.text);
16 | });
17 |
18 | socket.addEventListener("close", (event) => {
19 | console.log("WebSocket connection closed:", event);
20 | });
21 | }
22 |
23 | function displayMessage(message) {
24 | const messageElement = document.createElement("div");
25 | messageElement.textContent = message;
26 | chatBox.appendChild(messageElement);
27 | chatBox.scrollTop = chatBox.scrollHeight;
28 | }
29 |
30 | function sendMessage() {
31 | const message = messageInput.value;
32 | if (message.trim() !== "") {
33 | socket.send(JSON.stringify({ text: message }));
34 | displayMessage(message);
35 | messageInput.value = "";
36 | }
37 | }
38 |
39 | sendButton.addEventListener("click", sendMessage);
40 |
41 | document.addEventListener("DOMContentLoaded", () => {
42 | initWebSocket();
43 | });
44 |
--------------------------------------------------------------------------------
/14-Chat Application/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | margin: 0;
4 | padding: 0;
5 | display: flex;
6 | flex-direction: column;
7 | align-items: center;
8 | justify-content: center;
9 | height: 100vh;
10 | background-color: #f4f4f4;
11 | }
12 |
13 | #chat-box {
14 | width: 300px;
15 | border: 1px solid #ccc;
16 | padding: 10px;
17 | overflow-y: scroll;
18 | max-height: 300px;
19 | }
20 |
21 | #input-box {
22 | display: flex;
23 | margin-top: 10px;
24 | }
25 |
26 | #message-input {
27 | flex-grow: 1;
28 | padding: 5px;
29 | }
30 |
31 | #send-button {
32 | padding: 5px 10px;
33 | cursor: pointer;
34 | }
35 |
--------------------------------------------------------------------------------
/15-Interactive Quiz/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Interactive Quiz || 100 JavaScript Projects
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/15-Interactive Quiz/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | margin: 0;
4 | padding: 0;
5 | display: flex;
6 | flex-direction: column;
7 | align-items: center;
8 | justify-content: center;
9 | height: 100vh;
10 | background-color: #f4f4f4;
11 | }
12 |
13 | #quiz-container {
14 | width: 400px;
15 | padding: 20px;
16 | background-color: #fff;
17 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
18 | border-radius: 8px;
19 | }
20 |
21 | .question {
22 | margin-bottom: 10px;
23 | font-weight: bold;
24 | }
25 |
26 | .options {
27 | margin-top: 10px;
28 | }
29 |
30 | .option {
31 | margin-bottom: 5px;
32 | }
33 |
34 | #submit-button {
35 | margin-top: 20px;
36 | padding: 10px;
37 | cursor: pointer;
38 | background-color: #3498db;
39 | color: #fff;
40 | border: none;
41 | border-radius: 5px;
42 | }
43 |
44 | #result {
45 | margin-top: 20px;
46 | font-weight: bold;
47 | }
48 |
--------------------------------------------------------------------------------
/16-Pomodoro Timer/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Pomodoro Timer
7 |
8 |
9 |
10 |
11 | Pomodoro Timer
12 | 25:00
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/16-Pomodoro Timer/index.js:
--------------------------------------------------------------------------------
1 | let timer;
2 | let minutes = 25;
3 | let seconds = 0;
4 |
5 | function startTimer() {
6 | timer = setInterval(updateTimer, 1000);
7 | }
8 |
9 | function pauseTimer() {
10 | clearInterval(timer);
11 | }
12 |
13 | function resetTimer() {
14 | clearInterval(timer);
15 | minutes = 25;
16 | seconds = 0;
17 | updateDisplay();
18 | }
19 |
20 | function updateTimer() {
21 | if (minutes === 0 && seconds === 0) {
22 | clearInterval(timer);
23 | alert("Pomodoro completed! Take a break.");
24 | } else if (seconds === 0) {
25 | minutes--;
26 | seconds = 59;
27 | } else {
28 | seconds--;
29 | }
30 |
31 | updateDisplay();
32 | }
33 |
34 | function updateDisplay() {
35 | const formattedMinutes = String(minutes).padStart(2, "0");
36 | const formattedSeconds = String(seconds).padStart(2, "0");
37 | document.getElementById(
38 | "timer"
39 | ).textContent = `${formattedMinutes}:${formattedSeconds}`;
40 | }
41 |
--------------------------------------------------------------------------------
/16-Pomodoro Timer/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | display: flex;
4 | flex-direction: column;
5 | align-items: center;
6 | justify-content: center;
7 | height: 100vh;
8 | margin: 0;
9 | }
10 |
11 | h1 {
12 | margin-bottom: 20px;
13 | }
14 |
15 | #timer {
16 | font-size: 2em;
17 | margin-bottom: 20px;
18 | }
19 |
20 | #controls {
21 | display: flex;
22 | gap: 10px;
23 | }
24 |
--------------------------------------------------------------------------------
/17-Music Player/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Music Player || 100 JavaScript Projects
7 |
8 |
9 |
10 |
11 | Music Player
12 |
13 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/17-Music Player/index.js:
--------------------------------------------------------------------------------
1 | const audio = document.getElementById("audio");
2 |
3 | function playPause() {
4 | if (audio.paused) {
5 | audio.play();
6 | } else {
7 | audio.pause();
8 | }
9 | }
10 |
11 | function stop() {
12 | audio.pause();
13 | audio.currentTime = 0;
14 | }
15 |
--------------------------------------------------------------------------------
/17-Music Player/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | display: flex;
4 | flex-direction: column;
5 | align-items: center;
6 | justify-content: center;
7 | height: 100vh;
8 | margin: 0;
9 | }
10 |
11 | h1 {
12 | margin-bottom: 20px;
13 | }
14 |
15 | #audio-controls {
16 | display: flex;
17 | flex-direction: column;
18 | align-items: center;
19 | gap: 10px;
20 | }
21 |
--------------------------------------------------------------------------------
/19-Car Rental Website/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Car Rental Service || 100 JavaScript Projects
8 |
9 |
10 |
11 | Car Rental Service
12 |
13 |
14 |
17 |
18 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/19-Car Rental Website/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | margin: 0;
4 | padding: 0;
5 | }
6 |
7 | header {
8 | background-color: #333;
9 | color: #fff;
10 | text-align: center;
11 | padding: 10px;
12 | }
13 |
14 | #carList {
15 | display: flex;
16 | flex-wrap: wrap;
17 | justify-content: space-around;
18 | padding: 20px;
19 | }
20 |
21 | .car {
22 | border: 1px solid #ddd;
23 | border-radius: 5px;
24 | margin: 10px;
25 | padding: 10px;
26 | width: 250px;
27 | }
28 |
29 | .car img {
30 | width: 100%;
31 | height: auto;
32 | }
33 |
34 | #bookingForm {
35 | max-width: 400px;
36 | margin: 20px auto;
37 | padding: 20px;
38 | border: 1px solid #ddd;
39 | border-radius: 5px;
40 | }
41 |
42 | label {
43 | display: block;
44 | margin-bottom: 5px;
45 | }
46 |
47 | input,
48 | select {
49 | width: 100%;
50 | padding: 8px;
51 | margin-bottom: 10px;
52 | box-sizing: border-box;
53 | }
54 |
55 | button {
56 | background-color: #333;
57 | color: #fff;
58 | padding: 10px;
59 | border: none;
60 | border-radius: 5px;
61 | cursor: pointer;
62 | }
63 |
--------------------------------------------------------------------------------
/20-Blogging Platform/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Blogging Platform || 100 JavaScript Projects
8 |
9 |
10 |
13 |
14 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/20-Blogging Platform/script.js:
--------------------------------------------------------------------------------
1 | const blogPosts = [
2 | { title: "First Post", content: "This is the content of the first post." },
3 | {
4 | title: "Second Post",
5 | content: "This is the content of the second post.",
6 | },
7 | // Add more posts as needed
8 | ];
9 |
10 | function displayBlogPosts() {
11 | const blogPostsElement = document.getElementById("blogPosts");
12 |
13 | blogPosts.forEach((post) => {
14 | const postElement = document.createElement("div");
15 | postElement.classList.add("post");
16 |
17 | postElement.innerHTML = `
18 | ${post.title}
19 | ${post.content}
20 | `;
21 |
22 | blogPostsElement.appendChild(postElement);
23 | });
24 | }
25 |
26 | window.onload = displayBlogPosts;
27 |
--------------------------------------------------------------------------------
/20-Blogging Platform/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | margin: 0;
4 | padding: 0;
5 | }
6 |
7 | header {
8 | background-color: #333;
9 | color: #fff;
10 | text-align: center;
11 | padding: 10px;
12 | }
13 |
14 | #blogPosts {
15 | max-width: 800px;
16 | margin: 20px auto;
17 | padding: 20px;
18 | }
19 |
20 | .post {
21 | border: 1px solid #ddd;
22 | border-radius: 5px;
23 | margin-bottom: 20px;
24 | padding: 10px;
25 | }
26 |
27 | .post h2 {
28 | color: #333;
29 | }
30 |
31 | .post p {
32 | color: #666;
33 | }
34 |
--------------------------------------------------------------------------------
/21-Social Media Dashboard/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Social Media Dashboard || 100 JavaScript Projects
8 |
9 |
10 |
11 | Social Media Dashboard
12 |
13 |
14 |
15 |
18 |
19 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/21-Social Media Dashboard/script.js:
--------------------------------------------------------------------------------
1 | // Mock user data
2 | const user = {
3 | name: "John Doe",
4 | username: "john_doe",
5 | posts: [
6 | { title: "Post 1", content: "This is the content of the first post." },
7 | { title: "Post 2", content: "This is the content of the second post." },
8 | // Add more posts as needed
9 | ],
10 | };
11 |
12 | // Display user profile information
13 | function displayProfile() {
14 | const profileElement = document.getElementById("profile");
15 | profileElement.innerHTML = `
16 | ${user.name}
17 | @${user.username}
18 | `;
19 | }
20 |
21 | // Display social media posts
22 | function displayPosts() {
23 | const postsElement = document.getElementById("posts");
24 |
25 | user.posts.forEach((post) => {
26 | const postElement = document.createElement("div");
27 | postElement.classList.add("post");
28 |
29 | postElement.innerHTML = `
30 | ${post.title}
31 | ${post.content}
32 | `;
33 |
34 | postsElement.appendChild(postElement);
35 | });
36 | }
37 |
38 | // Logout function (placeholder)
39 | function logout() {
40 | alert("User logged out.");
41 | // Implement actual logout logic here
42 | }
43 |
44 | // Initial function calls
45 | window.onload = function () {
46 | displayProfile();
47 | displayPosts();
48 | };
49 |
--------------------------------------------------------------------------------
/21-Social Media Dashboard/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | margin: 0;
4 | padding: 0;
5 | }
6 |
7 | header {
8 | background-color: #333;
9 | color: #fff;
10 | text-align: center;
11 | padding: 10px;
12 | }
13 |
14 | button {
15 | background-color: #fff;
16 | color: #333;
17 | padding: 8px;
18 | border: none;
19 | border-radius: 5px;
20 | cursor: pointer;
21 | }
22 |
23 | #profile {
24 | max-width: 800px;
25 | margin: 20px auto;
26 | padding: 20px;
27 | border: 1px solid #ddd;
28 | border-radius: 5px;
29 | }
30 |
31 | #posts {
32 | max-width: 800px;
33 | margin: 20px auto;
34 | }
35 |
36 | .post {
37 | border: 1px solid #ddd;
38 | border-radius: 5px;
39 | margin-bottom: 20px;
40 | padding: 10px;
41 | }
42 |
43 | .post h2 {
44 | color: #333;
45 | }
46 |
47 | .post p {
48 | color: #666;
49 | }
50 |
--------------------------------------------------------------------------------
/22-E-commerce Website/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | E-commerce Website || 100 JavaScript Projects
8 |
9 |
10 |
14 |
15 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/22-E-commerce Website/script.js:
--------------------------------------------------------------------------------
1 | const products = [
2 | { id: 1, name: "Product 1", price: 50 },
3 | { id: 2, name: "Product 2", price: 45 },
4 | // Add more products as needed
5 | ];
6 |
7 | function displayProducts() {
8 | const productListElement = document.getElementById("productList");
9 |
10 | products.forEach((product) => {
11 | const productElement = document.createElement("div");
12 | productElement.classList.add("product");
13 |
14 | productElement.innerHTML = `
15 |
16 | ${product.name}
17 | Price: $${product.price}
18 |
19 | `;
20 |
21 | productListElement.appendChild(productElement);
22 | });
23 | }
24 |
25 | function addToCart(productId) {
26 | // Implement your cart logic (adding products to the cart)
27 | alert(`Product with ID ${productId} added to cart!`);
28 | }
29 |
30 | window.onload = displayProducts;
31 |
--------------------------------------------------------------------------------
/22-E-commerce Website/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | margin: 0;
4 | padding: 0;
5 | }
6 |
7 | header {
8 | background-color: #333;
9 | color: #fff;
10 | text-align: center;
11 | padding: 10px;
12 | }
13 |
14 | #productList {
15 | display: flex;
16 | flex-wrap: wrap;
17 | justify-content: space-around;
18 | padding: 20px;
19 | }
20 |
21 | .product {
22 | border: 1px solid #ddd;
23 | border-radius: 5px;
24 | margin: 10px;
25 | padding: 10px;
26 | width: 250px;
27 | }
28 |
29 | .product img {
30 | width: 100%;
31 | height: auto;
32 | }
33 |
34 | .button {
35 | background-color: #333;
36 | color: #fff;
37 | padding: 8px;
38 | border: none;
39 | border-radius: 5px;
40 | cursor: pointer;
41 | }
42 |
--------------------------------------------------------------------------------
/23-Real-time Chat Room/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Real-time Chat Room || 100 JavaScript Projects
8 |
9 |
10 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/23-Real-time Chat Room/script.js:
--------------------------------------------------------------------------------
1 | // Replace 'ws://your-server-address' with the actual WebSocket server address
2 | const socket = new WebSocket("ws://your-server-address");
3 |
4 | socket.addEventListener("open", (event) => {
5 | console.log("WebSocket connection opened:", event);
6 | });
7 |
8 | socket.addEventListener("message", (event) => {
9 | const chatMessages = document.getElementById("chatMessages");
10 | const message = document.createElement("div");
11 | message.textContent = event.data;
12 | chatMessages.appendChild(message);
13 | });
14 |
15 | socket.addEventListener("close", (event) => {
16 | console.log("WebSocket connection closed:", event);
17 | });
18 |
19 | function sendMessage() {
20 | const messageInput = document.getElementById("messageInput");
21 | const message = messageInput.value;
22 |
23 | if (message.trim() !== "") {
24 | socket.send(message);
25 | messageInput.value = "";
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/23-Real-time Chat Room/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | margin: 0;
4 | padding: 0;
5 | }
6 |
7 | #chatBox {
8 | max-width: 600px;
9 | margin: 20px auto;
10 | padding: 20px;
11 | border: 1px solid #ddd;
12 | border-radius: 5px;
13 | }
14 |
15 | #chatMessages {
16 | height: 300px;
17 | overflow-y: scroll;
18 | border: 1px solid #ddd;
19 | border-radius: 5px;
20 | padding: 10px;
21 | margin-bottom: 10px;
22 | }
23 |
24 | input {
25 | width: 70%;
26 | padding: 8px;
27 | box-sizing: border-box;
28 | }
29 |
30 | button {
31 | width: 30%;
32 | padding: 8px;
33 | background-color: #333;
34 | color: #fff;
35 | border: none;
36 | border-radius: 5px;
37 | cursor: pointer;
38 | }
39 |
--------------------------------------------------------------------------------
/24-Photo Editing Tool/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Photo Editing Tool || 100 JavaScript Projects
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/24-Photo Editing Tool/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | margin: 0;
4 | padding: 20px;
5 | text-align: center;
6 | }
7 |
8 | canvas {
9 | border: 1px solid #ddd;
10 | border-radius: 5px;
11 | margin: 10px 0;
12 | }
13 |
14 | button {
15 | padding: 10px;
16 | margin: 5px;
17 | cursor: pointer;
18 | }
19 |
--------------------------------------------------------------------------------
/25-Cryptocurrency Tracker/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Cryptocurrency Tracker || 100 JavaScript Projects
8 |
9 |
10 |
11 | Cryptocurrency Tracker
12 |
13 |
14 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/25-Cryptocurrency Tracker/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | margin: 0;
4 | padding: 20px;
5 | }
6 |
7 | header {
8 | background-color: #333;
9 | color: #fff;
10 | text-align: center;
11 | padding: 10px;
12 | }
13 |
14 | #cryptoList {
15 | max-width: 800px;
16 | margin: 20px auto;
17 | }
18 |
19 | .crypto {
20 | border: 1px solid #ddd;
21 | border-radius: 5px;
22 | margin-bottom: 10px;
23 | padding: 10px;
24 | }
25 |
26 | .crypto h3 {
27 | color: #333;
28 | }
29 |
30 | .crypto p {
31 | color: #666;
32 | }
33 |
--------------------------------------------------------------------------------
/26-Fitness Tracker/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Fitness Tracker || 100 JavaScript Projects
8 |
9 |
10 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/26-Fitness Tracker/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | background-color: #f4f4f4;
4 | margin: 0;
5 | }
6 |
7 | .container {
8 | max-width: 600px;
9 | margin: 20px auto;
10 | background-color: #fff;
11 | padding: 20px;
12 | border-radius: 8px;
13 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
14 | }
15 |
16 | #form-container {
17 | margin-bottom: 20px;
18 | }
19 |
20 | label {
21 | display: block;
22 | margin-bottom: 5px;
23 | }
24 |
25 | input {
26 | width: 100%;
27 | padding: 8px;
28 | margin-bottom: 10px;
29 | box-sizing: border-box;
30 | }
31 |
32 | button {
33 | background-color: #4caf50;
34 | color: #fff;
35 | padding: 10px;
36 | border: none;
37 | border-radius: 5px;
38 | cursor: pointer;
39 | }
40 |
41 | button:hover {
42 | background-color: #45a049;
43 | }
44 |
45 | #entries-container {
46 | border-top: 1px solid #ccc;
47 | padding-top: 20px;
48 | }
49 |
50 | h2 {
51 | margin-bottom: 10px;
52 | }
53 |
54 | ul {
55 | list-style-type: none;
56 | padding: 0;
57 | }
58 |
59 | li {
60 | border-bottom: 1px solid #ccc;
61 | padding: 10px;
62 | }
63 |
--------------------------------------------------------------------------------
/27-Job Board Platform/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Job Board || 100 JavaScript Projects
8 |
9 |
10 |
11 |
Job Board
12 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/27-Job Board Platform/script.js:
--------------------------------------------------------------------------------
1 | function addJob() {
2 | const jobTitle = document.getElementById("jobTitle").value;
3 | const jobDescription = document.getElementById("jobDescription").value;
4 |
5 | if (jobTitle && jobDescription) {
6 | const jobList = document.getElementById("jobList");
7 |
8 | const jobCard = document.createElement("div");
9 | jobCard.classList.add("job-card");
10 |
11 | jobCard.innerHTML = `
12 | ${jobTitle}
13 | ${jobDescription}
14 | `;
15 |
16 | jobList.appendChild(jobCard);
17 |
18 | // Clear the form fields
19 | document.getElementById("jobForm").reset();
20 | } else {
21 | alert("Please fill out all fields");
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/27-Job Board Platform/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | margin: 0;
4 | padding: 0;
5 | background-color: #f4f4f4;
6 | }
7 |
8 | .container {
9 | max-width: 600px;
10 | margin: 50px auto;
11 | background-color: #fff;
12 | padding: 20px;
13 | border-radius: 8px;
14 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
15 | }
16 |
17 | form {
18 | display: flex;
19 | flex-direction: column;
20 | }
21 |
22 | label {
23 | margin-bottom: 5px;
24 | }
25 |
26 | input,
27 | textarea {
28 | padding: 8px;
29 | margin-bottom: 10px;
30 | }
31 |
32 | button {
33 | padding: 10px;
34 | background-color: #007bff;
35 | color: #fff;
36 | border: none;
37 | border-radius: 5px;
38 | cursor: pointer;
39 | }
40 |
41 | button:hover {
42 | background-color: #0056b3;
43 | }
44 |
45 | #jobList {
46 | margin-top: 20px;
47 | }
48 |
--------------------------------------------------------------------------------
/28-AI-powered Recommendation System/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | AI Recommendation System || 100 JavaScript Projects
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/28-AI-powered Recommendation System/script.js:
--------------------------------------------------------------------------------
1 | // Sample data for the recommendation system
2 | const trainingData = [
3 | { input: [0, 0], output: [0] },
4 | { input: [0, 1], output: [1] },
5 | { input: [1, 0], output: [1] },
6 | { input: [1, 1], output: [0] },
7 | ];
8 |
9 | // Create a neural network
10 | const net = new brain.NeuralNetwork();
11 |
12 | // Train the neural network with the sample data
13 | net.train(trainingData);
14 |
15 | // Function to make recommendations based on input
16 | function makeRecommendation(inputData) {
17 | const output = net.run(inputData);
18 | return output[0] >= 0.5; // Adjust the threshold based on your use case
19 | }
20 |
21 | // Example usage
22 | const userInput = [0, 1]; // Replace this with actual user input
23 |
24 | const recommendation = makeRecommendation(userInput);
25 |
26 | console.log("Recommendation:", recommendation);
27 |
--------------------------------------------------------------------------------
/30-Video Streaming Platform/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Video Streaming Platform
7 |
24 |
25 |
26 |
27 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/31-Google Maps Integration/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Google Maps Integration || 100 JavaScript Projects
7 |
13 |
14 |
15 |
16 |
21 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/34-GitHub Profile Viewer/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | GitHub Profile Viewer | 100 JavaScript Projects
8 |
9 |
10 |
11 |
12 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/35-Weather Forecast using OpenWeatherMap API/app.js:
--------------------------------------------------------------------------------
1 | const apiKey = "YOUR_OPENWEATHERMAP_API_KEY";
2 |
3 | function getWeather() {
4 | const cityInput = document.getElementById("city-input").value;
5 |
6 | if (cityInput.trim() !== "") {
7 | const apiUrl = `https://api.openweathermap.org/data/2.5/weather?q=${cityInput}&appid=${apiKey}&units=metric`;
8 |
9 | fetch(apiUrl)
10 | .then((response) => response.json())
11 | .then((data) => {
12 | displayWeather(data);
13 | })
14 | .catch((error) => {
15 | console.error("Error fetching weather data:", error);
16 | });
17 | } else {
18 | alert("Please enter a city name.");
19 | }
20 | }
21 |
22 | function displayWeather(data) {
23 | const weatherInfo = document.getElementById("weather-info");
24 | const { name, main, weather } = data;
25 |
26 | weatherInfo.innerHTML = `
27 | ${name}
28 | Temperature: ${main.temp} °C
29 | Weather: ${weather[0].description}
30 | `;
31 | }
32 |
--------------------------------------------------------------------------------
/35-Weather Forecast using OpenWeatherMap API/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Weather Forecast || 100 JavaScript Projects
7 |
8 |
9 |
10 |
11 | Weather Forecast
12 |
13 |
14 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/35-Weather Forecast using OpenWeatherMap API/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | margin: 20px;
4 | text-align: center;
5 | }
6 |
7 | #weather-container {
8 | max-width: 400px;
9 | margin: auto;
10 | padding: 20px;
11 | border: 1px solid #ccc;
12 | border-radius: 8px;
13 | }
14 |
15 | #city-input {
16 | width: 80%;
17 | padding: 8px;
18 | margin-bottom: 10px;
19 | }
20 |
21 | #get-weather-button {
22 | padding: 10px;
23 | cursor: pointer;
24 | }
25 |
26 | #weather-info {
27 | margin-top: 20px;
28 | }
29 |
--------------------------------------------------------------------------------
/36-News Aggregator/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | News Aggregator || 100 JavaScript Projects
7 |
8 |
9 |
10 |
11 | News Aggregator
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/36-News Aggregator/index.js:
--------------------------------------------------------------------------------
1 | // Replace 'YOUR_NEWS_API_KEY' with your actual news API key
2 | const apiKey = "YOUR_NEWS_API_KEY";
3 | const newsApiUrl = `https://newsapi.org/v2/top-headlines?country=us&apiKey=${apiKey}`;
4 |
5 | function fetchNews() {
6 | fetch(newsApiUrl)
7 | .then((response) => response.json())
8 | .then((data) => displayNews(data.articles))
9 | .catch((error) => console.error("Error fetching news:", error));
10 | }
11 |
12 | function displayNews(articles) {
13 | const newsContainer = document.getElementById("news-container");
14 |
15 | articles.forEach((article) => {
16 | const articleElement = document.createElement("div");
17 | articleElement.classList.add("article");
18 |
19 | articleElement.innerHTML = `
20 | ${article.title}
21 | ${article.description}
22 | Read more
23 | `;
24 |
25 | newsContainer.appendChild(articleElement);
26 | });
27 | }
28 |
29 | // Fetch news when the page loads
30 | document.addEventListener("DOMContentLoaded", fetchNews);
31 |
--------------------------------------------------------------------------------
/36-News Aggregator/style.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | box-sizing: border-box;
5 | }
6 | body {
7 | font-family: Arial, sans-serif;
8 | margin: 20px;
9 | }
10 |
11 | #news-container {
12 | max-width: 800px;
13 | margin: auto;
14 | }
15 |
16 | .article {
17 | border: 1px solid #ccc;
18 | border-radius: 8px;
19 | padding: 10px;
20 | margin-bottom: 15px;
21 | }
22 |
23 | .article h2 {
24 | margin-bottom: 5px;
25 | }
26 |
27 | .article p {
28 | margin: 0;
29 | }
30 |
--------------------------------------------------------------------------------
/37-Currency Exchange Rates using API/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Currency Exchange Rates || 100 JavaScript Projects
7 |
8 |
9 |
10 |
11 | Currency Exchange Rates
12 |
13 |
14 |
17 |
20 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/37-Currency Exchange Rates using API/index.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pradipchaudhary/100-javascript-projects/896e267f921407ae2c10478cd0801d07e1c42cba/37-Currency Exchange Rates using API/index.js
--------------------------------------------------------------------------------
/37-Currency Exchange Rates using API/style.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pradipchaudhary/100-javascript-projects/896e267f921407ae2c10478cd0801d07e1c42cba/37-Currency Exchange Rates using API/style.css
--------------------------------------------------------------------------------
/38-NASA API for Astronomy Data/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | NASA APOD || 100 JavaScript Project
7 |
8 |
9 |
10 |
11 | NASA APOD - Astronomy Picture of the Day
12 |
13 |
16 |
17 |
![APOD]()
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/38-NASA API for Astronomy Data/index.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pradipchaudhary/100-javascript-projects/896e267f921407ae2c10478cd0801d07e1c42cba/38-NASA API for Astronomy Data/index.js
--------------------------------------------------------------------------------
/38-NASA API for Astronomy Data/style.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | box-sizing: border-box;
5 | }
6 | body {
7 | font-family: Arial, sans-serif;
8 | margin: 20px;
9 | text-align: center;
10 | }
11 |
12 | #apod-container {
13 | max-width: 800px;
14 | margin: auto;
15 | }
16 |
17 | #apod-image {
18 | max-width: 100%;
19 | border-radius: 8px;
20 | margin-bottom: 10px;
21 | }
22 |
23 | #apod-title {
24 | font-size: 1.5em;
25 | margin-bottom: 10px;
26 | }
27 |
28 | #apod-explanation {
29 | margin-bottom: 20px;
30 | }
31 |
32 | #load-apod-button {
33 | padding: 10px;
34 | cursor: pointer;
35 | }
36 |
--------------------------------------------------------------------------------
/39-Random Joke Generator using Joke API/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Random Joke Generator || 100 JavaScript Projects
8 |
9 |
10 |
11 |
Random Joke Generator
12 |
13 |
Press the button for a joke!
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/39-Random Joke Generator using Joke API/script.js:
--------------------------------------------------------------------------------
1 | document.addEventListener("DOMContentLoaded", function () {
2 | const jokeContainer = document.getElementById("joke-container");
3 | const jokeText = document.getElementById("joke-text");
4 | const getJokeBtn = document.getElementById("get-joke-btn");
5 |
6 | getJokeBtn.addEventListener("click", getJoke);
7 |
8 | function getJoke() {
9 | // Replace 'Any' with other categories if desired (e.g., 'Programming', 'Miscellaneous', etc.)
10 | const apiUrl = "https://v2.jokeapi.dev/joke/Any";
11 |
12 | fetch(apiUrl)
13 | .then((response) => response.json())
14 | .then((data) => {
15 | if (data.error) {
16 | jokeText.textContent =
17 | "Failed to fetch joke. Please try again.";
18 | } else {
19 | if (data.type === "twopart") {
20 | jokeText.textContent = `${data.setup}\n\n${data.delivery}`;
21 | } else {
22 | jokeText.textContent = data.joke;
23 | }
24 | }
25 | })
26 | .catch((error) => {
27 | console.error("Error fetching joke:", error);
28 | jokeText.textContent =
29 | "Failed to fetch joke. Please try again.";
30 | });
31 | }
32 | });
33 |
--------------------------------------------------------------------------------
/39-Random Joke Generator using Joke API/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | background-color: #f4f4f4;
4 | margin: 0;
5 | display: flex;
6 | align-items: center;
7 | justify-content: center;
8 | height: 100vh;
9 | }
10 |
11 | .container {
12 | text-align: center;
13 | background-color: #fff;
14 | padding: 20px;
15 | border-radius: 8px;
16 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
17 | }
18 |
19 | #joke-container {
20 | margin: 20px 0;
21 | padding: 15px;
22 | border: 1px solid #ddd;
23 | border-radius: 4px;
24 | }
25 |
26 | button {
27 | background-color: #4caf50;
28 | color: white;
29 | padding: 10px 20px;
30 | font-size: 16px;
31 | cursor: pointer;
32 | border: none;
33 | border-radius: 4px;
34 | }
35 |
36 | button:hover {
37 | background-color: #45a049;
38 | }
39 |
--------------------------------------------------------------------------------
/40-Recipe Finder using Food API/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Recipe Finder || 100 JavaScript Projects
8 |
9 |
10 |
11 |
Recipe Finder
12 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/40-Recipe Finder using Food API/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | background-color: #f4f4f4;
4 | margin: 0;
5 | display: flex;
6 | align-items: center;
7 | justify-content: center;
8 | height: 100vh;
9 | }
10 |
11 | .container {
12 | text-align: center;
13 | background-color: #fff;
14 | padding: 20px;
15 | border-radius: 8px;
16 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
17 | }
18 |
19 | #ingredientInput {
20 | width: 100%;
21 | padding: 10px;
22 | margin-bottom: 10px;
23 | box-sizing: border-box;
24 | }
25 |
26 | #searchButton {
27 | background-color: #4caf50;
28 | color: white;
29 | padding: 10px 20px;
30 | font-size: 16px;
31 | cursor: pointer;
32 | border: none;
33 | border-radius: 4px;
34 | }
35 |
36 | #searchButton:hover {
37 | background-color: #45a049;
38 | }
39 |
40 | #recipeContainer {
41 | margin-top: 20px;
42 | }
43 |
--------------------------------------------------------------------------------
/41-Drawing App/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Drawing App || 100 JavaScript Projects
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/41-Drawing App/script.js:
--------------------------------------------------------------------------------
1 | document.addEventListener("DOMContentLoaded", function () {
2 | const canvas = document.getElementById("drawingCanvas");
3 | const ctx = canvas.getContext("2d");
4 | let isDrawing = false;
5 |
6 | canvas.addEventListener("mousedown", startDrawing);
7 | canvas.addEventListener("mousemove", draw);
8 | canvas.addEventListener("mouseup", stopDrawing);
9 | canvas.addEventListener("mouseout", stopDrawing);
10 |
11 | function startDrawing(e) {
12 | isDrawing = true;
13 | draw(e); // To start drawing from the current position immediately
14 | }
15 |
16 | function draw(e) {
17 | if (!isDrawing) return;
18 |
19 | ctx.lineWidth = 5;
20 | ctx.lineCap = "round";
21 | ctx.strokeStyle = "#000";
22 |
23 | ctx.lineTo(
24 | e.clientX - canvas.getBoundingClientRect().left,
25 | e.clientY - canvas.getBoundingClientRect().top
26 | );
27 | ctx.stroke();
28 | ctx.beginPath();
29 | ctx.moveTo(
30 | e.clientX - canvas.getBoundingClientRect().left,
31 | e.clientY - canvas.getBoundingClientRect().top
32 | );
33 | }
34 |
35 | function stopDrawing() {
36 | isDrawing = false;
37 | ctx.beginPath(); // To start a new path when the user resumes drawing
38 | }
39 | });
40 |
--------------------------------------------------------------------------------
/41-Drawing App/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | margin: 0;
4 | display: flex;
5 | align-items: center;
6 | justify-content: center;
7 | height: 100vh;
8 | background-color: #f4f4f4;
9 | }
10 |
11 | .container {
12 | background-color: #fff;
13 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
14 | }
15 |
16 | #drawingCanvas {
17 | border: 1px solid #ccc;
18 | cursor: crosshair;
19 | }
20 |
--------------------------------------------------------------------------------
/42-Virtual Piano/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Virtual Piano || 100 JavaScript Projects
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/42-Virtual Piano/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | margin: 0;
4 | display: flex;
5 | align-items: center;
6 | justify-content: center;
7 | height: 100vh;
8 | background-color: #f4f4f4;
9 | }
10 |
11 | .container {
12 | background-color: #fff;
13 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
14 | }
15 |
16 | .piano {
17 | display: flex;
18 | justify-content: space-between;
19 | margin: 20px;
20 | }
21 |
22 | .white-key,
23 | .black-key {
24 | width: 50px;
25 | height: 200px;
26 | border: 1px solid #000;
27 | box-sizing: border-box;
28 | cursor: pointer;
29 | }
30 |
31 | .white-key {
32 | background-color: #fff;
33 | }
34 |
35 | .black-key {
36 | position: relative;
37 | background-color: #000;
38 | width: 30px;
39 | height: 120px;
40 | margin-left: -15px;
41 | z-index: 1;
42 | }
43 |
--------------------------------------------------------------------------------
/43-Interactive Storytelling/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Interactive Storytelling || 100 JavaScript Projects
8 |
9 |
10 |
11 |
12 |
Once upon a time...
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/43-Interactive Storytelling/script.js:
--------------------------------------------------------------------------------
1 | const storyElement = document.getElementById("story");
2 | const choicesElement = document.getElementById("choices");
3 |
4 | function makeChoice(choice) {
5 | if (choice === 1) {
6 | storyElement.textContent =
7 | "You chose Choice 1. This is the next part of the story for Choice 1.";
8 | displayChoices(["Next Option 1", "Next Option 2"]);
9 | } else if (choice === 2) {
10 | storyElement.textContent =
11 | "You chose Choice 2. This is the next part of the story for Choice 2.";
12 | displayChoices(["Option A", "Option B"]);
13 | }
14 | }
15 |
16 | function displayChoices(choices) {
17 | choicesElement.innerHTML = "";
18 | for (let i = 0; i < choices.length; i++) {
19 | const button = document.createElement("button");
20 | button.textContent = choices[i];
21 | button.onclick = function () {
22 | makeChoice(i + 1);
23 | };
24 | choicesElement.appendChild(button);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/43-Interactive Storytelling/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | margin: 0;
4 | display: flex;
5 | align-items: center;
6 | justify-content: center;
7 | height: 100vh;
8 | background-color: #f4f4f4;
9 | }
10 |
11 | .container {
12 | background-color: #fff;
13 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
14 | }
15 |
16 | #story-container {
17 | padding: 20px;
18 | }
19 |
20 | #choices {
21 | margin-top: 20px;
22 | }
23 |
24 | button {
25 | background-color: #4caf50;
26 | color: white;
27 | padding: 10px 20px;
28 | font-size: 16px;
29 | cursor: pointer;
30 | border: none;
31 | border-radius: 4px;
32 | margin-right: 10px;
33 | }
34 |
35 | button:hover {
36 | background-color: #45a049;
37 | }
38 |
--------------------------------------------------------------------------------
/44-3D Cube Puzzle/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 3D Cube Puzzle | 100 JavaScript Projects
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
Rotate the cube to match the pattern!
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/44-3D Cube Puzzle/script.js:
--------------------------------------------------------------------------------
1 | let isRotating = false;
2 |
3 | document.getElementById("cube").addEventListener("click", function () {
4 | if (!isRotating) {
5 | isRotating = true;
6 | rotateCube();
7 | }
8 | });
9 |
10 | function rotateCube() {
11 | const cube = document.getElementById("cube");
12 | cube.style.transform += "rotateY(90deg)";
13 |
14 | setTimeout(() => {
15 | isRotating = false;
16 | checkCubePosition();
17 | }, 500);
18 | }
19 |
20 | function checkCubePosition() {
21 | const cube = document.getElementById("cube");
22 | const currentRotation = getComputedStyle(cube).transform;
23 |
24 | // Check if the cube is in the correct position (rotation)
25 | if (
26 | currentRotation === "matrix(6.12323e-17, 0, -1, 1.22465e-16, 1, 0)" ||
27 | currentRotation === "none"
28 | ) {
29 | alert("Congratulations! Puzzle solved!");
30 | } else {
31 | alert("Try again. Rotate the cube to match the pattern.");
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/44-3D Cube Puzzle/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | margin: 0;
4 | display: flex;
5 | align-items: center;
6 | justify-content: center;
7 | height: 100vh;
8 | background-color: #f4f4f4;
9 | }
10 |
11 | .container {
12 | background-color: #fff;
13 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
14 | }
15 |
16 | .cube {
17 | width: 200px;
18 | height: 200px;
19 | position: relative;
20 | transform-style: preserve-3d;
21 | transform: rotateX(45deg) rotateY(45deg);
22 | transition: transform 0.5s ease-in-out;
23 | }
24 |
25 | .face {
26 | position: absolute;
27 | width: 200px;
28 | height: 200px;
29 | background-color: #3498db;
30 | border: 2px solid #2980b9;
31 | }
32 |
33 | .front {
34 | transform: translateZ(100px);
35 | }
36 | .back {
37 | transform: rotateY(180deg) translateZ(100px);
38 | }
39 | .left {
40 | transform: rotateY(-90deg) translateZ(100px);
41 | }
42 | .right {
43 | transform: rotateY(90deg) translateZ(100px);
44 | }
45 | .top {
46 | transform: rotateX(90deg) translateZ(100px);
47 | }
48 | .bottom {
49 | transform: rotateX(-90deg) translateZ(100px);
50 | }
51 |
52 | #instructions {
53 | margin-top: 20px;
54 | text-align: center;
55 | }
56 |
--------------------------------------------------------------------------------
/45-Text-based Adventure Game/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Text Adventure Game || 100 JavaScript Projects
8 |
9 |
10 |
11 |
12 |
You find yourself in a dark room...
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/45-Text-based Adventure Game/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | margin: 0;
4 | display: flex;
5 | align-items: center;
6 | justify-content: center;
7 | height: 100vh;
8 | background-color: #f4f4f4;
9 | }
10 |
11 | .container {
12 | background-color: #fff;
13 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
14 | }
15 |
16 | #game-container {
17 | padding: 20px;
18 | }
19 |
20 | #choices {
21 | margin-top: 20px;
22 | }
23 |
24 | button {
25 | background-color: #4caf50;
26 | color: white;
27 | padding: 10px 20px;
28 | font-size: 16px;
29 | cursor: pointer;
30 | border: none;
31 | border-radius: 4px;
32 | margin-right: 10px;
33 | }
34 |
35 | button:hover {
36 | background-color: #45a049;
37 | }
38 |
--------------------------------------------------------------------------------
/46-Music Visualizer/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Music Visualizer || 100 JavaScript Projects
8 |
9 |
10 |
11 |
Music Visualizer
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/46-Music Visualizer/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | margin: 0;
4 | display: flex;
5 | align-items: center;
6 | justify-content: center;
7 | height: 100vh;
8 | background-color: #f4f4f4;
9 | }
10 |
11 | .container {
12 | text-align: center;
13 | background-color: #fff;
14 | padding: 20px;
15 | border-radius: 8px;
16 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
17 | }
18 |
19 | #visualizer {
20 | width: 100%;
21 | height: 300px;
22 | background-color: #eee;
23 | margin-top: 20px;
24 | }
25 |
--------------------------------------------------------------------------------
/47-Meme Generator/script.js:
--------------------------------------------------------------------------------
1 | function generateMeme() {
2 | const topText = document.getElementById("topText").value;
3 | const bottomText = document.getElementById("bottomText").value;
4 | const imageSelect = document.getElementById("imageSelect");
5 | const selectedImage = imageSelect.options[imageSelect.selectedIndex].value;
6 |
7 | const memeContainer = document.getElementById("meme-container");
8 | const topTextElement = document.getElementById("top-text");
9 | const bottomTextElement = document.getElementById("bottom-text");
10 | const memeImageElement = document.getElementById("meme-image");
11 |
12 | topTextElement.textContent = topText;
13 | bottomTextElement.textContent = bottomText;
14 | memeImageElement.src = selectedImage;
15 |
16 | memeContainer.style.display = "block";
17 | }
18 |
--------------------------------------------------------------------------------
/47-Meme Generator/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | margin: 0;
4 | display: flex;
5 | align-items: center;
6 | justify-content: center;
7 | height: 100vh;
8 | background-color: #f4f4f4;
9 | }
10 |
11 | .container {
12 | text-align: center;
13 | background-color: #fff;
14 | padding: 20px;
15 | border-radius: 8px;
16 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
17 | }
18 |
19 | #meme-container {
20 | position: relative;
21 | margin-top: 20px;
22 | }
23 |
24 | #meme-image {
25 | max-width: 100%;
26 | height: auto;
27 | }
28 |
29 | #top-text,
30 | #bottom-text {
31 | position: absolute;
32 | width: 100%;
33 | text-align: center;
34 | font-size: 24px;
35 | font-weight: bold;
36 | color: white;
37 | text-shadow: 2px 2px 4px #000;
38 | }
39 |
40 | #top-text {
41 | top: 10px;
42 | }
43 |
44 | #bottom-text {
45 | bottom: 10px;
46 | }
47 |
48 | #form {
49 | margin-top: 20px;
50 | }
51 |
52 | label {
53 | display: block;
54 | margin-bottom: 5px;
55 | }
56 |
57 | input,
58 | select,
59 | button {
60 | padding: 10px;
61 | margin-bottom: 10px;
62 | width: 100%;
63 | box-sizing: border-box;
64 | }
65 |
66 | button {
67 | background-color: #4caf50;
68 | color: white;
69 | cursor: pointer;
70 | border: none;
71 | border-radius: 4px;
72 | }
73 |
74 | button:hover {
75 | background-color: #45a049;
76 | }
77 |
--------------------------------------------------------------------------------
/48-Virtual Pet/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Virtual Pet || 100 JavaScript Projects
8 |
9 |
10 |
11 |
Virtual Pet
12 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/48-Virtual Pet/script.js:
--------------------------------------------------------------------------------
1 | let happiness = 50;
2 | let hunger = 50;
3 | let energy = 50;
4 |
5 | function updateStatus() {
6 | const statusElement = document.getElementById("status");
7 | statusElement.textContent = `Happiness: ${happiness} | Hunger: ${hunger} | Energy: ${energy}`;
8 |
9 | const petElement = document.getElementById("pet");
10 |
11 | if (happiness < 30 || hunger > 70 || energy < 30) {
12 | petElement.style.backgroundColor = "#ff3300"; // Change color if pet is not happy
13 | } else {
14 | petElement.style.backgroundColor = "#ffcc66";
15 | }
16 | }
17 |
18 | function feed() {
19 | hunger -= 10;
20 | happiness += 5;
21 | updateStatus();
22 | }
23 |
24 | function play() {
25 | happiness += 10;
26 | energy -= 5;
27 | updateStatus();
28 | }
29 |
30 | function sleep() {
31 | energy += 20;
32 | happiness -= 10;
33 | updateStatus();
34 | }
35 |
36 | // Initial status update
37 | updateStatus();
38 |
--------------------------------------------------------------------------------
/48-Virtual Pet/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | margin: 0;
4 | display: flex;
5 | align-items: center;
6 | justify-content: center;
7 | height: 100vh;
8 | background-color: #f4f4f4;
9 | }
10 |
11 | .container {
12 | text-align: center;
13 | background-color: #fff;
14 | padding: 20px;
15 | border-radius: 8px;
16 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
17 | }
18 |
19 | #pet-container {
20 | position: relative;
21 | }
22 |
23 | #pet {
24 | width: 100px;
25 | height: 100px;
26 | background-color: #ffcc66;
27 | border-radius: 50%;
28 | position: absolute;
29 | bottom: 20px;
30 | left: 50%;
31 | transform: translateX(-50%);
32 | }
33 |
34 | #status {
35 | margin-top: 20px;
36 | }
37 |
38 | #actions {
39 | margin-top: 20px;
40 | }
41 |
42 | button {
43 | background-color: #4caf50;
44 | color: white;
45 | padding: 10px 20px;
46 | font-size: 16px;
47 | cursor: pointer;
48 | border: none;
49 | border-radius: 4px;
50 | margin-right: 10px;
51 | }
52 |
53 | button:hover {
54 | background-color: #45a049;
55 | }
56 |
--------------------------------------------------------------------------------
/49-Color Palette Generator/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Color Palette Generator
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/49-Color Palette Generator/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | display: flex;
4 | flex-direction: column;
5 | align-items: center;
6 | justify-content: center;
7 | height: 100vh;
8 | margin: 0;
9 | }
10 |
11 | #colorInput {
12 | margin-bottom: 20px;
13 | }
14 |
15 | #colorPalette {
16 | display: flex;
17 | justify-content: center;
18 | }
19 |
20 | .colorBox {
21 | width: 50px;
22 | height: 50px;
23 | margin: 0 5px;
24 | border: 1px solid #000;
25 | }
26 |
--------------------------------------------------------------------------------
/50-Emoji Translator/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Emoji Translator
8 |
9 |
10 |
11 |
Emoji Translator
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/50-Emoji Translator/script.js:
--------------------------------------------------------------------------------
1 | function translateToEmoji() {
2 | var textInput = document.getElementById("textInput").value;
3 | var emojiResult = document.getElementById("emojiResult");
4 |
5 | // Simple mapping of words to emojis (customize as needed)
6 | var emojiMap = {
7 | happy: "😊",
8 | sad: "😢",
9 | love: "❤️",
10 | cool: "😎",
11 | hello: "👋",
12 | // Add more mappings as needed
13 | };
14 |
15 | // Replace words with corresponding emojis
16 | var translatedText = textInput
17 | .toLowerCase()
18 | .replace(/\b\w+\b/g, function (word) {
19 | return emojiMap[word] || word;
20 | });
21 |
22 | // Display the translated text with emojis
23 | emojiResult.textContent = translatedText;
24 | }
25 |
--------------------------------------------------------------------------------
/50-Emoji Translator/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | background-color: #f4f4f4;
4 | display: flex;
5 | align-items: center;
6 | justify-content: center;
7 | height: 100vh;
8 | margin: 0;
9 | }
10 |
11 | .container {
12 | text-align: center;
13 | }
14 |
15 | h1 {
16 | color: #333;
17 | }
18 |
19 | textarea {
20 | margin: 10px 0;
21 | padding: 5px;
22 | font-size: 16px;
23 | }
24 |
25 | button {
26 | padding: 10px 20px;
27 | font-size: 16px;
28 | cursor: pointer;
29 | background-color: #007bff;
30 | color: #fff;
31 | border: none;
32 | border-radius: 5px;
33 | }
34 |
35 | #emojiResult {
36 | margin-top: 20px;
37 | font-size: 24px;
38 | }
39 |
--------------------------------------------------------------------------------
/51-File Uploader/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | File Uploader || 100 JavaScript Projects
8 |
9 |
10 |
11 |
File Uploader
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/51-File Uploader/script.js:
--------------------------------------------------------------------------------
1 | function uploadFile() {
2 | const fileInput = document.getElementById("fileInput");
3 | const progressBar = document.getElementById("progressBar");
4 | const status = document.getElementById("status");
5 |
6 | const file = fileInput.files[0];
7 | if (!file) {
8 | alert("Please select a file.");
9 | return;
10 | }
11 |
12 | const formData = new FormData();
13 | formData.append("file", file);
14 |
15 | const xhr = new XMLHttpRequest();
16 |
17 | xhr.upload.onprogress = function (e) {
18 | if (e.lengthComputable) {
19 | const progress = (e.loaded / e.total) * 100;
20 | progressBar.value = progress;
21 | }
22 | };
23 |
24 | xhr.onload = function () {
25 | if (xhr.status === 200) {
26 | status.innerHTML = "File uploaded successfully!";
27 | } else {
28 | status.innerHTML = "Error uploading file. Please try again.";
29 | }
30 | };
31 |
32 | xhr.open("POST", "your_upload_endpoint_url", true);
33 | xhr.send(formData);
34 | }
35 |
--------------------------------------------------------------------------------
/51-File Uploader/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | display: flex;
4 | justify-content: center;
5 | align-items: center;
6 | height: 100vh;
7 | margin: 0;
8 | }
9 |
10 | .container {
11 | text-align: center;
12 | }
13 |
14 | input {
15 | margin: 10px 0;
16 | }
17 |
18 | progress {
19 | width: 100%;
20 | margin: 10px 0;
21 | }
22 |
23 | #status {
24 | margin: 10px 0;
25 | }
26 |
--------------------------------------------------------------------------------
/52-Password Generator/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Password Generator || 100 JavaScript Projects
7 |
8 |
9 |
10 |
11 |
Password Generator
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/52-Password Generator/script.js:
--------------------------------------------------------------------------------
1 | function generatePassword() {
2 | const length = document.getElementById("length").value;
3 | const uppercase = document.getElementById("uppercase").checked;
4 | const lowercase = document.getElementById("lowercase").checked;
5 | const numbers = document.getElementById("numbers").checked;
6 | const special = document.getElementById("special").checked;
7 |
8 | const uppercaseChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
9 | const lowercaseChars = "abcdefghijklmnopqrstuvwxyz";
10 | const numberChars = "0123456789";
11 | const specialChars = "!@#$%^&*()_+-=[]{}|;:,.<>?";
12 |
13 | let allChars = "";
14 |
15 | if (uppercase) {
16 | allChars += uppercaseChars;
17 | }
18 | if (lowercase) {
19 | allChars += lowercaseChars;
20 | }
21 | if (numbers) {
22 | allChars += numberChars;
23 | }
24 | if (special) {
25 | allChars += specialChars;
26 | }
27 |
28 | let password = "";
29 |
30 | for (let i = 0; i < length; i++) {
31 | const randomIndex = Math.floor(Math.random() * allChars.length);
32 | password += allChars.charAt(randomIndex);
33 | }
34 |
35 | document.getElementById("password").innerText = password;
36 | }
37 |
--------------------------------------------------------------------------------
/52-Password Generator/styles.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | box-sizing: border-box;
5 | }
6 | body {
7 | font-family: Arial, sans-serif;
8 | display: flex;
9 | justify-content: center;
10 | align-items: center;
11 | height: 100vh;
12 | margin: 0;
13 | }
14 |
15 | #generator-container {
16 | text-align: center;
17 | }
18 |
19 | label {
20 | margin-right: 10px;
21 | }
22 |
23 | input {
24 | width: 40px;
25 | text-align: center;
26 | }
27 |
28 | button {
29 | padding: 10px 20px;
30 | margin-top: 10px;
31 | cursor: pointer;
32 | }
33 |
34 | #password {
35 | margin-top: 20px;
36 | font-size: 1.5em;
37 | font-weight: bold;
38 | margin-bottom: 20px;
39 | }
40 |
--------------------------------------------------------------------------------
/53-QR Code Generator/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | QR Code Generator || 100 JavaScript Project
8 |
9 |
10 |
11 |
QR Code Generator
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/53-QR Code Generator/script.js:
--------------------------------------------------------------------------------
1 | function generateQRCode() {
2 | const textInput = document.getElementById("textInput").value;
3 | const qrcodeContainer = document.getElementById("qrcode");
4 |
5 | if (!textInput) {
6 | alert("Please enter text or URL.");
7 | return;
8 | }
9 |
10 | qrcodeContainer.innerHTML = "";
11 |
12 | const qr = new QRCode(qrcodeContainer, {
13 | text: textInput,
14 | width: 200,
15 | height: 200,
16 | });
17 | }
18 |
--------------------------------------------------------------------------------
/53-QR Code Generator/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | display: flex;
4 | justify-content: center;
5 | align-items: center;
6 | height: 100vh;
7 | margin: 0;
8 | }
9 |
10 | .container {
11 | text-align: center;
12 | }
13 |
14 | label {
15 | margin-top: 10px;
16 | display: block;
17 | }
18 |
19 | input {
20 | margin: 10px 0;
21 | }
22 |
23 | #qrcode {
24 | margin-top: 20px;
25 | }
26 |
--------------------------------------------------------------------------------
/54-Unit Converter/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Unit Converter || 100 JavaScript Projects
8 |
9 |
10 |
11 |
Unit Converter
12 |
13 |
14 |
15 |
16 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/54-Unit Converter/script.js:
--------------------------------------------------------------------------------
1 | function convert() {
2 | const inputValue = parseFloat(document.getElementById("inputValue").value);
3 | const selectUnit = document.getElementById("selectUnit");
4 | const resultElement = document.getElementById("result");
5 |
6 | if (isNaN(inputValue)) {
7 | alert("Please enter a valid number.");
8 | return;
9 | }
10 |
11 | const selectedUnit = selectUnit.value;
12 | let result;
13 |
14 | if (selectedUnit === "km") {
15 | result = convertKilometersToMiles(inputValue);
16 | resultElement.innerText = `${inputValue} Kilometers is approximately ${result.toFixed(
17 | 2
18 | )} Miles.`;
19 | } else if (selectedUnit === "mi") {
20 | result = convertMilesToKilometers(inputValue);
21 | resultElement.innerText = `${inputValue} Miles is approximately ${result.toFixed(
22 | 2
23 | )} Kilometers.`;
24 | }
25 | }
26 |
27 | function convertKilometersToMiles(kilometers) {
28 | return kilometers * 0.621371;
29 | }
30 |
31 | function convertMilesToKilometers(miles) {
32 | return miles / 0.621371;
33 | }
34 |
--------------------------------------------------------------------------------
/54-Unit Converter/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | display: flex;
4 | justify-content: center;
5 | align-items: center;
6 | height: 100vh;
7 | margin: 0;
8 | }
9 |
10 | .container {
11 | text-align: center;
12 | }
13 |
14 | input,
15 | select,
16 | button {
17 | margin: 10px;
18 | }
19 |
--------------------------------------------------------------------------------
/55-Markdown Editor/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Markdown Editor || 100 JavaScript Projects
8 |
9 |
10 |
11 |
Markdown Editor
12 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/55-Markdown Editor/script.js:
--------------------------------------------------------------------------------
1 | document
2 | .getElementById("markdownInput")
3 | .addEventListener("input", updateMarkdown);
4 |
5 | function updateMarkdown() {
6 | const markdownInput = document.getElementById("markdownInput").value;
7 | const markdownPreview = document.getElementById("markdownPreview");
8 | const htmlOutput = marked(markdownInput);
9 |
10 | markdownPreview.innerHTML = htmlOutput;
11 | }
12 |
--------------------------------------------------------------------------------
/55-Markdown Editor/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | display: flex;
4 | justify-content: center;
5 | align-items: center;
6 | height: 100vh;
7 | margin: 0;
8 | }
9 |
10 | .container {
11 | text-align: center;
12 | width: 80%;
13 | }
14 |
15 | textarea {
16 | width: 100%;
17 | height: 200px;
18 | margin: 10px 0;
19 | }
20 |
21 | #markdownPreview {
22 | border: 1px solid #ddd;
23 | padding: 10px;
24 | min-height: 200px;
25 | }
26 |
--------------------------------------------------------------------------------
/56-Voice Assistant/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Voice Assistant || 100 JavaScript Projects
8 |
9 |
10 |
11 |
Voice Assistant
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/56-Voice Assistant/script.js:
--------------------------------------------------------------------------------
1 | let recognition;
2 |
3 | function startListening() {
4 | recognition = new webkitSpeechRecognition() || new SpeechRecognition();
5 |
6 | recognition.onstart = function () {
7 | document.getElementById("output").innerText = "Listening...";
8 | };
9 |
10 | recognition.onresult = function (event) {
11 | const transcript = event.results[0][0].transcript;
12 | document.getElementById("output").innerText = "You said: " + transcript;
13 | processCommand(transcript);
14 | };
15 |
16 | recognition.onerror = function (event) {
17 | document.getElementById("output").innerText =
18 | "Error occurred: " + event.error;
19 | };
20 |
21 | recognition.onend = function () {
22 | document.getElementById("output").innerText =
23 | "Speech recognition ended.";
24 | };
25 |
26 | recognition.start();
27 | }
28 |
29 | function stopListening() {
30 | recognition.stop();
31 | }
32 |
33 | function processCommand(command) {
34 | // You can implement logic here to interpret and respond to different commands.
35 | // For a more advanced voice assistant, you might integrate with a natural language processing API.
36 | }
37 |
--------------------------------------------------------------------------------
/56-Voice Assistant/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | display: flex;
4 | justify-content: center;
5 | align-items: center;
6 | height: 100vh;
7 | margin: 0;
8 | }
9 |
10 | .container {
11 | text-align: center;
12 | }
13 |
14 | button {
15 | margin: 10px;
16 | padding: 8px 16px;
17 | font-size: 16px;
18 | cursor: pointer;
19 | }
20 |
21 | #output {
22 | margin-top: 20px;
23 | font-weight: bold;
24 | }
25 |
--------------------------------------------------------------------------------
/57-Note-taking App/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Note-taking App || 100 JavaScript Projects
8 |
9 |
10 |
11 |
Note-taking App
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/57-Note-taking App/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | display: flex;
4 | justify-content: center;
5 | align-items: center;
6 | height: 100vh;
7 | margin: 0;
8 | }
9 |
10 | .container {
11 | text-align: center;
12 | }
13 |
14 | textarea {
15 | width: 100%;
16 | height: 100px;
17 | margin: 10px 0;
18 | }
19 |
20 | button {
21 | margin: 10px;
22 | padding: 8px 16px;
23 | font-size: 16px;
24 | cursor: pointer;
25 | }
26 |
27 | .note {
28 | border: 1px solid #ddd;
29 | padding: 10px;
30 | margin: 10px 0;
31 | display: flex;
32 | justify-content: space-between;
33 | align-items: center;
34 | }
35 |
36 | .note-text {
37 | flex-grow: 1;
38 | }
39 |
40 | .note-buttons {
41 | margin-left: 10px;
42 | }
43 |
--------------------------------------------------------------------------------
/58-Browser Extension/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "manifest_version": 2,
3 | "name": "Browser Extension",
4 | "version": "1.0",
5 | "description": "A basic browser extension",
6 | "permissions": ["storage", "activeTab"],
7 | "browser_action": {
8 | "default_icon": {
9 | "16": "icon16.png",
10 | "48": "icon48.png",
11 | "128": "icon128.png"
12 | },
13 | "default_popup": "popup/popup.html"
14 | },
15 | "icons": {
16 | "16": "icon16.png",
17 | "48": "icon48.png",
18 | "128": "icon128.png"
19 | },
20 | "content_scripts": [
21 | {
22 | "matches": [""],
23 | "js": ["content.js"]
24 | }
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/58-Browser Extension/popup/content.js:
--------------------------------------------------------------------------------
1 | chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {
2 | if (request.action === "content-script") {
3 | alert(request.message);
4 | }
5 | });
6 |
--------------------------------------------------------------------------------
/58-Browser Extension/popup/popup.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | padding: 10px;
4 | }
5 |
6 | .container {
7 | text-align: center;
8 | }
9 |
10 | button {
11 | padding: 8px 16px;
12 | font-size: 16px;
13 | cursor: pointer;
14 | }
15 |
--------------------------------------------------------------------------------
/58-Browser Extension/popup/popup.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Browser Extension || 100 JavaScript Projects
8 |
9 |
10 |
11 |
My Extension Popup
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/58-Browser Extension/popup/popup.js:
--------------------------------------------------------------------------------
1 | document.getElementById("clickMeButton").addEventListener("click", function () {
2 | chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) {
3 | chrome.tabs.sendMessage(tabs[0].id, {
4 | action: "content-script",
5 | message: "Hello from popup!",
6 | });
7 | });
8 | });
9 |
--------------------------------------------------------------------------------
/59-Calendar/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Calendar App || 100 JavaScript Projects
8 |
9 |
10 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/59-Calendar/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | display: flex;
4 | justify-content: center;
5 | align-items: center;
6 | height: 100vh;
7 | margin: 0;
8 | }
9 |
10 | .container {
11 | text-align: center;
12 | }
13 |
14 | .header {
15 | display: flex;
16 | justify-content: space-between;
17 | align-items: center;
18 | margin-bottom: 20px;
19 | }
20 |
21 | button {
22 | padding: 8px 16px;
23 | font-size: 16px;
24 | cursor: pointer;
25 | }
26 |
27 | #calendar {
28 | display: grid;
29 | grid-template-columns: repeat(7, 1fr);
30 | }
31 |
32 | .day {
33 | padding: 10px;
34 | border: 1px solid #ddd;
35 | }
36 |
37 | .day:hover {
38 | background-color: #eee;
39 | }
40 |
41 | .today {
42 | background-color: #f0f0f0;
43 | }
44 |
45 | .events {
46 | margin-top: 5px;
47 | }
48 |
49 | .event {
50 | background-color: #3498db;
51 | color: #fff;
52 | padding: 2px 5px;
53 | margin: 2px;
54 | border-radius: 3px;
55 | cursor: pointer;
56 | }
57 |
--------------------------------------------------------------------------------
/60-Clipboard Manager/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Clipboard Manager || 100 JavaScript Projects
8 |
9 |
10 |
11 |
Clipboard Manager
12 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/60-Clipboard Manager/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | display: flex;
4 | justify-content: center;
5 | align-items: center;
6 | height: 100vh;
7 | margin: 0;
8 | }
9 |
10 | .container {
11 | text-align: center;
12 | }
13 |
14 | textarea {
15 | width: 100%;
16 | height: 100px;
17 | margin: 10px 0;
18 | }
19 |
20 | button {
21 | padding: 8px 16px;
22 | font-size: 16px;
23 | cursor: pointer;
24 | }
25 |
26 | #clipboardHistory {
27 | margin-top: 20px;
28 | }
29 |
30 | .clipboard-item {
31 | border: 1px solid #ddd;
32 | padding: 10px;
33 | margin: 10px 0;
34 | }
35 |
--------------------------------------------------------------------------------
/61-Interactive Charts/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | D3.js Interactive Chart || 100 JavaScript Projects
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/61-Interactive Charts/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | margin: 0;
4 | padding: 0;
5 | }
6 |
7 | #chart-container {
8 | width: 80vw;
9 | height: 60vh;
10 | margin: 20px auto;
11 | border: 1px solid #ccc;
12 | }
13 |
--------------------------------------------------------------------------------
/62-Heatmap Generator/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | D3.js Heatmap Generator
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/62-Heatmap Generator/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | margin: 0;
4 | padding: 0;
5 | }
6 |
7 | #heatmap-container {
8 | width: 80vw;
9 | height: 60vh;
10 | margin: 20px auto;
11 | border: 1px solid #ccc;
12 | }
13 |
--------------------------------------------------------------------------------
/63-Dashboard with Graphs and Metrics/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | }
4 |
5 | .chart-container {
6 | height: 300px;
7 | border: 1px solid #ddd;
8 | margin-bottom: 20px;
9 | }
10 |
11 | .metric-container {
12 | padding: 20px;
13 | border: 1px solid #ddd;
14 | margin-bottom: 20px;
15 | }
16 |
--------------------------------------------------------------------------------
/64-Geographical Data Visualization/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
10 |
11 |
12 | Geographical Data Visualization || 100 JavaScript Projects
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/64-Geographical Data Visualization/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | padding: 0;
4 | }
5 |
6 | #map {
7 | height: 100vh;
8 | width: 100%;
9 | }
10 |
--------------------------------------------------------------------------------
/65-Network Traffic Analyzer/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Network Traffic Analyzer || 100 JavaScript Projects
8 |
9 |
10 |
11 |
12 |
13 |
Packet List
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/65-Network Traffic Analyzer/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | margin: 0;
4 | padding: 0;
5 | }
6 |
7 | .container {
8 | display: flex;
9 | flex-direction: column;
10 | align-items: center;
11 | padding: 20px;
12 | }
13 |
14 | #traffic-chart {
15 | width: 80vw;
16 | height: 300px;
17 | border: 1px solid #ddd;
18 | margin-bottom: 20px;
19 | }
20 |
21 | #packet-list {
22 | width: 80vw;
23 | border: 1px solid #ddd;
24 | padding: 20px;
25 | }
26 |
27 | #packet-list h2 {
28 | margin-bottom: 10px;
29 | }
30 |
31 | #packet-list-ul {
32 | list-style-type: none;
33 | padding: 0;
34 | margin: 0;
35 | max-height: 300px;
36 | overflow-y: auto;
37 | }
38 |
39 | li {
40 | border-bottom: 1px solid #ddd;
41 | padding: 10px;
42 | }
43 |
--------------------------------------------------------------------------------
/66-Stock Market Tracker with Graphs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Stock Market Tracker || 100 JavaScript Projects
9 |
10 |
11 |
12 |
Stock Market Tracker
13 |
14 |
15 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/66-Stock Market Tracker with Graphs/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | margin: 0;
4 | padding: 0;
5 | background-color: #f4f4f4;
6 | }
7 |
8 | .container {
9 | max-width: 800px;
10 | margin: 20px auto;
11 | padding: 20px;
12 | background-color: #fff;
13 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
14 | }
15 |
16 | input {
17 | padding: 8px;
18 | margin-right: 10px;
19 | }
20 |
21 | button {
22 | padding: 8px 15px;
23 | background-color: #4caf50;
24 | color: #fff;
25 | border: none;
26 | cursor: pointer;
27 | }
28 |
29 | button:hover {
30 | background-color: #45a049;
31 | }
32 |
--------------------------------------------------------------------------------
/67-Polls and Survey Data Visualization/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Polls and Survey Visualization || 100 JavaScript Projects
9 |
10 |
11 |
12 |
Polls and Survey Visualization
13 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/67-Polls and Survey Data Visualization/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | margin: 0;
4 | padding: 0;
5 | background-color: #f4f4f4;
6 | }
7 |
8 | .container {
9 | max-width: 800px;
10 | margin: 20px auto;
11 | padding: 20px;
12 | background-color: #fff;
13 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
14 | }
15 |
16 | input,
17 | button {
18 | margin-top: 10px;
19 | padding: 8px;
20 | }
21 |
22 | button {
23 | background-color: #4caf50;
24 | color: #fff;
25 | border: none;
26 | cursor: pointer;
27 | }
28 |
29 | button:hover {
30 | background-color: #45a049;
31 | }
32 |
33 | canvas {
34 | margin-top: 20px;
35 | }
36 |
--------------------------------------------------------------------------------
/68-Visualizing COVID-19 Dat/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | COVID-19 Data Visualization
9 |
10 |
11 |
12 |
COVID-19 Data Visualization
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/68-Visualizing COVID-19 Dat/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | margin: 0;
4 | padding: 0;
5 | background-color: #f4f4f4;
6 | }
7 |
8 | .container {
9 | max-width: 800px;
10 | margin: 20px auto;
11 | padding: 20px;
12 | background-color: #fff;
13 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
14 | }
15 |
16 | canvas {
17 | margin-top: 20px;
18 | }
19 |
--------------------------------------------------------------------------------
/69-Population Density Map/app.js:
--------------------------------------------------------------------------------
1 | // Sample population density data
2 | const populationData = [
3 | { location: [37.7749, -122.4194], population: 870887 },
4 | { location: [34.0522, -118.2437], population: 399975 },
5 | { location: [40.7128, -74.006], population: 8175133 },
6 | // Add more data as needed
7 | ];
8 |
9 | // Create a Leaflet map
10 | const map = L.map("map").setView([37.7749, -122.4194], 4);
11 |
12 | L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
13 | attribution: "© OpenStreetMap contributors",
14 | }).addTo(map);
15 |
16 | // Add population density circles to the map
17 | populationData.forEach((entry) => {
18 | const circle = L.circle(entry.location, {
19 | color: "red",
20 | fillColor: "red",
21 | fillOpacity: 0.5,
22 | radius: Math.sqrt(entry.population) * 100,
23 | }).addTo(map);
24 |
25 | // Add a popup with population information
26 | circle.bindPopup(`Population: ${entry.population}`);
27 | });
28 |
--------------------------------------------------------------------------------
/69-Population Density Map/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
10 |
11 | Population Density Map
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/69-Population Density Map/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | margin: 0;
4 | padding: 0;
5 | }
6 |
7 | #map {
8 | height: 100vh;
9 | width: 100%;
10 | }
11 |
--------------------------------------------------------------------------------
/70-Social Media Analytics Dashboard/app.js:
--------------------------------------------------------------------------------
1 | // You can add JavaScript here to fetch and update real-time data from social media APIs
2 | // For this example, we're keeping it static.
3 |
--------------------------------------------------------------------------------
/70-Social Media Analytics Dashboard/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Social Media Analytics Dashboard || 100 JavaScript Projects
8 |
9 |
10 |
11 |
12 |
13 | Social Media Analytics Dashboard
14 |
15 |
16 |
17 |
21 |
22 |
27 |
28 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/70-Social Media Analytics Dashboard/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | margin: 0;
4 | padding: 0;
5 | background-color: #f4f4f4;
6 | }
7 |
8 | header {
9 | background-color: #333;
10 | color: white;
11 | padding: 1em;
12 | text-align: center;
13 | }
14 |
15 | .container {
16 | display: flex;
17 | justify-content: space-around;
18 | padding: 2em;
19 | }
20 |
21 | .widget {
22 | background-color: white;
23 | padding: 1.5em;
24 | border-radius: 8px;
25 | box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
26 | margin: 1em;
27 | flex: 1;
28 | text-align: center;
29 | }
30 |
--------------------------------------------------------------------------------
/71-Tic Tac Toe/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Advanced Tic Tac Toe || 100 JavaScript Projects
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/71-Tic Tac Toe/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | display: flex;
4 | justify-content: center;
5 | align-items: center;
6 | height: 100vh;
7 | margin: 0;
8 | }
9 |
10 | #game-board {
11 | display: grid;
12 | grid-template-columns: repeat(3, 100px);
13 | grid-template-rows: repeat(3, 100px);
14 | gap: 5px;
15 | }
16 |
17 | .cell {
18 | width: 100px;
19 | height: 100px;
20 | border: 2px solid #333;
21 | display: flex;
22 | align-items: center;
23 | justify-content: center;
24 | font-size: 24px;
25 | cursor: pointer;
26 | transition: background-color 0.3s;
27 | }
28 |
29 | .cell:hover {
30 | background-color: #eee;
31 | }
32 |
33 | .message {
34 | text-align: center;
35 | margin-top: 20px;
36 | }
37 |
--------------------------------------------------------------------------------
/72-Snake Game/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Snake Game || 100 JavaScript Projects
8 |
9 |
10 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/72-Snake Game/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | display: flex;
3 | align-items: center;
4 | justify-content: center;
5 | height: 100vh;
6 | margin: 0;
7 | background-color: #f0f0f0;
8 | }
9 |
10 | .game-container {
11 | position: relative;
12 | width: 300px;
13 | height: 300px;
14 | border: 2px solid #333;
15 | }
16 |
17 | .snake,
18 | .food {
19 | position: absolute;
20 | width: 20px;
21 | height: 20px;
22 | }
23 |
24 | .snake {
25 | background-color: #4caf50;
26 | }
27 |
28 | .food {
29 | background-color: #ff5733;
30 | }
31 |
--------------------------------------------------------------------------------
/73-2048/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 2048 Game || 100 JavaScript Projects
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/73-2048/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | display: flex;
3 | justify-content: center;
4 | align-items: center;
5 | height: 100vh;
6 | margin: 0;
7 | background-color: #f8f8f8;
8 | font-family: "Arial", sans-serif;
9 | }
10 |
11 | #game-board {
12 | display: grid;
13 | grid-template-columns: repeat(4, 100px);
14 | gap: 10px;
15 | border: 5px solid #333;
16 | border-radius: 10px;
17 | padding: 10px;
18 | background-color: #eee;
19 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
20 | }
21 |
22 | .cell {
23 | width: 100px;
24 | height: 100px;
25 | display: flex;
26 | justify-content: center;
27 | align-items: center;
28 | font-size: 24px;
29 | font-weight: bold;
30 | background-color: #ccc;
31 | border-radius: 5px;
32 | }
33 |
--------------------------------------------------------------------------------
/75-Chess Game/.gitignore:
--------------------------------------------------------------------------------
1 |
2 |
3 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
4 |
5 | # dependencies
6 | /node_modules
7 | /.pnp
8 | .pnp.js
9 |
10 | # testing
11 | /coverage
12 |
13 | # next.js
14 | /.next/
15 | /out/
16 |
17 | # production
18 | /build
19 |
20 | # misc
21 | .DS_Store
22 | *.pem
23 |
24 | # debug
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
29 | # local env files
30 | .env*.local
31 |
32 | # vercel
33 | .vercel
34 |
35 | # typescript
36 | *.tsbuildinfo
37 | next-env.d.ts
38 |
39 | # Wordpress files
40 | wp-content/mu-plugins/*
41 | !wp-content/mu-plugins/notesontech-*
42 |
--------------------------------------------------------------------------------
/75-Chess Game/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Chess Game || 100 JavaScript Projects
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/75-Chess Game/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "express": "^4.18.2",
4 | "socket.io": "^4.7.4"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/75-Chess Game/script.js:
--------------------------------------------------------------------------------
1 | document.addEventListener("DOMContentLoaded", () => {
2 | const socket = io();
3 |
4 | const board = document.getElementById("board");
5 |
6 | for (let i = 0; i < 64; i++) {
7 | const square = document.createElement("div");
8 | square.classList.add("square");
9 | square.classList.add(
10 | (i + Math.floor(i / 8)) % 2 === 0 ? "white" : "black"
11 | );
12 | board.appendChild(square);
13 | }
14 |
15 | // Add chess piece logic here
16 |
17 | // Socket.io logic here
18 | });
19 |
--------------------------------------------------------------------------------
/75-Chess Game/server.js:
--------------------------------------------------------------------------------
1 | const express = require("express");
2 | const http = require("http");
3 | const socketIO = require("socket.io");
4 |
5 | const app = express();
6 | const server = http.createServer(app);
7 | const io = socketIO(server);
8 |
9 | app.use(express.static("public"));
10 |
11 | io.on("connection", (socket) => {
12 | console.log("A user connected");
13 |
14 | // Handle chess moves and game logic here
15 |
16 | socket.on("disconnect", () => {
17 | console.log("User disconnected");
18 | });
19 | });
20 |
21 | const PORT = process.env.PORT || 3000;
22 |
23 | server.listen(PORT, () => {
24 | console.log(`Server is running on http://localhost:${PORT}`);
25 | });
26 |
--------------------------------------------------------------------------------
/75-Chess Game/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | display: flex;
3 | align-items: center;
4 | justify-content: center;
5 | height: 100vh;
6 | margin: 0;
7 | }
8 |
9 | #board {
10 | width: 600px;
11 | height: 600px;
12 | border: 2px solid #333;
13 | display: grid;
14 | grid-template-columns: repeat(8, 1fr);
15 | }
16 |
17 | .square {
18 | width: 100%;
19 | height: 100%;
20 | display: flex;
21 | align-items: center;
22 | justify-content: center;
23 | }
24 |
25 | .white {
26 | background-color: #f0d9b5;
27 | }
28 |
29 | .black {
30 | background-color: #b58863;
31 | }
32 |
--------------------------------------------------------------------------------
/76-Hangman/images/hangman-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pradipchaudhary/100-javascript-projects/896e267f921407ae2c10478cd0801d07e1c42cba/76-Hangman/images/hangman-2.png
--------------------------------------------------------------------------------
/76-Hangman/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Hangman Game || 100 JavaScript Projects
8 |
9 |
10 |
11 |
12 |
13 |

14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/76-Hangman/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | display: flex;
3 | align-items: center;
4 | justify-content: center;
5 | height: 100vh;
6 | margin: 0;
7 | font-family: "Arial", sans-serif;
8 | }
9 |
10 | #hangman-container {
11 | text-align: center;
12 | }
13 |
14 | #word-container {
15 | font-size: 24px;
16 | margin: 20px 0;
17 | }
18 |
19 | #image-container {
20 | margin: 20px 0;
21 | }
22 |
23 | #hangman-image {
24 | max-width: 100%;
25 | height: auto;
26 | }
27 |
28 | #letters-container {
29 | margin: 20px 0;
30 | }
31 |
32 | button {
33 | padding: 10px;
34 | font-size: 16px;
35 | cursor: pointer;
36 | }
37 |
--------------------------------------------------------------------------------
/77-Memory Puzzle Game/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Memory Puzzle Game
8 |
9 |
10 |
11 |
12 |
13 | Congratulations! You solved the puzzle!
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/77-Memory Puzzle Game/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | display: flex;
3 | align-items: center;
4 | justify-content: center;
5 | height: 100vh;
6 | margin: 0;
7 | font-family: "Arial", sans-serif;
8 | }
9 |
10 | #game-container {
11 | text-align: center;
12 | }
13 |
14 | .board {
15 | display: grid;
16 | grid-template-columns: repeat(4, 1fr);
17 | gap: 10px;
18 | margin-top: 20px;
19 | }
20 |
21 | .card {
22 | width: 100px;
23 | height: 100px;
24 | background-color: #3498db;
25 | color: #fff;
26 | font-size: 24px;
27 | display: flex;
28 | align-items: center;
29 | justify-content: center;
30 | cursor: pointer;
31 | }
32 |
33 | .hidden {
34 | display: none;
35 | }
36 |
37 | #reset-button {
38 | padding: 10px;
39 | font-size: 16px;
40 | cursor: pointer;
41 | margin-top: 20px;
42 | }
43 |
--------------------------------------------------------------------------------
/78-Battleship/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Battleship Game
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/78-Battleship/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | display: flex;
3 | align-items: center;
4 | justify-content: center;
5 | height: 100vh;
6 | margin: 0;
7 | font-family: "Arial", sans-serif;
8 | }
9 |
10 | #game-container {
11 | text-align: center;
12 | }
13 |
14 | .board {
15 | display: grid;
16 | grid-template-columns: repeat(10, 30px);
17 | gap: 5px;
18 | margin-top: 20px;
19 | }
20 |
21 | .cell {
22 | width: 30px;
23 | height: 30px;
24 | border: 1px solid #ddd;
25 | display: flex;
26 | align-items: center;
27 | justify-content: center;
28 | cursor: pointer;
29 | }
30 |
31 | .ship {
32 | background-color: #3498db;
33 | }
34 |
35 | .hit {
36 | background-color: #e74c3c;
37 | }
38 |
39 | .hidden {
40 | display: none;
41 | }
42 |
43 | #reset-button {
44 | padding: 10px;
45 | font-size: 16px;
46 | cursor: pointer;
47 | margin-top: 20px;
48 | }
49 |
--------------------------------------------------------------------------------
/79-Crossword Puzzle/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Crossword Puzzle
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/79-Crossword Puzzle/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | display: flex;
3 | align-items: center;
4 | justify-content: center;
5 | height: 100vh;
6 | margin: 0;
7 | font-family: "Arial", sans-serif;
8 | }
9 |
10 | #puzzle-container {
11 | text-align: center;
12 | }
13 |
14 | .board {
15 | display: grid;
16 | grid-template-columns: repeat(10, 30px);
17 | gap: 2px;
18 | margin-top: 20px;
19 | }
20 |
21 | .cell {
22 | width: 30px;
23 | height: 30px;
24 | border: 1px solid #ddd;
25 | display: flex;
26 | align-items: center;
27 | justify-content: center;
28 | font-size: 14px;
29 | cursor: pointer;
30 | }
31 |
32 | #word-input {
33 | margin-top: 20px;
34 | }
35 |
36 | #word-input label {
37 | margin-right: 10px;
38 | }
39 |
40 | #message {
41 | margin-top: 20px;
42 | color: green;
43 | font-weight: bold;
44 | }
45 |
46 | .hidden {
47 | display: none;
48 | }
49 |
50 | #reset-button {
51 | padding: 10px;
52 | font-size: 16px;
53 | cursor: pointer;
54 | margin-top: 20px;
55 | }
56 |
--------------------------------------------------------------------------------
/80-Platformer Game/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Platformer Game
8 |
9 |
10 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/80-Platformer Game/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | overflow: hidden;
4 | background-color: #87ceeb;
5 | }
6 |
7 | #game-container {
8 | position: relative;
9 | width: 800px;
10 | height: 500px;
11 | margin: 20px auto;
12 | border: 1px solid #000;
13 | }
14 |
15 | .platform {
16 | position: absolute;
17 | background-color: #2e8b57;
18 | height: 20px;
19 | border-radius: 5px;
20 | }
21 |
22 | #player {
23 | position: absolute;
24 | width: 40px;
25 | height: 40px;
26 | background-color: #ff6347;
27 | border-radius: 50%;
28 | bottom: 0;
29 | left: 50px;
30 | }
31 |
--------------------------------------------------------------------------------
/81-Screen Reader Compatibility/app.js:
--------------------------------------------------------------------------------
1 | document.addEventListener("DOMContentLoaded", function () {
2 | const toggleButton = document.getElementById("toggleButton");
3 | const content = document.getElementById("content");
4 |
5 | toggleButton.addEventListener("click", function () {
6 | const isVisible = content.style.display === "block";
7 | content.style.display = isVisible ? "none" : "block";
8 | const buttonText = isVisible ? "Show Content" : "Hide Content";
9 | toggleButton.innerHTML = buttonText;
10 |
11 | // Update ARIA attributes
12 | content.setAttribute("aria-hidden", isVisible ? "true" : "false");
13 | toggleButton.setAttribute(
14 | "aria-expanded",
15 | isVisible ? "false" : "true"
16 | );
17 | });
18 | });
19 |
--------------------------------------------------------------------------------
/81-Screen Reader Compatibility/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Screen Reader Compatibility
8 |
9 |
10 |
11 |
Screen Reader Compatibility Test
12 |
13 | This is a simple web app to test screen reader compatibility.
14 |
15 |
18 |
19 |
This is the content that will be toggled.
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/81-Screen Reader Compatibility/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | }
4 |
5 | #app {
6 | max-width: 600px;
7 | margin: 0 auto;
8 | padding: 20px;
9 | text-align: center;
10 | }
11 |
12 | button {
13 | padding: 10px;
14 | font-size: 16px;
15 | }
16 |
17 | #content {
18 | display: none;
19 | margin-top: 20px;
20 | }
21 |
--------------------------------------------------------------------------------
/82-Keyboard Navigation Improvement/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Keyboard Navigation Improvement
8 |
9 |
10 |
11 |
Keyboard Navigation Improvement
12 |
13 | This web app demonstrates improved keyboard navigation.
14 |
15 |
16 |
17 |
18 |
19 |
20 | This is the focusable content that can be navigated
21 | using the keyboard.
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/82-Keyboard Navigation Improvement/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | }
4 |
5 | #app {
6 | max-width: 600px;
7 | margin: 0 auto;
8 | padding: 20px;
9 | text-align: center;
10 | }
11 |
12 | .navButton {
13 | padding: 10px;
14 | font-size: 16px;
15 | cursor: pointer;
16 | }
17 |
18 | #content {
19 | margin-top: 20px;
20 | border: 2px solid #ccc;
21 | padding: 10px;
22 | outline: none;
23 | }
24 |
--------------------------------------------------------------------------------
/83-Contrast Checker/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Contrast Checker
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/83-Contrast Checker/readme.md:
--------------------------------------------------------------------------------
1 | # Notes:
2 |
3 | Creating an advanced Contrast Checker web app involves assessing the contrast between text and background colors to ensure readability, especially for users with visual impairments. For this example, I'll use the React.js framework. Make sure to include React.js in your project, either by downloading it and adding it to your project or using a CDN.
4 |
5 | **In this example:**
6 |
7 | - Users can input foreground and background colors using color pickers.
8 | - The contrast ratio is calculated and compared against the WCAG 2.0 AA standard (4.5:1).
9 | - The result is displayed, indicating whether the contrast passes or fails.
10 |
11 | Feel free to customize the app further based on your specific requirements. This example provides a basic foundation for a Contrast Checker web app using React.js.
12 |
--------------------------------------------------------------------------------
/83-Contrast Checker/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | }
4 |
5 | #app {
6 | max-width: 600px;
7 | margin: 0 auto;
8 | padding: 20px;
9 | text-align: center;
10 | }
11 |
12 | .colorInput {
13 | margin-bottom: 10px;
14 | padding: 5px;
15 | font-size: 16px;
16 | }
17 |
18 | #result {
19 | margin-top: 20px;
20 | }
21 |
22 | .pass {
23 | color: #4caf50;
24 | }
25 |
26 | .fail {
27 | color: #ff5733;
28 | }
29 |
--------------------------------------------------------------------------------
/84-Text Resize/app.js:
--------------------------------------------------------------------------------
1 | document.addEventListener("DOMContentLoaded", function () {
2 | const fontSizeInput = document.getElementById("fontSize");
3 | const textToResize = document.getElementById("textToResize");
4 |
5 | fontSizeInput.addEventListener("input", function () {
6 | const newSize = fontSizeInput.value + "px";
7 | textToResize.style.fontSize = newSize;
8 | });
9 | });
10 |
--------------------------------------------------------------------------------
/84-Text Resize/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Text Resize App
8 |
9 |
10 |
11 |
Text Resize App
12 |
13 |
21 |
This is the text that will be resized.
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/84-Text Resize/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | }
4 |
5 | #app {
6 | max-width: 600px;
7 | margin: 0 auto;
8 | padding: 20px;
9 | text-align: center;
10 | }
11 |
12 | #textToResize {
13 | font-size: 16px;
14 | transition: font-size 0.3s ease-in-out;
15 | }
16 |
--------------------------------------------------------------------------------
/85-Color Blindness Simulator/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Color Blindness Simulator
8 |
9 |
10 |
11 |
Color Blindness Simulator
12 |
13 |
14 |
15 |
Simulated Colors:
16 |
Protanopia
17 |
Deuteranopia
18 |
Tritanopia
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/85-Color Blindness Simulator/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | }
4 |
5 | #app {
6 | max-width: 600px;
7 | margin: 0 auto;
8 | padding: 20px;
9 | text-align: center;
10 | }
11 |
12 | label {
13 | display: block;
14 | margin-bottom: 10px;
15 | }
16 |
17 | #simulatedColors {
18 | margin-top: 20px;
19 | }
20 |
21 | .simulatedColor {
22 | display: inline-block;
23 | margin: 10px;
24 | padding: 20px;
25 | border: 2px solid #ccc;
26 | font-size: 16px;
27 | }
28 |
--------------------------------------------------------------------------------
/86-Speech Recognition Interface/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Speech Recognition Interface
7 |
8 |
9 |
10 |
11 |
Speech Recognition Interface
12 |
Your transcribed speech will appear here.
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/86-Speech Recognition Interface/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | margin: 0;
4 | padding: 0;
5 | display: flex;
6 | align-items: center;
7 | justify-content: center;
8 | height: 100vh;
9 | background-color: #f4f4f4;
10 | }
11 |
12 | .container {
13 | text-align: center;
14 | }
15 |
16 | button {
17 | padding: 10px 20px;
18 | font-size: 16px;
19 | cursor: pointer;
20 | background-color: #3498db;
21 | color: #fff;
22 | border: none;
23 | border-radius: 5px;
24 | }
25 |
--------------------------------------------------------------------------------
/87-Focus Management/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Focus Management App
8 |
9 |
10 |
11 |
Focus Management App
12 |
13 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/87-Focus Management/script.js:
--------------------------------------------------------------------------------
1 | document.addEventListener("DOMContentLoaded", function () {
2 | const taskInput = document.getElementById("taskInput");
3 | const addTaskBtn = document.getElementById("addTaskBtn");
4 | const taskList = document.getElementById("taskList");
5 |
6 | addTaskBtn.addEventListener("click", addTask);
7 |
8 | function addTask() {
9 | const taskText = taskInput.value.trim();
10 | if (taskText !== "") {
11 | const taskItem = document.createElement("li");
12 | taskItem.classList.add("task-item");
13 | taskItem.innerHTML = `
14 | ${taskText}
15 |
16 | `;
17 | taskList.appendChild(taskItem);
18 | taskInput.value = "";
19 | taskInput.focus();
20 |
21 | const completeBtn = taskItem.querySelector(".complete-btn");
22 | completeBtn.addEventListener("click", completeTask);
23 | }
24 | }
25 |
26 | function completeTask(event) {
27 | const taskItem = event.target.closest(".task-item");
28 | taskItem.classList.toggle("completed");
29 | }
30 | });
31 |
--------------------------------------------------------------------------------
/87-Focus Management/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | background-color: #f4f4f4;
4 | margin: 0;
5 | display: flex;
6 | align-items: center;
7 | justify-content: center;
8 | height: 100vh;
9 | }
10 |
11 | .container {
12 | text-align: center;
13 | background-color: #fff;
14 | padding: 20px;
15 | border-radius: 8px;
16 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
17 | }
18 |
19 | .input-section {
20 | margin-bottom: 20px;
21 | }
22 |
23 | input {
24 | padding: 10px;
25 | font-size: 16px;
26 | }
27 |
28 | button {
29 | padding: 10px 20px;
30 | font-size: 16px;
31 | cursor: pointer;
32 | }
33 |
34 | button:hover {
35 | background-color: #ddd;
36 | }
37 |
38 | .task-list {
39 | list-style: none;
40 | padding: 0;
41 | }
42 |
43 | .task-item {
44 | display: flex;
45 | justify-content: space-between;
46 | align-items: center;
47 | padding: 10px;
48 | border-bottom: 1px solid #ddd;
49 | }
50 |
51 | .task-item.completed {
52 | text-decoration: line-through;
53 | opacity: 0.7;
54 | }
55 |
--------------------------------------------------------------------------------
/88-High-Contrast Mode/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | High-Contrast Mode Tool
9 |
10 |
11 |
12 |
High-Contrast Mode Tool
13 |
14 |
This is a sample text for testing high-contrast mode.
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/88-High-Contrast Mode/script.js:
--------------------------------------------------------------------------------
1 | document.addEventListener("DOMContentLoaded", function () {
2 | const toggleBtn = document.getElementById("toggleBtn");
3 | const body = document.body;
4 |
5 | toggleBtn.addEventListener("click", toggleHighContrast);
6 |
7 | function toggleHighContrast() {
8 | body.classList.toggle("high-contrast");
9 | }
10 | });
11 |
--------------------------------------------------------------------------------
/88-High-Contrast Mode/styles-high-contrast.css:
--------------------------------------------------------------------------------
1 | body.high-contrast {
2 | background-color: #000;
3 | color: #fff;
4 | }
5 |
6 | body.high-contrast button {
7 | background-color: #fff;
8 | color: #000;
9 | }
10 |
11 | body.high-contrast p {
12 | border: 2px solid #fff;
13 | padding: 10px;
14 | }
15 |
--------------------------------------------------------------------------------
/88-High-Contrast Mode/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | transition: background-color 0.3s, color 0.3s;
4 | }
5 |
6 | .container {
7 | text-align: center;
8 | padding: 20px;
9 | border-radius: 8px;
10 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
11 | }
12 |
13 | button {
14 | padding: 10px 20px;
15 | font-size: 16px;
16 | cursor: pointer;
17 | }
18 |
19 | button:hover {
20 | background-color: #ddd;
21 | }
22 |
--------------------------------------------------------------------------------
/89-Aria Role Implementation/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | ARIA Role Implementation App
8 |
9 |
10 |
11 |
ARIA Role Implementation App
12 |
This is a simple example demonstrating ARIA roles.
13 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/89-Aria Role Implementation/script.js:
--------------------------------------------------------------------------------
1 | document.addEventListener("DOMContentLoaded", function () {
2 | const alertBtn = document.getElementById("alertBtn");
3 |
4 | alertBtn.addEventListener("click", function () {
5 | alert("Hello, this is an alert!");
6 | });
7 | });
8 |
--------------------------------------------------------------------------------
/89-Aria Role Implementation/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Arial", sans-serif;
3 | text-align: center;
4 | padding: 20px;
5 | }
6 |
7 | #main {
8 | background-color: #f4f4f4;
9 | padding: 20px;
10 | border-radius: 8px;
11 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
12 | }
13 |
14 | button {
15 | padding: 10px 20px;
16 | font-size: 16px;
17 | cursor: pointer;
18 | }
19 |
20 | button:hover {
21 | background-color: #ddd;
22 | }
23 |
--------------------------------------------------------------------------------
/90-Responsive Design for Accessibility/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Your Accessible Web App
7 |
8 |
9 |
10 |
11 | Your Accessible Web App
12 |
13 |
14 |
21 |
22 |
23 |
24 |
25 |
26 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/90-Responsive Design for Accessibility/readme.md:
--------------------------------------------------------------------------------
1 | # Accessibility Considerations:
2 |
3 | - Use semantic HTML elements (