@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.
@@ -1,35 +1,6 @@
1
- import { useState } from 'react'
2
1
  import { YaText } from '@yoamigo.com/core'
3
- import { submitContactForm, type ContactFormData } from '@yoamigo.com/core/lib'
4
2
 
5
3
  export default function ContactPage() {
6
- const [formData, setFormData] = useState({ name: '', email: '', message: '' })
7
- const [isSubmitting, setIsSubmitting] = useState(false)
8
- const [isSubmitted, setIsSubmitted] = useState(false)
9
- const [error, setError] = useState<string | null>(null)
10
-
11
- const handleSubmit = async (e: React.FormEvent) => {
12
- e.preventDefault()
13
- setIsSubmitting(true)
14
- setError(null)
15
-
16
- try {
17
- const data: ContactFormData = {
18
- name: formData.name,
19
- email: formData.email,
20
- message: formData.message,
21
- }
22
-
23
- await submitContactForm(data)
24
- setIsSubmitted(true)
25
- setFormData({ name: '', email: '', message: '' })
26
- } catch (err) {
27
- setError(err instanceof Error ? err.message : 'Failed to submit form')
28
- } finally {
29
- setIsSubmitting(false)
30
- }
31
- }
32
-
33
4
  return (
34
5
  <div>
35
6
  {/* Hero Section */}
@@ -38,196 +9,82 @@ export default function ContactPage() {
38
9
  <div className="text-center max-w-3xl mx-auto">
39
10
  <h1 className="text-4xl font-bold text-gray-900 mb-4">
40
11
  <YaText fieldId="contact.title" as="span">
41
- Contact Us
12
+ Get in Touch
42
13
  </YaText>
43
14
  </h1>
44
15
  <p className="text-xl text-gray-600">
45
16
  <YaText fieldId="contact.subtitle" as="span">
46
- Have questions? We'd love to hear from you.
17
+ We'd love to hear from you. Reach out and let's start a conversation.
47
18
  </YaText>
48
19
  </p>
49
20
  </div>
50
21
  </div>
51
22
  </section>
52
23
 
53
- {/* Contact Form & Info Section */}
24
+ {/* Contact Info Section */}
54
25
  <section className="py-16">
55
26
  <div className="container mx-auto px-4">
56
- <div className="max-w-4xl mx-auto">
57
- <div className="grid md:grid-cols-2 gap-12">
58
- {/* Contact Form */}
59
- <div>
60
- <h2 className="text-2xl font-bold text-gray-900 mb-6">
61
- <YaText fieldId="contact.formTitle" as="span">
62
- Send us a message
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
63
39
  </YaText>
64
- </h2>
65
-
66
- {isSubmitted ? (
67
- <div className="bg-green-50 border border-green-200 rounded-lg p-6 text-center">
68
- <div className="text-green-600 text-4xl mb-4">✓</div>
69
- <h3 className="text-lg font-semibold text-green-800 mb-2">
70
- <YaText fieldId="contact.successTitle" as="span">
71
- Message Sent!
72
- </YaText>
73
- </h3>
74
- <p className="text-green-700">
75
- <YaText fieldId="contact.successMessage" as="span">
76
- Thanks for reaching out. We'll get back to you soon.
77
- </YaText>
78
- </p>
79
- <button
80
- onClick={() => setIsSubmitted(false)}
81
- className="mt-4 text-sm font-medium text-blue-600 hover:underline"
82
- >
83
- Send another message
84
- </button>
85
- </div>
86
- ) : (
87
- <form onSubmit={handleSubmit} className="space-y-6">
88
- <div>
89
- <label htmlFor="name" className="block text-sm font-medium text-gray-700 mb-2">
90
- <YaText fieldId="contact.nameLabel" as="span">
91
- Name
92
- </YaText>
93
- </label>
94
- <input
95
- type="text"
96
- id="name"
97
- name="name"
98
- required
99
- value={formData.name}
100
- onChange={(e) => setFormData({ ...formData, name: e.target.value })}
101
- className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
102
- placeholder="Your name"
103
- />
104
- </div>
105
-
106
- <div>
107
- <label htmlFor="email" className="block text-sm font-medium text-gray-700 mb-2">
108
- <YaText fieldId="contact.emailLabel" as="span">
109
- Email
110
- </YaText>
111
- </label>
112
- <input
113
- type="email"
114
- id="email"
115
- name="email"
116
- required
117
- value={formData.email}
118
- onChange={(e) => setFormData({ ...formData, email: e.target.value })}
119
- className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
120
- placeholder="your@email.com"
121
- />
122
- </div>
123
-
124
- <div>
125
- <label htmlFor="message" className="block text-sm font-medium text-gray-700 mb-2">
126
- <YaText fieldId="contact.messageLabel" as="span">
127
- Message
128
- </YaText>
129
- </label>
130
- <textarea
131
- id="message"
132
- name="message"
133
- required
134
- rows={5}
135
- value={formData.message}
136
- onChange={(e) => setFormData({ ...formData, message: e.target.value })}
137
- className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
138
- placeholder="How can we help you?"
139
- />
140
- </div>
141
-
142
- {error && (
143
- <div className="p-3 bg-red-50 border border-red-200 text-red-700 text-sm rounded-lg">
144
- {error}
145
- </div>
146
- )}
147
-
148
- <button
149
- type="submit"
150
- disabled={isSubmitting}
151
- className="w-full bg-blue-600 text-white font-medium py-3 px-6 rounded-lg hover:bg-blue-700 transition-colors disabled:opacity-50"
152
- >
153
- {isSubmitting ? 'Sending...' : (
154
- <YaText fieldId="contact.submitText" as="span">
155
- Send Message
156
- </YaText>
157
- )}
158
- </button>
159
- </form>
160
- )}
161
- </div>
162
-
163
- {/* Contact Info */}
164
- <div className="space-y-6">
165
- <h2 className="text-2xl font-bold text-gray-900 mb-6">
166
- <YaText fieldId="contact.infoTitle" as="span">
167
- Contact Information
40
+ </h3>
41
+ <p className="text-gray-600">
42
+ <YaText fieldId="contact.emailValue" as="span">
43
+ hello@example.com
168
44
  </YaText>
169
- </h2>
170
-
171
- {/* Email */}
172
- <div className="bg-white p-6 rounded-lg border border-gray-200">
173
- <div className="w-10 h-10 bg-blue-100 rounded-lg flex items-center justify-center mb-4">
174
- <svg className="w-5 h-5 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
175
- <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" />
176
- </svg>
177
- </div>
178
- <h3 className="text-lg font-semibold text-gray-900 mb-2">
179
- <YaText fieldId="contact.emailTitle" as="span">
180
- Email
181
- </YaText>
182
- </h3>
183
- <p className="text-gray-600">
184
- <YaText fieldId="contact.emailValue" as="span">
185
- hello@example.com
186
- </YaText>
187
- </p>
188
- </div>
45
+ </p>
46
+ </div>
189
47
 
190
- {/* Phone */}
191
- <div className="bg-white p-6 rounded-lg border border-gray-200">
192
- <div className="w-10 h-10 bg-blue-100 rounded-lg flex items-center justify-center mb-4">
193
- <svg className="w-5 h-5 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
194
- <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" />
195
- </svg>
196
- </div>
197
- <h3 className="text-lg font-semibold text-gray-900 mb-2">
198
- <YaText fieldId="contact.phoneTitle" as="span">
199
- Phone
200
- </YaText>
201
- </h3>
202
- <p className="text-gray-600">
203
- <YaText fieldId="contact.phoneValue" as="span">
204
- (555) 123-4567
205
- </YaText>
206
- </p>
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>
207
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>
208
67
 
209
- {/* Address */}
210
- <div className="bg-white p-6 rounded-lg border border-gray-200">
211
- <div className="w-10 h-10 bg-blue-100 rounded-lg flex items-center justify-center mb-4">
212
- <svg className="w-5 h-5 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
213
- <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" />
214
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 11a3 3 0 11-6 0 3 3 0 016 0z" />
215
- </svg>
216
- </div>
217
- <h3 className="text-lg font-semibold text-gray-900 mb-2">
218
- <YaText fieldId="contact.addressTitle" as="span">
219
- Address
220
- </YaText>
221
- </h3>
222
- <p className="text-gray-600">
223
- <YaText fieldId="contact.addressValue" as="span">
224
- 123 Main Street, Suite 100
225
- <br />
226
- San Francisco, CA 94102
227
- </YaText>
228
- </p>
229
- </div>
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>
230
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
+ Your City, State 12345
86
+ </YaText>
87
+ </p>
231
88
  </div>
232
89
  </div>
233
90
  </div>
@@ -1,105 +1,97 @@
1
- import { YaText, YaLink } from '@yoamigo.com/core'
1
+ import { YaText, YaLink, YaImage } from '@yoamigo.com/core'
2
2
 
3
3
  export default function HomePage() {
4
4
  return (
5
5
  <div>
6
6
  {/* Hero Section */}
7
- <section className="bg-gradient-to-b from-gray-50 to-white py-20">
7
+ <section className="py-16 md:py-24">
8
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">
9
+ <div className="text-center max-w-2xl mx-auto">
10
+ {/* Welcome Image */}
11
+ <div className="mb-8">
12
+ <YaImage
13
+ fieldId="hero.image"
14
+ className="w-full h-auto rounded-lg shadow-md"
15
+ alt="Welcome"
16
+ />
17
+ </div>
18
+
19
+ {/* Tagline */}
20
+ <p className="text-lg text-gray-600 mb-8">
16
21
  <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.
22
+ Quality products. Exceptional service. Results you can trust.
19
23
  </YaText>
20
24
  </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>
25
+
26
+ {/* Single CTA */}
27
+ <YaLink
28
+ fieldId="hero.ctaLink"
29
+ href="/contact"
30
+ className="inline-block px-8 py-3 bg-gray-900 hover:bg-gray-800 text-white rounded-lg font-medium transition-colors"
31
+ >
32
+ Get Started
33
+ </YaLink>
37
34
  </div>
38
35
  </div>
39
36
  </section>
40
37
 
41
38
  {/* Features Section */}
42
- <section className="py-20">
39
+ <section className="py-16 border-t border-gray-100">
43
40
  <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">
41
+ <div className="grid md:grid-cols-3 gap-8 max-w-4xl mx-auto">
50
42
  {/* 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">
43
+ <div className="text-center">
44
+ <div className="w-10 h-10 bg-gray-100 rounded-lg flex items-center justify-center mx-auto mb-3">
45
+ <svg className="w-5 h-5 text-gray-700" fill="none" stroke="currentColor" viewBox="0 0 24 24">
54
46
  <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M13 10V3L4 14h7v7l9-11h-7z" />
55
47
  </svg>
56
48
  </div>
57
- <h3 className="text-xl font-semibold text-gray-900 mb-2">
49
+ <h3 className="text-base font-semibold text-gray-900 mb-1">
58
50
  <YaText fieldId="feature1.title" as="span">
59
- Fast & Reliable
51
+ Quality First
60
52
  </YaText>
61
53
  </h3>
62
- <p className="text-gray-600">
54
+ <p className="text-sm text-gray-600">
63
55
  <YaText fieldId="feature1.description" as="span">
64
- Built for speed and reliability. Your website loads instantly on any device.
56
+ We take pride in delivering excellence in everything we do.
65
57
  </YaText>
66
58
  </p>
67
59
  </div>
68
60
 
69
61
  {/* 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" />
62
+ <div className="text-center">
63
+ <div className="w-10 h-10 bg-gray-100 rounded-lg flex items-center justify-center mx-auto mb-3">
64
+ <svg className="w-5 h-5 text-gray-700" fill="none" stroke="currentColor" viewBox="0 0 24 24">
65
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M18.364 5.636l-3.536 3.536m0 5.656l3.536 3.536M9.172 9.172L5.636 5.636m3.536 9.192l-3.536 3.536M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-5 0a4 4 0 11-8 0 4 4 0 018 0z" />
74
66
  </svg>
75
67
  </div>
76
- <h3 className="text-xl font-semibold text-gray-900 mb-2">
68
+ <h3 className="text-base font-semibold text-gray-900 mb-1">
77
69
  <YaText fieldId="feature2.title" as="span">
78
- Easy to Customize
70
+ Expert Support
79
71
  </YaText>
80
72
  </h3>
81
- <p className="text-gray-600">
73
+ <p className="text-sm text-gray-600">
82
74
  <YaText fieldId="feature2.description" as="span">
83
- Click any text to edit it. Change colors, fonts, and layouts with ease.
75
+ Our dedicated team is here to help you every step of the way.
84
76
  </YaText>
85
77
  </p>
86
78
  </div>
87
79
 
88
80
  {/* 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" />
81
+ <div className="text-center">
82
+ <div className="w-10 h-10 bg-gray-100 rounded-lg flex items-center justify-center mx-auto mb-3">
83
+ <svg className="w-5 h-5 text-gray-700" fill="none" stroke="currentColor" viewBox="0 0 24 24">
84
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" />
93
85
  </svg>
94
86
  </div>
95
- <h3 className="text-xl font-semibold text-gray-900 mb-2">
87
+ <h3 className="text-base font-semibold text-gray-900 mb-1">
96
88
  <YaText fieldId="feature3.title" as="span">
97
- Secure & Modern
89
+ Trusted Results
98
90
  </YaText>
99
91
  </h3>
100
- <p className="text-gray-600">
92
+ <p className="text-sm text-gray-600">
101
93
  <YaText fieldId="feature3.description" as="span">
102
- Built with the latest web technologies. Secure, accessible, and SEO-friendly.
94
+ Join thousands of happy customers who have chosen us.
103
95
  </YaText>
104
96
  </p>
105
97
  </div>