├── Analogue Clock
├── Images
│ └── clock.png
├── css
│ └── style.css
└── index.html
├── Drum Kit
├── images
│ ├── crash.png
│ ├── kick.png
│ ├── snare.png
│ ├── tom1.png
│ ├── tom2.png
│ ├── tom3.png
│ └── tom4.png
├── index.html
├── index.js
├── sounds
│ ├── crash.mp3
│ ├── kick-bass.mp3
│ ├── snare.mp3
│ ├── tom-1.mp3
│ ├── tom-2.mp3
│ ├── tom-3.mp3
│ └── tom-4.mp3
└── styles.css
├── Guess the Number
├── index.html
├── script.js
└── style.css
├── JS Calculator
├── index.html
├── script.js
└── style.css
├── README.md
├── TODO App
├── index.html
├── script.js
└── style.css
└── Text Editor
├── index.html
├── script.js
└── style.css
/Analogue Clock/Images/clock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aswathysaji/10-Days-of-JavaScript-Projects-for-Beginners/e85843a68614a075421e497996ce92d7ea057ebd/Analogue Clock/Images/clock.png
--------------------------------------------------------------------------------
/Analogue Clock/css/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 | width: 100%;
11 | height: 100vh;
12 | background: #091921 ;
13 | overflow: auto;
14 | font-family: 'Lora', serif;
15 | }
16 | #container{
17 | position: relative;
18 | }
19 | .clock{
20 | width: 250px;
21 | height: 250px;
22 | display: flex;
23 | justify-content: center;
24 | align-items: center;
25 | background: url(../Images/clock.png);
26 | background-size:cover ;
27 | border: 4px solid #091921;
28 | box-shadow: 0 -15px 15px rgba(255,255,255,0.05),
29 | inset 0 -15px 15px rgba(255,255,255,0.05),
30 | 0 15px 15px rgba(0,0,0,0.3),
31 | inset 0 15px 15px rgba(0,0,0,0.3);
32 | z-index:99999 ;
33 | border-radius: 50%;
34 | margin: 0;
35 | position: absolute;
36 | top: 50%;
37 | left: 50%;
38 | -ms-transform: translate(-50%, -50%);
39 | transform: translate(-50%, -50%);
40 | position: absolute;
41 | }
42 | .clock::before{
43 | content: "";
44 | position: absolute;
45 | width: 10px;
46 | height: 10px;
47 | background: #fff;
48 | border-radius: 50%;
49 | z-index: 10000;
50 | }
51 |
52 | .clock:after{
53 | position: absolute;
54 | content: '';
55 | height: 120px;
56 | width: 120px;
57 | background: #091921;
58 | border-radius: 50%;
59 | box-shadow: 0 5px 15px rgba(0,0,0,0.1),
60 | 0 5px 5px rgba(0,0,0,0.1),
61 | 0 5px 5px rgba(0,0,0,0.1),
62 | 0 5px 5px rgba(0,0,0,0.1);
63 | }
64 | .sec-hand,.min-hand,.hr-hand{
65 | position: absolute;
66 | }
67 | .sec-hand, .sec{
68 | height: 170px;
69 | width: 180px;
70 | z-index: 6;
71 | }
72 | .min-hand, .min{
73 | height: 140px;
74 | width: 140px;
75 | z-index: 5;
76 | }
77 | .hr-hand, .hr{
78 | height: 110px;
79 | width: 110px;
80 | z-index: 4;
81 | }
82 | .sec,.min,.hr{
83 | display: flex;
84 | justify-content: center;
85 | position: absolute;
86 | }
87 | .sec:before{
88 | position: absolute;
89 | content: '';
90 | height: 110px;
91 | width: 3px;
92 | background: #e94560;
93 | }
94 | .sec:after{
95 | position: absolute;
96 | content: '';
97 | height: 30px;
98 | width: 7px;
99 | background: #e94560;
100 | top: 105px;
101 | border-radius: 5px;
102 | }
103 | .min:before{
104 | position: absolute;
105 | content: '';
106 | width: 1px;
107 | top: -15px;
108 | border-left: 3px solid transparent;
109 | border-right: 3px solid transparent;
110 | border-bottom: 60px solid #e94560;
111 | }
112 | .min:after{
113 | position: absolute;
114 | content: '';
115 | width: 3px;
116 | top: 40px;
117 | border-left: 2px solid transparent;
118 | border-right: 2px solid transparent;
119 | border-top: 30px solid #e94560;
120 | }
121 | .hr:before{
122 | position: absolute;
123 | content: '';
124 | width: 1px;
125 | border-left: 3px solid transparent;
126 | border-right: 3px solid transparent;
127 | border-bottom: 35px solid #bbbbbb;
128 | }
129 | .hr:after{
130 | position: absolute;
131 | content: '';
132 | width: 3px;
133 | top: 34px;
134 | border-left: 2px solid transparent;
135 | border-right: 2px solid transparent;
136 | border-top: 25px solid #bbbbbb;
137 | }
138 |
--------------------------------------------------------------------------------
/Analogue Clock/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Time-table web page
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
31 |
48 |
49 |
--------------------------------------------------------------------------------
/Drum Kit/images/crash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aswathysaji/10-Days-of-JavaScript-Projects-for-Beginners/e85843a68614a075421e497996ce92d7ea057ebd/Drum Kit/images/crash.png
--------------------------------------------------------------------------------
/Drum Kit/images/kick.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aswathysaji/10-Days-of-JavaScript-Projects-for-Beginners/e85843a68614a075421e497996ce92d7ea057ebd/Drum Kit/images/kick.png
--------------------------------------------------------------------------------
/Drum Kit/images/snare.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aswathysaji/10-Days-of-JavaScript-Projects-for-Beginners/e85843a68614a075421e497996ce92d7ea057ebd/Drum Kit/images/snare.png
--------------------------------------------------------------------------------
/Drum Kit/images/tom1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aswathysaji/10-Days-of-JavaScript-Projects-for-Beginners/e85843a68614a075421e497996ce92d7ea057ebd/Drum Kit/images/tom1.png
--------------------------------------------------------------------------------
/Drum Kit/images/tom2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aswathysaji/10-Days-of-JavaScript-Projects-for-Beginners/e85843a68614a075421e497996ce92d7ea057ebd/Drum Kit/images/tom2.png
--------------------------------------------------------------------------------
/Drum Kit/images/tom3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aswathysaji/10-Days-of-JavaScript-Projects-for-Beginners/e85843a68614a075421e497996ce92d7ea057ebd/Drum Kit/images/tom3.png
--------------------------------------------------------------------------------
/Drum Kit/images/tom4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aswathysaji/10-Days-of-JavaScript-Projects-for-Beginners/e85843a68614a075421e497996ce92d7ea057ebd/Drum Kit/images/tom4.png
--------------------------------------------------------------------------------
/Drum Kit/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Drum Kit
7 |
8 |
9 |
10 |
11 |
12 |
13 | Drum 🥁 Kit
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/Drum Kit/index.js:
--------------------------------------------------------------------------------
1 |
2 | var buttons = document.querySelectorAll(".drum"); //select all the buttons with class drum
3 |
4 | //Detecting button press
5 |
6 | for(i=0;i
2 |
3 |
4 |
5 |
6 | Guess the Number
7 |
8 |
9 |
10 |
11 |
14 |
15 | 1.2.3
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/Guess the Number/script.js:
--------------------------------------------------------------------------------
1 | // initialize a list store our guesses
2 | let guessList = [];
3 |
4 | //function to generate random number
5 | function getRandomNumber(){
6 | let randomNumber = Math.floor(Math.random()*100)+1;
7 | return randomNumber;
8 | }
9 |
10 | //initialize a variable to store the random number generted.
11 | let correctNumber = getRandomNumber();
12 |
13 | //functions that take place on loading the website
14 | window.onload = function(){
15 | document.getElementById('number-submit').addEventListener('click', playGame);
16 | document.getElementById('restart-game').addEventListener('click',initGame);
17 | }
18 |
19 | //function to play the game
20 | function playGame(){
21 | let numberGuess = document.getElementById('number-guess').value;
22 | displayResult(numberGuess);
23 | saveGuessHistory(numberGuess);
24 | displayHistory();
25 | }
26 |
27 | //function to display result
28 | function displayResult(numberGuess){
29 | if(correctNumber < numberGuess){
30 | showNumberAbove();
31 | }
32 | else if(correctNumber > numberGuess){
33 | showNumberBelow();
34 | }
35 | else{
36 | showYouWon();
37 | }
38 | }
39 |
40 | //You won function
41 | function showYouWon(){
42 | const text = "Awesome job, you got it!";
43 |
44 | let dialog = getDialog('won', text);
45 | console.log(dialog);
46 | document.getElementById('result').innerHTML = dialog;
47 | }
48 |
49 |
50 | //Yoy guessed high function
51 | function showNumberAbove(){
52 | const text = "Your guess is too high!"
53 |
54 |
55 | let dialog = getDialog('warning', text);
56 | document.getElementById('result').innerHTML = dialog;
57 | }
58 |
59 | //you guessed low function
60 | function showNumberBelow(){
61 | const text = "Your guess is too low!"
62 |
63 | let dialog = getDialog('warning', text);
64 | document.getElementById('result').innerHTML = dialog;
65 | }
66 |
67 | //function to save the history
68 | function saveGuessHistory(guess){
69 | guessList.push(guess);
70 |
71 | }
72 |
73 | function displayHistory(){
74 | let index = guessList.length -1;
75 |
76 | let list = "";
77 |
78 | while(index >= 0){
79 | list += "- " +
80 | "You guessed " + guessList[index] + "
"
81 | index-=1;
82 | }
83 |
84 | list += "
";
85 | console.log(guessList);
86 | document.getElementById('history').innerHTML = list;
87 | }
88 |
89 | //To generate the text result according to our guess
90 | function getDialog(dialogType, text){
91 | let dialog;
92 | switch(dialogType){
93 | case 'warning':
94 | dialog = ""
95 | break;
96 | case 'won':
97 | dialog = "
"
98 | break;
99 | }
100 | dialog += text;
101 | dialog += "
"
102 | return dialog;
103 | }
104 |
105 | //function to restart the game
106 | function initGame(){
107 | correctNumber = getRandomNumber();
108 | document.getElementById('result').innerHTML = "";
109 | guessList = [];
110 | displayHistory();
111 | }
112 |
--------------------------------------------------------------------------------
/Guess the Number/style.css:
--------------------------------------------------------------------------------
1 | #number-guess,#result,#history,#number-submit,#restart-game{
2 | max-width: 400px;
3 | margin: 0 auto;
4 | }
5 | #history,#result{
6 | margin-top: 16px;
7 | text-align: center;
8 | }
9 | .banner{
10 | color: #ffd23f;
11 | font-size: 90px;
12 | font-family: sans-serif;
13 | text-align: center;
14 | }
15 | footer{
16 | margin-top: 5%;
17 | }
--------------------------------------------------------------------------------
/JS Calculator/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
JS Calculator
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
22 |
23 |
24 |
25 |
26 |
28 |
29 |
30 |
31 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/JS Calculator/script.js:
--------------------------------------------------------------------------------
1 | //Get the input value
2 | function getInput(){
3 | return document.getElementById('input-value').innerText;
4 | }
5 |
6 | //Print input value
7 | function printInput(num){
8 | document.getElementById('input-value').innerText = num;
9 | }
10 |
11 | //Get the output value
12 | function getOutput(){
13 | return document.getElementById('output-value').innerText;
14 | }
15 |
16 | //Print the output value
17 | function printOutput(num){
18 | if(num==""){
19 | document.getElementById('output-value').innerText=num;
20 | }
21 | else{
22 | document.getElementById('output-value').innerText = getFormattedNumber(num);
23 | }
24 | }
25 |
26 | //Function to display number with commas
27 | function getFormattedNumber(num){
28 | if(num=="-"){
29 | return "";
30 | }
31 | let n = Number(num);
32 | let value = n.toLocaleString("en");
33 | return value;
34 | }
35 |
36 |
37 | //function to dislay number without commas
38 |
39 | function reverseNumberFormat(num){
40 | return Number(num.replace(/,/g,''));
41 | }
42 |
43 | //get all operators
44 | let operators = document.getElementsByClassName('operator');
45 |
46 |
47 | for(let i=0;i
2 |
3 |
4 |
5 |
6 | Login Form
7 |
8 |
9 |
10 |
11 |
12 |
13 | TODO APP
14 |
15 |
16 |
17 |
18 |
19 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/TODO App/script.js:
--------------------------------------------------------------------------------
1 | const addButton = document.querySelector('.add');
2 | let input = document.querySelector('.input');
3 | const container = document.querySelector('.container');
4 |
5 | class item{
6 | constructor(itemName){
7 | //create the item div
8 | this.createDiv(itemName);
9 | }
10 | createDiv(itemName){
11 | let input = document.createElement('input');
12 | input.value = itemName;
13 | input.disabled = true;
14 | input.classList.add('input-item');
15 | input.type = "text";
16 |
17 | let itemBox = document.createElement('div');
18 | itemBox.classList.add('item');
19 |
20 | let editButton = document.createElement('button');
21 | editButton.innerHTML = "Edit";
22 | editButton.classList.add('edit-Button');
23 |
24 | let removeButton = document.createElement('button');
25 | removeButton.innerHTML = "Remove";
26 | removeButton.classList.add('remove-button');
27 |
28 | container.appendChild(itemBox);
29 |
30 | itemBox.appendChild(input);
31 | itemBox.appendChild(editButton);
32 | itemBox.appendChild(removeButton);
33 |
34 | editButton.addEventListener('click',() => this.edit(input));
35 |
36 | removeButton.addEventListener('click',() => this.remove(itemBox));
37 | }
38 | edit(input){
39 | input.disabled = !input.disabled;
40 | }
41 | remove(item){
42 | container.removeChild(item);
43 | }
44 | }
45 | function check(){
46 | if(input.value != ""){
47 | new item(input.value);
48 | input.value="";
49 | }
50 | }
51 | addButton.addEventListener('click',check);
52 | window.addEventListener('keydown',(e) => {
53 | if(e.which == 13){
54 | check();
55 | }
56 | });
--------------------------------------------------------------------------------
/TODO App/style.css:
--------------------------------------------------------------------------------
1 | *{
2 | padding: 0;
3 | margin: 0;
4 | box-sizing: border-box;
5 | font-family: 'Poppins','sans-serif';
6 | }
7 | body{
8 | height: 100%;
9 | background-color: #222831;
10 | }
11 | h1{
12 | font-size: 3rem;
13 | font-weight: 700;
14 | margin: 1rem 0 3rem;
15 | text-align: center;
16 | color: #fde8cd;
17 | }
18 | .main-heading{
19 | color: #f05454;
20 | }
21 | .input-div{
22 | display: flex;
23 | justify-content: center;
24 | align-items: center;
25 | text-align: center;
26 | }
27 | .input-div .input{
28 | padding: 0.5rem 1rem;
29 | height: 50px;
30 | outline: none;
31 | border:none;
32 | width: 450px;
33 | font-size: 1.15rem;
34 | margin: 0.25rem;
35 | border-radius: 2rem;
36 | }
37 | .add{
38 | width: 50px;
39 | height: 50px;
40 | border-radius: 50%;
41 | border: none;
42 | color: white;
43 | background: #ef4f4f;
44 | margin: 0.25px;
45 | cursor: pointer;
46 | outline: none;
47 | }
48 | .add:hover{
49 | opacity: 0.7;
50 | }
51 | .container{
52 | display: flex;
53 | flex-direction: column;
54 | justify-content: center;
55 | align-items: center;
56 | text-align: center;
57 | margin-top: 2rem;
58 | }
59 | .item{
60 | padding: 0.5rem;
61 | margin-bottom: 1.5rem;
62 | border-bottom: 2px solid #ffffff;
63 | }
64 | .input-item{
65 | background: none;
66 | outline: none;
67 | border: none;
68 | color:#ffffff ;
69 | width: 350px;
70 | font-size: 1.1rem;
71 | }
72 | .edit-Button{
73 | font-size: 1.2rem;
74 | margin: 0 1rem;
75 | background: none;
76 | outline: none;
77 | color: #ef4f4f;
78 | border: none;
79 | cursor: pointer;
80 | }
81 | .remove-button{
82 | font-size: 1.2rem;
83 | background: none;
84 | outline: none;
85 | color: #ffcda3;
86 | border: none;
87 | cursor: pointer;
88 | }
--------------------------------------------------------------------------------
/Text Editor/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Text Editor
9 |
10 |
11 |
12 |
13 | Text Editor
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/Text Editor/script.js:
--------------------------------------------------------------------------------
1 |
2 | function updateText(){
3 | let text = document.getElementById('text-input').value;
4 | document.getElementById('text-output').innerText = text;
5 | }
6 |
7 | function makeBold(element){
8 | element.classList.toggle('active');
9 | document.getElementById('text-output').classList.toggle('bold');
10 | }
11 |
12 | function makeItalic(element){
13 | element.classList.toggle('active');
14 | document.getElementById('text-output').classList.toggle('italic');
15 | }
16 |
17 | function makeUnderline(element){
18 | element.classList.toggle('active');
19 | document.getElementById('text-output').classList.toggle('underline');
20 | }
21 |
22 | function alignText(element, alignType){
23 | document.getElementById('text-output').style.textAlign = alignType;
24 | let buttonList = document.getElementsByClassName('btn');
25 | for(let i=0;i