create-tina-app 0.0.1 → 0.1.0
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 +6 -0
- package/README.md +3 -0
- package/bin/create-tina-app +2 -2
- package/dist/examples.d.ts +27 -0
- package/dist/index.js +180 -43
- package/examples/basic/.tina/__generated__/_graphql.json +2304 -0
- package/examples/basic/.tina/__generated__/_lookup.json +56 -0
- package/examples/basic/.tina/__generated__/_schema.json +57 -0
- package/examples/basic/.tina/__generated__/config/schema.json +38 -0
- package/examples/basic/.tina/__generated__/schema.gql +159 -0
- package/examples/basic/.tina/__generated__/types.ts +285 -0
- package/examples/basic/.tina/schema.ts +40 -0
- package/examples/basic/README.md +24 -0
- package/examples/basic/components/Layout.js +28 -0
- package/examples/basic/content/page/home.mdx +2 -0
- package/examples/basic/content/post/HelloWorld.md +7 -0
- package/examples/basic/next.config.js +1 -0
- package/examples/basic/package.json +23 -0
- package/examples/basic/pages/_app.js +33 -0
- package/examples/basic/pages/admin/[[...slug]].js +3 -0
- package/examples/basic/pages/index.js +30 -0
- package/examples/basic/pages/posts/[slug].js +64 -0
- package/examples/basic/pages/posts/index.js +44 -0
- package/examples/basic/public/favicon.ico +0 -0
- package/examples/basic/public/vercel.svg +4 -0
- 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,24 @@
|
|
|
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
|
+
module.exports = {
|
|
15
|
+
projects: {
|
|
16
|
+
app: {
|
|
17
|
+
schema: ['.tina/__generated__/schema.gql'],
|
|
18
|
+
documents: [
|
|
19
|
+
'pages/**/*.{graphql,js,ts,jsx,tsx}',
|
|
20
|
+
'pages/*.{graphql,js,ts,jsx,tsx}',
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
/// <reference types="next" />
|
|
15
|
+
/// <reference types="next/types/global" />
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tina-tailwind-sidebar-demo",
|
|
3
|
+
"version": "0.1.11",
|
|
4
|
+
"private": true,
|
|
5
|
+
"description": "",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"tailwindcss",
|
|
8
|
+
"react",
|
|
9
|
+
"cms",
|
|
10
|
+
"tina",
|
|
11
|
+
"tinacms",
|
|
12
|
+
"nextjs"
|
|
13
|
+
],
|
|
14
|
+
"license": "Apache-2.0",
|
|
15
|
+
"main": "src/index.js",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"autoprefixer": "^10.2.5",
|
|
18
|
+
"chroma-js": "^2.1.1",
|
|
19
|
+
"next": "10.0.5",
|
|
20
|
+
"postcss": "^8.2.9",
|
|
21
|
+
"react": "^16.14.0",
|
|
22
|
+
"react-dom": "^16.14.0",
|
|
23
|
+
"react-icons": "^4.2.0",
|
|
24
|
+
"react-is": "^17.0.2",
|
|
25
|
+
"react-tinacms-editor": "^0.52.5",
|
|
26
|
+
"react-tinacms-inline": "^0.53.5",
|
|
27
|
+
"styled-components": "^5.3.0",
|
|
28
|
+
"tinacms": "latest"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@tinacms/cli": "latest",
|
|
32
|
+
"@types/node": "^15.12.2",
|
|
33
|
+
"@types/react": "^17.0.11",
|
|
34
|
+
"tailwindcss": "^2.0.4",
|
|
35
|
+
"typescript": "^3.8.3"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"dev": "yarn tinacms server:start -c \"next dev\"",
|
|
39
|
+
"build": "yarn tinacms server:start -c \"next build\"",
|
|
40
|
+
"start": "yarn tinacms server:start -c \"next start\""
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import '../styles.css'
|
|
2
|
+
import dynamic from 'next/dynamic'
|
|
3
|
+
import { TinaEditProvider } from 'tinacms/dist/edit-state'
|
|
4
|
+
const TinaCMS = dynamic(() => import('tinacms'), { ssr: false })
|
|
5
|
+
|
|
6
|
+
const NEXT_PUBLIC_TINA_CLIENT_ID = process.env.NEXT_PUBLIC_TINA_CLIENT_ID
|
|
7
|
+
const NEXT_PUBLIC_USE_LOCAL_CLIENT =
|
|
8
|
+
process.env.NEXT_PUBLIC_USE_LOCAL_CLIENT || true
|
|
9
|
+
|
|
10
|
+
const App = ({ Component, pageProps }) => {
|
|
11
|
+
return (
|
|
12
|
+
<>
|
|
13
|
+
<TinaEditProvider
|
|
14
|
+
showEditButton={true}
|
|
15
|
+
editMode={
|
|
16
|
+
<TinaCMS
|
|
17
|
+
branch="main"
|
|
18
|
+
clientId={NEXT_PUBLIC_TINA_CLIENT_ID}
|
|
19
|
+
isLocalClient={Boolean(Number(NEXT_PUBLIC_USE_LOCAL_CLIENT))}
|
|
20
|
+
// mediaStore={import('next-tinacms-cloudinary').then(
|
|
21
|
+
// ({ TinaCloudCloudinaryMediaStore }) =>
|
|
22
|
+
// TinaCloudCloudinaryMediaStore
|
|
23
|
+
// )}
|
|
24
|
+
// cmsCallback={(cms) => {
|
|
25
|
+
// import('react-tinacms-editor').then(({ MarkdownFieldPlugin }) => {
|
|
26
|
+
// cms.plugins.add(MarkdownFieldPlugin)
|
|
27
|
+
// })
|
|
28
|
+
// }}
|
|
29
|
+
// formifyCallback={({ formConfig, createForm, createGlobalForm }) => {
|
|
30
|
+
// if (formConfig.id === 'getGlobalDocument') {
|
|
31
|
+
// return createGlobalForm(formConfig)
|
|
32
|
+
// }
|
|
33
|
+
|
|
34
|
+
// return createForm(formConfig)
|
|
35
|
+
// }}
|
|
36
|
+
{...pageProps}
|
|
37
|
+
>
|
|
38
|
+
{(livePageProps) => <Component {...livePageProps} />}
|
|
39
|
+
</TinaCMS>
|
|
40
|
+
}
|
|
41
|
+
>
|
|
42
|
+
<Component {...pageProps} />
|
|
43
|
+
</TinaEditProvider>
|
|
44
|
+
</>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export default App
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { useRouter } from 'next/router'
|
|
15
|
+
import { useEffect } from 'react'
|
|
16
|
+
import { useEditState } from '../utils/editState'
|
|
17
|
+
const Admin = () => {
|
|
18
|
+
const { setEdit } = useEditState()
|
|
19
|
+
const router = useRouter()
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
setEdit(true)
|
|
22
|
+
router.back()
|
|
23
|
+
}, [])
|
|
24
|
+
return <div>Going into edit mode...</div>
|
|
25
|
+
}
|
|
26
|
+
export default Admin
|
|
@@ -0,0 +1,186 @@
|
|
|
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 { Hero, hero_template } from '../components/hero'
|
|
15
|
+
import { Testimonial, testimonial_template } from '../components/testimonial'
|
|
16
|
+
import { Blocks } from '../components/PageBlocks'
|
|
17
|
+
import { Nav } from '../components/nav'
|
|
18
|
+
import { Footer } from '../components/footer'
|
|
19
|
+
import { Features, features_template } from '../components/features'
|
|
20
|
+
import { Page, ThemeDocument } from '../.tina/__generated__/types'
|
|
21
|
+
import { Theme } from '../components/theme'
|
|
22
|
+
import { gql, getStaticPropsForTina } from 'tinacms'
|
|
23
|
+
|
|
24
|
+
interface AppProps {
|
|
25
|
+
data: {
|
|
26
|
+
getPageDocument: { data: Page }
|
|
27
|
+
getThemeDocument: ThemeDocument
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
const App = ({ data }: AppProps) => {
|
|
31
|
+
const { getPageDocument } = data
|
|
32
|
+
const { blocks, nav, footer, navlist } = getPageDocument.data
|
|
33
|
+
return (
|
|
34
|
+
<div className="App">
|
|
35
|
+
<Theme theme={data}>
|
|
36
|
+
<div className="min-h-screen flex flex-col">
|
|
37
|
+
<Nav nav={nav} />
|
|
38
|
+
<div className="flex-grow flex flex-col">
|
|
39
|
+
<Blocks
|
|
40
|
+
blocksData={blocks}
|
|
41
|
+
placeholder={
|
|
42
|
+
<div className="flex-grow flex items-center justify-center transition duration-150 ease-out text-gray-700 dark:text-gray-100 bg-gradient-to-br from-gray-50 to-white dark:from-gray-900 dark:to-gray-800 body-font overflow-hidden">
|
|
43
|
+
<p className="opacity-30">
|
|
44
|
+
There's nothing here, try adding some page sections.
|
|
45
|
+
</p>
|
|
46
|
+
</div>
|
|
47
|
+
}
|
|
48
|
+
/>
|
|
49
|
+
</div>
|
|
50
|
+
<Footer
|
|
51
|
+
name={nav?.wordmark?.name || ''}
|
|
52
|
+
footer={footer}
|
|
53
|
+
navList={navlist}
|
|
54
|
+
/>
|
|
55
|
+
</div>
|
|
56
|
+
</Theme>
|
|
57
|
+
{/* {showModal && (
|
|
58
|
+
<TinaModal
|
|
59
|
+
data={data}
|
|
60
|
+
close={() => {
|
|
61
|
+
setShowModal(false);
|
|
62
|
+
}}
|
|
63
|
+
/> */}
|
|
64
|
+
{/* )} */}
|
|
65
|
+
</div>
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const PAGE_BLOCKS = {
|
|
70
|
+
hero: Hero,
|
|
71
|
+
testimonial: Testimonial,
|
|
72
|
+
features: Features,
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const PAGE_BLOCK_TEMPLATES = {
|
|
76
|
+
hero: hero_template,
|
|
77
|
+
testimonial: testimonial_template,
|
|
78
|
+
features: features_template,
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export default App
|
|
82
|
+
|
|
83
|
+
export const query = gql`
|
|
84
|
+
query ContentQuery {
|
|
85
|
+
getThemeDocument(relativePath: "NormalTheme.json") {
|
|
86
|
+
data {
|
|
87
|
+
color
|
|
88
|
+
btnStyle
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
getPageDocument(relativePath: "homepage.json") {
|
|
92
|
+
id
|
|
93
|
+
data {
|
|
94
|
+
nav {
|
|
95
|
+
wordmark {
|
|
96
|
+
icon {
|
|
97
|
+
color
|
|
98
|
+
name
|
|
99
|
+
style
|
|
100
|
+
}
|
|
101
|
+
name
|
|
102
|
+
}
|
|
103
|
+
items {
|
|
104
|
+
label
|
|
105
|
+
link
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
blocks {
|
|
109
|
+
__typename
|
|
110
|
+
... on PageBlocksHero {
|
|
111
|
+
tagline
|
|
112
|
+
headline
|
|
113
|
+
paragraph
|
|
114
|
+
string {
|
|
115
|
+
color
|
|
116
|
+
}
|
|
117
|
+
image {
|
|
118
|
+
src
|
|
119
|
+
alt
|
|
120
|
+
}
|
|
121
|
+
actions {
|
|
122
|
+
label
|
|
123
|
+
type
|
|
124
|
+
icon
|
|
125
|
+
}
|
|
126
|
+
style {
|
|
127
|
+
color
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
__typename
|
|
131
|
+
... on PageBlocksTestimonial {
|
|
132
|
+
quote
|
|
133
|
+
author
|
|
134
|
+
style {
|
|
135
|
+
color
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
__typename
|
|
139
|
+
... on PageBlocksFeatures {
|
|
140
|
+
items {
|
|
141
|
+
icon {
|
|
142
|
+
color
|
|
143
|
+
name
|
|
144
|
+
style
|
|
145
|
+
}
|
|
146
|
+
title
|
|
147
|
+
text
|
|
148
|
+
actions {
|
|
149
|
+
label
|
|
150
|
+
type
|
|
151
|
+
icon
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
navlist {
|
|
157
|
+
__typename
|
|
158
|
+
... on PageNavlistNav {
|
|
159
|
+
title
|
|
160
|
+
items {
|
|
161
|
+
label
|
|
162
|
+
link
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
footer {
|
|
167
|
+
social {
|
|
168
|
+
facebook
|
|
169
|
+
twitter
|
|
170
|
+
instagram
|
|
171
|
+
github
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
`
|
|
178
|
+
|
|
179
|
+
export const getStaticProps = async (ctx) => {
|
|
180
|
+
const tinaProps = await getStaticPropsForTina({ query, variables: {} })
|
|
181
|
+
return {
|
|
182
|
+
props: {
|
|
183
|
+
...tinaProps,
|
|
184
|
+
},
|
|
185
|
+
}
|
|
186
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
module.exports = {
|
|
15
|
+
plugins: {
|
|
16
|
+
tailwindcss: {},
|
|
17
|
+
autoprefixer: {},
|
|
18
|
+
},
|
|
19
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta
|
|
6
|
+
name="viewport"
|
|
7
|
+
content="width=device-width, initial-scale=1, shrink-to-fit=no"
|
|
8
|
+
/>
|
|
9
|
+
<meta name="theme-color" content="#000000" />
|
|
10
|
+
<!--
|
|
11
|
+
manifest.json provides metadata used when your web app is added to the
|
|
12
|
+
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
|
|
13
|
+
-->
|
|
14
|
+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
|
15
|
+
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
|
|
16
|
+
<!--
|
|
17
|
+
Notice the use of %PUBLIC_URL% in the tags above.
|
|
18
|
+
It will be replaced with the URL of the `public` folder during the build.
|
|
19
|
+
Only files inside the `public` folder can be referenced from the HTML.
|
|
20
|
+
|
|
21
|
+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
|
22
|
+
work correctly both with client-side routing and a non-root public URL.
|
|
23
|
+
Learn how to configure a non-root public URL by running `npm run build`.
|
|
24
|
+
-->
|
|
25
|
+
<title>Tina Demo</title>
|
|
26
|
+
</head>
|
|
27
|
+
|
|
28
|
+
<body>
|
|
29
|
+
<noscript> You need to enable JavaScript to run this app. </noscript>
|
|
30
|
+
<div id="root"></div>
|
|
31
|
+
<!--
|
|
32
|
+
This HTML file is a template.
|
|
33
|
+
If you open it directly in the browser, you will see an empty page.
|
|
34
|
+
|
|
35
|
+
You can add webfonts, meta tags, or analytics to this file.
|
|
36
|
+
The build step will place the bundled scripts into the <body> tag.
|
|
37
|
+
|
|
38
|
+
To begin the development, run `npm start` or `yarn start`.
|
|
39
|
+
To create a production bundle, use `npm run build` or `yarn build`.
|
|
40
|
+
-->
|
|
41
|
+
</body>
|
|
42
|
+
</html>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
details summary::-webkit-details-marker {
|
|
6
|
+
display: none;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
div[class^='ModalBody'],
|
|
10
|
+
div[class*=' ModalBody'] {
|
|
11
|
+
min-height: 42vh;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
button[class^='SidebarToggleButton']:focus,
|
|
15
|
+
button[class*=' SidebarToggleButton']:focus,
|
|
16
|
+
button[class^='SidebarToggleButton'],
|
|
17
|
+
button[class*=' SidebarToggleButton'] {
|
|
18
|
+
outline: 0 !important;
|
|
19
|
+
outline-color: transparent;
|
|
20
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
const chroma = require('chroma-js')
|
|
15
|
+
const colors = require('tailwindcss/colors')
|
|
16
|
+
|
|
17
|
+
module.exports = {
|
|
18
|
+
purge: [],
|
|
19
|
+
darkMode: 'class',
|
|
20
|
+
theme: {
|
|
21
|
+
colors: {
|
|
22
|
+
transparent: 'transparent',
|
|
23
|
+
current: 'currentColor',
|
|
24
|
+
black: colors.black,
|
|
25
|
+
white: colors.white,
|
|
26
|
+
gray: colors.coolGray,
|
|
27
|
+
blue: colors.blue,
|
|
28
|
+
teal: colors.cyan,
|
|
29
|
+
green: colors.emerald,
|
|
30
|
+
red: colors.rose,
|
|
31
|
+
purple: colors.purple,
|
|
32
|
+
pink: colors.pink,
|
|
33
|
+
yellow: colors.yellow,
|
|
34
|
+
orange: colors.orange,
|
|
35
|
+
},
|
|
36
|
+
screens: {
|
|
37
|
+
sm: '600px',
|
|
38
|
+
md: '900px',
|
|
39
|
+
lg: '1200px',
|
|
40
|
+
xl: '1500px',
|
|
41
|
+
'2xl': '1800px',
|
|
42
|
+
},
|
|
43
|
+
extend: {
|
|
44
|
+
spacing: {
|
|
45
|
+
128: '32rem',
|
|
46
|
+
},
|
|
47
|
+
zIndex: {
|
|
48
|
+
'-1': '-1',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
variants: {
|
|
53
|
+
extend: {},
|
|
54
|
+
},
|
|
55
|
+
plugins: [
|
|
56
|
+
/* https://gist.github.com/Merott/d2a19b32db07565e94f10d13d11a8574 */
|
|
57
|
+
function ({ addBase, theme }) {
|
|
58
|
+
function extractColorVars(colorObj, colorGroup = '') {
|
|
59
|
+
return Object.keys(colorObj).reduce((vars, colorKey) => {
|
|
60
|
+
const value = colorObj[colorKey]
|
|
61
|
+
|
|
62
|
+
if (value === 'transparent' || value === 'currentColor') return
|
|
63
|
+
|
|
64
|
+
const newVars =
|
|
65
|
+
typeof value === 'string'
|
|
66
|
+
? {
|
|
67
|
+
[`--color${colorGroup}-${colorKey}`]: value,
|
|
68
|
+
[`--color-rgb${colorGroup}-${colorKey}`]: chroma(value)
|
|
69
|
+
.rgb()
|
|
70
|
+
.toString(),
|
|
71
|
+
}
|
|
72
|
+
: extractColorVars(value, `-${colorKey}`)
|
|
73
|
+
|
|
74
|
+
return { ...vars, ...newVars }
|
|
75
|
+
}, {})
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
addBase({
|
|
79
|
+
':root': extractColorVars(theme('colors')),
|
|
80
|
+
})
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es5",
|
|
4
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
5
|
+
"allowJs": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"strict": false,
|
|
8
|
+
"forceConsistentCasingInFileNames": true,
|
|
9
|
+
"noEmit": true,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"module": "esnext",
|
|
12
|
+
"moduleResolution": "node",
|
|
13
|
+
"resolveJsonModule": true,
|
|
14
|
+
"isolatedModules": true,
|
|
15
|
+
"jsx": "preserve"
|
|
16
|
+
},
|
|
17
|
+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "components/features.ts"],
|
|
18
|
+
"exclude": ["node_modules"]
|
|
19
|
+
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-tina-app",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
7
|
+
"examples",
|
|
7
8
|
"bin/*"
|
|
8
9
|
],
|
|
9
|
-
"bin": "
|
|
10
|
+
"bin": "bin/create-tina-app",
|
|
10
11
|
"typings": "dist/index.d.ts",
|
|
11
12
|
"license": "Apache-2.0",
|
|
12
13
|
"buildConfig": {
|
|
@@ -19,7 +20,8 @@
|
|
|
19
20
|
},
|
|
20
21
|
"scripts": {
|
|
21
22
|
"types": "yarn tsc",
|
|
22
|
-
"build": "echo \"Run `yarn build` from the root of the repository instead\""
|
|
23
|
+
"build": "echo \"Run `yarn build` from the root of the repository instead\"",
|
|
24
|
+
"test-run-bin": "yarn create-tina-app"
|
|
23
25
|
},
|
|
24
26
|
"publishConfig": {
|
|
25
27
|
"registry": "https://registry.npmjs.org"
|
|
@@ -29,6 +31,7 @@
|
|
|
29
31
|
"directory": "packages/create-tina-app"
|
|
30
32
|
},
|
|
31
33
|
"devDependencies": {
|
|
34
|
+
"@types/fs-extra": "^9.0.13",
|
|
32
35
|
"@types/node": "^16.11.7",
|
|
33
36
|
"@types/prompts": "^2.0.14",
|
|
34
37
|
"@types/tar": "4.0.3",
|
|
@@ -39,6 +42,7 @@
|
|
|
39
42
|
"commander": "^8.3.0",
|
|
40
43
|
"cross-spawn": "^7.0.3",
|
|
41
44
|
"esm": "3.2.25",
|
|
45
|
+
"fs-extra": "^10.0.0",
|
|
42
46
|
"got": "^11.8.2",
|
|
43
47
|
"prompts": "^2.4.2",
|
|
44
48
|
"rimraf": "^3.0.2",
|