-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
135 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# <p align="center">QR Code Generator Calculator</p> | ||
|
||
## Description :- | ||
|
||
Generates the QR Code according to the given input. | ||
|
||
## Tech Stacks :- | ||
|
||
- HTML | ||
- CSS | ||
- JavaScript | ||
|
||
## Screenshots :- | ||
|
||
![image](https://github.com/Rakesh9100/CalcDiverse/assets/73993775/31af8b35-48c1-41ec-ade2-705aade649c5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>QR CODE GENERATOR</title> | ||
<link rel="stylesheet" href="style.css"> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="box"> | ||
<h2 class="heading">QR CODE GENERATOR</h2> | ||
<input type="text" name="" id="" class="input-box"> | ||
<button class="submit">Generate Qr Code</button> | ||
<img src="" alt="" height="200" width="200" class="hidden"> | ||
</div> | ||
<script src="script.js"></script> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
let input = document.querySelector('.input-box'); | ||
let submit = document.querySelector('.submit'); | ||
let img = document.querySelector('.box img'); | ||
|
||
submit.addEventListener('click' , ()=> { | ||
img.classList.add('hidden'); | ||
if(input.value == "") { | ||
alert('Please Provide Valid Details !'); | ||
img.classList.add('hidden'); | ||
} else { | ||
submit.innerHTML = "Generating Qr Code..."; | ||
setTimeout(()=> { | ||
submit.innerHTML = "Generate Qr Code"; | ||
img.classList.remove('hidden'); | ||
img.setAttribute('src' , `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${input.value}`); | ||
} , 500); | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
.container { | ||
width: 100%; | ||
min-height: 100vh; | ||
background: linear-gradient(160deg, #0093E9 0%, #80D0C7 100%); | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
letter-spacing: 1.2px; | ||
} | ||
|
||
.box { | ||
width: 100%; | ||
max-width: 350px; | ||
min-width: 240px; | ||
box-shadow: 0px 0px 10px #0093E9 , 0px 0px 20px #0093E9 , 0px 0px 40px #ffffff; | ||
display: flex; | ||
flex-direction: column; | ||
text-align: center; | ||
gap: 20px; | ||
padding: 20px 10px 40px; | ||
} | ||
|
||
.heading { | ||
font-size: 30px; | ||
padding: 0 5px; | ||
color: #ffffff; | ||
} | ||
|
||
.input-box { | ||
font-size: 28px; | ||
outline: none; | ||
border: none; | ||
border-radius: 5px; | ||
padding: 5px 10px 5px; | ||
letter-spacing: 1px; | ||
} | ||
|
||
.submit { | ||
font-size: 24px; | ||
border: none; | ||
outline: none; | ||
box-sizing: border-box; | ||
background-color: #252B4880; | ||
color: white; | ||
padding: 4px 10px; | ||
border-radius: 5px; | ||
transition: all 0.1s ease-in-out; | ||
} | ||
|
||
.submit:hover { | ||
background-color: #252B4895; | ||
transform: scale(1.02); | ||
transition: all 0.1s ease-in-out; | ||
} | ||
|
||
img { | ||
margin: 0 auto; | ||
} | ||
|
||
.hidden { | ||
display: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters