create-tina-app 0.0.1 → 0.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/CHANGELOG.md +26 -0
- package/README.md +3 -0
- package/bin/create-tina-app +2 -2
- package/dist/examples.d.ts +27 -0
- package/dist/index.js +186 -43
- package/examples/tina-tailwind-sidebar-demo/.tina/PageTemplate.ts +427 -0
- package/examples/tina-tailwind-sidebar-demo/.tina/ThemeTemplate.ts +42 -0
- package/examples/tina-tailwind-sidebar-demo/.tina/__generated__/_graphql.json +4180 -0
- package/examples/tina-tailwind-sidebar-demo/.tina/__generated__/_lookup.json +68 -0
- package/examples/tina-tailwind-sidebar-demo/.tina/__generated__/_schema.json +851 -0
- package/examples/tina-tailwind-sidebar-demo/.tina/__generated__/config/schema.json +479 -0
- package/examples/tina-tailwind-sidebar-demo/.tina/__generated__/schema.gql +391 -0
- package/examples/tina-tailwind-sidebar-demo/.tina/__generated__/types.ts +520 -0
- package/examples/tina-tailwind-sidebar-demo/.tina/schema.ts +35 -0
- package/examples/tina-tailwind-sidebar-demo/CHANGELOG.md +95 -0
- package/examples/tina-tailwind-sidebar-demo/LICENSE +201 -0
- package/examples/tina-tailwind-sidebar-demo/README.md +10 -0
- package/examples/tina-tailwind-sidebar-demo/components/PageBlocks.tsx +25 -0
- package/examples/tina-tailwind-sidebar-demo/components/actions.js +114 -0
- package/examples/tina-tailwind-sidebar-demo/components/features.tsx +171 -0
- package/examples/tina-tailwind-sidebar-demo/components/footer.tsx +247 -0
- package/examples/tina-tailwind-sidebar-demo/components/hero.js +156 -0
- package/examples/tina-tailwind-sidebar-demo/components/icon.js +264 -0
- package/examples/tina-tailwind-sidebar-demo/components/modal.js +79 -0
- package/examples/tina-tailwind-sidebar-demo/components/nav.tsx +121 -0
- package/examples/tina-tailwind-sidebar-demo/components/section.js +53 -0
- package/examples/tina-tailwind-sidebar-demo/components/testimonial.tsx +87 -0
- package/examples/tina-tailwind-sidebar-demo/components/theme.tsx +81 -0
- package/examples/tina-tailwind-sidebar-demo/components/tina-wrapper.js +85 -0
- package/examples/tina-tailwind-sidebar-demo/content/data/homepage.json +186 -0
- package/examples/tina-tailwind-sidebar-demo/content/theme/NormalTheme.json +5 -0
- package/examples/tina-tailwind-sidebar-demo/graphql.config.js +24 -0
- package/examples/tina-tailwind-sidebar-demo/next-env.d.ts +15 -0
- package/examples/tina-tailwind-sidebar-demo/package.json +42 -0
- package/examples/tina-tailwind-sidebar-demo/pages/_app.js +48 -0
- package/examples/tina-tailwind-sidebar-demo/pages/admin.tsx +26 -0
- package/examples/tina-tailwind-sidebar-demo/pages/index.tsx +186 -0
- package/examples/tina-tailwind-sidebar-demo/postcss.config.js +19 -0
- package/examples/tina-tailwind-sidebar-demo/public/canal.jpg +0 -0
- package/examples/tina-tailwind-sidebar-demo/public/index.html +42 -0
- package/examples/tina-tailwind-sidebar-demo/styles.css +20 -0
- package/examples/tina-tailwind-sidebar-demo/tailwind.config.js +83 -0
- package/examples/tina-tailwind-sidebar-demo/tsconfig.json +19 -0
- package/package.json +7 -3
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Copyright 2021 Forestry.io Holdings, Inc.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software
|
|
8
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
+
See the License for the specific language governing permissions and
|
|
11
|
+
limitations under the License.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { TinaTemplate } from '@tinacms/cli'
|
|
15
|
+
|
|
16
|
+
export const PageTemplate: TinaTemplate = {
|
|
17
|
+
name: 'homepage',
|
|
18
|
+
label: 'Homepage',
|
|
19
|
+
fields: [
|
|
20
|
+
{
|
|
21
|
+
name: 'nav',
|
|
22
|
+
type: 'object',
|
|
23
|
+
label: 'Navbar',
|
|
24
|
+
fields: [
|
|
25
|
+
{
|
|
26
|
+
label: 'Wordmark',
|
|
27
|
+
name: 'wordmark',
|
|
28
|
+
type: 'object',
|
|
29
|
+
fields: [
|
|
30
|
+
{
|
|
31
|
+
label: 'Icon',
|
|
32
|
+
name: 'icon',
|
|
33
|
+
type: 'object',
|
|
34
|
+
fields: [
|
|
35
|
+
{
|
|
36
|
+
name: 'color',
|
|
37
|
+
label: 'Color',
|
|
38
|
+
type: 'string',
|
|
39
|
+
options: [
|
|
40
|
+
'primary',
|
|
41
|
+
'blue',
|
|
42
|
+
'teal',
|
|
43
|
+
'green',
|
|
44
|
+
'red',
|
|
45
|
+
'pink',
|
|
46
|
+
'purple',
|
|
47
|
+
'orange',
|
|
48
|
+
'yellow',
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'name',
|
|
53
|
+
label: 'Icon',
|
|
54
|
+
type: 'string',
|
|
55
|
+
options: [
|
|
56
|
+
'random',
|
|
57
|
+
'FiAperture',
|
|
58
|
+
'BiCodeBlock',
|
|
59
|
+
'BiLike',
|
|
60
|
+
'BiMapAlt',
|
|
61
|
+
'BiPalette',
|
|
62
|
+
'BiPieChartAlt2',
|
|
63
|
+
'BiPin',
|
|
64
|
+
'BiShield',
|
|
65
|
+
'BiSlider',
|
|
66
|
+
'BiStore',
|
|
67
|
+
'BiTennisBall',
|
|
68
|
+
'BiTestTube',
|
|
69
|
+
'BiTrophy',
|
|
70
|
+
'BiUserCircle',
|
|
71
|
+
'BiBeer',
|
|
72
|
+
'BiChat',
|
|
73
|
+
'BiCloud',
|
|
74
|
+
'BiCoffeeTogo',
|
|
75
|
+
'BiWorld',
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'style',
|
|
80
|
+
label: 'Style',
|
|
81
|
+
type: 'string',
|
|
82
|
+
options: ['circle', 'float'],
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
label: 'Name',
|
|
88
|
+
name: 'name',
|
|
89
|
+
type: 'string',
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
label: 'Nav Items',
|
|
95
|
+
name: 'items',
|
|
96
|
+
type: 'object',
|
|
97
|
+
list: true,
|
|
98
|
+
fields: [
|
|
99
|
+
{
|
|
100
|
+
label: 'Label',
|
|
101
|
+
name: 'label',
|
|
102
|
+
type: 'string',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
label: 'Link',
|
|
106
|
+
name: 'link',
|
|
107
|
+
type: 'string',
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: 'blocks',
|
|
115
|
+
type: 'object',
|
|
116
|
+
label: 'Page Sections',
|
|
117
|
+
list: true,
|
|
118
|
+
templates: [
|
|
119
|
+
{
|
|
120
|
+
name: 'hero',
|
|
121
|
+
label: 'Hero',
|
|
122
|
+
fields: [
|
|
123
|
+
{
|
|
124
|
+
name: 'tagline',
|
|
125
|
+
label: 'Tagline',
|
|
126
|
+
type: 'string',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: 'headline',
|
|
130
|
+
label: 'Headline',
|
|
131
|
+
type: 'string',
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: 'paragraph',
|
|
135
|
+
label: 'Paragraph',
|
|
136
|
+
type: 'string',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: 'string',
|
|
140
|
+
label: 'Text',
|
|
141
|
+
type: 'object',
|
|
142
|
+
fields: [
|
|
143
|
+
{
|
|
144
|
+
name: 'color',
|
|
145
|
+
label: 'Color',
|
|
146
|
+
type: 'string',
|
|
147
|
+
options: ['default', 'tint', 'primary'],
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: 'image',
|
|
153
|
+
label: 'Image',
|
|
154
|
+
type: 'object',
|
|
155
|
+
fields: [
|
|
156
|
+
{
|
|
157
|
+
name: 'src',
|
|
158
|
+
label: 'Image Source',
|
|
159
|
+
type: 'string',
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
name: 'alt',
|
|
163
|
+
label: 'Alt Text',
|
|
164
|
+
type: 'string',
|
|
165
|
+
},
|
|
166
|
+
],
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
label: 'Actions',
|
|
170
|
+
name: 'actions',
|
|
171
|
+
type: 'object',
|
|
172
|
+
list: true,
|
|
173
|
+
fields: [
|
|
174
|
+
{
|
|
175
|
+
label: 'Label',
|
|
176
|
+
name: 'label',
|
|
177
|
+
type: 'string',
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
label: 'Type',
|
|
181
|
+
name: 'type',
|
|
182
|
+
type: 'string',
|
|
183
|
+
options: ['button', 'link'],
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
label: 'Icon',
|
|
187
|
+
name: 'icon',
|
|
188
|
+
type: 'boolean',
|
|
189
|
+
},
|
|
190
|
+
],
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
name: 'style',
|
|
194
|
+
label: 'Style',
|
|
195
|
+
type: 'object',
|
|
196
|
+
fields: [
|
|
197
|
+
{
|
|
198
|
+
name: 'color',
|
|
199
|
+
label: 'Color',
|
|
200
|
+
type: 'string',
|
|
201
|
+
options: ['default', 'tint', 'primary'],
|
|
202
|
+
},
|
|
203
|
+
],
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
name: 'testimonial',
|
|
209
|
+
label: 'Testimonial',
|
|
210
|
+
fields: [
|
|
211
|
+
{
|
|
212
|
+
name: 'quote',
|
|
213
|
+
label: 'Quote',
|
|
214
|
+
type: 'string',
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
name: 'author',
|
|
218
|
+
label: 'Author',
|
|
219
|
+
type: 'string',
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
name: 'style',
|
|
223
|
+
label: 'Style',
|
|
224
|
+
type: 'object',
|
|
225
|
+
fields: [
|
|
226
|
+
{
|
|
227
|
+
name: 'color',
|
|
228
|
+
label: 'Color',
|
|
229
|
+
type: 'string',
|
|
230
|
+
options: ['default', 'tint', 'primary'],
|
|
231
|
+
},
|
|
232
|
+
],
|
|
233
|
+
},
|
|
234
|
+
],
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
name: 'features',
|
|
238
|
+
label: 'Features',
|
|
239
|
+
fields: [
|
|
240
|
+
{
|
|
241
|
+
label: 'Features',
|
|
242
|
+
name: 'items',
|
|
243
|
+
type: 'object',
|
|
244
|
+
list: true,
|
|
245
|
+
fields: [
|
|
246
|
+
{
|
|
247
|
+
label: 'Icon',
|
|
248
|
+
name: 'icon',
|
|
249
|
+
type: 'object',
|
|
250
|
+
fields: [
|
|
251
|
+
{
|
|
252
|
+
name: 'color',
|
|
253
|
+
label: 'Color',
|
|
254
|
+
type: 'string',
|
|
255
|
+
options: [
|
|
256
|
+
'primary',
|
|
257
|
+
'blue',
|
|
258
|
+
'teal',
|
|
259
|
+
'green',
|
|
260
|
+
'red',
|
|
261
|
+
'pink',
|
|
262
|
+
'purple',
|
|
263
|
+
'orange',
|
|
264
|
+
'yellow',
|
|
265
|
+
],
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
name: 'name',
|
|
269
|
+
label: 'Icon',
|
|
270
|
+
type: 'string',
|
|
271
|
+
options: [
|
|
272
|
+
'random',
|
|
273
|
+
'Aperture',
|
|
274
|
+
'BiCodeBlock',
|
|
275
|
+
'BiLike',
|
|
276
|
+
'BiMapAlt',
|
|
277
|
+
'BiPalette',
|
|
278
|
+
'BiPieChartAlt2',
|
|
279
|
+
'BiPin',
|
|
280
|
+
'BiShield',
|
|
281
|
+
'BiSlider',
|
|
282
|
+
'BiStore',
|
|
283
|
+
'BiTennisBall',
|
|
284
|
+
'BiTestTube',
|
|
285
|
+
'BiTrophy',
|
|
286
|
+
'BiUserCircle',
|
|
287
|
+
'BiBeer',
|
|
288
|
+
'BiChat',
|
|
289
|
+
'BiCloud',
|
|
290
|
+
'BiCoffeeTogo',
|
|
291
|
+
'BiWorld',
|
|
292
|
+
],
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
name: 'style',
|
|
296
|
+
label: 'Style',
|
|
297
|
+
type: 'string',
|
|
298
|
+
options: ['circle', 'float'],
|
|
299
|
+
},
|
|
300
|
+
],
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
name: 'title',
|
|
304
|
+
label: 'Title',
|
|
305
|
+
type: 'string',
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
name: 'text',
|
|
309
|
+
label: 'Text',
|
|
310
|
+
type: 'string',
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
label: 'Actions',
|
|
314
|
+
name: 'actions',
|
|
315
|
+
type: 'object',
|
|
316
|
+
list: true,
|
|
317
|
+
fields: [
|
|
318
|
+
{
|
|
319
|
+
label: 'Label',
|
|
320
|
+
name: 'label',
|
|
321
|
+
type: 'string',
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
label: 'Type',
|
|
325
|
+
name: 'type',
|
|
326
|
+
type: 'string',
|
|
327
|
+
options: ['button', 'link'],
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
label: 'Icon',
|
|
331
|
+
name: 'icon',
|
|
332
|
+
type: 'boolean',
|
|
333
|
+
},
|
|
334
|
+
],
|
|
335
|
+
},
|
|
336
|
+
],
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
name: 'style',
|
|
340
|
+
label: 'Style',
|
|
341
|
+
type: 'object',
|
|
342
|
+
fields: [
|
|
343
|
+
{
|
|
344
|
+
name: 'color',
|
|
345
|
+
label: 'Color',
|
|
346
|
+
type: 'string',
|
|
347
|
+
options: ['default', 'tint', 'primary'],
|
|
348
|
+
},
|
|
349
|
+
],
|
|
350
|
+
},
|
|
351
|
+
],
|
|
352
|
+
},
|
|
353
|
+
],
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
label: 'Nav List',
|
|
357
|
+
name: 'navlist',
|
|
358
|
+
type: 'object',
|
|
359
|
+
list: true,
|
|
360
|
+
templates: [
|
|
361
|
+
{
|
|
362
|
+
name: 'nav',
|
|
363
|
+
label: 'Foooter nav',
|
|
364
|
+
fields: [
|
|
365
|
+
{
|
|
366
|
+
name: 'title',
|
|
367
|
+
label: 'Title',
|
|
368
|
+
type: 'string',
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
name: 'items',
|
|
372
|
+
label: 'Nav Items',
|
|
373
|
+
type: 'object',
|
|
374
|
+
list: true,
|
|
375
|
+
fields: [
|
|
376
|
+
{
|
|
377
|
+
name: 'label',
|
|
378
|
+
label: 'Label',
|
|
379
|
+
type: 'string',
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
name: 'link',
|
|
383
|
+
label: 'Link',
|
|
384
|
+
type: 'string',
|
|
385
|
+
},
|
|
386
|
+
],
|
|
387
|
+
},
|
|
388
|
+
],
|
|
389
|
+
},
|
|
390
|
+
],
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
name: 'footer',
|
|
394
|
+
label: 'Footer',
|
|
395
|
+
type: 'object',
|
|
396
|
+
fields: [
|
|
397
|
+
{
|
|
398
|
+
name: 'social',
|
|
399
|
+
label: 'Social Media',
|
|
400
|
+
type: 'object',
|
|
401
|
+
fields: [
|
|
402
|
+
{
|
|
403
|
+
name: 'facebook',
|
|
404
|
+
label: 'Facebook',
|
|
405
|
+
type: 'string',
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
name: 'twitter',
|
|
409
|
+
label: 'Twitter',
|
|
410
|
+
type: 'string',
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
name: 'instagram',
|
|
414
|
+
label: 'Instagram',
|
|
415
|
+
type: 'string',
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
name: 'github',
|
|
419
|
+
label: 'Github',
|
|
420
|
+
type: 'string',
|
|
421
|
+
},
|
|
422
|
+
],
|
|
423
|
+
},
|
|
424
|
+
],
|
|
425
|
+
},
|
|
426
|
+
],
|
|
427
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Copyright 2021 Forestry.io Holdings, Inc.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software
|
|
8
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
+
See the License for the specific language governing permissions and
|
|
11
|
+
limitations under the License.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { TinaTemplate } from '@tinacms/cli'
|
|
15
|
+
|
|
16
|
+
export const ThemeTemplate: TinaTemplate = {
|
|
17
|
+
name: 'theme',
|
|
18
|
+
label: 'Theme',
|
|
19
|
+
fields: [
|
|
20
|
+
{
|
|
21
|
+
name: 'color',
|
|
22
|
+
label: 'Primary Color',
|
|
23
|
+
type: 'string',
|
|
24
|
+
options: [
|
|
25
|
+
'blue',
|
|
26
|
+
'teal',
|
|
27
|
+
'green',
|
|
28
|
+
'red',
|
|
29
|
+
'pink',
|
|
30
|
+
'purple',
|
|
31
|
+
'orange',
|
|
32
|
+
'yellow',
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'btnStyle',
|
|
37
|
+
label: 'Button Style',
|
|
38
|
+
type: 'string',
|
|
39
|
+
options: ['round', 'rounded', 'square'],
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
}
|