payload-next-starter 1.0.1 → 1.0.4

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/bin/setup.js CHANGED
@@ -20,7 +20,7 @@ if (!existsSync(join(targetDir, 'package.json'))) {
20
20
 
21
21
  const pkg = JSON.parse(readFileSync(join(targetDir, 'package.json'), 'utf8'))
22
22
  if (!pkg.dependencies?.next) {
23
- console.error('❌ This doesn\'t appear to be a Next.js project.')
23
+ console.error("❌ This doesn't appear to be a Next.js project.")
24
24
  process.exit(1)
25
25
  }
26
26
 
@@ -42,27 +42,43 @@ try {
42
42
 
43
43
  // Copy payload.config.ts
44
44
  if (existsSync(join(templatesDir, 'payload.config.ts'))) {
45
- copyFileSync(
46
- join(templatesDir, 'payload.config.ts'),
47
- join(targetDir, 'src/payload.config.ts')
48
- )
45
+ copyFileSync(join(templatesDir, 'payload.config.ts'), join(targetDir, 'src/payload.config.ts'))
49
46
  console.log(' ✓ payload.config.ts')
50
47
  }
51
48
 
52
49
  // Copy collections
53
50
  if (existsSync(join(templatesDir, 'collections'))) {
54
- cpSync(join(templatesDir, 'collections'), join(targetDir, 'src/collections'), { recursive: true, force: true })
51
+ cpSync(join(templatesDir, 'collections'), join(targetDir, 'src/collections'), {
52
+ recursive: true,
53
+ force: true,
54
+ })
55
55
  console.log(' ✓ collections/')
56
56
  }
57
57
 
58
58
  // Copy app routes
59
59
  if (existsSync(join(templatesDir, 'app/(payload)'))) {
60
- cpSync(join(templatesDir, 'app/(payload)'), join(targetDir, 'src/app/(payload)'), { recursive: true, force: true })
60
+ cpSync(join(templatesDir, 'app/(payload)'), join(targetDir, 'src/app/(payload)'), {
61
+ recursive: true,
62
+ force: true,
63
+ })
61
64
  console.log(' ✓ app/(payload)/')
62
65
  }
63
66
 
67
+ // Copy frontend pages
68
+ if (existsSync(join(templatesDir, 'app/(frontend)'))) {
69
+ mkdirSync(join(targetDir, 'src/app/(frontend)'), { recursive: true })
70
+ cpSync(join(templatesDir, 'app/(frontend)'), join(targetDir, 'src/app/(frontend)'), {
71
+ recursive: true,
72
+ force: true,
73
+ })
74
+ console.log(' ✓ Frontend pages (about-us, contact-us, share)/')
75
+ }
76
+
64
77
  if (existsSync(join(templatesDir, 'app/api/[...payload]'))) {
65
- cpSync(join(templatesDir, 'app/api/[...payload]'), join(targetDir, 'src/app/api/[...payload]'), { recursive: true, force: true })
78
+ cpSync(join(templatesDir, 'app/api/[...payload]'), join(targetDir, 'src/app/api/[...payload]'), {
79
+ recursive: true,
80
+ force: true,
81
+ })
66
82
  console.log(' ✓ app/api/[...payload]/')
67
83
  }
68
84
 
@@ -75,16 +91,19 @@ const deps = [
75
91
  '@payloadcms/richtext-lexical',
76
92
  '@payloadcms/ui',
77
93
  'dotenv',
78
- 'cross-env'
94
+ 'cross-env',
79
95
  ]
80
96
 
81
97
  try {
82
- const pkgManager = existsSync(join(targetDir, 'pnpm-lock.yaml')) ? 'pnpm' :
83
- existsSync(join(targetDir, 'yarn.lock')) ? 'yarn' : 'npm'
98
+ const pkgManager = existsSync(join(targetDir, 'pnpm-lock.yaml'))
99
+ ? 'pnpm'
100
+ : existsSync(join(targetDir, 'yarn.lock'))
101
+ ? 'yarn'
102
+ : 'npm'
84
103
 
85
104
  execSync(`${pkgManager} add ${deps.join(' ')}`, {
86
105
  cwd: targetDir,
87
- stdio: 'inherit'
106
+ stdio: 'inherit',
88
107
  })
89
108
  console.log('✓ Dependencies installed\n')
90
109
  } catch (e) {
@@ -116,24 +135,30 @@ export default withPayload(nextConfig)
116
135
  }
117
136
  } else {
118
137
  console.log(' ⚠ No next.config found, creating one...')
119
- writeFileSync(join(targetDir, 'next.config.ts'), `import { withPayload } from '@payloadcms/next/withPayload'
138
+ writeFileSync(
139
+ join(targetDir, 'next.config.ts'),
140
+ `import { withPayload } from '@payloadcms/next/withPayload'
120
141
 
121
142
  const nextConfig = {
122
143
  // your config
123
144
  }
124
145
 
125
146
  export default withPayload(nextConfig)
126
- `)
147
+ `,
148
+ )
127
149
  console.log(' ✓ next.config.ts created\n')
128
150
  }
129
151
 
130
152
  // Create .env.example
131
153
  if (!existsSync(join(targetDir, '.env'))) {
132
- writeFileSync(join(targetDir, '.env.example'), `# PayloadCMS
154
+ writeFileSync(
155
+ join(targetDir, '.env.example'),
156
+ `# PayloadCMS
133
157
  DATABASE_URI=postgresql://user:password@host:5432/database
134
158
  PAYLOAD_SECRET=your-secret-key-here-at-least-16-chars
135
159
  NEXT_PUBLIC_SERVER_URL=http://localhost:3000
136
- `)
160
+ `,
161
+ )
137
162
  console.log(' ✓ .env.example created')
138
163
  }
139
164
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payload-next-starter",
3
- "version": "1.0.1",
3
+ "version": "1.0.4",
4
4
  "description": "PayloadCMS starter for Next.js - install into any Next.js app",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -0,0 +1,22 @@
1
+ import React from 'react'
2
+
3
+ export default function AboutUsPage() {
4
+ return (
5
+ <div className="about-us">
6
+ <div className="content">
7
+ <h1>About Us</h1>
8
+ <p>
9
+ Welcome to our company. We are dedicated to delivering exceptional
10
+ products and services that meet the needs of our customers. Our team
11
+ is passionate about innovation and committed to excellence.
12
+ </p>
13
+ <p>
14
+ Founded with a vision to make a difference, we have grown into a
15
+ trusted partner for businesses and individuals alike. Our mission is
16
+ to create value through quality, integrity, and customer-focused
17
+ solutions.
18
+ </p>
19
+ </div>
20
+ </div>
21
+ )
22
+ }
@@ -0,0 +1,421 @@
1
+ 'use client'
2
+
3
+ import Image from 'next/image'
4
+ import Link from 'next/link'
5
+ import React from 'react'
6
+
7
+ export default function ContactUsPage() {
8
+ return (
9
+ <div
10
+ style={{
11
+ display: 'flex',
12
+ minHeight: '100vh',
13
+ fontFamily: 'system-ui, -apple-system, sans-serif',
14
+ }}
15
+ >
16
+ {/* Sticky Sidebar Navigation */}
17
+ <nav
18
+ style={{
19
+ position: 'sticky',
20
+ top: 0,
21
+ height: '100vh',
22
+ width: '240px',
23
+ background: 'linear-gradient(180deg, #1e3a5f 0%, #0d2137 100%)',
24
+ padding: '40px 20px',
25
+ display: 'flex',
26
+ flexDirection: 'column',
27
+ gap: '20px',
28
+ boxShadow: '4px 0 15px rgba(0,0,0,0.1)',
29
+ }}
30
+ >
31
+ <h2 style={{ color: '#fff', fontSize: '24px', marginBottom: '30px', fontWeight: 700 }}>
32
+ Navigation
33
+ </h2>
34
+ <Link
35
+ href="/"
36
+ style={{
37
+ color: '#e2e8f0',
38
+ textDecoration: 'none',
39
+ padding: '15px 20px',
40
+ borderRadius: '8px',
41
+ transition: 'all 0.3s ease',
42
+ display: 'flex',
43
+ alignItems: 'center',
44
+ gap: '10px',
45
+ fontSize: '16px',
46
+ fontWeight: 500,
47
+ }}
48
+ onMouseEnter={(e) => {
49
+ e.currentTarget.style.background = 'rgba(255,255,255,0.1)'
50
+ e.currentTarget.style.color = '#fff'
51
+ }}
52
+ onMouseLeave={(e) => {
53
+ e.currentTarget.style.background = 'transparent'
54
+ e.currentTarget.style.color = '#e2e8f0'
55
+ }}
56
+ >
57
+ <span>🏠</span> Home
58
+ </Link>
59
+ <Link
60
+ href="/about-us"
61
+ style={{
62
+ color: '#e2e8f0',
63
+ textDecoration: 'none',
64
+ padding: '15px 20px',
65
+ borderRadius: '8px',
66
+ transition: 'all 0.3s ease',
67
+ display: 'flex',
68
+ alignItems: 'center',
69
+ gap: '10px',
70
+ fontSize: '16px',
71
+ fontWeight: 500,
72
+ }}
73
+ onMouseEnter={(e) => {
74
+ e.currentTarget.style.background = 'rgba(255,255,255,0.1)'
75
+ e.currentTarget.style.color = '#fff'
76
+ }}
77
+ onMouseLeave={(e) => {
78
+ e.currentTarget.style.background = 'transparent'
79
+ e.currentTarget.style.color = '#e2e8f0'
80
+ }}
81
+ >
82
+ <span>ℹ️</span> About Us
83
+ </Link>
84
+ <Link
85
+ href="/contact-us"
86
+ style={{
87
+ background: 'rgba(255,255,255,0.15)',
88
+ color: '#fff',
89
+ textDecoration: 'none',
90
+ padding: '15px 20px',
91
+ borderRadius: '8px',
92
+ display: 'flex',
93
+ alignItems: 'center',
94
+ gap: '10px',
95
+ fontSize: '16px',
96
+ fontWeight: 500,
97
+ }}
98
+ >
99
+ <span>📧</span> Contact Us
100
+ </Link>
101
+ </nav>
102
+
103
+ {/* Main Content */}
104
+ <main style={{ flex: 1, background: '#f8fafc' }}>
105
+ {/* Hero Section with Image */}
106
+ <div
107
+ style={{
108
+ position: 'relative',
109
+ height: '400px',
110
+ overflow: 'hidden',
111
+ display: 'flex',
112
+ alignItems: 'center',
113
+ justifyContent: 'center',
114
+ }}
115
+ >
116
+ <Image
117
+ src="https://images.unsplash.com/photo-1577563908411-5077b6dc7624?w=1200&h=400&fit=crop"
118
+ alt="Contact us header"
119
+ fill
120
+ style={{ objectFit: 'cover' }}
121
+ priority
122
+ />
123
+ <div
124
+ style={{
125
+ position: 'absolute',
126
+ inset: 0,
127
+ background:
128
+ 'linear-gradient(135deg, rgba(30, 58, 95, 0.8) 0%, rgba(13, 33, 55, 0.6) 100%)',
129
+ }}
130
+ />
131
+ <div style={{ position: 'relative', zIndex: 1, textAlign: 'center', color: '#fff' }}>
132
+ <h1 style={{ fontSize: '48px', fontWeight: 800, marginBottom: '16px' }}>
133
+ Get In Touch
134
+ </h1>
135
+ <p style={{ fontSize: '20px', opacity: 0.9 }}>We would love to hear from you</p>
136
+ </div>
137
+ </div>
138
+
139
+ {/* Content Grid */}
140
+ <div style={{ maxWidth: '1200px', margin: '0 auto', padding: '60px 40px' }}>
141
+ <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '60px' }}>
142
+ {/* Contact Info Cards */}
143
+ <div>
144
+ <h2
145
+ style={{
146
+ fontSize: '32px',
147
+ color: '#1e3a5f',
148
+ marginBottom: '30px',
149
+ fontWeight: 700,
150
+ }}
151
+ >
152
+ Contact Information
153
+ </h2>
154
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '24px' }}>
155
+ {/* Email Card */}
156
+ <div
157
+ style={{
158
+ background: '#fff',
159
+ padding: '30px',
160
+ borderRadius: '16px',
161
+ boxShadow: '0 4px 20px rgba(0,0,0,0.08)',
162
+ display: 'flex',
163
+ alignItems: 'center',
164
+ gap: '20px',
165
+ }}
166
+ >
167
+ <div
168
+ style={{
169
+ width: '60px',
170
+ height: '60px',
171
+ background: 'linear-gradient(135deg, #3b82f6 0%, #1e3a5f 100%)',
172
+ borderRadius: '12px',
173
+ display: 'flex',
174
+ alignItems: 'center',
175
+ justifyContent: 'center',
176
+ fontSize: '28px',
177
+ }}
178
+ >
179
+ 📧
180
+ </div>
181
+ <div>
182
+ <h3 style={{ fontSize: '18px', color: '#64748b', marginBottom: '8px' }}>
183
+ Email
184
+ </h3>
185
+ <p style={{ fontSize: '18px', color: '#1e3a5f', fontWeight: 600 }}>
186
+ contact@example.com
187
+ </p>
188
+ </div>
189
+ </div>
190
+
191
+ {/* Phone Card */}
192
+ <div
193
+ style={{
194
+ background: '#fff',
195
+ padding: '30px',
196
+ borderRadius: '16px',
197
+ boxShadow: '0 4px 20px rgba(0,0,0,0.08)',
198
+ display: 'flex',
199
+ alignItems: 'center',
200
+ gap: '20px',
201
+ }}
202
+ >
203
+ <div
204
+ style={{
205
+ width: '60px',
206
+ height: '60px',
207
+ background: 'linear-gradient(135deg, #10b981 0%, #059669 100%)',
208
+ borderRadius: '12px',
209
+ display: 'flex',
210
+ alignItems: 'center',
211
+ justifyContent: 'center',
212
+ fontSize: '28px',
213
+ }}
214
+ >
215
+ 📞
216
+ </div>
217
+ <div>
218
+ <h3 style={{ fontSize: '18px', color: '#64748b', marginBottom: '8px' }}>
219
+ Phone
220
+ </h3>
221
+ <p style={{ fontSize: '18px', color: '#1e3a5f', fontWeight: 600 }}>
222
+ +1 (555) 123-4567
223
+ </p>
224
+ </div>
225
+ </div>
226
+
227
+ {/* Address Card */}
228
+ <div
229
+ style={{
230
+ background: '#fff',
231
+ padding: '30px',
232
+ borderRadius: '16px',
233
+ boxShadow: '0 4px 20px rgba(0,0,0,0.08)',
234
+ display: 'flex',
235
+ alignItems: 'center',
236
+ gap: '20px',
237
+ }}
238
+ >
239
+ <div
240
+ style={{
241
+ width: '60px',
242
+ height: '60px',
243
+ background: 'linear-gradient(135deg, #f59e0b 0%, #d97706 100%)',
244
+ borderRadius: '12px',
245
+ display: 'flex',
246
+ alignItems: 'center',
247
+ justifyContent: 'center',
248
+ fontSize: '28px',
249
+ }}
250
+ >
251
+ 📍
252
+ </div>
253
+ <div>
254
+ <h3 style={{ fontSize: '18px', color: '#64748b', marginBottom: '8px' }}>
255
+ Address
256
+ </h3>
257
+ <p style={{ fontSize: '18px', color: '#1e3a5f', fontWeight: 600 }}>
258
+ 123 Main Street, City, State 12345
259
+ </p>
260
+ </div>
261
+ </div>
262
+ </div>
263
+ </div>
264
+
265
+ {/* Modern Contact Form */}
266
+ <div>
267
+ <h2
268
+ style={{
269
+ fontSize: '32px',
270
+ color: '#1e3a5f',
271
+ marginBottom: '30px',
272
+ fontWeight: 700,
273
+ }}
274
+ >
275
+ Send a Message
276
+ </h2>
277
+ <form
278
+ style={{
279
+ background: '#fff',
280
+ padding: '40px',
281
+ borderRadius: '20px',
282
+ boxShadow: '0 10px 40px rgba(0,0,0,0.1)',
283
+ }}
284
+ >
285
+ <div style={{ marginBottom: '24px' }}>
286
+ <label
287
+ htmlFor="name"
288
+ style={{
289
+ display: 'block',
290
+ fontSize: '14px',
291
+ color: '#64748b',
292
+ marginBottom: '8px',
293
+ fontWeight: 500,
294
+ textTransform: 'uppercase',
295
+ letterSpacing: '0.5px',
296
+ }}
297
+ >
298
+ Your Name
299
+ </label>
300
+ <input
301
+ type="text"
302
+ id="name"
303
+ name="name"
304
+ placeholder="John Doe"
305
+ style={{
306
+ width: '100%',
307
+ padding: '16px 20px',
308
+ borderRadius: '12px',
309
+ border: '2px solid #e2e8f0',
310
+ fontSize: '16px',
311
+ transition: 'all 0.3s ease',
312
+ outline: 'none',
313
+ }}
314
+ onFocus={(e) => (e.target.style.borderColor = '#3b82f6')}
315
+ onBlur={(e) => (e.target.style.borderColor = '#e2e8f0')}
316
+ />
317
+ </div>
318
+
319
+ <div style={{ marginBottom: '24px' }}>
320
+ <label
321
+ htmlFor="email"
322
+ style={{
323
+ display: 'block',
324
+ fontSize: '14px',
325
+ color: '#64748b',
326
+ marginBottom: '8px',
327
+ fontWeight: 500,
328
+ textTransform: 'uppercase',
329
+ letterSpacing: '0.5px',
330
+ }}
331
+ >
332
+ Email Address
333
+ </label>
334
+ <input
335
+ type="email"
336
+ id="email"
337
+ name="email"
338
+ placeholder="john@example.com"
339
+ style={{
340
+ width: '100%',
341
+ padding: '16px 20px',
342
+ borderRadius: '12px',
343
+ border: '2px solid #e2e8f0',
344
+ fontSize: '16px',
345
+ transition: 'all 0.3s ease',
346
+ outline: 'none',
347
+ }}
348
+ onFocus={(e) => (e.target.style.borderColor = '#3b82f6')}
349
+ onBlur={(e) => (e.target.style.borderColor = '#e2e8f0')}
350
+ />
351
+ </div>
352
+
353
+ <div style={{ marginBottom: '24px' }}>
354
+ <label
355
+ htmlFor="message"
356
+ style={{
357
+ display: 'block',
358
+ fontSize: '14px',
359
+ color: '#64748b',
360
+ marginBottom: '8px',
361
+ fontWeight: 500,
362
+ textTransform: 'uppercase',
363
+ letterSpacing: '0.5px',
364
+ }}
365
+ >
366
+ Your Message
367
+ </label>
368
+ <textarea
369
+ id="message"
370
+ name="message"
371
+ rows={5}
372
+ placeholder="Tell us how we can help..."
373
+ style={{
374
+ width: '100%',
375
+ padding: '16px 20px',
376
+ borderRadius: '12px',
377
+ border: '2px solid #e2e8f0',
378
+ fontSize: '16px',
379
+ transition: 'all 0.3s ease',
380
+ outline: 'none',
381
+ resize: 'vertical',
382
+ }}
383
+ onFocus={(e) => (e.target.style.borderColor = '#3b82f6')}
384
+ onBlur={(e) => (e.target.style.borderColor = '#e2e8f0')}
385
+ />
386
+ </div>
387
+
388
+ <button
389
+ type="submit"
390
+ style={{
391
+ width: '100%',
392
+ padding: '18px 40px',
393
+ background: 'linear-gradient(135deg, #3b82f6 0%, #1e3a5f 100%)',
394
+ color: '#fff',
395
+ border: 'none',
396
+ borderRadius: '12px',
397
+ fontSize: '18px',
398
+ fontWeight: 600,
399
+ cursor: 'pointer',
400
+ transition: 'all 0.3s ease',
401
+ boxShadow: '0 4px 15px rgba(59, 130, 246, 0.4)',
402
+ }}
403
+ onMouseEnter={(e) => {
404
+ e.currentTarget.style.transform = 'translateY(-2px)'
405
+ e.currentTarget.style.boxShadow = '0 8px 25px rgba(59, 130, 246, 0.5)'
406
+ }}
407
+ onMouseLeave={(e) => {
408
+ e.currentTarget.style.transform = 'translateY(0)'
409
+ e.currentTarget.style.boxShadow = '0 4px 15px rgba(59, 130, 246, 0.4)'
410
+ }}
411
+ >
412
+ Send Message →
413
+ </button>
414
+ </form>
415
+ </div>
416
+ </div>
417
+ </div>
418
+ </main>
419
+ </div>
420
+ )
421
+ }
@@ -0,0 +1,59 @@
1
+ import { headers as getHeaders } from 'next/headers.js'
2
+ import Image from 'next/image'
3
+ import { getPayload } from 'payload'
4
+ import React from 'react'
5
+ import { fileURLToPath } from 'url'
6
+
7
+ import config from '@/payload.config'
8
+ import './styles.css'
9
+
10
+ export default async function HomePage() {
11
+ const headers = await getHeaders()
12
+ const payloadConfig = await config
13
+ const payload = await getPayload({ config: payloadConfig })
14
+ const { user } = await payload.auth({ headers })
15
+
16
+ const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
17
+
18
+ return (
19
+ <div className="home">
20
+ <div className="content">
21
+ <picture>
22
+ <source srcSet="https://raw.githubusercontent.com/payloadcms/payload/main/packages/ui/src/assets/payload-favicon.svg" />
23
+ <Image
24
+ alt="Payload Logo"
25
+ height={65}
26
+ src="https://raw.githubusercontent.com/payloadcms/payload/main/packages/ui/src/assets/payload-favicon.svg"
27
+ width={65}
28
+ />
29
+ </picture>
30
+ {!user && <h1>Welcome to your new project. Magically TESt</h1>}
31
+ {user && <h1>Welcome back, {user.email}</h1>}
32
+ <div className="links">
33
+ <a
34
+ className="admin"
35
+ href={payloadConfig.routes.admin}
36
+ rel="noopener noreferrer"
37
+ target="_blank"
38
+ >
39
+ Go to admin panel
40
+ </a>
41
+ <a
42
+ className="docs"
43
+ href="https://payloadcms.com/docs"
44
+ rel="noopener noreferrer"
45
+ target="_blank"
46
+ >
47
+ Documentation
48
+ </a>
49
+ </div>
50
+ </div>
51
+ <div className="footer">
52
+ <p>Update this page by editing</p>
53
+ <a className="codeLink" href={fileURL}>
54
+ <code>app/(frontend)/page.tsx</code>
55
+ </a>
56
+ </div>
57
+ </div>
58
+ )
59
+ }
@@ -0,0 +1,72 @@
1
+ import React from 'react'
2
+
3
+ export default function SharePage() {
4
+ return (
5
+ <div className="share">
6
+ <div className="content">
7
+ <h1>Share</h1>
8
+ <p>
9
+ Share our content with your friends and followers. Spread the word
10
+ and help us grow our community.
11
+ </p>
12
+
13
+ <div className="share-sections">
14
+ <div className="share-card">
15
+ <h2>Social Media</h2>
16
+ <p>Follow us and share our posts on your favorite platforms:</p>
17
+ <ul>
18
+ <li>
19
+ <a href="https://twitter.com/share" target="_blank" rel="noopener noreferrer">
20
+ Twitter
21
+ </a>
22
+ </li>
23
+ <li>
24
+ <a href="https://facebook.com/share" target="_blank" rel="noopener noreferrer">
25
+ Facebook
26
+ </a>
27
+ </li>
28
+ <li>
29
+ <a href="https://linkedin.com/share" target="_blank" rel="noopener noreferrer">
30
+ LinkedIn
31
+ </a>
32
+ </li>
33
+ <li>
34
+ <a href="https://instagram.com" target="_blank" rel="noopener noreferrer">
35
+ Instagram
36
+ </a>
37
+ </li>
38
+ </ul>
39
+ </div>
40
+
41
+ <div className="share-card">
42
+ <h2>Refer a Friend</h2>
43
+ <p>
44
+ Know someone who would benefit from our services? Share your
45
+ unique referral link and earn rewards.
46
+ </p>
47
+ <div className="referral-box">
48
+ <input
49
+ type="text"
50
+ value="https://example.com/ref/YOUR-CODE"
51
+ readOnly
52
+ />
53
+ <button>Copy Link</button>
54
+ </div>
55
+ </div>
56
+
57
+ <div className="share-card">
58
+ <h2>Newsletter</h2>
59
+ <p>
60
+ Stay updated with our latest news and updates. Subscribe to our
61
+ newsletter and share it with others.
62
+ </p>
63
+ <form className="newsletter-form">
64
+ <input type="email" placeholder="Enter your email" />
65
+ <button type="submit">Subscribe</button>
66
+ </form>
67
+ </div>
68
+ </div>
69
+ </div>
70
+ </div>
71
+ )
72
+ }
@@ -0,0 +1,164 @@
1
+ :root {
2
+ --font-mono: 'Roboto Mono', monospace;
3
+ }
4
+
5
+ * {
6
+ box-sizing: border-box;
7
+ }
8
+
9
+ html {
10
+ font-size: 18px;
11
+ line-height: 32px;
12
+
13
+ background: rgb(0, 0, 0);
14
+ -webkit-font-smoothing: antialiased;
15
+ }
16
+
17
+ html,
18
+ body,
19
+ #app {
20
+ height: 100%;
21
+ }
22
+
23
+ body {
24
+ font-family: system-ui;
25
+ font-size: 18px;
26
+ line-height: 32px;
27
+
28
+ margin: 0;
29
+ color: rgb(1000, 1000, 1000);
30
+
31
+ @media (max-width: 1024px) {
32
+ font-size: 15px;
33
+ line-height: 24px;
34
+ }
35
+ }
36
+
37
+ img {
38
+ max-width: 100%;
39
+ height: auto;
40
+ display: block;
41
+ }
42
+
43
+ h1 {
44
+ margin: 40px 0;
45
+ font-size: 64px;
46
+ line-height: 70px;
47
+ font-weight: bold;
48
+
49
+ @media (max-width: 1024px) {
50
+ margin: 24px 0;
51
+ font-size: 42px;
52
+ line-height: 42px;
53
+ }
54
+
55
+ @media (max-width: 768px) {
56
+ font-size: 38px;
57
+ line-height: 38px;
58
+ }
59
+
60
+ @media (max-width: 400px) {
61
+ font-size: 32px;
62
+ line-height: 32px;
63
+ }
64
+ }
65
+
66
+ p {
67
+ margin: 24px 0;
68
+
69
+ @media (max-width: 1024px) {
70
+ margin: calc(var(--base) * 0.75) 0;
71
+ }
72
+ }
73
+
74
+ a {
75
+ color: currentColor;
76
+
77
+ &:focus {
78
+ opacity: 0.8;
79
+ outline: none;
80
+ }
81
+
82
+ &:active {
83
+ opacity: 0.7;
84
+ outline: none;
85
+ }
86
+ }
87
+
88
+ svg {
89
+ vertical-align: middle;
90
+ }
91
+
92
+ .home {
93
+ display: flex;
94
+ flex-direction: column;
95
+ justify-content: space-between;
96
+ align-items: center;
97
+ height: 100vh;
98
+ padding: 45px;
99
+ max-width: 1024px;
100
+ margin: 0 auto;
101
+ overflow: hidden;
102
+
103
+ @media (max-width: 400px) {
104
+ padding: 24px;
105
+ }
106
+
107
+ .content {
108
+ display: flex;
109
+ flex-direction: column;
110
+ align-items: center;
111
+ justify-content: center;
112
+ flex-grow: 1;
113
+
114
+ h1 {
115
+ text-align: center;
116
+ }
117
+ }
118
+
119
+ .links {
120
+ display: flex;
121
+ align-items: center;
122
+ gap: 12px;
123
+
124
+ a {
125
+ text-decoration: none;
126
+ padding: 0.25rem 0.5rem;
127
+ border-radius: 4px;
128
+ }
129
+
130
+ .admin {
131
+ color: rgb(0, 0, 0);
132
+ background: rgb(1000, 1000, 1000);
133
+ border: 1px solid rgb(0, 0, 0);
134
+ }
135
+
136
+ .docs {
137
+ color: rgb(1000, 1000, 1000);
138
+ background: rgb(0, 0, 0);
139
+ border: 1px solid rgb(1000, 1000, 1000);
140
+ }
141
+ }
142
+
143
+ .footer {
144
+ display: flex;
145
+ align-items: center;
146
+ gap: 8px;
147
+
148
+ @media (max-width: 1024px) {
149
+ flex-direction: column;
150
+ gap: 6px;
151
+ }
152
+
153
+ p {
154
+ margin: 0;
155
+ }
156
+
157
+ .codeLink {
158
+ text-decoration: none;
159
+ padding: 0 0.5rem;
160
+ background: rgb(60, 60, 60);
161
+ border-radius: 4px;
162
+ }
163
+ }
164
+ }