generated from fastn-stack/fastn-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqr-code.ftd
97 lines (47 loc) · 1.34 KB
/
qr-code.ftd
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
-- import: fastn-stack.github.io/fastn-js/assets
-- ftd.column:
spacing.fixed.px: 40
-- show: https://fastn.com
id: fastn
color: $ow
bg-color: $yb
level: 100
-- show: https://fastn.com
id: fastn-1
-- end: ftd.column
-- component show:
caption url:
string id:
optional integer width:
optional integer height:
optional ftd.color color:
optional ftd.color bg-color:
optional integer level:
-- ftd.column:
id: $show.id
-- ftd.image:
src: $qr-code-generate(id = $show.id, url = $show.url, width = $show.width, height = $show.height, color = $show.color, bgcolor = $show.bg-color, darkmode = $ftd.dark-mode, level = $show.level)
-- end: ftd.column
-- end: show
-- ftd.image-src qrCode(id):
string id:
string url:
js: [//cdn.rawgit.com/davidshimjs/qrcodejs/gh-pages/qrcode.min.js, $assets.files.qrCode.js]
qrCodeGenerate(id, url)
-- ftd.image-src qr-code-generate(id,url,width,height,color,bgcolor):
string id:
string url:
optional integer width:
optional integer height:
optional ftd.color color:
optional ftd.color bgcolor:
boolean darkmode:
optional integer level:
js: [//cdn.rawgit.com/davidshimjs/qrcodejs/gh-pages/qrcode.min.js, $assets.files.qrCode.js]
qrCodeGenerateWithConfig(id, url, width, height, color, bgcolor, darkmode, level)
-- ftd.color ow:
light: #ef8435
dark: black
-- ftd.color yb:
light: yellow
dark: white