dokio-create-template 1.0.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +153 -43
- package/bin/cli.js +1 -1
- package/dist/creator.d.ts +2 -0
- package/dist/creator.d.ts.map +1 -0
- package/dist/creator.js +170 -0
- package/dist/creator.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +32 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +35 -5
- package/templates/email/CHANGELOG.md +1 -0
- package/templates/general/CHANGELOG.md +1 -0
- package/templates/general/data.yaml +7 -10
- package/templates/general/index.html +14 -15
- package/templates/general/style.scss.hbs +2 -3
- package/templates/pdf/CHANGELOG.md +1 -0
- package/templates/pdf/index.html +14 -14
- package/templates/pdf/style.scss.hbs +1 -8
- package/EXAMPLES.md +0 -609
- package/INSTALLATION.md +0 -516
- package/QUICKSTART.md +0 -218
- package/SETUP.md +0 -192
- package/STRUCTURE.txt +0 -0
- package/index.js +0 -1
- package/lib/creator.js +0 -144
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
</div>
|
|
1
|
+
{{!--
|
|
2
|
+
|
|
3
|
+
The HTML boilerplate is already in the Dokio Hub.
|
|
4
|
+
Just wrap your content in a div with a class of "page" and you're good to go!
|
|
5
|
+
|
|
6
|
+
Dokio Reference: https://rb.gy/u57yes
|
|
7
|
+
|
|
8
|
+
--}}
|
|
9
|
+
|
|
10
|
+
<div class="page">
|
|
11
|
+
<div class="content">
|
|
12
|
+
<h1 class="heading">{{{heading}}}</h1>
|
|
13
|
+
<div class="body-text">{{{body-text}}}</div>
|
|
14
14
|
</div>
|
|
15
|
-
</
|
|
16
|
-
</html>
|
|
15
|
+
</div>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
// Mode: General (Image)
|
|
1
|
+
{{!-- MODE: General Template (Image)--}}
|
|
3
2
|
|
|
4
3
|
* {
|
|
5
4
|
margin: 0;
|
|
@@ -13,7 +12,7 @@ body {
|
|
|
13
12
|
-moz-osx-font-smoothing: grayscale;
|
|
14
13
|
}
|
|
15
14
|
|
|
16
|
-
.
|
|
15
|
+
.page {
|
|
17
16
|
width: 400px;
|
|
18
17
|
height: 400px;
|
|
19
18
|
display: flex;
|
package/templates/pdf/index.html
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
</
|
|
1
|
+
{{!--
|
|
2
|
+
|
|
3
|
+
The HTML boilerplate is already in the Dokio Hub.
|
|
4
|
+
Just wrap your content in a div with a class of "page" and you're good to go!
|
|
5
|
+
|
|
6
|
+
Dokio Reference: https://rb.gy/u57yes
|
|
7
|
+
|
|
8
|
+
--}}
|
|
9
|
+
|
|
10
|
+
<div class="page">
|
|
11
|
+
<div class="content">
|
|
12
|
+
<h1 class="heading">{{{heading}}}</h1>
|
|
13
|
+
<div class="body-text">{{{body-text}}}</div>
|
|
13
14
|
</div>
|
|
14
|
-
</
|
|
15
|
-
</html>
|
|
15
|
+
</div>
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
// Mode: PDF
|
|
3
|
-
// Prince Version: {{PRINCE_VERSION}}
|
|
1
|
+
{{!-- MODE: PDF Template --}}
|
|
4
2
|
|
|
5
|
-
// Page setup
|
|
6
3
|
@page {
|
|
7
4
|
size: A4 portrait;
|
|
8
5
|
margin: 15mm;
|
|
@@ -20,12 +17,10 @@
|
|
|
20
17
|
}
|
|
21
18
|
}
|
|
22
19
|
|
|
23
|
-
// PDF color conversion
|
|
24
20
|
@prince-pdf {
|
|
25
21
|
prince-pdf-color-conversion: full;
|
|
26
22
|
}
|
|
27
23
|
|
|
28
|
-
// Reset
|
|
29
24
|
* {
|
|
30
25
|
margin: 0;
|
|
31
26
|
padding: 0;
|
|
@@ -92,13 +87,11 @@ body {
|
|
|
92
87
|
}
|
|
93
88
|
}
|
|
94
89
|
|
|
95
|
-
// Utility: prevent orphans and widows
|
|
96
90
|
p {
|
|
97
91
|
orphans: 3;
|
|
98
92
|
widows: 3;
|
|
99
93
|
}
|
|
100
94
|
|
|
101
|
-
// Utility: page breaks
|
|
102
95
|
.page-break {
|
|
103
96
|
page-break-before: always;
|
|
104
97
|
}
|
package/EXAMPLES.md
DELETED
|
@@ -1,609 +0,0 @@
|
|
|
1
|
-
# Template Examples
|
|
2
|
-
|
|
3
|
-
This document provides real-world examples of templates you can create with `dokio-create-template`.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Example 1: Event Flyer (PDF)
|
|
8
|
-
|
|
9
|
-
### Generate the Template
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
dokio-create-template
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
**Answers:**
|
|
16
|
-
- Template type: `PDF`
|
|
17
|
-
- Template name: `Event Flyer`
|
|
18
|
-
- Template ID: `event-flyer`
|
|
19
|
-
- Subdomain: `marketing`
|
|
20
|
-
- Output directory: `./event-flyer`
|
|
21
|
-
- Prince version: `15`
|
|
22
|
-
- Resizable: `Yes`
|
|
23
|
-
- Dynamic pages: `No`
|
|
24
|
-
|
|
25
|
-
### Customize data.yaml
|
|
26
|
-
|
|
27
|
-
```yaml
|
|
28
|
-
---
|
|
29
|
-
name: event-flyer - Event Flyer
|
|
30
|
-
mode: pdf
|
|
31
|
-
prince_version: 15
|
|
32
|
-
subdomain: marketing
|
|
33
|
-
dimension_mode: mm
|
|
34
|
-
resizable: true
|
|
35
|
-
page_count: 1
|
|
36
|
-
dimension_width: 210
|
|
37
|
-
dimension_height: 297
|
|
38
|
-
compositing_data: {}
|
|
39
|
-
export_options:
|
|
40
|
-
downloadables:
|
|
41
|
-
hi_res:
|
|
42
|
-
title: Print-Ready PDF
|
|
43
|
-
renderer: pdf
|
|
44
|
-
marks: true
|
|
45
|
-
bleed: true
|
|
46
|
-
fields_data:
|
|
47
|
-
event-title:
|
|
48
|
-
type: text
|
|
49
|
-
title: Event Title
|
|
50
|
-
default: Summer Music Festival
|
|
51
|
-
maximum_characters: 50
|
|
52
|
-
|
|
53
|
-
event-date:
|
|
54
|
-
type: datepicker
|
|
55
|
-
title: Event Date
|
|
56
|
-
display_format: DD MMMM YYYY
|
|
57
|
-
minimum_date: today
|
|
58
|
-
|
|
59
|
-
event-location:
|
|
60
|
-
type: text
|
|
61
|
-
title: Location
|
|
62
|
-
placeholder: Enter venue name
|
|
63
|
-
|
|
64
|
-
event-description:
|
|
65
|
-
type: richtext
|
|
66
|
-
title: Description
|
|
67
|
-
toolbar:
|
|
68
|
-
- bold
|
|
69
|
-
- italic
|
|
70
|
-
- ul
|
|
71
|
-
|
|
72
|
-
hero-image:
|
|
73
|
-
type: image
|
|
74
|
-
title: Hero Image
|
|
75
|
-
options:
|
|
76
|
-
min_width: 1240
|
|
77
|
-
min_height: 1754
|
|
78
|
-
crop:
|
|
79
|
-
allowed_aspect_ratio_options:
|
|
80
|
-
- custom
|
|
81
|
-
|
|
82
|
-
brand-color:
|
|
83
|
-
type: colour
|
|
84
|
-
title: Brand Color
|
|
85
|
-
customisable: true
|
|
86
|
-
options:
|
|
87
|
-
'FF6B35': Orange
|
|
88
|
-
'004E89': Navy
|
|
89
|
-
'F7931E': Gold
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
---
|
|
93
|
-
|
|
94
|
-
## Example 2: Email Newsletter (Email)
|
|
95
|
-
|
|
96
|
-
### Generate the Template
|
|
97
|
-
|
|
98
|
-
```bash
|
|
99
|
-
dokio-create-template
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
**Answers:**
|
|
103
|
-
- Template type: `Email`
|
|
104
|
-
- Template name: `Weekly Newsletter`
|
|
105
|
-
- Template ID: `weekly-newsletter`
|
|
106
|
-
- Subdomain: `communications`
|
|
107
|
-
- Output directory: `./weekly-newsletter`
|
|
108
|
-
|
|
109
|
-
### Customize data.yaml
|
|
110
|
-
|
|
111
|
-
```yaml
|
|
112
|
-
---
|
|
113
|
-
name: weekly-newsletter - Weekly Newsletter
|
|
114
|
-
mode: email
|
|
115
|
-
sendable: true
|
|
116
|
-
subdomain: communications
|
|
117
|
-
export_options:
|
|
118
|
-
downloadables:
|
|
119
|
-
hosted-html:
|
|
120
|
-
title: Download HTML
|
|
121
|
-
host_files: true
|
|
122
|
-
output: zip
|
|
123
|
-
fields_data:
|
|
124
|
-
subject:
|
|
125
|
-
type: text
|
|
126
|
-
title: Email Subject
|
|
127
|
-
default: "This Week's Highlights"
|
|
128
|
-
maximum_characters: 100
|
|
129
|
-
|
|
130
|
-
preheader:
|
|
131
|
-
type: text
|
|
132
|
-
title: Preheader
|
|
133
|
-
maximum_characters: 150
|
|
134
|
-
|
|
135
|
-
header-logo:
|
|
136
|
-
type: image
|
|
137
|
-
title: Company Logo
|
|
138
|
-
placeholder: logo.png
|
|
139
|
-
|
|
140
|
-
featured-articles:
|
|
141
|
-
type: modules
|
|
142
|
-
title: Featured Articles
|
|
143
|
-
maximum: 3
|
|
144
|
-
button_title: Add Article
|
|
145
|
-
modules:
|
|
146
|
-
article:
|
|
147
|
-
title: Article
|
|
148
|
-
fields:
|
|
149
|
-
article-image:
|
|
150
|
-
type: image
|
|
151
|
-
title: Article Image
|
|
152
|
-
options:
|
|
153
|
-
min_width: 600
|
|
154
|
-
min_height: 400
|
|
155
|
-
article-title:
|
|
156
|
-
type: text
|
|
157
|
-
title: Article Title
|
|
158
|
-
maximum_characters: 80
|
|
159
|
-
article-excerpt:
|
|
160
|
-
type: textarea
|
|
161
|
-
title: Excerpt
|
|
162
|
-
maximum_characters: 200
|
|
163
|
-
article-url:
|
|
164
|
-
type: url
|
|
165
|
-
title: Read More Link
|
|
166
|
-
|
|
167
|
-
footer-text:
|
|
168
|
-
type: textarea
|
|
169
|
-
title: Footer Text
|
|
170
|
-
output_html_safe: true
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
---
|
|
174
|
-
|
|
175
|
-
## Example 3: Social Media Graphics (General)
|
|
176
|
-
|
|
177
|
-
### Generate the Template
|
|
178
|
-
|
|
179
|
-
```bash
|
|
180
|
-
dokio-create-template
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
**Answers:**
|
|
184
|
-
- Template type: `General (Image)`
|
|
185
|
-
- Template name: `Quote Graphic`
|
|
186
|
-
- Template ID: `quote-graphic`
|
|
187
|
-
- Subdomain: `social`
|
|
188
|
-
- Output directory: `./quote-graphic`
|
|
189
|
-
|
|
190
|
-
### Customize data.yaml
|
|
191
|
-
|
|
192
|
-
```yaml
|
|
193
|
-
---
|
|
194
|
-
name: quote-graphic - Quote Graphic
|
|
195
|
-
mode: general
|
|
196
|
-
subdomain: social
|
|
197
|
-
dimension_mode: px
|
|
198
|
-
page_count: 1
|
|
199
|
-
dimension_width: 1080
|
|
200
|
-
dimension_height: 1080
|
|
201
|
-
compositing_data: {}
|
|
202
|
-
export_options:
|
|
203
|
-
downloadables:
|
|
204
|
-
png_chrome:
|
|
205
|
-
title: PNG Download
|
|
206
|
-
renderer: image
|
|
207
|
-
format: png
|
|
208
|
-
jpg_chrome:
|
|
209
|
-
title: JPG Download
|
|
210
|
-
renderer: image
|
|
211
|
-
format: jpg
|
|
212
|
-
fields_data:
|
|
213
|
-
quote-text:
|
|
214
|
-
type: textarea
|
|
215
|
-
title: Quote
|
|
216
|
-
default: "The best way to predict the future is to create it."
|
|
217
|
-
maximum_characters: 200
|
|
218
|
-
|
|
219
|
-
author:
|
|
220
|
-
type: text
|
|
221
|
-
title: Author
|
|
222
|
-
default: Peter Drucker
|
|
223
|
-
maximum_characters: 50
|
|
224
|
-
|
|
225
|
-
background-style:
|
|
226
|
-
type: conditional
|
|
227
|
-
title: Background Style
|
|
228
|
-
selector:
|
|
229
|
-
type: select
|
|
230
|
-
options:
|
|
231
|
-
solid: Solid Color
|
|
232
|
-
gradient: Gradient
|
|
233
|
-
image: Image
|
|
234
|
-
panels:
|
|
235
|
-
- condition_type: equal_to
|
|
236
|
-
condition: solid
|
|
237
|
-
fields:
|
|
238
|
-
bg-color:
|
|
239
|
-
type: colour
|
|
240
|
-
title: Background Color
|
|
241
|
-
customisable: true
|
|
242
|
-
options:
|
|
243
|
-
'0079C8': Blue
|
|
244
|
-
'FF6B35': Orange
|
|
245
|
-
'2C3E50': Dark Gray
|
|
246
|
-
|
|
247
|
-
- condition_type: equal_to
|
|
248
|
-
condition: gradient
|
|
249
|
-
fields:
|
|
250
|
-
gradient-start:
|
|
251
|
-
type: colour
|
|
252
|
-
title: Gradient Start
|
|
253
|
-
customisable: true
|
|
254
|
-
gradient-end:
|
|
255
|
-
type: colour
|
|
256
|
-
title: Gradient End
|
|
257
|
-
customisable: true
|
|
258
|
-
|
|
259
|
-
- condition_type: equal_to
|
|
260
|
-
condition: image
|
|
261
|
-
fields:
|
|
262
|
-
bg-image:
|
|
263
|
-
type: image
|
|
264
|
-
title: Background Image
|
|
265
|
-
options:
|
|
266
|
-
min_width: 1080
|
|
267
|
-
min_height: 1080
|
|
268
|
-
|
|
269
|
-
text-color:
|
|
270
|
-
type: colour
|
|
271
|
-
title: Text Color
|
|
272
|
-
customisable: true
|
|
273
|
-
options:
|
|
274
|
-
'FFFFFF': White
|
|
275
|
-
'000000': Black
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
---
|
|
279
|
-
|
|
280
|
-
## Example 4: Certificate (PDF)
|
|
281
|
-
|
|
282
|
-
### Generate the Template
|
|
283
|
-
|
|
284
|
-
```bash
|
|
285
|
-
dokio-create-template
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
**Answers:**
|
|
289
|
-
- Template type: `PDF`
|
|
290
|
-
- Template name: `Certificate of Achievement`
|
|
291
|
-
- Template ID: `certificate`
|
|
292
|
-
- Subdomain: `training`
|
|
293
|
-
- Output directory: `./certificate`
|
|
294
|
-
- Prince version: `15`
|
|
295
|
-
- Resizable: `No`
|
|
296
|
-
- Dynamic pages: `No`
|
|
297
|
-
|
|
298
|
-
### Customize data.yaml
|
|
299
|
-
|
|
300
|
-
```yaml
|
|
301
|
-
---
|
|
302
|
-
name: certificate - Certificate of Achievement
|
|
303
|
-
mode: pdf
|
|
304
|
-
prince_version: 15
|
|
305
|
-
subdomain: training
|
|
306
|
-
dimension_mode: mm
|
|
307
|
-
page_count: 1
|
|
308
|
-
dimension_width: 297
|
|
309
|
-
dimension_height: 210 # A4 Landscape
|
|
310
|
-
compositing_data: {}
|
|
311
|
-
export_options:
|
|
312
|
-
downloadables:
|
|
313
|
-
certificate-pdf:
|
|
314
|
-
title: Download Certificate
|
|
315
|
-
renderer: pdf
|
|
316
|
-
bleed: false
|
|
317
|
-
marks: false
|
|
318
|
-
fields_data:
|
|
319
|
-
recipient-name:
|
|
320
|
-
type: text
|
|
321
|
-
title: Recipient Name
|
|
322
|
-
placeholder: Enter full name
|
|
323
|
-
override_required: true
|
|
324
|
-
|
|
325
|
-
course-title:
|
|
326
|
-
type: text
|
|
327
|
-
title: Course Title
|
|
328
|
-
default: Web Development Fundamentals
|
|
329
|
-
override_required: true
|
|
330
|
-
|
|
331
|
-
completion-date:
|
|
332
|
-
type: datepicker
|
|
333
|
-
title: Completion Date
|
|
334
|
-
display_format: DD MMMM YYYY
|
|
335
|
-
maximum_date: today
|
|
336
|
-
|
|
337
|
-
instructor-name:
|
|
338
|
-
type: text
|
|
339
|
-
title: Instructor Name
|
|
340
|
-
placeholder: Enter instructor name
|
|
341
|
-
|
|
342
|
-
certificate-number:
|
|
343
|
-
type: generator
|
|
344
|
-
# Auto-generates random ID
|
|
345
|
-
|
|
346
|
-
signature-image:
|
|
347
|
-
type: image
|
|
348
|
-
title: Signature
|
|
349
|
-
placeholder: signature.png
|
|
350
|
-
options:
|
|
351
|
-
allowed_file_types:
|
|
352
|
-
- png
|
|
353
|
-
- jpg
|
|
354
|
-
|
|
355
|
-
border-style:
|
|
356
|
-
type: select
|
|
357
|
-
title: Border Style
|
|
358
|
-
options:
|
|
359
|
-
classic: Classic
|
|
360
|
-
modern: Modern
|
|
361
|
-
minimal: Minimal
|
|
362
|
-
default: classic
|
|
363
|
-
```
|
|
364
|
-
|
|
365
|
-
---
|
|
366
|
-
|
|
367
|
-
## Example 5: Product Catalog (PDF Multi-page)
|
|
368
|
-
|
|
369
|
-
### Generate the Template
|
|
370
|
-
|
|
371
|
-
```bash
|
|
372
|
-
dokio-create-template
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
**Answers:**
|
|
376
|
-
- Template type: `PDF`
|
|
377
|
-
- Template name: `Product Catalog`
|
|
378
|
-
- Template ID: `product-catalog`
|
|
379
|
-
- Subdomain: `sales`
|
|
380
|
-
- Output directory: `./product-catalog`
|
|
381
|
-
- Prince version: `15`
|
|
382
|
-
- Resizable: `No`
|
|
383
|
-
- Dynamic pages: `Yes`
|
|
384
|
-
|
|
385
|
-
### Customize data.yaml
|
|
386
|
-
|
|
387
|
-
```yaml
|
|
388
|
-
---
|
|
389
|
-
name: product-catalog - Product Catalog
|
|
390
|
-
mode: pdf
|
|
391
|
-
prince_version: 15
|
|
392
|
-
subdomain: sales
|
|
393
|
-
dimension_mode: mm
|
|
394
|
-
page_count: 1
|
|
395
|
-
has_dynamic_page_count: true
|
|
396
|
-
dimension_width: 210
|
|
397
|
-
dimension_height: 297
|
|
398
|
-
compositing_data: {}
|
|
399
|
-
export_options:
|
|
400
|
-
downloadables:
|
|
401
|
-
catalog-pdf:
|
|
402
|
-
title: Download Catalog
|
|
403
|
-
renderer: pdf
|
|
404
|
-
fields_data:
|
|
405
|
-
catalog-title:
|
|
406
|
-
type: text
|
|
407
|
-
title: Catalog Title
|
|
408
|
-
default: 2026 Product Catalog
|
|
409
|
-
|
|
410
|
-
company-logo:
|
|
411
|
-
type: image
|
|
412
|
-
title: Company Logo
|
|
413
|
-
placeholder: logo.png
|
|
414
|
-
|
|
415
|
-
products:
|
|
416
|
-
type: modules
|
|
417
|
-
title: Products
|
|
418
|
-
button_title: Add Product
|
|
419
|
-
modules:
|
|
420
|
-
product:
|
|
421
|
-
title: Product
|
|
422
|
-
title_source: product-name
|
|
423
|
-
fields:
|
|
424
|
-
product-name:
|
|
425
|
-
type: text
|
|
426
|
-
title: Product Name
|
|
427
|
-
placeholder: Enter product name
|
|
428
|
-
|
|
429
|
-
product-image:
|
|
430
|
-
type: image
|
|
431
|
-
title: Product Image
|
|
432
|
-
options:
|
|
433
|
-
min_width: 800
|
|
434
|
-
min_height: 600
|
|
435
|
-
|
|
436
|
-
product-description:
|
|
437
|
-
type: richtext
|
|
438
|
-
title: Description
|
|
439
|
-
toolbar:
|
|
440
|
-
- bold
|
|
441
|
-
- italic
|
|
442
|
-
- ul
|
|
443
|
-
|
|
444
|
-
product-price:
|
|
445
|
-
type: numeric
|
|
446
|
-
title: Price
|
|
447
|
-
placeholder: 0.00
|
|
448
|
-
minimum: 0
|
|
449
|
-
resolution: 0.01
|
|
450
|
-
|
|
451
|
-
product-sku:
|
|
452
|
-
type: text
|
|
453
|
-
title: SKU
|
|
454
|
-
placeholder: Enter SKU
|
|
455
|
-
|
|
456
|
-
specifications:
|
|
457
|
-
type: textarea
|
|
458
|
-
title: Specifications
|
|
459
|
-
placeholder: Enter product specifications
|
|
460
|
-
|
|
461
|
-
primary-color:
|
|
462
|
-
type: colour
|
|
463
|
-
title: Primary Brand Color
|
|
464
|
-
customisable: true
|
|
465
|
-
options:
|
|
466
|
-
'0079C8': Corporate Blue
|
|
467
|
-
'2C3E50': Dark Gray
|
|
468
|
-
```
|
|
469
|
-
|
|
470
|
-
---
|
|
471
|
-
|
|
472
|
-
## Example 6: Video Ad Template (Video)
|
|
473
|
-
|
|
474
|
-
### Generate the Template
|
|
475
|
-
|
|
476
|
-
```bash
|
|
477
|
-
dokio-create-template
|
|
478
|
-
```
|
|
479
|
-
|
|
480
|
-
**Answers:**
|
|
481
|
-
- Template type: `Video`
|
|
482
|
-
- Template name: `Product Ad`
|
|
483
|
-
- Template ID: `product-ad-30s`
|
|
484
|
-
- Subdomain: `marketing`
|
|
485
|
-
- Output directory: `./product-ad`
|
|
486
|
-
|
|
487
|
-
### Customize data.yaml
|
|
488
|
-
|
|
489
|
-
```yaml
|
|
490
|
-
---
|
|
491
|
-
name: product-ad-30s - Product Ad
|
|
492
|
-
mode: video
|
|
493
|
-
subdomain: marketing
|
|
494
|
-
duration: '30'
|
|
495
|
-
highlight_point: '27'
|
|
496
|
-
dimension_height: 1080
|
|
497
|
-
dimension_width: 1920
|
|
498
|
-
export_options:
|
|
499
|
-
downloadables:
|
|
500
|
-
hi-res:
|
|
501
|
-
title: 1080p HD
|
|
502
|
-
fields_data:
|
|
503
|
-
product-name:
|
|
504
|
-
type: text
|
|
505
|
-
title: Product Name
|
|
506
|
-
default: Amazing Product
|
|
507
|
-
|
|
508
|
-
tagline:
|
|
509
|
-
type: text
|
|
510
|
-
title: Tagline
|
|
511
|
-
default: Change your life today
|
|
512
|
-
maximum_characters: 60
|
|
513
|
-
|
|
514
|
-
call-to-action:
|
|
515
|
-
type: text
|
|
516
|
-
title: Call to Action
|
|
517
|
-
default: Visit our website
|
|
518
|
-
|
|
519
|
-
website-url:
|
|
520
|
-
type: url
|
|
521
|
-
title: Website URL
|
|
522
|
-
|
|
523
|
-
product-image:
|
|
524
|
-
type: image
|
|
525
|
-
title: Product Image
|
|
526
|
-
options:
|
|
527
|
-
min_width: 1920
|
|
528
|
-
min_height: 1080
|
|
529
|
-
|
|
530
|
-
logo:
|
|
531
|
-
type: image
|
|
532
|
-
title: Company Logo
|
|
533
|
-
placeholder: logo.png
|
|
534
|
-
|
|
535
|
-
background-video-style:
|
|
536
|
-
type: select
|
|
537
|
-
title: Background Style
|
|
538
|
-
options:
|
|
539
|
-
product-focus: Product Focus
|
|
540
|
-
lifestyle: Lifestyle
|
|
541
|
-
minimal: Minimal
|
|
542
|
-
default: product-focus
|
|
543
|
-
|
|
544
|
-
primary-color:
|
|
545
|
-
type: colour
|
|
546
|
-
title: Primary Color
|
|
547
|
-
customisable: true
|
|
548
|
-
options:
|
|
549
|
-
'FF6B35': Orange
|
|
550
|
-
'0079C8': Blue
|
|
551
|
-
'2ECC71': Green
|
|
552
|
-
|
|
553
|
-
secondary-color:
|
|
554
|
-
type: colour
|
|
555
|
-
title: Secondary Color
|
|
556
|
-
customisable: true
|
|
557
|
-
options:
|
|
558
|
-
'FFFFFF': White
|
|
559
|
-
'2C3E50': Dark Gray
|
|
560
|
-
```
|
|
561
|
-
|
|
562
|
-
---
|
|
563
|
-
|
|
564
|
-
## Tips for Each Template Type
|
|
565
|
-
|
|
566
|
-
### PDF Templates
|
|
567
|
-
- Use millimeters for dimensions
|
|
568
|
-
- Include bleed (usually 3-5mm) for print
|
|
569
|
-
- Test with Prince to ensure proper rendering
|
|
570
|
-
- Use page breaks for multi-page layouts
|
|
571
|
-
- Consider resizable options for flexibility
|
|
572
|
-
|
|
573
|
-
### Email Templates
|
|
574
|
-
- Keep width at 600px for best compatibility
|
|
575
|
-
- Test on multiple email clients
|
|
576
|
-
- Use web-safe fonts
|
|
577
|
-
- Inline CSS for best results
|
|
578
|
-
- Include alt text for images
|
|
579
|
-
- Test mobile responsiveness
|
|
580
|
-
|
|
581
|
-
### General (Image) Templates
|
|
582
|
-
- Use pixels for dimensions
|
|
583
|
-
- Consider standard social media sizes:
|
|
584
|
-
- Instagram: 1080x1080
|
|
585
|
-
- Facebook: 1200x630
|
|
586
|
-
- Twitter: 1200x675
|
|
587
|
-
- Optimize for web (RGB color mode)
|
|
588
|
-
- Keep file sizes reasonable
|
|
589
|
-
|
|
590
|
-
### Video Templates
|
|
591
|
-
- Standard HD: 1920x1080
|
|
592
|
-
- Consider animation timing
|
|
593
|
-
- Keep text on screen long enough to read
|
|
594
|
-
- Use web-safe fonts
|
|
595
|
-
- Test video rendering
|
|
596
|
-
|
|
597
|
-
---
|
|
598
|
-
|
|
599
|
-
## Next Steps
|
|
600
|
-
|
|
601
|
-
After creating your template:
|
|
602
|
-
|
|
603
|
-
1. **Test locally** in Dokio Studio
|
|
604
|
-
2. **Iterate** based on feedback
|
|
605
|
-
3. **Document** changes in CHANGELOG.md
|
|
606
|
-
4. **Version control** with Git
|
|
607
|
-
5. **Share** with your team
|
|
608
|
-
|
|
609
|
-
Happy templating! 🎨
|