CSSMP
CSSMP
CSSMP
Annexure - I
Micro-Project Proposal
Annexure - II
Micro-Project Report
2.0 Rationale:
Requirements gathering: The first step was to gather requirements for the
QR code generator. This included identifying the different types of data
that the generator should be able to encode, as well as the desired features
of the generator, such as the ability to customize the appearance of QR
codes and add logos and other images.
Research: The next step was to research existing QR code generators in
HTML. This involved identifying the different methods that are used to
generate QR codes in HTML, as well as the different JavaScript libraries
that are available.
Design: Once the requirements and research had been completed, the
design of the QR code generator was begun. This involved designing the
user interface of the generator, as well as the algorithm that would be
used to generate QR codes.
Implementation: The next step was to implement the QR code generator.
This involved coding the user interface and the algorithm for generating
QR codes in HTML and JavaScript.
Testing: Once the generator was implemented, it was thoroughly tested to
ensure that it was working correctly. This involved testing the generator
with different types of data and different appearance options.
Deployment: The final step was to deploy the QR code generator to a
web server so that others could use it.
Client Side Scripting(22519) QR Code Generator
1. HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>QR-Code Generator</title>
</head>
<body>
<div class="container">
<p>Enter your text or URL</p>
<input type="text" placeholder="Text or URL" id="qrtext"
onkeypress="handleKeyPress(event)">
<div id="Imgbox">
<img src="" id="qrImage">
</div>
<button onclick="generateQR()">Generate QR-Code</button>
<div>
<button id="downloadbtn">Download</button>
</div>
</div>
<script>
let imgbox=document.getElementById("Imgbox")
let qrImage=document.getElementById("qrImage")
Client Side Scripting(22519) QR Code Generator
let qrtext=document.getElementById("qrtext")
let download = document.getElementById("downloadbtn");
function generateQR(){
if(qrtext.value.length > 0){
qrImage.src=" https://api.qrserver.com/v1/create-qr-code/?
size=150x150&data="+qrtext.value;
imgbox.classlist.add("show-img");
}
}
download.addEventListener("click",async()=>{
const response = await fetch(qrImage.src);
const blob = await response.blob();
const downloadLink = document.createElement("a");
downloadLink.href= URL.createObjectURL(blob);
downloadLink.download = "qrcode.jpg";
downloadLink.click();
})
</script>
</body>
</html>
2. CSS:
body{
background: rgb(57,195,251);
background: radial-gradient(circle, rgba(57,195,251,1) 0%, rgba(57,71,251,1) 100%);
}
.container{
width: 420px;
padding: 10px 25px;
top: 50%;
left: 50%;
position: absolute;
transform: translate(-50%,-50%);
background-color: beige;
border-radius: 25px;
}
.container p{
Client Side Scripting(22519) QR Code Generator
font-weight: 1000;
font-size: 30px;
margin-bottom: 8px;
text-align: center;
}
.container input{
width: 100%;
height: 25px;
border: 1px solid #494eea;
outline: 0;
padding: 10px;
padding: 10px;
margin: 10px 0 20px;
border-radius: 5px;
}
.container button:hover{
width:100%;
height: 50px;
background: #494eea;
color: #fff;
border:0;
outline: 0;
border-radius: 5px;
box-shadow:0 10px 10px rgba(0,0,0,0.1);
cursor: pointer;
margin: 20px 0;
font-weight: 500;
}
.container button{
width:100%;
height: 50px;
background: #fff;
color: #494eea;
border:0;
outline: 0;
border-radius: 5px;
box-shadow:0 10px 10px rgba(0,0,0,0.1);
cursor: pointer;
margin: 20px 0;
Client Side Scripting(22519) QR Code Generator
font-weight: 500;
}
#Imgbox{
width: 200px;
border-radius:5px;
max-height: 300px;
margin: 10px auto;
/*border: 1px solid #d1d1d1;
/*overflow: hidden;
transition: max-height 1s;*/
}
#Imgbox img{
width:100%;
padding: 10px;
margin: 10px auto;
}
#Imgbox.show-img{
max-height:300px;
margin: 10px auto;
border: 1px solid #d1d1d1;
}
8.0 Output:
Client Side Scripting(22519) QR Code Generator
I.
II.
III.
Client Side Scripting(22519) QR Code Generator
During the course of this micro-project, how to create a Web page using
HTML,CSS, JAVASCRIPT.
The QR code generator in HTML is a useful tool for generating QR codes for
any type of data. However, there are a few areas where the generator could be
improved.
One area of improvement is support for more QR code formats. The current
generator only supports the standard QR code format. However, there are other
QR code formats that can be useful, such as Micro QR codes, QR codes with
logos, and QR codes with embedded data.
Another area of improvement is customization options. The current generator
allows users to customize the size, color, and other options of their QR codes.
However, it would be useful to add more customization options, such as the
ability to change the font, add borders, and add background images.
12.0 Conclusion: