generated from fastn-community/business-card-template-old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ftd
280 lines (203 loc) · 5.66 KB
/
index.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
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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
-- import: fastn-community.github.io/business-card/docs
-- import: fastn-community.github.io/site-doc
-- import: gsalunke.github.io/green-leaf-card
-- $site-doc.copyright-info: Copyright © 2023 - [gsalunke ](https://gsalunke.github.io/green-leaf-card)
;; home-card component arguments (with default values) ----------------------
;; caption name:
;; string package-name: business-card
;; string package-full-name: fastn-community.github.io/business-card
;; string license-url: https://github.com/fastn-community/business-card/blob/main/LICENSE
;; module c: business-card
;; optional string company-name:
;; optional string company-slogan:
;; optional ftd.image-src qr-code:
;; optional string title:
;; optional string phone-no:
;; optional string email:
;; optional string address:
;; optional ftd.image-src logo: $business-card.default-card-logo
;; optional ftd.image-src avatar:
;; optional string github:
;; optional string website:
;; --------------------------------------------------------------------------
-- docs.home-card: John Doe
package-name: green-leaf-card
package-full-name: gsalunke.github.io/green-leaf-card
license-url: https://github.com/gsalunke/green-leaf-card/blob/main/LICENSE
title: Software Developer
phone-no: +123-4567890
email: johndoe@xyz.com
address: 123 Anywhere, Any City
github: https://github.com/gsalunke/green-leaf-card
c: green-leaf-card
logo: $assets.files.assets.ipsum-logo.svg
website: www.johndoe.com
qr-code: $assets.files.assets.qr-code.png
;; ---------------- DEFINE YOUR CARD COMPONENTS -----------------------
;; Implement your card and card-back components below
-- component front:
caption name:
optional string company-name:
optional string title:
optional string phone-no:
optional string email:
optional string address:
optional ftd.image-src logo:
optional ftd.image-src avatar:
optional string company-slogan:
optional ftd.image-src qr-code:
optional string website:
-- ftd.column:
width.fixed.px: 600
width if { ftd.device == "mobile" }: fill-container
height.fixed.px: 297
spacing.fixed.px: 10
padding-vertical.px: 34
border-width.px: 1
border-color: $inherited.colors.border-strong
background.solid: $inherited.colors.background.step-2
z-index: 0
-- ftd.column:
width: fill-container
height: fill-container
anchor: parent
left.px: 0
top.px: 0
background.image: $bg-image
z-index: 1
-- end: ftd.column
-- ftd.image:
if: { front.qr-code != NULL }
src: $front.qr-code
width.fixed.px: 64
height.fixed.px: 64
anchor: parent
right.px: 12
top.px: 12
z-index: 2
-- ftd.column:
padding-left.px: 94
align-content: left
width: fill-container
-- ftd.text: $front.name
role: $inherited.types.heading-medium
color: $inherited.colors.text
-- ftd.text: $front.title
role: $inherited.types.fine-print
color: $inherited.colors.text
padding-left.px: 2
-- ftd.column:
width.fixed.percent: 70
spacing.fixed.px: 8
margin-top.px: 34
-- ftd.row:
if: { front.phone-no != NULL }
spacing.fixed.px: 16
-- ftd.image:
src: $assets.files.assets.phone-icon.svg
width.fixed.px: 24
height.fixed.px: 24
-- ftd.text: $front.phone-no
role: $inherited.types.fine-print
color: $inherited.colors.text
-- end: ftd.row
-- ftd.row:
if: { front.email != NULL }
spacing.fixed.px: 16
-- ftd.image:
src: $assets.files.assets.email-icon.svg
width.fixed.px: 24
height.fixed.px: 24
-- ftd.text: $front.email
role: $inherited.types.fine-print
color: $inherited.colors.text
-- end: ftd.row
-- ftd.row:
if: { front.website != NULL }
spacing.fixed.px: 16
-- ftd.image:
src: $assets.files.assets.web-icon.svg
width.fixed.px: 24
height.fixed.px: 24
-- ftd.text: $front.website
role: $inherited.types.fine-print
color: $inherited.colors.text
-- end: ftd.row
-- ftd.row:
if: { front.address != NULL }
spacing.fixed.px: 16
-- ftd.image:
src: $assets.files.assets.map-icon.svg
width.fixed.px: 24
height.fixed.px: 24
-- ftd.text: $front.address
role: $inherited.types.fine-print
color: $inherited.colors.text
-- end: ftd.row
-- end: ftd.column
-- end: ftd.column
-- end: ftd.column
-- end: front
-- component back:
optional caption name:
optional string company-name:
optional string title:
optional string phone-no:
optional string email:
optional string address:
optional ftd.image-src logo:
optional ftd.image-src avatar:
optional string company-slogan:
optional ftd.image-src qr-code:
optional string website:
-- ftd.column:
width.fixed.px: 600
width if { ftd.device == "mobile" }: fill-container
height.fixed.px: 297
spacing.fixed.px: 10
background.solid: $inherited.colors.background.step-2
padding-vertical.px: 34
border-width.px: 1
border-color: $inherited.colors.border-strong
z-index: 0
-- ftd.column:
width: fill-container
height: fill-container
anchor: parent
left.px: 0
top.px: 0
background.image: $bg-image
z-index: 1
-- end: ftd.column
-- ftd.column:
width: fill-container
height: fill-container
align-content: center
spacing.fixed.px: 8
-- ftd.image: $back.logo
if: { back.logo != NULL }
width.fixed.px: 250
-- ftd.text: $back.company-slogan
if: { back.company-slogan != NULL }
role: $inherited.types.copy-regular
color: $inherited.colors.text
-- end: ftd.column
-- end: ftd.column
-- end: back
;; ------------------------- VARIABLES --------------------------
-- string front-sample-code:
\-- import: gsalunke.github.io/green-leaf-card
\-- green-leaf-card.front: gsalunke
title: Software Developer
email: gsalunke@xyz.com
address: 123 Anywhere, Any City
logo: $assets.files.assets.ipsum-logo.svg
-- string back-sample-code:
\-- import: gsalunke.github.io/green-leaf-card
\-- green-leaf-card.back:
logo: $assets.files.assets.ipsum-logo.svg
company-slogan: If you can type you can code
-- ftd.background-image bg-image:
src: $assets.files.assets.background-image.png
repeat: no-repeat
background-size: cover