Skip to content

Commit e19cb91

Browse files
committed
Add QR Code Generator by jhanavishukla
1 parent 9021458 commit e19cb91

5 files changed

Lines changed: 116 additions & 0 deletions

File tree

‎QRCode/jhanavishukla/README.md‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
QR Code Generator
2+
A simple and responsive QR Code Generator built using HTML, CSS, and JavaScript. The project allows users to generate QR codes dynamically from user input.
3+
✨ Features
4+
- Generate QR codes from user input
5+
- Simple and intuitive interface
6+
- Responsive design
7+
- Interactive JavaScript functionality
8+
- No backend required
9+
🛠️ Technologies Used
10+
- HTML5
11+
- CSS3
12+
- JavaScript
13+
🚀 Getting Started
14+
Open qrcode.html in your browser.
15+
You can also use the Live Server extension in VS Code.
16+
📸 Screenshot
17+
18+
👩‍💻 Author
19+
Jhanavi Shukla
20+
Computer Science & Engineering Student
21+
Ramdeobaba University, Nagpur
22+
GitHub: https://github.com/jhanavishukla
23+
LinkedIn: https://www.linkedin.com/in/jhanavi-shukla-8b18952ab

‎QRCode/jhanavishukla/qrcode.css‎

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
*{
2+
padding:0;
3+
margin:0;
4+
box-sizing:border-box;
5+
}
6+
body{
7+
background-color:rgb(15, 15, 15);
8+
display:flex;
9+
justify-content:center;
10+
align-items:center;
11+
height:100vh;
12+
13+
}
14+
.qr-container{
15+
background-color:green;
16+
padding:20px;
17+
border-radius:20px;
18+
box-shadow :0 0 10px black;
19+
height:500px;
20+
width:500px;
21+
22+
23+
}
24+
h2{
25+
text-align:center;
26+
padding-bottom:20px;
27+
font-size:50px;
28+
}
29+
#qr-input{
30+
display:block;
31+
width:100%;
32+
margin-bottom:10px;
33+
padding:10px;
34+
font-size:16px;
35+
border-radius:10px;
36+
color:black;
37+
background-color:white;
38+
border:none;
39+
40+
}
41+
#qr-button{
42+
border-radius:10px;
43+
display:block;
44+
width:100%;
45+
color:rgb(130, 121, 121);
46+
background-color:rgb(15, 15, 15);
47+
padding:10px;
48+
border-radius:10px;
49+
font-size:16px;
50+
box-shadow:0 0 10px black;
51+
border:none;
52+
}
53+
#qr-img{
54+
display:block;
55+
margin:20px auto;
56+
width:50%;
57+
}

‎QRCode/jhanavishukla/qrcode.html‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>QR Code Generator</title>
7+
<link rel="stylesheet" href="qrcode.css">
8+
</head>
9+
<body>
10+
11+
<div class="qr-container">
12+
<h2>QR Code Generator</h2>
13+
<input type="text" id="qr-input" placeholder="Paste your URL here or type it out">
14+
<button id="qr-button">Click here to Generate QR Code</button>
15+
<img src="" alt="" id="qr-img">
16+
</div>
17+
<script src ="qrcode.js"></script>
18+
</body>
19+
</html>

‎QRCode/jhanavishukla/qrcode.js‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const qrinput=document.getElementById("qr-input")
2+
const qrimg=document.getElementById("qr-img")
3+
const qrbutton =document.getElementById("qr-button")
4+
5+
qrbutton.addEventListener("click", () => {
6+
const inputvalue=qrinput.value;
7+
console.log(inputvalue);
8+
if(!inputvalue){
9+
alert("Please enter a value to generate QR Code");
10+
return;
11+
}
12+
else{
13+
qrimg. src=`https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=${inputvalue}`;
14+
qrimg.alt=`QR Code for ${inputvalue}`;
15+
}
16+
17+
});
73.3 KB
Loading

0 commit comments

Comments
 (0)