-
Notifications
You must be signed in to change notification settings - Fork 0
/
qrcg.html
252 lines (235 loc) · 7.27 KB
/
qrcg.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
</><!DOCTYPE html>
<html>
<head>
<title>QR Code Generator</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Include Bootstrap for styling -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" />
<style>
header {
background-color: #F79F79;
color: white;
padding: 10px;
text-align: center;
width: 100%;
position: flex;
}
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
.wrapper{
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: 1;
background: linear-gradient(-135deg, #F79F79, #F79F79);
/* background: linear-gradient(375deg, #1cc7d0, #2ede98); */
/* clip-path: circle(25px at calc(0% + 45px) 45px); */
clip-path: circle(0px at calc(100% - 45px) 45px);
transition: all 0.2s ease-in-out;
}
#active:checked ~ .wrapper{
clip-path: circle(75%);
}
.menu-btn{
position: absolute;
z-index: 2;
right: 10px;
/* left: 20px; */
top: 5px;
height: 50px;
width: 50px;
text-align: center;
line-height: 50px;
border-radius: 50%;
font-size: 30px;
color: #fff;
cursor: pointer;
/* background: linear-gradient(375deg, #1cc7d0, #2ede98); */
transition: all 0.2s ease-in-out;
}
#active:checked ~ .menu-btn{
color: #fff;
}
#active:checked ~ .menu-btn i:before{
content: "\f00d";
}
.wrapper ul{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
list-style: none;
text-align: center;
}
.wrapper ul li{
margin: 15px 0;
}
.wrapper ul li a{
color: none;
text-decoration: none;
font-size: 18px;
font-weight: 500;
padding: 5px 30px;
color: #fff;
position: relative;
line-height: 50px;
transition: 0.2s ease;
}
.wrapper ul li a:after{
position: absolute;
content: "";
background: #fff;
width: 100%;
height: 50px;
left: 0;
border-radius: 50px;
transform: scaleY(0);
z-index: -1;
transition: transform 0.1s ease;
}
.wrapper ul li a:hover:after{
transform: scaleY(1);
}
.wrapper ul li a:hover{
color: #5582ff;
}
input[type="checkbox"]{
display: none;
}
.content{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: -1;
text-align: center;
width: 100%;
color: #202020;
}
.content .title{
font-size: 40px;
font-weight: 700;
}
.content p{
font-size: 35px;
font-weight: 600;
}gold;
}
.qr-code {
max-width: 200px;
margin: 10px;
}
/* Override Bootstrap button styles */
.btn.btn-default {
background-color: #4caf50;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
}
.btn.btn-default:hover {
background-color: #45a049;
}
.footer {
background-color: #9DD9D2;
color: black;
padding: 10px;
text-align: center;
width: 100%;
position: fixed;
bottom: 0;
left: 0;
z-index: 0;
}
@media screen and (max-height: 600px) {
.footer {
position: relative;
}
} }
}
</style>
</head>
<body>
<header>
<h1><a href="qrcg.html" style="color: white; text-decoration: none;">QR Generator</a></h1>
<input type="checkbox" id="active">
<label for="active" class="menu-btn"><i class="fas fa-bars"></i></label>
<div class="wrapper">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="qrcg.html">QR Generator</a></li>
<li><a href="Age.html">Age Calculator</a></li>
<li><a href="date.html">Date Calculator</a></li>
<li><a href="mailto:developers.service.web@gmail.com?subject=/Developer%20contact/<write%20your%20mail%20subject%20here>&body=/Developer%20contact.%20%20Do%20not%20delete%20these%20texts./">Contact</a></li>
</ul>
</div>
</header>
<div>
<h1 style="background-color:red">
QR not available right now
</h1>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-sm-offset-2 col-sm-8">
<div class="text-center">
<img src="https://chart.googleapis.com/chart?cht=qr&chl=Hello+World&chs=160x160&chld=L|0" class="qr-code img-thumbnail img-responsive" />
<p id="generatedSentence" style="display: none;">QR Code generated successfully!</p>
</div>
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2" for="content">Content:</label>
<div class="col-sm-10">
<input type="text" size="60" class="form-control" id="content" placeholder="Enter content" />
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<span style="margin-left: 40px;"></span>
<button type="button" class="btn btn-default" id="generate">Generate</button>
<span style="margin-right: 100px;"></span>
<button type="button" class="btn btn-primary" id="download" style="display: none;">Download</button>
</div>
</div>
</div>
</div>
<p style="display:block;margin-top:150px;">    To download QR code, click on download and on the next <ul></ul>     screen long press/right click and click on download image. </p>
<div class="footer">
<p>© 2024 QR Code Generator All rights reserved.<div></div><a href="mailto:developers.service.web@gmail.com?subject=Age%20calculator/<write%20your%20mail%20subject%20here>&body=Age%20calculator.%20%20Do%20not%20delete%20these%20texts. " style="text-decoration: none;">Contact Developer</a> </p>
</div>
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script>
$(function() {
$('#generate').click(function() {
let content = $('#content').val().trim();
if (content === "") {
$('#generatedSentence').text("Please enter text").css("color", "red").show();
} else {
let finalURL = 'https://chart.googleapis.com/chart?cht=qr&chl=' +
encodeURIComponent(content) +
'&chs=160x160&chld=L|0';
$('.qr-code').attr('src', finalURL);
$('#download').show(); // Show the download button
$('#generatedSentence').text("QR code generated successfully").css("color", "green").show();
}
});
$('#download').click(function() {
var link = document.createElement('a');
link.href = $('.qr-code').attr('src');
link.download = 'qr_code.png';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
});
});
</script>
</body>
</html>