-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
160 lines (152 loc) · 5.07 KB
/
index.html
File metadata and controls
160 lines (152 loc) · 5.07 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Generator QR kodova</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
background-color: #f4f7f6;
color: #333;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
flex-direction: column;
padding: 20px;
box-sizing: border-box;
}
.container {
background-color: #ffffff;
padding: 40px;
border-radius: 12px;
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
width: 100%;
max-width: 500px;
text-align: center;
position: relative; /* Dodano za pozicioniranje jezika */
}
h1 {
color: #2c3e50;
margin-bottom: 20px;
}
form label, #form-container label {
display: block;
text-align: left;
margin-top: 15px;
margin-bottom: 5px;
font-weight: 600;
}
form input, #form-container input, form select, #form-container select, form textarea {
width: 100%;
padding: 12px;
border: 1px solid #ddd;
border-radius: 8px;
box-sizing: border-box;
font-size: 16px;
}
button {
background-color: #3498db;
color: white;
padding: 14px 20px;
margin-top: 25px;
border: none;
border-radius: 8px;
cursor: pointer;
font-size: 16px;
font-weight: 700;
width: 100%;
transition: background-color 0.3s ease;
}
button:hover {
background-color: #2980b9;
}
#qrcode {
margin-top: 30px;
padding: 10px;
border: 1px solid #ddd;
border-radius: 8px;
display: inline-block;
}
.checkbox-container {
display: flex;
align-items: center;
margin-top: 5px;
margin-bottom: 5px;
}
.checkbox-container input[type="checkbox"] {
width: 20px !important;
height: 20px;
margin-right: 5px;
flex-shrink: 0;
}
.checkbox-container label {
font-weight: normal;
margin: 0;
padding: 0;
flex-grow: 1;
}
.language-switcher {
position: absolute;
top: 15px;
right: 15px;
}
.language-switcher button {
background: none;
color: #3498db;
border: none;
padding: 5px;
cursor: pointer;
font-weight: bold;
font-size: 16px;
width: auto;
margin: 0 2px;
transition: color 0.2s;
}
.language-switcher button:hover {
color: #2980b9;
}
.language-switcher button.active {
color: #2980b9;
}
.language-switcher span {
color: #ccc;
font-weight: bold;
}
</style>
</head>
<body>
<div class="container">
<div class="language-switcher">
<button id="lang-en">EN</button><span>|</span><button id="lang-hr">HR</button>
</div>
<h1 id="main-title">Generator QR kodova</h1>
<p id="main-subtitle">Brzo i jednostavno pretvorite bilo koji tekst, web adresu, e-mail ili telefonski broj u funkcionalan QR kod.</p>
<form id="mainForm">
<label for="qrType" id="label-qrType">Odaberi tip QR koda:</label>
<select id="qrType" name="qrType">
<option value="url">URL</option>
<option value="text">Tekst</option>
<option value="email">E-mail</option>
<option value="sms">SMS</option>
<option value="wifi">Wi-Fi</option>
<option value="vcard">vCard (Kontakt)</option>
<option value="bitcoin">Bitcoin</option>
<option value="twitter">Twitter</option>
<option value="facebook">Facebook</option>
</select>
<div id="form-container">
</div>
<button type="button" id="btn-generate" onclick="generateQRCode()">Generiraj QR kod</button>
<button type="button" id="btn-download" onclick="generatePdf()">Generiraj PDF</button>
<button type="button" id="btn-reset" onclick="updateForm()">Ispočetka</button>
</form>
<div id="qrcode"></div>
</div>
<script src="https://cdn.rawgit.com/davidshimjs/qrcodejs/gh-pages/qrcode.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
<script src="script.js"></script>
</body>
</html>