@yoamigo.com/cli 0.1.25 → 0.1.27
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 +1 -1
- package/dist/index.js +228 -122
- package/package.json +3 -1
- package/templates/starter/CHANGELOG.md +31 -0
- package/templates/starter/package-lock.json +472 -768
- package/templates/starter/package.json +1 -3
- package/templates/starter/public/{favicon.svg → assets/favicon.svg} +2 -2
- package/templates/starter/public/assets/welcome.jpg +0 -0
- package/templates/starter/showcase/01-desktop-hero.png +0 -0
- package/templates/starter/showcase/02-mobile-hero.png +0 -0
- package/templates/starter/showcase/06-desktop-about.png +0 -0
- package/templates/starter/showcase/07-desktop-contact.png +0 -0
- package/templates/starter/showcase/manifest.json +30 -0
- package/templates/starter/src/App.tsx +2 -1
- package/templates/starter/src/components/Footer.tsx +9 -3
- package/templates/starter/src/components/Header.tsx +96 -15
- package/templates/starter/src/content.ts +18 -16
- package/templates/starter/src/pages/about.tsx +21 -10
- package/templates/starter/src/pages/contact.tsx +58 -201
- package/templates/starter/src/pages/index.tsx +49 -57
|
@@ -9,20 +9,18 @@
|
|
|
9
9
|
"preview": "vite preview"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
+
"@yoamigo.com/core": "^0.3.11",
|
|
12
13
|
"@tiptap/core": "^3.11.1",
|
|
13
14
|
"@tiptap/extension-link": "^3.11.1",
|
|
14
15
|
"@tiptap/extension-text-style": "^3.11.1",
|
|
15
16
|
"@tiptap/pm": "^3.11.1",
|
|
16
17
|
"@tiptap/react": "^3.11.1",
|
|
17
18
|
"@tiptap/starter-kit": "^3.11.1",
|
|
18
|
-
"@yoamigo.com/core": "^0.1.14",
|
|
19
19
|
"dompurify": "^3.2.3",
|
|
20
|
-
"preact": "^10.27.2",
|
|
21
20
|
"react": "^19.2.1",
|
|
22
21
|
"react-dom": "^19.2.1"
|
|
23
22
|
},
|
|
24
23
|
"devDependencies": {
|
|
25
|
-
"@preact/preset-vite": "^2.8.0",
|
|
26
24
|
"@tailwindcss/postcss": "^4.1.17",
|
|
27
25
|
"@types/react": "^19.2.1",
|
|
28
26
|
"@types/react-dom": "^19.2.1",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
2
|
-
<rect
|
|
3
|
-
<text x="50" y="65" font-size="50" text-anchor="middle" fill="white" font-family="
|
|
2
|
+
<rect width="100" height="100" rx="20" fill="#3b82f6"/>
|
|
3
|
+
<text x="50" y="65" font-size="50" text-anchor="middle" fill="white" font-family="Arial, sans-serif" font-weight="bold">Y</text>
|
|
4
4
|
</svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"template": "starter",
|
|
3
|
+
"capturedAt": "2026-01-04T01:03:04.689Z",
|
|
4
|
+
"screenshots": [
|
|
5
|
+
{
|
|
6
|
+
"filename": "01-desktop-hero.png",
|
|
7
|
+
"caption": "Desktop Homepage Hero",
|
|
8
|
+
"viewport": "desktop",
|
|
9
|
+
"path": "/"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"filename": "02-mobile-hero.png",
|
|
13
|
+
"caption": "Mobile Homepage",
|
|
14
|
+
"viewport": "mobile",
|
|
15
|
+
"path": "/"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"filename": "06-desktop-about.png",
|
|
19
|
+
"caption": "About Page",
|
|
20
|
+
"viewport": "desktop",
|
|
21
|
+
"path": "/about"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"filename": "07-desktop-contact.png",
|
|
25
|
+
"caption": "Contact Page",
|
|
26
|
+
"viewport": "desktop",
|
|
27
|
+
"path": "/contact"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ContentStoreProvider } from '@yoamigo.com/core'
|
|
2
|
-
import { Router } from '@yoamigo.com/core/router'
|
|
2
|
+
import { Router, ScrollRestoration } from '@yoamigo.com/core/router'
|
|
3
3
|
import { Header } from './components/Header'
|
|
4
4
|
import { Footer } from './components/Footer'
|
|
5
5
|
import { AppRoutes, getAvailablePages } from './routes'
|
|
@@ -22,6 +22,7 @@ export default function App() {
|
|
|
22
22
|
return (
|
|
23
23
|
<ContentStoreProvider pages={pages}>
|
|
24
24
|
<Router>
|
|
25
|
+
<ScrollRestoration />
|
|
25
26
|
<Layout>
|
|
26
27
|
<AppRoutes />
|
|
27
28
|
</Layout>
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { YaText } from '@yoamigo.com/core'
|
|
2
2
|
|
|
3
3
|
export function Footer() {
|
|
4
|
+
const currentYear = new Date().getFullYear()
|
|
5
|
+
|
|
4
6
|
return (
|
|
5
7
|
<footer className="bg-gray-100 border-t border-gray-200">
|
|
6
8
|
<div className="container mx-auto px-4 py-8">
|
|
7
9
|
<div className="text-center text-gray-600">
|
|
8
|
-
<
|
|
9
|
-
©
|
|
10
|
-
|
|
10
|
+
<p>
|
|
11
|
+
© {currentYear}{' '}
|
|
12
|
+
<YaText fieldId="footer.name" as="span">
|
|
13
|
+
My Website
|
|
14
|
+
</YaText>
|
|
15
|
+
. All rights reserved.
|
|
16
|
+
</p>
|
|
11
17
|
</div>
|
|
12
18
|
</div>
|
|
13
19
|
</footer>
|
|
@@ -1,31 +1,112 @@
|
|
|
1
|
+
import { useState } from 'react'
|
|
1
2
|
import { YaText, YaLink } from '@yoamigo.com/core'
|
|
2
3
|
|
|
3
4
|
export function Header() {
|
|
5
|
+
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false)
|
|
6
|
+
|
|
4
7
|
return (
|
|
5
|
-
|
|
6
|
-
<
|
|
7
|
-
<div className="
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
<>
|
|
9
|
+
<header className="sticky top-0 z-50 bg-white border-b border-gray-200">
|
|
10
|
+
<div className="container mx-auto px-4">
|
|
11
|
+
<div className="flex items-center justify-between h-16">
|
|
12
|
+
{/* Logo */}
|
|
13
|
+
<YaLink fieldId="site.logoLink" href="/" className="text-xl font-bold text-gray-900 hover:text-gray-700 transition-colors">
|
|
14
|
+
<YaText fieldId="site.name" as="span">
|
|
15
|
+
Your Business
|
|
16
|
+
</YaText>
|
|
17
|
+
</YaLink>
|
|
18
|
+
|
|
19
|
+
{/* Desktop Navigation - hidden on mobile */}
|
|
20
|
+
<nav className="hidden md:flex items-center gap-8">
|
|
21
|
+
<YaLink fieldId="nav.homeLink" href="/" className="text-gray-600 hover:text-gray-900 transition-colors">
|
|
22
|
+
Home
|
|
23
|
+
</YaLink>
|
|
24
|
+
<YaLink fieldId="nav.aboutLink" href="/about" className="text-gray-600 hover:text-gray-900 transition-colors">
|
|
25
|
+
About
|
|
26
|
+
</YaLink>
|
|
27
|
+
<YaLink fieldId="nav.contactLink" href="/contact" className="text-gray-600 hover:text-gray-900 transition-colors">
|
|
28
|
+
Contact
|
|
29
|
+
</YaLink>
|
|
30
|
+
</nav>
|
|
31
|
+
|
|
32
|
+
{/* Mobile Menu Button - visible only on mobile */}
|
|
33
|
+
<button
|
|
34
|
+
onClick={() => setIsMobileMenuOpen(!isMobileMenuOpen)}
|
|
35
|
+
className="md:hidden p-3 text-gray-600 hover:text-gray-900 transition-colors"
|
|
36
|
+
aria-label="Toggle menu"
|
|
37
|
+
>
|
|
38
|
+
<svg className="w-7 h-7" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
39
|
+
{isMobileMenuOpen ? (
|
|
40
|
+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
|
|
41
|
+
) : (
|
|
42
|
+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 12h16M4 18h16" />
|
|
43
|
+
)}
|
|
44
|
+
</svg>
|
|
45
|
+
</button>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</header>
|
|
49
|
+
|
|
50
|
+
{/* Mobile Menu Overlay */}
|
|
51
|
+
<div
|
|
52
|
+
className={`md:hidden fixed inset-0 z-40 transition-opacity duration-300 ${
|
|
53
|
+
isMobileMenuOpen ? 'opacity-100 pointer-events-auto' : 'opacity-0 pointer-events-none'
|
|
54
|
+
}`}
|
|
55
|
+
>
|
|
56
|
+
{/* Backdrop */}
|
|
57
|
+
<div
|
|
58
|
+
className="absolute inset-0 bg-black/50"
|
|
59
|
+
onClick={() => setIsMobileMenuOpen(false)}
|
|
60
|
+
/>
|
|
61
|
+
|
|
62
|
+
{/* Menu Panel - slides in from right */}
|
|
63
|
+
<div
|
|
64
|
+
className={`absolute top-0 right-0 h-full w-80 max-w-[85vw] bg-white shadow-xl transition-transform duration-300 ease-out ${
|
|
65
|
+
isMobileMenuOpen ? 'translate-x-0' : 'translate-x-full'
|
|
66
|
+
}`}
|
|
67
|
+
>
|
|
68
|
+
{/* Close button */}
|
|
69
|
+
<div className="flex justify-end p-4 border-b border-gray-200">
|
|
70
|
+
<button
|
|
71
|
+
onClick={() => setIsMobileMenuOpen(false)}
|
|
72
|
+
className="p-3 text-gray-600 hover:text-gray-900 transition-colors"
|
|
73
|
+
aria-label="Close menu"
|
|
74
|
+
>
|
|
75
|
+
<svg className="w-7 h-7" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
76
|
+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
|
|
77
|
+
</svg>
|
|
78
|
+
</button>
|
|
79
|
+
</div>
|
|
14
80
|
|
|
15
|
-
{/* Navigation */}
|
|
16
|
-
<nav className="flex
|
|
17
|
-
<YaLink
|
|
81
|
+
{/* Navigation Links - right aligned */}
|
|
82
|
+
<nav className="p-8 flex flex-col gap-6">
|
|
83
|
+
<YaLink
|
|
84
|
+
fieldId="nav.mobileHomeLink"
|
|
85
|
+
href="/"
|
|
86
|
+
className="text-right text-2xl font-medium text-gray-700 hover:text-gray-900 hover:bg-gray-100 transition-colors px-6 py-5 rounded-xl"
|
|
87
|
+
onClick={() => setIsMobileMenuOpen(false)}
|
|
88
|
+
>
|
|
18
89
|
Home
|
|
19
90
|
</YaLink>
|
|
20
|
-
<YaLink
|
|
91
|
+
<YaLink
|
|
92
|
+
fieldId="nav.mobileAboutLink"
|
|
93
|
+
href="/about"
|
|
94
|
+
className="text-right text-2xl font-medium text-gray-700 hover:text-gray-900 hover:bg-gray-100 transition-colors px-6 py-5 rounded-xl"
|
|
95
|
+
onClick={() => setIsMobileMenuOpen(false)}
|
|
96
|
+
>
|
|
21
97
|
About
|
|
22
98
|
</YaLink>
|
|
23
|
-
<YaLink
|
|
99
|
+
<YaLink
|
|
100
|
+
fieldId="nav.mobileContactLink"
|
|
101
|
+
href="/contact"
|
|
102
|
+
className="text-right text-2xl font-medium text-gray-700 hover:text-gray-900 hover:bg-gray-100 transition-colors px-6 py-5 rounded-xl"
|
|
103
|
+
onClick={() => setIsMobileMenuOpen(false)}
|
|
104
|
+
>
|
|
24
105
|
Contact
|
|
25
106
|
</YaLink>
|
|
26
107
|
</nav>
|
|
27
108
|
</div>
|
|
28
109
|
</div>
|
|
29
|
-
|
|
110
|
+
</>
|
|
30
111
|
)
|
|
31
112
|
}
|
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
"site.name": "My Website",
|
|
3
|
-
"hero.title": "
|
|
4
|
-
"hero.subtitle": "
|
|
5
|
-
"features.title": "
|
|
6
|
-
"feature1.title": "
|
|
7
|
-
"feature1.description": "
|
|
8
|
-
"feature2.title": "
|
|
9
|
-
"feature2.description": "
|
|
10
|
-
"feature3.title": "
|
|
11
|
-
"feature3.description": "
|
|
3
|
+
"hero.title": "Welcome to My Website",
|
|
4
|
+
"hero.subtitle": "Quality products. Exceptional service. Results you can trust.",
|
|
5
|
+
"features.title": "What We Offer",
|
|
6
|
+
"feature1.title": "Quality First",
|
|
7
|
+
"feature1.description": "We take pride in delivering excellence in everything we do. Your satisfaction is our priority.",
|
|
8
|
+
"feature2.title": "Expert Support",
|
|
9
|
+
"feature2.description": "Our dedicated team is here to help you every step of the way. Reach out anytime.",
|
|
10
|
+
"feature3.title": "Trusted Results",
|
|
11
|
+
"feature3.description": "Join thousands of happy customers who have chosen us for reliable, proven solutions.",
|
|
12
12
|
"about.title": "About Us",
|
|
13
|
-
"about.subtitle": "
|
|
13
|
+
"about.subtitle": "Get to know the team behind the work.",
|
|
14
14
|
"about.missionTitle": "Our Mission",
|
|
15
|
-
"about.missionText": "We
|
|
15
|
+
"about.missionText": "We're dedicated to providing outstanding value and service to our customers. Our team works tirelessly to exceed expectations and build lasting relationships with everyone we serve.",
|
|
16
16
|
"about.storyTitle": "Our Story",
|
|
17
|
-
"about.storyText": "
|
|
18
|
-
"contact.title": "
|
|
19
|
-
"contact.subtitle": "
|
|
17
|
+
"about.storyText": "What started as a small idea has grown into something we're truly proud of. Through hard work and a commitment to our values, we've built a reputation for reliability and excellence that our customers can count on.",
|
|
18
|
+
"contact.title": "Get in Touch",
|
|
19
|
+
"contact.subtitle": "We'd love to hear from you. Reach out and let's start a conversation.",
|
|
20
20
|
"contact.emailTitle": "Email",
|
|
21
21
|
"contact.emailValue": "hello@example.com",
|
|
22
22
|
"contact.phoneTitle": "Phone",
|
|
23
23
|
"contact.phoneValue": "(555) 123-4567",
|
|
24
24
|
"contact.addressTitle": "Address",
|
|
25
|
-
"contact.addressValue": "123 Main Street, Suite 100\
|
|
26
|
-
"footer.
|
|
25
|
+
"contact.addressValue": "123 Main Street, Suite 100\nYour City, State 12345",
|
|
26
|
+
"footer.name": "My Website",
|
|
27
|
+
"hero.image": "/assets/welcome.jpg",
|
|
28
|
+
"about.image": "https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=1200&h=800&fit=crop&q=80"
|
|
27
29
|
} as const satisfies Record<string, string>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { YaText } from '@yoamigo.com/core'
|
|
1
|
+
import { YaText, YaImage } from '@yoamigo.com/core'
|
|
2
2
|
|
|
3
3
|
export default function AboutPage() {
|
|
4
4
|
return (
|
|
@@ -14,13 +14,26 @@ export default function AboutPage() {
|
|
|
14
14
|
</h1>
|
|
15
15
|
<p className="text-xl text-gray-600">
|
|
16
16
|
<YaText fieldId="about.subtitle" as="span">
|
|
17
|
-
|
|
17
|
+
Get to know the team behind the work.
|
|
18
18
|
</YaText>
|
|
19
19
|
</p>
|
|
20
20
|
</div>
|
|
21
21
|
</div>
|
|
22
22
|
</section>
|
|
23
23
|
|
|
24
|
+
{/* Team Image Section */}
|
|
25
|
+
<section className="py-8">
|
|
26
|
+
<div className="container mx-auto px-4">
|
|
27
|
+
<div className="max-w-3xl mx-auto">
|
|
28
|
+
<YaImage
|
|
29
|
+
fieldId="about.image"
|
|
30
|
+
className="w-full h-auto rounded-xl shadow-lg"
|
|
31
|
+
alt="About us"
|
|
32
|
+
/>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</section>
|
|
36
|
+
|
|
24
37
|
{/* Content Section */}
|
|
25
38
|
<section className="py-16">
|
|
26
39
|
<div className="container mx-auto px-4">
|
|
@@ -33,10 +46,9 @@ export default function AboutPage() {
|
|
|
33
46
|
</h2>
|
|
34
47
|
<p className="text-gray-600 mb-8">
|
|
35
48
|
<YaText fieldId="about.missionText" as="span">
|
|
36
|
-
We
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
and your customers.
|
|
49
|
+
We're dedicated to providing outstanding value and service to our customers.
|
|
50
|
+
Our team works tirelessly to exceed expectations and build lasting relationships
|
|
51
|
+
with everyone we serve.
|
|
40
52
|
</YaText>
|
|
41
53
|
</p>
|
|
42
54
|
|
|
@@ -47,10 +59,9 @@ export default function AboutPage() {
|
|
|
47
59
|
</h2>
|
|
48
60
|
<p className="text-gray-600 mb-8">
|
|
49
61
|
<YaText fieldId="about.storyText" as="span">
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
succeed.
|
|
62
|
+
What started as a small idea has grown into something we're truly proud of.
|
|
63
|
+
Through hard work and a commitment to our values, we've built a reputation
|
|
64
|
+
for reliability and excellence that our customers can count on.
|
|
54
65
|
</YaText>
|
|
55
66
|
</p>
|
|
56
67
|
</div>
|