Skip to content

Commit 1fb87c5

Browse files
committed
form validation
2 parents ca534c6 + d35a8b4 commit 1fb87c5

File tree

3 files changed

+107
-2
lines changed

3 files changed

+107
-2
lines changed

17. Image Gallery/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Image Gallery _(HTML, CSS, Js)_
2+
![alt text](https://github.com/AkashKobal/web-development/blob/main/16.%20Image%20Gallery/Screenshot%20(325).png)

5. QR Code Generator/README.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,102 @@
11
# QR Code Generator _(HTML, CSS, and Js)_ <br>
22
![alt text](https://github.com/AkashKobal/web-development/blob/main/5.%20QR%20Code%20Generator/qr%20code%20generator.png)
3+
## _HTML_
4+
```html
5+
<!DOCTYPE html>
6+
<html lang="en">
7+
8+
<head>
9+
<meta charset="UTF-8">
10+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
11+
<title>Generate QR</title>
12+
<link rel="stylesheet" href="style.css">
13+
<script src="script.js"></script>
14+
</head>
15+
16+
<body>
17+
<div class="container">
18+
<p>Enter your Text or URL</p>
19+
<input type="text" placeholder="Text or URL" id="userInput" /><br>
20+
<div id="qrBox">
21+
<img id="qrImage" src="" />
22+
</div> <!--to display the QR code -->
23+
<button class="generateBtn" id="generateBtn" onclick="generateQRCode()">Generate</button>
24+
</div>
25+
</body>
26+
27+
</html>
28+
```
29+
## _Javascript_
30+
```js
31+
function generateQRCode() {
32+
let userInput = document.getElementById('userInput');
33+
let qrBox = document.getElementById('qrBox');
34+
let qrImage = document.getElementById('qrImage');
35+
36+
if(userInput.value ==""){
37+
alert("Please enter a Text or URL");
38+
}else{
39+
40+
qrImage.src = "https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=" + userInput.value;
41+
}
42+
43+
44+
}
45+
```
46+
## _CSS_
47+
```css
48+
body {
49+
background-color: rgba(39, 105, 219, 0.693);
50+
}
51+
52+
.container {
53+
position: absolute;
54+
top: 50%;
55+
left: 50%;
56+
transform: translate(-50%, -50%);
57+
background-color: rgba(255, 255, 255, 0.824);
58+
padding: 20px;
59+
border-radius: 20px;
60+
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.5);
61+
text-align: center;
62+
63+
}
64+
65+
.container p {
66+
font-size: 20px;
67+
font-weight: bold;
68+
font-family: Georgia, 'Times New Roman', Times, serif;
69+
}
70+
71+
.container input {
72+
padding: 5px;
73+
margin-top: 10px;
74+
margin-bottom: 10px;
75+
border-radius: 8px;
76+
border: 1px solid #000;
77+
font-size: 20px;
78+
font-family: Georgia, 'Times New Roman', Times, serif;
79+
}
80+
81+
.container button {
82+
padding: 10px;
83+
margin-top: 10px;
84+
margin-bottom: 10px;
85+
border-radius: 8px ;
86+
border-color: transparent;
87+
/* border: 1px solid #000; */
88+
font-size: 20px;
89+
font-family: Georgia;
90+
letter-spacing: 1px;
91+
background-color: #3e66f6ea;
92+
color: white;
93+
cursor: pointer;
94+
}
95+
96+
.container button:hover {
97+
background-color: #1a3fc7;
98+
}
99+
body:hover{
100+
background-color: rgb(10, 24, 66);
101+
}
102+
```

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
![alt text](https://github.com/AkashKobal/web-development/blob/main/2.%20Random%20Password%20Generator/random%20password%20generator%20output.png)
77

88
## BMI Calculator _(HTML, CSS, and Js)_ <br>
9-
![alt text](https://github.com/AkashKobal/web-development/blob/main/3.%20Body%20Mass%20Index%20Calculator/bmi%20calculator%20output.png)
9+
![alt text](https://github.com/AkashKobal/web-development/blob/main/3.%20Body%20Mass%20Index%20Calculator/bmi%20calculator%20output.png)
1010

1111
## Account Registration Form _(HTML, CSS, and Js)_ <br>
1212
![alt text](https://github.com/AkashKobal/web-development/blob/main/4.%20Account%20Registration%20Form/account%20registration%20form%20output.png)
1313

1414
## QR Code Generator _(HTML, CSS, and Js)_ <br>
15-
![alt text](https://github.com/AkashKobal/web-development/blob/main/5.%20QR%20Code%20Generator/qr%20code%20generator.png)
15+
![alt text](https://github.com/AkashKobal/web-development/blob/main/5.%20QR%20Code%20Generator/qr%20code%20generator.png)
1616

1717
## Login page _(HTML, CSS, and Js)_ <br>
1818
![alt text](https://github.com/AkashKobal/web-development/blob/main/6.%20Login%20Page/login%20page%20output.png)
@@ -51,4 +51,7 @@
5151
## Form validation _(HTML, CSS, Js)_
5252
![alt text](https://github.com/AkashKobal/web-development/blob/main/15.%20Form%20Validation/output.png)
5353

54+
## Image Gallery _(HTML, CSS, Js)_
55+
![alt text](https://github.com/AkashKobal/web-development/blob/main/16.%20Image%20Gallery/Screenshot%20(325).png)
56+
5457

0 commit comments

Comments
 (0)