uniweb 0.2.52 → 0.2.54
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/README.md +2 -0
- package/package.json +5 -5
- package/templates/multi/foundations/default/package.json.hbs +1 -0
- package/templates/multi/foundations/default/src/components/Section/meta.js +35 -40
- package/templates/multi/foundations/default/src/foundation.js.hbs +41 -0
- package/templates/single/foundation/package.json.hbs +1 -0
- package/templates/single/foundation/src/components/Section/meta.js +35 -40
- package/templates/single/foundation/src/foundation.js.hbs +48 -0
- package/partials/exports-js.hbs +0 -14
- package/templates/multi/foundations/default/src/exports.js.hbs +0 -11
- package/templates/multi/foundations/default/src/meta.js.hbs +0 -6
- package/templates/single/foundation/src/exports.js.hbs +0 -11
- package/templates/single/foundation/src/meta.js.hbs +0 -6
- package/templates/template/README.md.hbs +0 -65
- package/templates/template/package.json.hbs +0 -33
- package/templates/template/template/AGENTS.md.hbs +0 -1
- package/templates/template/template/foundation/package.json.hbs +0 -37
- package/templates/template/template/foundation/src/_entry.generated.js +0 -15
- package/templates/template/template/foundation/src/components/Features/index.jsx +0 -74
- package/templates/template/template/foundation/src/components/Features/meta.js +0 -41
- package/templates/template/template/foundation/src/components/Hero/index.jsx +0 -88
- package/templates/template/template/foundation/src/components/Hero/meta.js +0 -47
- package/templates/template/template/foundation/src/meta.js.hbs +0 -6
- package/templates/template/template/foundation/src/styles.css +0 -13
- package/templates/template/template/foundation/vite.config.js +0 -3
- package/templates/template/template/package.json.hbs +0 -15
- package/templates/template/template/pnpm-workspace.yaml +0 -3
- package/templates/template/template/site/index.html.hbs +0 -13
- package/templates/template/template/site/main.js +0 -6
- package/templates/template/template/site/package.json.hbs +0 -27
- package/templates/template/template/site/pages/home/1-hero.md.hbs +0 -16
- package/templates/template/template/site/pages/home/2-features.md +0 -21
- package/templates/template/template/site/pages/home/page.yml +0 -2
- package/templates/template/template/site/public/favicon.svg +0 -7
- package/templates/template/template/site/site.yml.hbs +0 -8
- package/templates/template/template/site/vite.config.js +0 -3
- package/templates/template/template/template.json.hbs +0 -7
- package/templates/template/template.json +0 -4
package/README.md
CHANGED
|
@@ -171,8 +171,10 @@ The parser extracts semantic elements from markdown—`title` from the first hea
|
|
|
171
171
|
|
|
172
172
|
- [Content Structure](./docs/content-structure.md) — How content is parsed and structured
|
|
173
173
|
- [Component Metadata](./docs/component-metadata.md) — Full meta.js schema reference
|
|
174
|
+
- [Site Theming](./docs/site-theming.md) — Colors, typography, and dark mode
|
|
174
175
|
- [Data Fetching](./docs/data-fetching.md) — Load external data from files or APIs
|
|
175
176
|
- [Dynamic Routes](./docs/dynamic-routes.md) — Generate pages from data (blogs, catalogs)
|
|
177
|
+
- [Content Collections](./docs/content-collections.md) — Manage articles, team members, and more
|
|
176
178
|
|
|
177
179
|
## Foundations Are Portable
|
|
178
180
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uniweb",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.54",
|
|
4
4
|
"description": "Create structured Vite + React sites with content/code separation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"js-yaml": "^4.1.0",
|
|
38
38
|
"prompts": "^2.4.2",
|
|
39
39
|
"tar": "^7.0.0",
|
|
40
|
-
"@uniweb/build": "0.1.
|
|
41
|
-
"@uniweb/
|
|
42
|
-
"@uniweb/
|
|
43
|
-
"@uniweb/
|
|
40
|
+
"@uniweb/build": "0.1.33",
|
|
41
|
+
"@uniweb/core": "0.1.16",
|
|
42
|
+
"@uniweb/runtime": "0.2.20",
|
|
43
|
+
"@uniweb/kit": "0.1.11"
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -1,66 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Section Component Metadata (v2)
|
|
3
|
+
*
|
|
4
|
+
* A versatile content section for headings, text, and links.
|
|
5
|
+
*/
|
|
1
6
|
export default {
|
|
2
7
|
title: 'Section',
|
|
3
8
|
description: 'A versatile content section for headings, text, and links',
|
|
4
|
-
category: '
|
|
9
|
+
category: 'content',
|
|
10
|
+
purpose: 'Inform',
|
|
5
11
|
|
|
6
|
-
|
|
7
|
-
pretitle:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
description: 'Main heading (H1)',
|
|
14
|
-
},
|
|
15
|
-
subtitle: {
|
|
16
|
-
label: 'Subtitle',
|
|
17
|
-
description: 'Secondary heading (H2 after H1)',
|
|
18
|
-
},
|
|
19
|
-
paragraphs: {
|
|
20
|
-
label: 'Content',
|
|
21
|
-
description: 'Body text paragraphs',
|
|
22
|
-
},
|
|
23
|
-
links: {
|
|
24
|
-
label: 'Links',
|
|
25
|
-
description: 'Call-to-action buttons',
|
|
26
|
-
},
|
|
27
|
-
imgs: {
|
|
28
|
-
label: 'Images',
|
|
29
|
-
description: 'Section images',
|
|
30
|
-
},
|
|
12
|
+
content: {
|
|
13
|
+
pretitle: 'Eyebrow text',
|
|
14
|
+
title: 'Main heading',
|
|
15
|
+
subtitle: 'Secondary heading',
|
|
16
|
+
paragraphs: 'Body text',
|
|
17
|
+
links: 'Call-to-action buttons',
|
|
18
|
+
imgs: 'Section images',
|
|
31
19
|
},
|
|
32
20
|
|
|
33
|
-
|
|
21
|
+
params: {
|
|
34
22
|
theme: {
|
|
35
23
|
type: 'select',
|
|
36
24
|
label: 'Theme',
|
|
37
|
-
options: [
|
|
38
|
-
{ value: 'light', label: 'Light' },
|
|
39
|
-
{ value: 'dark', label: 'Dark' },
|
|
40
|
-
{ value: 'primary', label: 'Primary' },
|
|
41
|
-
],
|
|
25
|
+
options: ['light', 'dark', 'primary'],
|
|
42
26
|
default: 'light',
|
|
43
27
|
},
|
|
44
28
|
align: {
|
|
45
29
|
type: 'select',
|
|
46
30
|
label: 'Alignment',
|
|
47
|
-
options: [
|
|
48
|
-
{ value: 'left', label: 'Left' },
|
|
49
|
-
{ value: 'center', label: 'Center' },
|
|
50
|
-
{ value: 'right', label: 'Right' },
|
|
51
|
-
],
|
|
31
|
+
options: ['left', 'center', 'right'],
|
|
52
32
|
default: 'center',
|
|
53
33
|
},
|
|
54
34
|
width: {
|
|
55
35
|
type: 'select',
|
|
56
36
|
label: 'Width',
|
|
57
37
|
options: [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
38
|
+
'narrow',
|
|
39
|
+
'default',
|
|
40
|
+
'wide',
|
|
61
41
|
{ value: 'full', label: 'Full Width' },
|
|
62
42
|
],
|
|
63
43
|
default: 'default',
|
|
64
44
|
},
|
|
65
45
|
},
|
|
46
|
+
|
|
47
|
+
presets: {
|
|
48
|
+
default: {
|
|
49
|
+
label: 'Centered',
|
|
50
|
+
params: { theme: 'light', align: 'center' },
|
|
51
|
+
},
|
|
52
|
+
dark: {
|
|
53
|
+
label: 'Dark Theme',
|
|
54
|
+
params: { theme: 'dark', align: 'center' },
|
|
55
|
+
},
|
|
56
|
+
left: {
|
|
57
|
+
label: 'Left Aligned',
|
|
58
|
+
params: { theme: 'light', align: 'left' },
|
|
59
|
+
},
|
|
60
|
+
},
|
|
66
61
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* {{projectName}} Default Foundation Configuration
|
|
3
|
+
*
|
|
4
|
+
* This file defines foundation-level configuration:
|
|
5
|
+
* - vars: CSS custom properties that sites can override in theme.yml
|
|
6
|
+
* - Layout: Custom page layout component (optional)
|
|
7
|
+
* - props: Foundation-wide props accessible via website.foundationProps
|
|
8
|
+
*
|
|
9
|
+
* Identity (name, version, description) comes from package.json.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
// import Layout from './components/Layout'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* CSS custom properties that sites can override in theme.yml
|
|
16
|
+
*/
|
|
17
|
+
export const vars = {
|
|
18
|
+
'header-height': {
|
|
19
|
+
default: '4rem',
|
|
20
|
+
description: 'Fixed header height',
|
|
21
|
+
},
|
|
22
|
+
'max-content-width': {
|
|
23
|
+
default: '80rem',
|
|
24
|
+
description: 'Maximum content width (1280px)',
|
|
25
|
+
},
|
|
26
|
+
'section-padding-y': {
|
|
27
|
+
default: '5rem',
|
|
28
|
+
description: 'Vertical padding for sections',
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Runtime exports (Layout and props)
|
|
34
|
+
*/
|
|
35
|
+
export default {
|
|
36
|
+
// Uncomment to use a custom page layout:
|
|
37
|
+
// Layout,
|
|
38
|
+
|
|
39
|
+
// Foundation-wide props (accessible via website.foundationProps):
|
|
40
|
+
props: {},
|
|
41
|
+
}
|
|
@@ -1,66 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Section Component Metadata (v2)
|
|
3
|
+
*
|
|
4
|
+
* A versatile content section for headings, text, and links.
|
|
5
|
+
*/
|
|
1
6
|
export default {
|
|
2
7
|
title: 'Section',
|
|
3
8
|
description: 'A versatile content section for headings, text, and links',
|
|
4
|
-
category: '
|
|
9
|
+
category: 'content',
|
|
10
|
+
purpose: 'Inform',
|
|
5
11
|
|
|
6
|
-
|
|
7
|
-
pretitle:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
description: 'Main heading (H1)',
|
|
14
|
-
},
|
|
15
|
-
subtitle: {
|
|
16
|
-
label: 'Subtitle',
|
|
17
|
-
description: 'Secondary heading (H2 after H1)',
|
|
18
|
-
},
|
|
19
|
-
paragraphs: {
|
|
20
|
-
label: 'Content',
|
|
21
|
-
description: 'Body text paragraphs',
|
|
22
|
-
},
|
|
23
|
-
links: {
|
|
24
|
-
label: 'Links',
|
|
25
|
-
description: 'Call-to-action buttons',
|
|
26
|
-
},
|
|
27
|
-
imgs: {
|
|
28
|
-
label: 'Images',
|
|
29
|
-
description: 'Section images',
|
|
30
|
-
},
|
|
12
|
+
content: {
|
|
13
|
+
pretitle: 'Eyebrow text',
|
|
14
|
+
title: 'Main heading',
|
|
15
|
+
subtitle: 'Secondary heading',
|
|
16
|
+
paragraphs: 'Body text',
|
|
17
|
+
links: 'Call-to-action buttons',
|
|
18
|
+
imgs: 'Section images',
|
|
31
19
|
},
|
|
32
20
|
|
|
33
|
-
|
|
21
|
+
params: {
|
|
34
22
|
theme: {
|
|
35
23
|
type: 'select',
|
|
36
24
|
label: 'Theme',
|
|
37
|
-
options: [
|
|
38
|
-
{ value: 'light', label: 'Light' },
|
|
39
|
-
{ value: 'dark', label: 'Dark' },
|
|
40
|
-
{ value: 'primary', label: 'Primary' },
|
|
41
|
-
],
|
|
25
|
+
options: ['light', 'dark', 'primary'],
|
|
42
26
|
default: 'light',
|
|
43
27
|
},
|
|
44
28
|
align: {
|
|
45
29
|
type: 'select',
|
|
46
30
|
label: 'Alignment',
|
|
47
|
-
options: [
|
|
48
|
-
{ value: 'left', label: 'Left' },
|
|
49
|
-
{ value: 'center', label: 'Center' },
|
|
50
|
-
{ value: 'right', label: 'Right' },
|
|
51
|
-
],
|
|
31
|
+
options: ['left', 'center', 'right'],
|
|
52
32
|
default: 'center',
|
|
53
33
|
},
|
|
54
34
|
width: {
|
|
55
35
|
type: 'select',
|
|
56
36
|
label: 'Width',
|
|
57
37
|
options: [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
38
|
+
'narrow',
|
|
39
|
+
'default',
|
|
40
|
+
'wide',
|
|
61
41
|
{ value: 'full', label: 'Full Width' },
|
|
62
42
|
],
|
|
63
43
|
default: 'default',
|
|
64
44
|
},
|
|
65
45
|
},
|
|
46
|
+
|
|
47
|
+
presets: {
|
|
48
|
+
default: {
|
|
49
|
+
label: 'Centered',
|
|
50
|
+
params: { theme: 'light', align: 'center' },
|
|
51
|
+
},
|
|
52
|
+
dark: {
|
|
53
|
+
label: 'Dark Theme',
|
|
54
|
+
params: { theme: 'dark', align: 'center' },
|
|
55
|
+
},
|
|
56
|
+
left: {
|
|
57
|
+
label: 'Left Aligned',
|
|
58
|
+
params: { theme: 'light', align: 'left' },
|
|
59
|
+
},
|
|
60
|
+
},
|
|
66
61
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* {{projectName}} Foundation Configuration
|
|
3
|
+
*
|
|
4
|
+
* This file defines foundation-level configuration:
|
|
5
|
+
* - vars: CSS custom properties that sites can override in theme.yml
|
|
6
|
+
* - Layout: Custom page layout component (optional)
|
|
7
|
+
* - props: Foundation-wide props accessible via website.foundationProps
|
|
8
|
+
*
|
|
9
|
+
* Identity (name, version, description) comes from package.json.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
// import Layout from './components/Layout'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* CSS custom properties that sites can override in theme.yml
|
|
16
|
+
*/
|
|
17
|
+
export const vars = {
|
|
18
|
+
'header-height': {
|
|
19
|
+
default: '4rem',
|
|
20
|
+
description: 'Fixed header height',
|
|
21
|
+
},
|
|
22
|
+
'max-content-width': {
|
|
23
|
+
default: '80rem',
|
|
24
|
+
description: 'Maximum content width (1280px)',
|
|
25
|
+
},
|
|
26
|
+
'section-padding-y': {
|
|
27
|
+
default: '5rem',
|
|
28
|
+
description: 'Vertical padding for sections',
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Runtime exports (Layout and props)
|
|
34
|
+
*
|
|
35
|
+
* The Layout component receives pre-rendered page areas as props:
|
|
36
|
+
* - page, website: Runtime context
|
|
37
|
+
* - header, body, footer: Core page regions (pre-rendered React elements)
|
|
38
|
+
* - left/leftPanel, right/rightPanel: Sidebar panels
|
|
39
|
+
*
|
|
40
|
+
* If no Layout is provided, the runtime uses a default layout.
|
|
41
|
+
*/
|
|
42
|
+
export default {
|
|
43
|
+
// Uncomment to use a custom page layout:
|
|
44
|
+
// Layout,
|
|
45
|
+
|
|
46
|
+
// Foundation-wide props (accessible via website.foundationProps):
|
|
47
|
+
props: {},
|
|
48
|
+
}
|
package/partials/exports-js.hbs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Foundation Exports
|
|
3
|
-
*
|
|
4
|
-
* Optional file to export foundation-level capabilities to the runtime:
|
|
5
|
-
* - Layout: Custom page layout component (receives header, body, footer, sidebars)
|
|
6
|
-
* - props: Foundation-wide props accessible via website.foundationProps
|
|
7
|
-
*
|
|
8
|
-
* The Layout component receives pre-rendered page areas as props:
|
|
9
|
-
* - page, website: Runtime context
|
|
10
|
-
* - header, body, footer: Core page regions (pre-rendered React elements)
|
|
11
|
-
* - left/leftPanel, right/rightPanel: Sidebar panels
|
|
12
|
-
*
|
|
13
|
-
* If this file is not provided, the runtime uses a default layout (header -> body -> footer).
|
|
14
|
-
*/
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# {{templateTitle}} Template
|
|
2
|
-
|
|
3
|
-
{{templateDescription}}
|
|
4
|
-
|
|
5
|
-
## Development
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
# Install dependencies
|
|
9
|
-
pnpm install
|
|
10
|
-
|
|
11
|
-
# Run the template in development mode
|
|
12
|
-
pnpm dev
|
|
13
|
-
|
|
14
|
-
# Build the template
|
|
15
|
-
pnpm build
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Template Structure
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
├── template.json # Template metadata (published)
|
|
22
|
-
├── template/ # Template files (copied to user projects)
|
|
23
|
-
│ ├── foundation/ # Component library
|
|
24
|
-
│ ├── site/ # Content and pages
|
|
25
|
-
│ └── ...
|
|
26
|
-
└── package.json # npm package config
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Publishing
|
|
30
|
-
|
|
31
|
-
### To npm
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
npm publish --access public
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Users can then use your template:
|
|
38
|
-
```bash
|
|
39
|
-
uniweb create myproject --template @{{scope}}/template-{{templateName}}
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### To GitHub
|
|
43
|
-
|
|
44
|
-
Push to a GitHub repository and users can use:
|
|
45
|
-
```bash
|
|
46
|
-
uniweb create myproject --template github:{{scope}}/template-{{templateName}}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Customization
|
|
50
|
-
|
|
51
|
-
### Adding Components
|
|
52
|
-
|
|
53
|
-
1. Create component in `template/foundation/src/components/ComponentName/`
|
|
54
|
-
2. Add `index.jsx` and `meta.js`
|
|
55
|
-
3. Export from `template/foundation/src/index.js`
|
|
56
|
-
|
|
57
|
-
### Adding Content
|
|
58
|
-
|
|
59
|
-
1. Add pages in `template/site/pages/`
|
|
60
|
-
2. Each page needs `page.yml` and section `.md` files
|
|
61
|
-
3. Reference components in frontmatter with `type: ComponentName`
|
|
62
|
-
|
|
63
|
-
## License
|
|
64
|
-
|
|
65
|
-
MIT
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@{{scope}}/template-{{templateName}}",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"description": "{{templateDescription}}",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "template.json",
|
|
7
|
-
"files": [
|
|
8
|
-
"template.json",
|
|
9
|
-
"template/"
|
|
10
|
-
],
|
|
11
|
-
"keywords": [
|
|
12
|
-
"uniweb",
|
|
13
|
-
"template",
|
|
14
|
-
"{{templateName}}"
|
|
15
|
-
],
|
|
16
|
-
"scripts": {
|
|
17
|
-
"dev": "cd template && pnpm dev",
|
|
18
|
-
"build": "cd template && pnpm build",
|
|
19
|
-
"test": "node scripts/test-template.js"
|
|
20
|
-
},
|
|
21
|
-
"devDependencies": {
|
|
22
|
-
"uniweb": "{{version "uniweb"}}"
|
|
23
|
-
},
|
|
24
|
-
"workspaces": [
|
|
25
|
-
"site",
|
|
26
|
-
"foundation",
|
|
27
|
-
"sites/*",
|
|
28
|
-
"foundations/*"
|
|
29
|
-
],
|
|
30
|
-
"pnpm": {
|
|
31
|
-
"onlyBuiltDependencies": ["esbuild", "sharp"]
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{{> agents-md}}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "foundation",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"type": "module",
|
|
5
|
-
"main": "./src/_entry.generated.js",
|
|
6
|
-
"exports": {
|
|
7
|
-
".": "./src/_entry.generated.js",
|
|
8
|
-
"./styles": "./src/styles.css",
|
|
9
|
-
"./dist": "./dist/foundation.js",
|
|
10
|
-
"./dist/styles": "./dist/assets/style.css"
|
|
11
|
-
},
|
|
12
|
-
"files": ["dist", "src"],
|
|
13
|
-
"scripts": {
|
|
14
|
-
"dev": "vite",
|
|
15
|
-
"build": "uniweb build",
|
|
16
|
-
"build:vite": "vite build",
|
|
17
|
-
"preview": "vite preview"
|
|
18
|
-
},
|
|
19
|
-
"peerDependencies": {
|
|
20
|
-
"react": "^18.0.0 || ^19.0.0",
|
|
21
|
-
"react-dom": "^18.0.0 || ^19.0.0"
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@uniweb/core": "{{version "@uniweb/core"}}",
|
|
25
|
-
"@uniweb/kit": "{{version "@uniweb/kit"}}"
|
|
26
|
-
},
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"@tailwindcss/vite": "^4.0.0",
|
|
29
|
-
"@uniweb/build": "{{version "@uniweb/build"}}",
|
|
30
|
-
"@vitejs/plugin-react": "^5.0.0",
|
|
31
|
-
"react": "^18.2.0",
|
|
32
|
-
"react-dom": "^18.2.0",
|
|
33
|
-
"tailwindcss": "^4.0.0",
|
|
34
|
-
"vite": "^7.0.0",
|
|
35
|
-
"vite-plugin-svgr": "^4.2.0"
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// Auto-generated foundation entry point
|
|
2
|
-
// DO NOT EDIT - This file is regenerated during build
|
|
3
|
-
|
|
4
|
-
import './styles.css'
|
|
5
|
-
import Features from './components/Features/index.jsx'
|
|
6
|
-
import Hero from './components/Hero/index.jsx'
|
|
7
|
-
|
|
8
|
-
export const components = { Features, Hero }
|
|
9
|
-
|
|
10
|
-
export { Features, Hero }
|
|
11
|
-
|
|
12
|
-
export const capabilities = null
|
|
13
|
-
|
|
14
|
-
// Per-component runtime metadata (from meta.js)
|
|
15
|
-
export const meta = {}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { H2, H3, P, cn } from '@uniweb/kit'
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Features Component
|
|
6
|
-
*
|
|
7
|
-
* Display a list of features in a grid. Uses items (H3 sections)
|
|
8
|
-
* from the markdown content.
|
|
9
|
-
*/
|
|
10
|
-
export function Features({ content, params }) {
|
|
11
|
-
const { title, subtitle, items = [] } = content || {}
|
|
12
|
-
|
|
13
|
-
const {
|
|
14
|
-
columns = 3,
|
|
15
|
-
theme = 'light',
|
|
16
|
-
} = params || {}
|
|
17
|
-
|
|
18
|
-
const themes = {
|
|
19
|
-
light: 'bg-white text-gray-900',
|
|
20
|
-
gray: 'bg-gray-50 text-gray-900',
|
|
21
|
-
dark: 'bg-gray-900 text-white',
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const gridCols = {
|
|
25
|
-
2: 'md:grid-cols-2',
|
|
26
|
-
3: 'md:grid-cols-3',
|
|
27
|
-
4: 'md:grid-cols-4',
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<section className={cn('py-16 px-6', themes[theme])}>
|
|
32
|
-
<div className="max-w-6xl mx-auto">
|
|
33
|
-
{(title || subtitle) && (
|
|
34
|
-
<div className="text-center mb-12">
|
|
35
|
-
{title && (
|
|
36
|
-
<H2 text={title} className="text-3xl font-bold mb-4" />
|
|
37
|
-
)}
|
|
38
|
-
{subtitle && (
|
|
39
|
-
<p className={cn(
|
|
40
|
-
'text-lg',
|
|
41
|
-
theme === 'light' || theme === 'gray' ? 'text-gray-600' : 'text-gray-300'
|
|
42
|
-
)}>
|
|
43
|
-
{subtitle}
|
|
44
|
-
</p>
|
|
45
|
-
)}
|
|
46
|
-
</div>
|
|
47
|
-
)}
|
|
48
|
-
|
|
49
|
-
<div className={cn('grid gap-8', gridCols[columns] || 'md:grid-cols-3')}>
|
|
50
|
-
{items.map((item, index) => (
|
|
51
|
-
<div key={index} className="text-center">
|
|
52
|
-
{item.title && (
|
|
53
|
-
<H3
|
|
54
|
-
text={item.title}
|
|
55
|
-
className="text-xl font-semibold mb-3"
|
|
56
|
-
/>
|
|
57
|
-
)}
|
|
58
|
-
{item.paragraphs?.[0] && (
|
|
59
|
-
<P
|
|
60
|
-
text={item.paragraphs[0]}
|
|
61
|
-
className={cn(
|
|
62
|
-
theme === 'light' || theme === 'gray' ? 'text-gray-600' : 'text-gray-300'
|
|
63
|
-
)}
|
|
64
|
-
/>
|
|
65
|
-
)}
|
|
66
|
-
</div>
|
|
67
|
-
))}
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
</section>
|
|
71
|
-
)
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export default Features
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
title: 'Features',
|
|
3
|
-
description: 'Display a list of features in a grid',
|
|
4
|
-
category: 'Content',
|
|
5
|
-
|
|
6
|
-
elements: {
|
|
7
|
-
title: {
|
|
8
|
-
label: 'Section Title',
|
|
9
|
-
},
|
|
10
|
-
subtitle: {
|
|
11
|
-
label: 'Section Subtitle',
|
|
12
|
-
},
|
|
13
|
-
items: {
|
|
14
|
-
label: 'Features',
|
|
15
|
-
description: 'Each H3 becomes a feature item',
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
properties: {
|
|
20
|
-
columns: {
|
|
21
|
-
type: 'select',
|
|
22
|
-
label: 'Columns',
|
|
23
|
-
options: [
|
|
24
|
-
{ value: 2, label: '2 Columns' },
|
|
25
|
-
{ value: 3, label: '3 Columns' },
|
|
26
|
-
{ value: 4, label: '4 Columns' },
|
|
27
|
-
],
|
|
28
|
-
default: 3,
|
|
29
|
-
},
|
|
30
|
-
theme: {
|
|
31
|
-
type: 'select',
|
|
32
|
-
label: 'Theme',
|
|
33
|
-
options: [
|
|
34
|
-
{ value: 'light', label: 'Light' },
|
|
35
|
-
{ value: 'gray', label: 'Gray' },
|
|
36
|
-
{ value: 'dark', label: 'Dark' },
|
|
37
|
-
],
|
|
38
|
-
default: 'light',
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { H1, P, Link, cn } from '@uniweb/kit'
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Hero Component
|
|
6
|
-
*
|
|
7
|
-
* A hero section for landing pages. Customize this component
|
|
8
|
-
* for your template's needs.
|
|
9
|
-
*/
|
|
10
|
-
export function Hero({ content, params }) {
|
|
11
|
-
const { title, pretitle, subtitle, paragraphs = [], links = [], imgs = [] } = content || {}
|
|
12
|
-
|
|
13
|
-
const {
|
|
14
|
-
theme = 'light',
|
|
15
|
-
layout = 'center',
|
|
16
|
-
} = params || {}
|
|
17
|
-
|
|
18
|
-
const themes = {
|
|
19
|
-
light: 'bg-white text-gray-900',
|
|
20
|
-
dark: 'bg-gray-900 text-white',
|
|
21
|
-
gradient: 'bg-gradient-to-br from-primary to-primary-dark text-white',
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const description = paragraphs[0]
|
|
25
|
-
const cta = links[0]
|
|
26
|
-
const secondaryCta = links[1]
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<section className={cn('py-20 px-6', themes[theme])}>
|
|
30
|
-
<div className={cn('max-w-4xl mx-auto', layout === 'center' && 'text-center')}>
|
|
31
|
-
{pretitle && (
|
|
32
|
-
<span className="inline-block px-4 py-1 text-sm font-medium rounded-full bg-primary/10 text-primary mb-4">
|
|
33
|
-
{pretitle}
|
|
34
|
-
</span>
|
|
35
|
-
)}
|
|
36
|
-
|
|
37
|
-
{title && (
|
|
38
|
-
<H1
|
|
39
|
-
text={title}
|
|
40
|
-
className="text-4xl sm:text-5xl font-bold mb-6 tracking-tight"
|
|
41
|
-
/>
|
|
42
|
-
)}
|
|
43
|
-
|
|
44
|
-
{subtitle && (
|
|
45
|
-
<p className={cn(
|
|
46
|
-
'text-xl mb-4',
|
|
47
|
-
theme === 'light' ? 'text-gray-600' : 'text-gray-300'
|
|
48
|
-
)}>
|
|
49
|
-
{subtitle}
|
|
50
|
-
</p>
|
|
51
|
-
)}
|
|
52
|
-
|
|
53
|
-
{description && (
|
|
54
|
-
<P
|
|
55
|
-
text={description}
|
|
56
|
-
className={cn(
|
|
57
|
-
'text-lg mb-8',
|
|
58
|
-
theme === 'light' ? 'text-gray-600' : 'text-gray-300'
|
|
59
|
-
)}
|
|
60
|
-
/>
|
|
61
|
-
)}
|
|
62
|
-
|
|
63
|
-
{(cta || secondaryCta) && (
|
|
64
|
-
<div className={cn('flex gap-4 flex-wrap', layout === 'center' && 'justify-center')}>
|
|
65
|
-
{cta && (
|
|
66
|
-
<Link
|
|
67
|
-
href={cta.href}
|
|
68
|
-
className="px-6 py-3 font-semibold rounded-lg bg-primary text-white hover:bg-primary-dark transition-colors"
|
|
69
|
-
>
|
|
70
|
-
{cta.label}
|
|
71
|
-
</Link>
|
|
72
|
-
)}
|
|
73
|
-
{secondaryCta && (
|
|
74
|
-
<Link
|
|
75
|
-
href={secondaryCta.href}
|
|
76
|
-
className="px-6 py-3 font-semibold rounded-lg border-2 border-current hover:bg-gray-100 transition-colors"
|
|
77
|
-
>
|
|
78
|
-
{secondaryCta.label}
|
|
79
|
-
</Link>
|
|
80
|
-
)}
|
|
81
|
-
</div>
|
|
82
|
-
)}
|
|
83
|
-
</div>
|
|
84
|
-
</section>
|
|
85
|
-
)
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export default Hero
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
title: 'Hero',
|
|
3
|
-
description: 'A hero section for landing pages',
|
|
4
|
-
category: 'Headers',
|
|
5
|
-
|
|
6
|
-
elements: {
|
|
7
|
-
pretitle: {
|
|
8
|
-
label: 'Eyebrow',
|
|
9
|
-
description: 'Small text above the title',
|
|
10
|
-
},
|
|
11
|
-
title: {
|
|
12
|
-
label: 'Headline',
|
|
13
|
-
required: true,
|
|
14
|
-
},
|
|
15
|
-
subtitle: {
|
|
16
|
-
label: 'Subtitle',
|
|
17
|
-
},
|
|
18
|
-
paragraphs: {
|
|
19
|
-
label: 'Description',
|
|
20
|
-
},
|
|
21
|
-
links: {
|
|
22
|
-
label: 'Call to Action',
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
properties: {
|
|
27
|
-
theme: {
|
|
28
|
-
type: 'select',
|
|
29
|
-
label: 'Theme',
|
|
30
|
-
options: [
|
|
31
|
-
{ value: 'light', label: 'Light' },
|
|
32
|
-
{ value: 'dark', label: 'Dark' },
|
|
33
|
-
{ value: 'gradient', label: 'Gradient' },
|
|
34
|
-
],
|
|
35
|
-
default: 'light',
|
|
36
|
-
},
|
|
37
|
-
layout: {
|
|
38
|
-
type: 'select',
|
|
39
|
-
label: 'Layout',
|
|
40
|
-
options: [
|
|
41
|
-
{ value: 'center', label: 'Center' },
|
|
42
|
-
{ value: 'left', label: 'Left' },
|
|
43
|
-
],
|
|
44
|
-
default: 'center',
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
@import "tailwindcss";
|
|
2
|
-
|
|
3
|
-
@source "./components/**/*.{js,jsx}";
|
|
4
|
-
@source "../node_modules/@uniweb/kit/src/**/*.{js,jsx}";
|
|
5
|
-
|
|
6
|
-
@theme {
|
|
7
|
-
/* Customize your template's colors */
|
|
8
|
-
--color-primary: #3b82f6;
|
|
9
|
-
--color-primary-light: #60a5fa;
|
|
10
|
-
--color-primary-dark: #2563eb;
|
|
11
|
-
--color-secondary: #64748b;
|
|
12
|
-
--color-accent: #8b5cf6;
|
|
13
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{templateName}}-workspace",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "pnpm --filter site dev",
|
|
8
|
-
"build": "pnpm --filter foundation build && pnpm --filter site build",
|
|
9
|
-
"preview": "pnpm --filter site preview"
|
|
10
|
-
},
|
|
11
|
-
"devDependencies": {
|
|
12
|
-
"@types/node": "^22.0.0",
|
|
13
|
-
"uniweb": "{{version "uniweb"}}"
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>{{templateTitle}}</title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div id="root"></div>
|
|
11
|
-
<script type="module" src="/main.js"></script>
|
|
12
|
-
</body>
|
|
13
|
-
</html>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "site",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"type": "module",
|
|
5
|
-
"private": true,
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "vite",
|
|
8
|
-
"dev:runtime": "VITE_FOUNDATION_MODE=runtime vite",
|
|
9
|
-
"build": "uniweb build",
|
|
10
|
-
"preview": "vite preview"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"@uniweb/runtime": "{{version "@uniweb/runtime"}}",
|
|
14
|
-
"foundation": "file:../foundation"
|
|
15
|
-
},
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"@tailwindcss/vite": "^4.0.0",
|
|
18
|
-
"@uniweb/build": "{{version "@uniweb/build"}}",
|
|
19
|
-
"@vitejs/plugin-react": "^5.0.0",
|
|
20
|
-
"react": "^18.2.0",
|
|
21
|
-
"react-dom": "^18.2.0",
|
|
22
|
-
"react-router-dom": "^7.0.0",
|
|
23
|
-
"tailwindcss": "^4.0.0",
|
|
24
|
-
"vite": "^7.0.0",
|
|
25
|
-
"vite-plugin-svgr": "^4.2.0"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: Hero
|
|
3
|
-
theme: gradient
|
|
4
|
-
layout: center
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
### New Template
|
|
8
|
-
|
|
9
|
-
# {{templateTitle}}
|
|
10
|
-
|
|
11
|
-
## {{templateDescription}}
|
|
12
|
-
|
|
13
|
-
Build amazing websites with Uniweb components.
|
|
14
|
-
|
|
15
|
-
[Get Started](#features)
|
|
16
|
-
[Learn More](https://github.com/uniweb)
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: Features
|
|
3
|
-
columns: 3
|
|
4
|
-
theme: light
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Features
|
|
8
|
-
|
|
9
|
-
## What makes this template great
|
|
10
|
-
|
|
11
|
-
### Easy to Use
|
|
12
|
-
|
|
13
|
-
Simple markdown content with powerful components. No complex setup required.
|
|
14
|
-
|
|
15
|
-
### Customizable
|
|
16
|
-
|
|
17
|
-
Tailor every aspect of your site with Tailwind CSS and React components.
|
|
18
|
-
|
|
19
|
-
### Fast
|
|
20
|
-
|
|
21
|
-
Built on Vite for lightning-fast development and optimal production builds.
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
2
|
-
<rect width="32" height="32" rx="6" fill="#1e293b"/>
|
|
3
|
-
<!-- < symbol -->
|
|
4
|
-
<path d="M12 10 L6 16 L12 22" stroke="#FA8400" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
|
|
5
|
-
<!-- > symbol -->
|
|
6
|
-
<path d="M20 10 L26 16 L20 22" stroke="#00ADFE" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
|
|
7
|
-
</svg>
|