@yoamigo.com/cli 0.1.8 → 0.1.11
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/dist/index.js +100 -30
- package/package.json +1 -1
- package/templates/starter/package.json +1 -1
- package/templates/starter/src/App.tsx +18 -69
- package/templates/starter/src/components/Footer.tsx +15 -0
- package/templates/starter/src/components/Header.tsx +31 -0
- package/templates/starter/src/content.json +24 -5
- package/templates/starter/src/pages/AboutPage.tsx +62 -0
- package/templates/starter/src/pages/ContactPage.tsx +94 -0
- package/templates/starter/src/pages/HomePage.tsx +111 -0
- package/templates/starter/src/styles/globals.css +1 -1
package/dist/index.js
CHANGED
|
@@ -249,7 +249,13 @@ import path4 from "path";
|
|
|
249
249
|
var API_BASE_URL2 = getApiBaseUrl();
|
|
250
250
|
var APP_BASE_URL = getAppBaseUrl();
|
|
251
251
|
var EXCLUDE_PATTERNS = ["node_modules", "dist", ".git", "vite.config.ts", "tsconfig.json", "*.log"];
|
|
252
|
-
var deployCommand = new Command4("deploy").description("Upload template to YoAmigo").argument("<version>", "Template version (e.g., 1.0.0)").action(async (version) => {
|
|
252
|
+
var deployCommand = new Command4("deploy").description("Upload template to YoAmigo").argument("<version>", "Template version (e.g., 1.0.0)").option("-v, --verbose", "Show detailed logging for debugging").action(async (version, options) => {
|
|
253
|
+
const verbose = options.verbose;
|
|
254
|
+
if (verbose) {
|
|
255
|
+
console.log(chalk4.dim(`API URL: ${API_BASE_URL2}`));
|
|
256
|
+
console.log(chalk4.dim(`App URL: ${APP_BASE_URL}`));
|
|
257
|
+
console.log();
|
|
258
|
+
}
|
|
253
259
|
const credentials = await getCredentials();
|
|
254
260
|
if (!credentials) {
|
|
255
261
|
console.error(chalk4.red("Error: Not logged in. Run `yoamigo login` first."));
|
|
@@ -275,21 +281,56 @@ var deployCommand = new Command4("deploy").description("Upload template to YoAmi
|
|
|
275
281
|
throw new Error("No files found to upload");
|
|
276
282
|
}
|
|
277
283
|
spinner.text = `Uploading ${files.length} files...`;
|
|
278
|
-
const
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
}
|
|
284
|
+
const templateUrl = `${API_BASE_URL2}/api/trpc/developer.createOrUpdateTemplate`;
|
|
285
|
+
const templateBody = {
|
|
286
|
+
name: templateName,
|
|
287
|
+
version,
|
|
288
|
+
description: packageJson.description || ""
|
|
289
|
+
};
|
|
290
|
+
if (verbose) {
|
|
291
|
+
spinner.stop();
|
|
292
|
+
console.log(chalk4.dim(`POST ${templateUrl}`));
|
|
293
|
+
console.log(chalk4.dim(`Body: ${JSON.stringify(templateBody)}`));
|
|
294
|
+
spinner.start();
|
|
295
|
+
}
|
|
296
|
+
let templateResponse;
|
|
297
|
+
try {
|
|
298
|
+
templateResponse = await fetch(templateUrl, {
|
|
299
|
+
method: "POST",
|
|
300
|
+
headers: {
|
|
301
|
+
"Content-Type": "application/json",
|
|
302
|
+
"X-API-Key": credentials.apiKey
|
|
303
|
+
},
|
|
304
|
+
body: JSON.stringify(templateBody)
|
|
305
|
+
});
|
|
306
|
+
} catch (fetchError) {
|
|
307
|
+
if (verbose) {
|
|
308
|
+
spinner.stop();
|
|
309
|
+
console.error(chalk4.red(`
|
|
310
|
+
Fetch error for ${templateUrl}:`));
|
|
311
|
+
console.error(chalk4.red(fetchError instanceof Error ? fetchError.stack || fetchError.message : String(fetchError)));
|
|
312
|
+
}
|
|
313
|
+
throw new Error(`Network error: ${fetchError instanceof Error ? fetchError.message : "fetch failed"}`);
|
|
314
|
+
}
|
|
315
|
+
if (verbose) {
|
|
316
|
+
spinner.stop();
|
|
317
|
+
console.log(chalk4.dim(`Response status: ${templateResponse.status}`));
|
|
318
|
+
spinner.start();
|
|
319
|
+
}
|
|
290
320
|
if (!templateResponse.ok) {
|
|
291
|
-
const
|
|
292
|
-
|
|
321
|
+
const errorText = await templateResponse.text();
|
|
322
|
+
if (verbose) {
|
|
323
|
+
spinner.stop();
|
|
324
|
+
console.error(chalk4.red(`
|
|
325
|
+
Response body: ${errorText}`));
|
|
326
|
+
}
|
|
327
|
+
let errorMessage = "Failed to create template";
|
|
328
|
+
try {
|
|
329
|
+
const error = JSON.parse(errorText);
|
|
330
|
+
errorMessage = error.error?.message || error.message || errorMessage;
|
|
331
|
+
} catch {
|
|
332
|
+
errorMessage = errorText || errorMessage;
|
|
333
|
+
}
|
|
293
334
|
throw new Error(errorMessage);
|
|
294
335
|
}
|
|
295
336
|
const templateData = await templateResponse.json();
|
|
@@ -297,23 +338,48 @@ var deployCommand = new Command4("deploy").description("Upload template to YoAmi
|
|
|
297
338
|
if (!templateId) {
|
|
298
339
|
throw new Error("Failed to get template ID");
|
|
299
340
|
}
|
|
341
|
+
const uploadUrl = `${API_BASE_URL2}/api/trpc/developer.uploadTemplateFile`;
|
|
300
342
|
for (const file of files) {
|
|
301
343
|
const relativePath = path4.relative(process.cwd(), file);
|
|
302
344
|
const content = await fs4.readFile(file, "utf-8");
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
345
|
+
if (verbose) {
|
|
346
|
+
spinner.stop();
|
|
347
|
+
console.log(chalk4.dim(`Uploading: ${relativePath}`));
|
|
348
|
+
spinner.start();
|
|
349
|
+
}
|
|
350
|
+
try {
|
|
351
|
+
const uploadResponse = await fetch(uploadUrl, {
|
|
352
|
+
method: "POST",
|
|
353
|
+
headers: {
|
|
354
|
+
"Content-Type": "application/json",
|
|
355
|
+
"X-API-Key": credentials.apiKey
|
|
356
|
+
},
|
|
357
|
+
body: JSON.stringify({
|
|
358
|
+
templateId,
|
|
359
|
+
path: relativePath,
|
|
360
|
+
content
|
|
361
|
+
})
|
|
362
|
+
});
|
|
363
|
+
if (!uploadResponse.ok) {
|
|
364
|
+
const errorText = await uploadResponse.text();
|
|
365
|
+
if (verbose) {
|
|
366
|
+
spinner.stop();
|
|
367
|
+
console.error(chalk4.yellow(`Failed to upload ${relativePath}: ${uploadResponse.status}`));
|
|
368
|
+
console.error(chalk4.yellow(`Response: ${errorText}`));
|
|
369
|
+
spinner.start();
|
|
370
|
+
} else {
|
|
371
|
+
console.warn(chalk4.yellow(`Warning: Failed to upload ${relativePath}`));
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
} catch (uploadError) {
|
|
375
|
+
if (verbose) {
|
|
376
|
+
spinner.stop();
|
|
377
|
+
console.error(chalk4.yellow(`Network error uploading ${relativePath}:`));
|
|
378
|
+
console.error(chalk4.yellow(uploadError instanceof Error ? uploadError.message : String(uploadError)));
|
|
379
|
+
spinner.start();
|
|
380
|
+
} else {
|
|
381
|
+
console.warn(chalk4.yellow(`Warning: Failed to upload ${relativePath}`));
|
|
382
|
+
}
|
|
317
383
|
}
|
|
318
384
|
}
|
|
319
385
|
spinner.succeed(`Template v${version} deployed successfully!`);
|
|
@@ -325,7 +391,11 @@ var deployCommand = new Command4("deploy").description("Upload template to YoAmi
|
|
|
325
391
|
console.log(chalk4.dim(` ${APP_BASE_URL}/dashboard`));
|
|
326
392
|
} catch (error) {
|
|
327
393
|
spinner.fail("Failed to deploy template");
|
|
328
|
-
|
|
394
|
+
if (verbose && error instanceof Error && error.stack) {
|
|
395
|
+
console.error(chalk4.red(error.stack));
|
|
396
|
+
} else {
|
|
397
|
+
console.error(chalk4.red(error instanceof Error ? error.message : "Unknown error"));
|
|
398
|
+
}
|
|
329
399
|
process.exit(1);
|
|
330
400
|
}
|
|
331
401
|
});
|
package/package.json
CHANGED
|
@@ -1,73 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Router, Route } from '@yoamigo.com/core/router'
|
|
2
|
+
import { Header } from './components/Header'
|
|
3
|
+
import { Footer } from './components/Footer'
|
|
4
|
+
import { HomePage } from './pages/HomePage'
|
|
5
|
+
import { AboutPage } from './pages/AboutPage'
|
|
6
|
+
import { ContactPage } from './pages/ContactPage'
|
|
3
7
|
|
|
4
|
-
function
|
|
8
|
+
function Layout({ children }: { children: React.ReactNode }) {
|
|
5
9
|
return (
|
|
6
|
-
<div className="min-h-screen
|
|
7
|
-
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Welcome to YoAmigo
|
|
13
|
-
</YaText>
|
|
14
|
-
</h1>
|
|
15
|
-
<p className="text-xl text-gray-300 mb-8">
|
|
16
|
-
<YaText fieldId="hero.subtitle" as="span">
|
|
17
|
-
Build beautiful websites with our template system.
|
|
18
|
-
Click any text to edit it in the builder.
|
|
19
|
-
</YaText>
|
|
20
|
-
</p>
|
|
21
|
-
<div className="flex gap-4 justify-center">
|
|
22
|
-
<YaLink fieldId="hero.cta1" href="#about" className="px-6 py-3 bg-blue-600 hover:bg-blue-700 rounded-lg font-medium transition-colors">
|
|
23
|
-
Learn More
|
|
24
|
-
</YaLink>
|
|
25
|
-
<YaLink fieldId="hero.cta2" href="#contact" className="px-6 py-3 bg-gray-700 hover:bg-gray-600 rounded-lg font-medium transition-colors">
|
|
26
|
-
Contact
|
|
27
|
-
</YaLink>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
</section>
|
|
31
|
-
|
|
32
|
-
{/* About Section */}
|
|
33
|
-
<section id="about" className="container mx-auto px-4 py-20">
|
|
34
|
-
<div className="max-w-3xl mx-auto">
|
|
35
|
-
<h2 className="text-3xl font-bold mb-6 text-center">
|
|
36
|
-
<YaText fieldId="about.title" as="span">
|
|
37
|
-
About Us
|
|
38
|
-
</YaText>
|
|
39
|
-
</h2>
|
|
40
|
-
<p className="text-gray-300 text-center">
|
|
41
|
-
<YaText fieldId="about.description" as="span">
|
|
42
|
-
We create beautiful, responsive templates for modern websites.
|
|
43
|
-
Our templates are designed to be easy to customize and deploy.
|
|
44
|
-
</YaText>
|
|
45
|
-
</p>
|
|
46
|
-
</div>
|
|
47
|
-
</section>
|
|
48
|
-
|
|
49
|
-
{/* Contact Section */}
|
|
50
|
-
<section id="contact" className="container mx-auto px-4 py-20">
|
|
51
|
-
<div className="max-w-3xl mx-auto text-center">
|
|
52
|
-
<h2 className="text-3xl font-bold mb-6">
|
|
53
|
-
<YaText fieldId="contact.title" as="span">
|
|
54
|
-
Get in Touch
|
|
55
|
-
</YaText>
|
|
56
|
-
</h2>
|
|
57
|
-
<p className="text-gray-300 mb-8">
|
|
58
|
-
<YaText fieldId="contact.description" as="span">
|
|
59
|
-
Have questions? We'd love to hear from you.
|
|
60
|
-
</YaText>
|
|
61
|
-
</p>
|
|
62
|
-
</div>
|
|
63
|
-
</section>
|
|
64
|
-
|
|
65
|
-
{/* Footer */}
|
|
66
|
-
<footer className="border-t border-gray-800 py-8">
|
|
67
|
-
<div className="container mx-auto px-4 text-center text-gray-400">
|
|
68
|
-
<p>Built with YoAmigo</p>
|
|
69
|
-
</div>
|
|
70
|
-
</footer>
|
|
10
|
+
<div className="min-h-screen flex flex-col bg-white">
|
|
11
|
+
<Header />
|
|
12
|
+
<main className="flex-1">
|
|
13
|
+
{children}
|
|
14
|
+
</main>
|
|
15
|
+
<Footer />
|
|
71
16
|
</div>
|
|
72
17
|
)
|
|
73
18
|
}
|
|
@@ -75,7 +20,11 @@ function HomePage() {
|
|
|
75
20
|
export default function App() {
|
|
76
21
|
return (
|
|
77
22
|
<Router>
|
|
78
|
-
<
|
|
23
|
+
<Layout>
|
|
24
|
+
<Route path="/" component={HomePage} />
|
|
25
|
+
<Route path="/about" component={AboutPage} />
|
|
26
|
+
<Route path="/contact" component={ContactPage} />
|
|
27
|
+
</Layout>
|
|
79
28
|
</Router>
|
|
80
29
|
)
|
|
81
30
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { YaText } from '@yoamigo.com/core'
|
|
2
|
+
|
|
3
|
+
export function Footer() {
|
|
4
|
+
return (
|
|
5
|
+
<footer className="bg-gray-100 border-t border-gray-200">
|
|
6
|
+
<div className="container mx-auto px-4 py-8">
|
|
7
|
+
<div className="text-center text-gray-600">
|
|
8
|
+
<YaText fieldId="footer.copyright" as="p">
|
|
9
|
+
© 2025 My Website. All rights reserved.
|
|
10
|
+
</YaText>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</footer>
|
|
14
|
+
)
|
|
15
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { YaText, YaLink } from '@yoamigo.com/core'
|
|
2
|
+
|
|
3
|
+
export function Header() {
|
|
4
|
+
return (
|
|
5
|
+
<header className="sticky top-0 z-50 bg-white border-b border-gray-200">
|
|
6
|
+
<div className="container mx-auto px-4">
|
|
7
|
+
<div className="flex items-center justify-between h-16">
|
|
8
|
+
{/* Logo */}
|
|
9
|
+
<YaLink fieldId="site.logoLink" href="/" className="text-xl font-bold text-gray-900 hover:text-gray-700 transition-colors">
|
|
10
|
+
<YaText fieldId="site.name" as="span">
|
|
11
|
+
My Website
|
|
12
|
+
</YaText>
|
|
13
|
+
</YaLink>
|
|
14
|
+
|
|
15
|
+
{/* Navigation */}
|
|
16
|
+
<nav className="flex items-center gap-8">
|
|
17
|
+
<YaLink fieldId="nav.homeLink" href="/" className="text-gray-600 hover:text-gray-900 transition-colors">
|
|
18
|
+
Home
|
|
19
|
+
</YaLink>
|
|
20
|
+
<YaLink fieldId="nav.aboutLink" href="/about" className="text-gray-600 hover:text-gray-900 transition-colors">
|
|
21
|
+
About
|
|
22
|
+
</YaLink>
|
|
23
|
+
<YaLink fieldId="nav.contactLink" href="/contact" className="text-gray-600 hover:text-gray-900 transition-colors">
|
|
24
|
+
Contact
|
|
25
|
+
</YaLink>
|
|
26
|
+
</nav>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</header>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
@@ -1,8 +1,27 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"hero.
|
|
2
|
+
"site.name": "My Website",
|
|
3
|
+
"hero.title": "Build Something Amazing",
|
|
4
|
+
"hero.subtitle": "Create beautiful, modern websites with our intuitive template system. Click any text to customize it in the builder.",
|
|
5
|
+
"features.title": "Why Choose Us",
|
|
6
|
+
"feature1.title": "Fast & Reliable",
|
|
7
|
+
"feature1.description": "Built for speed and reliability. Your website loads instantly on any device.",
|
|
8
|
+
"feature2.title": "Easy to Customize",
|
|
9
|
+
"feature2.description": "Click any text to edit it. Change colors, fonts, and layouts with ease.",
|
|
10
|
+
"feature3.title": "Secure & Modern",
|
|
11
|
+
"feature3.description": "Built with the latest web technologies. Secure, accessible, and SEO-friendly.",
|
|
4
12
|
"about.title": "About Us",
|
|
5
|
-
"about.
|
|
6
|
-
"
|
|
7
|
-
"
|
|
13
|
+
"about.subtitle": "Learn more about who we are and what we do.",
|
|
14
|
+
"about.missionTitle": "Our Mission",
|
|
15
|
+
"about.missionText": "We believe everyone deserves a beautiful website. Our mission is to make professional web design accessible to all, without requiring technical expertise. We provide intuitive tools that let you focus on what matters most—your content and your customers.",
|
|
16
|
+
"about.storyTitle": "Our Story",
|
|
17
|
+
"about.storyText": "Founded with a simple idea: building websites should be fun, not frustrating. We've helped thousands of businesses and creators bring their ideas to life online. From small portfolios to growing businesses, we're here to help you succeed.",
|
|
18
|
+
"contact.title": "Contact Us",
|
|
19
|
+
"contact.subtitle": "Have questions? We'd love to hear from you.",
|
|
20
|
+
"contact.emailTitle": "Email",
|
|
21
|
+
"contact.emailValue": "hello@example.com",
|
|
22
|
+
"contact.phoneTitle": "Phone",
|
|
23
|
+
"contact.phoneValue": "(555) 123-4567",
|
|
24
|
+
"contact.addressTitle": "Address",
|
|
25
|
+
"contact.addressValue": "123 Main Street, Suite 100\nSan Francisco, CA 94102",
|
|
26
|
+
"footer.copyright": "© 2025 My Website. All rights reserved."
|
|
8
27
|
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { YaText } from '@yoamigo.com/core'
|
|
2
|
+
|
|
3
|
+
export function AboutPage() {
|
|
4
|
+
return (
|
|
5
|
+
<div>
|
|
6
|
+
{/* Hero Section */}
|
|
7
|
+
<section className="bg-gray-50 py-16">
|
|
8
|
+
<div className="container mx-auto px-4">
|
|
9
|
+
<div className="text-center max-w-3xl mx-auto">
|
|
10
|
+
<h1 className="text-4xl font-bold text-gray-900 mb-4">
|
|
11
|
+
<YaText fieldId="about.title" as="span">
|
|
12
|
+
About Us
|
|
13
|
+
</YaText>
|
|
14
|
+
</h1>
|
|
15
|
+
<p className="text-xl text-gray-600">
|
|
16
|
+
<YaText fieldId="about.subtitle" as="span">
|
|
17
|
+
Learn more about who we are and what we do.
|
|
18
|
+
</YaText>
|
|
19
|
+
</p>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</section>
|
|
23
|
+
|
|
24
|
+
{/* Content Section */}
|
|
25
|
+
<section className="py-16">
|
|
26
|
+
<div className="container mx-auto px-4">
|
|
27
|
+
<div className="max-w-3xl mx-auto">
|
|
28
|
+
<div className="prose prose-lg">
|
|
29
|
+
<h2 className="text-2xl font-bold text-gray-900 mb-4">
|
|
30
|
+
<YaText fieldId="about.missionTitle" as="span">
|
|
31
|
+
Our Mission
|
|
32
|
+
</YaText>
|
|
33
|
+
</h2>
|
|
34
|
+
<p className="text-gray-600 mb-8">
|
|
35
|
+
<YaText fieldId="about.missionText" as="span">
|
|
36
|
+
We believe everyone deserves a beautiful website. Our mission is to make
|
|
37
|
+
professional web design accessible to all, without requiring technical expertise.
|
|
38
|
+
We provide intuitive tools that let you focus on what matters most—your content
|
|
39
|
+
and your customers.
|
|
40
|
+
</YaText>
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
<h2 className="text-2xl font-bold text-gray-900 mb-4">
|
|
44
|
+
<YaText fieldId="about.storyTitle" as="span">
|
|
45
|
+
Our Story
|
|
46
|
+
</YaText>
|
|
47
|
+
</h2>
|
|
48
|
+
<p className="text-gray-600 mb-8">
|
|
49
|
+
<YaText fieldId="about.storyText" as="span">
|
|
50
|
+
Founded with a simple idea: building websites should be fun, not frustrating.
|
|
51
|
+
We've helped thousands of businesses and creators bring their ideas to life
|
|
52
|
+
online. From small portfolios to growing businesses, we're here to help you
|
|
53
|
+
succeed.
|
|
54
|
+
</YaText>
|
|
55
|
+
</p>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</section>
|
|
60
|
+
</div>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { YaText } from '@yoamigo.com/core'
|
|
2
|
+
|
|
3
|
+
export function ContactPage() {
|
|
4
|
+
return (
|
|
5
|
+
<div>
|
|
6
|
+
{/* Hero Section */}
|
|
7
|
+
<section className="bg-gray-50 py-16">
|
|
8
|
+
<div className="container mx-auto px-4">
|
|
9
|
+
<div className="text-center max-w-3xl mx-auto">
|
|
10
|
+
<h1 className="text-4xl font-bold text-gray-900 mb-4">
|
|
11
|
+
<YaText fieldId="contact.title" as="span">
|
|
12
|
+
Contact Us
|
|
13
|
+
</YaText>
|
|
14
|
+
</h1>
|
|
15
|
+
<p className="text-xl text-gray-600">
|
|
16
|
+
<YaText fieldId="contact.subtitle" as="span">
|
|
17
|
+
Have questions? We'd love to hear from you.
|
|
18
|
+
</YaText>
|
|
19
|
+
</p>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</section>
|
|
23
|
+
|
|
24
|
+
{/* Contact Info Section */}
|
|
25
|
+
<section className="py-16">
|
|
26
|
+
<div className="container mx-auto px-4">
|
|
27
|
+
<div className="max-w-2xl mx-auto">
|
|
28
|
+
<div className="grid md:grid-cols-2 gap-8">
|
|
29
|
+
{/* Email */}
|
|
30
|
+
<div className="bg-white p-6 rounded-lg border border-gray-200">
|
|
31
|
+
<div className="w-10 h-10 bg-blue-100 rounded-lg flex items-center justify-center mb-4">
|
|
32
|
+
<svg className="w-5 h-5 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
33
|
+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" />
|
|
34
|
+
</svg>
|
|
35
|
+
</div>
|
|
36
|
+
<h3 className="text-lg font-semibold text-gray-900 mb-2">
|
|
37
|
+
<YaText fieldId="contact.emailTitle" as="span">
|
|
38
|
+
Email
|
|
39
|
+
</YaText>
|
|
40
|
+
</h3>
|
|
41
|
+
<p className="text-gray-600">
|
|
42
|
+
<YaText fieldId="contact.emailValue" as="span">
|
|
43
|
+
hello@example.com
|
|
44
|
+
</YaText>
|
|
45
|
+
</p>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
{/* Phone */}
|
|
49
|
+
<div className="bg-white p-6 rounded-lg border border-gray-200">
|
|
50
|
+
<div className="w-10 h-10 bg-blue-100 rounded-lg flex items-center justify-center mb-4">
|
|
51
|
+
<svg className="w-5 h-5 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
52
|
+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" />
|
|
53
|
+
</svg>
|
|
54
|
+
</div>
|
|
55
|
+
<h3 className="text-lg font-semibold text-gray-900 mb-2">
|
|
56
|
+
<YaText fieldId="contact.phoneTitle" as="span">
|
|
57
|
+
Phone
|
|
58
|
+
</YaText>
|
|
59
|
+
</h3>
|
|
60
|
+
<p className="text-gray-600">
|
|
61
|
+
<YaText fieldId="contact.phoneValue" as="span">
|
|
62
|
+
(555) 123-4567
|
|
63
|
+
</YaText>
|
|
64
|
+
</p>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
{/* Address */}
|
|
69
|
+
<div className="mt-8 bg-white p-6 rounded-lg border border-gray-200">
|
|
70
|
+
<div className="w-10 h-10 bg-blue-100 rounded-lg flex items-center justify-center mb-4">
|
|
71
|
+
<svg className="w-5 h-5 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
72
|
+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" />
|
|
73
|
+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 11a3 3 0 11-6 0 3 3 0 016 0z" />
|
|
74
|
+
</svg>
|
|
75
|
+
</div>
|
|
76
|
+
<h3 className="text-lg font-semibold text-gray-900 mb-2">
|
|
77
|
+
<YaText fieldId="contact.addressTitle" as="span">
|
|
78
|
+
Address
|
|
79
|
+
</YaText>
|
|
80
|
+
</h3>
|
|
81
|
+
<p className="text-gray-600">
|
|
82
|
+
<YaText fieldId="contact.addressValue" as="span">
|
|
83
|
+
123 Main Street, Suite 100
|
|
84
|
+
<br />
|
|
85
|
+
San Francisco, CA 94102
|
|
86
|
+
</YaText>
|
|
87
|
+
</p>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</section>
|
|
92
|
+
</div>
|
|
93
|
+
)
|
|
94
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { YaText, YaLink } from '@yoamigo.com/core'
|
|
2
|
+
|
|
3
|
+
export function HomePage() {
|
|
4
|
+
return (
|
|
5
|
+
<div>
|
|
6
|
+
{/* Hero Section */}
|
|
7
|
+
<section className="bg-gradient-to-b from-gray-50 to-white py-20">
|
|
8
|
+
<div className="container mx-auto px-4">
|
|
9
|
+
<div className="text-center max-w-3xl mx-auto">
|
|
10
|
+
<h1 className="text-5xl font-bold text-gray-900 mb-6">
|
|
11
|
+
<YaText fieldId="hero.title" as="span">
|
|
12
|
+
Build Something Amazing
|
|
13
|
+
</YaText>
|
|
14
|
+
</h1>
|
|
15
|
+
<p className="text-xl text-gray-600 mb-8">
|
|
16
|
+
<YaText fieldId="hero.subtitle" as="span">
|
|
17
|
+
Create beautiful, modern websites with our intuitive template system.
|
|
18
|
+
Click any text to customize it in the builder.
|
|
19
|
+
</YaText>
|
|
20
|
+
</p>
|
|
21
|
+
<div className="flex gap-4 justify-center">
|
|
22
|
+
<YaLink
|
|
23
|
+
fieldId="hero.ctaLink"
|
|
24
|
+
href="/contact"
|
|
25
|
+
className="px-8 py-3 bg-blue-600 hover:bg-blue-700 text-white rounded-lg font-medium transition-colors"
|
|
26
|
+
>
|
|
27
|
+
Get Started
|
|
28
|
+
</YaLink>
|
|
29
|
+
<YaLink
|
|
30
|
+
fieldId="hero.secondaryLink"
|
|
31
|
+
href="/about"
|
|
32
|
+
className="px-8 py-3 bg-gray-200 hover:bg-gray-300 text-gray-800 rounded-lg font-medium transition-colors"
|
|
33
|
+
>
|
|
34
|
+
Learn More
|
|
35
|
+
</YaLink>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</section>
|
|
40
|
+
|
|
41
|
+
{/* Features Section */}
|
|
42
|
+
<section className="py-20">
|
|
43
|
+
<div className="container mx-auto px-4">
|
|
44
|
+
<h2 className="text-3xl font-bold text-gray-900 text-center mb-12">
|
|
45
|
+
<YaText fieldId="features.title" as="span">
|
|
46
|
+
Why Choose Us
|
|
47
|
+
</YaText>
|
|
48
|
+
</h2>
|
|
49
|
+
<div className="grid md:grid-cols-3 gap-8 max-w-5xl mx-auto">
|
|
50
|
+
{/* Feature 1 */}
|
|
51
|
+
<div className="text-center p-6">
|
|
52
|
+
<div className="w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center mx-auto mb-4">
|
|
53
|
+
<svg className="w-6 h-6 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
54
|
+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M13 10V3L4 14h7v7l9-11h-7z" />
|
|
55
|
+
</svg>
|
|
56
|
+
</div>
|
|
57
|
+
<h3 className="text-xl font-semibold text-gray-900 mb-2">
|
|
58
|
+
<YaText fieldId="feature1.title" as="span">
|
|
59
|
+
Fast & Reliable
|
|
60
|
+
</YaText>
|
|
61
|
+
</h3>
|
|
62
|
+
<p className="text-gray-600">
|
|
63
|
+
<YaText fieldId="feature1.description" as="span">
|
|
64
|
+
Built for speed and reliability. Your website loads instantly on any device.
|
|
65
|
+
</YaText>
|
|
66
|
+
</p>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
{/* Feature 2 */}
|
|
70
|
+
<div className="text-center p-6">
|
|
71
|
+
<div className="w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center mx-auto mb-4">
|
|
72
|
+
<svg className="w-6 h-6 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
73
|
+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01" />
|
|
74
|
+
</svg>
|
|
75
|
+
</div>
|
|
76
|
+
<h3 className="text-xl font-semibold text-gray-900 mb-2">
|
|
77
|
+
<YaText fieldId="feature2.title" as="span">
|
|
78
|
+
Easy to Customize
|
|
79
|
+
</YaText>
|
|
80
|
+
</h3>
|
|
81
|
+
<p className="text-gray-600">
|
|
82
|
+
<YaText fieldId="feature2.description" as="span">
|
|
83
|
+
Click any text to edit it. Change colors, fonts, and layouts with ease.
|
|
84
|
+
</YaText>
|
|
85
|
+
</p>
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
{/* Feature 3 */}
|
|
89
|
+
<div className="text-center p-6">
|
|
90
|
+
<div className="w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center mx-auto mb-4">
|
|
91
|
+
<svg className="w-6 h-6 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
92
|
+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" />
|
|
93
|
+
</svg>
|
|
94
|
+
</div>
|
|
95
|
+
<h3 className="text-xl font-semibold text-gray-900 mb-2">
|
|
96
|
+
<YaText fieldId="feature3.title" as="span">
|
|
97
|
+
Secure & Modern
|
|
98
|
+
</YaText>
|
|
99
|
+
</h3>
|
|
100
|
+
<p className="text-gray-600">
|
|
101
|
+
<YaText fieldId="feature3.description" as="span">
|
|
102
|
+
Built with the latest web technologies. Secure, accessible, and SEO-friendly.
|
|
103
|
+
</YaText>
|
|
104
|
+
</p>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
</section>
|
|
109
|
+
</div>
|
|
110
|
+
)
|
|
111
|
+
}
|