-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
53 lines (42 loc) · 1.49 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script src="js/vue.min.js"></script>
<script src="js/qrious.min.js"></script>
<link rel="stylesheet" href="css/style.css">
<title>Gerador de QRCode</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@900&display=swap" rel="stylesheet">
</head>
<body>
<div id="app">
<h1 class="display-1 my-4">{{ title }}</h1>
<div>
<input class="form-control my-2" type="text" size="25" placeholder="Digite" v-model="text">
</div>
<div v-if="text" class="output">
<img :src="newQRCode" alt="QRCode">
</div>
</div>
<!-- SCRIPT -->
<script>
new Vue({
el: "#app",
data: {
title: 'Gerador QRCode',
text: 'https://github.com/EwertonBatista',
qrcode: new QRious({ size: 300 })
},
computed: {
newQRCode(){
this.qrcode.value = this.text
return this.qrcode.toDataURL()
}
}
})
</script>
</body>
</html>