File tree Expand file tree Collapse file tree 15 files changed +368
-0
lines changed
Expand file tree Collapse file tree 15 files changed +368
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "editor.quickSuggestions" : {
3+ "comments" : " on" ,
4+ "strings" : " on" ,
5+ "other" : " on"
6+ },
7+ "liveServer.settings.port" : 5502
8+ }
Original file line number Diff line number Diff line change 1+ body {
2+ text-align : center;
3+ justify-content : center;
4+ text-decoration : solid;
5+ background-color : white;
6+ font-weight : bolder;
7+ }
8+
9+ input {
10+ width : 25% ;
11+ margin : 20px ;
12+ height : 2rem ;
13+ }
14+
15+ /* navbar */
16+
17+ .nav-bar {
18+ display : flex;
19+ flex-wrap : wrap;
20+ align-items : center;
21+ justify-content : center;
22+ padding : 1rem ;
23+ margin-bottom : 5px ;
24+ gap : 1rem ;
25+ border-bottom : solid 1px # aaa ;
26+ background-color : # aaa ;
27+ }
28+
29+ nav a {
30+ min-width : 9rem ;
31+ border-radius : 0.3rem ;
32+ border : solid black;
33+ background-color : aliceblue;
34+ text-decoration-line : none;
35+ padding : 5px ;
36+ }
37+
38+ * {
39+ box-sizing : border-box;
40+ }
41+
42+ /* navbar */
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+
4+ < head >
5+ < meta charset ="UTF-8 ">
6+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
7+ < title > BMI Calculator</ title >
8+ < link rel ="stylesheet " href ="index.css ">
9+ < script src ="index.js " defer > </ script >
10+ </ head >
11+
12+ < body >
13+ < nav class ="nav-bar ">
14+ < a href ="/ " aria-current ="page "> Home</ a >
15+ < a target ="_blank " href ="https://youtu.be/2s2sZm5gy-o?feature=shared "> Youtube channel</ a >
16+ < a target ="_blank " href ="https://github.com/RohitSharma50 "> Github</ a >
17+
18+ </ nav >
19+ < div class ="value "> Height (cm):</ div >
20+ < input type ="number " id ="height-input " placeholder ="Enter Height ">
21+
22+ < div > Weight (kg):</ div >
23+ < input type ="number " id ="weight-input " placeholder ="Enter Weight ">
24+ < div >
25+ < button type ="submit " onclick ="bmiCalculate() "> Calculate</ button >
26+ </ div >
27+ < div id ="result "> your BMI is :</ div >
28+ </ body >
29+
30+ </ html >
Original file line number Diff line number Diff line change 1+ function bmiCalculate ( ) {
2+ let weight = document . getElementById ( 'weight-input' ) . value ;
3+ let height = document . getElementById ( 'height-input' ) . value ;
4+
5+ let bmi = ( ( weight * 1000 ) / ( height * height ) ) . toFixed ( 2 ) ;
6+ document . getElementById ( 'result' ) . innerText += bmi ;
7+
8+ }
9+
10+
11+
12+
Original file line number Diff line number Diff line change 1+ .nav-bar {
2+ display : flex;
3+ flex-wrap : wrap;
4+ align-items : center;
5+ justify-content : center;
6+ padding : 1rem ;
7+ margin-bottom : 5px ;
8+ gap : 1rem ;
9+ border-bottom : solid 1px # aaa ;
10+ background-color : # aaa ;
11+ }
12+
13+ nav a {
14+ min-width : 9rem ;
15+ border-radius : 0.3rem ;
16+ border : solid black;
17+ background-color : aliceblue;
18+ text-decoration-line : none;
19+ padding : 5px ;
20+ }
21+
22+ * {
23+ box-sizing : border-box;
24+ }
25+
26+ /* navbar */
27+
28+
29+ .form-section {
30+ text-align : center;
31+ padding : 15rem ;
32+ border-width : 2px ;
33+
34+ }
35+
36+ .input-field {
37+ border-color : blue;
38+ border-style : solid;
39+ }
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+
4+ < head >
5+ < meta charset ="UTF-8 ">
6+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
7+ < title > Guess the number</ title >
8+ < link rel ="stylesheet " href ="index.css ">
9+ </ head >
10+ < nav class ="nav-bar ">
11+ < a href ="/index.html "> Home</ a >
12+ < a target ="_blank " href ="https://youtu.be/2s2sZm5gy-o?feature=shared "> Youtube channel</ a >
13+ < a target ="_blank " href ="https://github.com/RohitSharma50 "> Github</ a >
14+
15+
16+ </ nav >
17+
18+ < body >
19+ < form class ="form-section ">
20+ < label > Upload File :</ label >
21+ < input type ="file " class ="input-field ">
22+ </ form >
23+ </ body >
24+
25+ </ html >
Original file line number Diff line number Diff line change 1+ body {
2+ text-align : center;
3+ justify-content : center;
4+ text-decoration : solid;
5+ background-color : white;
6+ font-weight : bolder;
7+ }
8+
9+ input {
10+ width : 25% ;
11+ margin : 20px ;
12+ height : 2rem ;
13+ }
14+
15+ /* navbar */
16+
17+ .nav-bar {
18+ display : flex;
19+ flex-wrap : wrap;
20+ align-items : center;
21+ justify-content : center;
22+ padding : 1rem ;
23+ margin-bottom : 5px ;
24+ gap : 1rem ;
25+ border-bottom : solid 1px # aaa ;
26+ background-color : # aaa ;
27+ }
28+
29+ nav a {
30+ min-width : 9rem ;
31+ border-radius : 0.3rem ;
32+ border : solid black;
33+ background-color : aliceblue;
34+ text-decoration-line : none;
35+ padding : 5px ;
36+ }
37+
38+ * {
39+ box-sizing : border-box;
40+ }
41+
42+ /* navbar */
43+ div {
44+ color : white solid;
45+ }
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+
4+ < head >
5+ < meta charset ="UTF-8 ">
6+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
7+ < title > Guess the number</ title >
8+ < link rel ="stylesheet " href ="index.css ">
9+ </ head >
10+
11+ < body >
12+ < nav class ="nav-bar ">
13+ < a href ="/index.html "> Home</ a >
14+ < a target ="_blank " href ="https://youtu.be/2s2sZm5gy-o?feature=shared "> Youtube channel</ a >
15+ < a target ="_blank " href ="https://github.com/RohitSharma50 "> Github</ a >
16+
17+ </ nav >
18+ < main >
19+ < input type ="number " class ="input-value ">
20+ < button type ="button " class ="button "> Guess</ button >
21+ < p > Random Number is: < span id ="div "> </ span > </ p >
22+ < p > Your Guess is: < span id ="num "> </ span > </ p >
23+
24+ </ main >
25+ < script src ="index.js " defer > </ script >
26+
27+ </ body >
28+
29+ </ html >
Original file line number Diff line number Diff line change 1+ const input_value = document . querySelector ( '.input-value' ) ;
2+ const guess = document . querySelector ( '.button' ) ;
3+ const div = document . getElementById ( 'div' ) ;
4+ const number = document . getElementById ( 'num' ) ;
5+ guess . addEventListener ( 'click' , ( ) => {
6+ const num = Math . floor ( Math . random ( ) * ( 100 - 0 ) ) ; // Generates random number between 0 and 99
7+ div . innerText = num ; // Display the random number in the div
8+
9+ number . innerText = input_value . value ;
10+ } ) ;
11+
Original file line number Diff line number Diff line change 1+ /* navbar */
2+
3+ .nav-bar {
4+ display : flex;
5+ flex-wrap : wrap;
6+ align-items : center;
7+ justify-content : center;
8+ padding : 1rem ;
9+ margin-bottom : 5px ;
10+ gap : 1rem ;
11+ border-bottom : solid 1px # aaa ;
12+ background-color : # aaa ;
13+ }
14+
15+ nav a {
16+ min-width : 9rem ;
17+ border-radius : 0.3rem ;
18+ border : solid black;
19+ background-color : aliceblue;
20+ text-decoration-line : none;
21+ padding : 5px ;
22+ }
23+
24+ * {
25+ box-sizing : border-box;
26+ }
27+
28+ /* navbar */
You can’t perform that action at this time.
0 commit comments