@xenterprises/nuxt-x-marketing 1.0.2 → 1.1.0

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.
Files changed (64) hide show
  1. package/README.md +130 -11
  2. package/app/components/X/Mark/CodeBlock/index.vue +19 -7
  3. package/app/components/X/Mark/Divider/Glow.vue +25 -19
  4. package/app/components/X/Mark/Section/Stitch.vue +45 -31
  5. package/app/composables/{useParallax.ts → useParallax.js} +6 -7
  6. package/app/composables/{useScrollReveal.ts → useScrollReveal.js} +4 -4
  7. package/nuxt.config.ts +1 -11
  8. package/package.json +1 -1
  9. package/.claude/settings.local.json +0 -23
  10. package/.nuxtrc +0 -1
  11. package/.playground/app.config.ts +0 -74
  12. package/.playground/app.vue +0 -269
  13. package/.playground/components/AppFooter.vue +0 -103
  14. package/.playground/components/AppHeader.vue +0 -41
  15. package/.playground/components/CodeExample.vue +0 -70
  16. package/.playground/components/ComponentPlayground.vue +0 -117
  17. package/.playground/components/DocsHeader.vue +0 -19
  18. package/.playground/layouts/default.vue +0 -15
  19. package/.playground/layouts/docs-layout.vue +0 -161
  20. package/.playground/layouts/docs.vue +0 -11
  21. package/.playground/nuxt.config.ts +0 -5
  22. package/.playground/package-lock.json +0 -6
  23. package/.playground/pages/blog/author.vue +0 -145
  24. package/.playground/pages/blog/card.vue +0 -149
  25. package/.playground/pages/blog/cta.vue +0 -131
  26. package/.playground/pages/blog/detail.vue +0 -471
  27. package/.playground/pages/blog/list.vue +0 -261
  28. package/.playground/pages/blog/navigation.vue +0 -228
  29. package/.playground/pages/blog/sidebar.vue +0 -279
  30. package/.playground/pages/config.vue +0 -289
  31. package/.playground/pages/content/comparison.vue +0 -253
  32. package/.playground/pages/content/cta.vue +0 -245
  33. package/.playground/pages/content/features.vue +0 -217
  34. package/.playground/pages/content/newsletter-section.vue +0 -260
  35. package/.playground/pages/content/newsletter.vue +0 -200
  36. package/.playground/pages/content/pricing.vue +0 -335
  37. package/.playground/pages/content/testimonials.vue +0 -188
  38. package/.playground/pages/hero.vue +0 -257
  39. package/.playground/pages/index.vue +0 -381
  40. package/.playground/pages/layout/footer.vue +0 -210
  41. package/.playground/pages/layout/legal-footer.vue +0 -121
  42. package/.playground/pages/layout/navbar.vue +0 -285
  43. package/.playground/pages/layout/section.vue +0 -266
  44. package/.playground/pages/layout/x-legal.vue +0 -199
  45. package/.playground/pages/modals/feature-modal.vue +0 -320
  46. package/.playground/pages/modals/image-lightbox.vue +0 -277
  47. package/.playground/pages/modals/video-modal.vue +0 -222
  48. package/.playground/pages/notifications/announcement-bar.vue +0 -164
  49. package/.playground/pages/notifications/cookie-banner.vue +0 -210
  50. package/.playground/pages/notifications/cookie-toast.vue +0 -143
  51. package/.playground/pages/notifications/gdpr.vue +0 -276
  52. package/.playground/pages/notifications/social-proof-toast.vue +0 -515
  53. package/.playground/pages/ui/badge.vue +0 -161
  54. package/.playground/pages/ui/bg-pattern.vue +0 -177
  55. package/.playground/pages/ui/glass-card.vue +0 -179
  56. package/.playground/pages/ui/glow-divider.vue +0 -179
  57. package/.playground/pages/ui/promo-card.vue +0 -259
  58. package/.playground/pages/ui/section-stitch.vue +0 -411
  59. package/.playground/pages/utilities/back-to-top.vue +0 -153
  60. package/.playground/pages/utilities/popup-chat.vue +0 -224
  61. package/componentList.json +0 -2129
  62. package/screenshots/playground-home.png +0 -0
  63. package/tsconfig.json +0 -3
  64. /package/app/composables/{useXBlog.ts → useXBlog.js} +0 -0
@@ -1,471 +0,0 @@
1
- <template>
2
- <div class="min-h-screen">
3
- <!-- Page Header -->
4
- <div
5
- class="bg-white dark:bg-neutral-900 border-b border-neutral-200 dark:border-neutral-800 px-8 py-6"
6
- >
7
- <h1 class="text-2xl font-bold text-neutral-900 dark:text-white">
8
- Blog Detail
9
- </h1>
10
- <p class="mt-2 text-neutral-600 dark:text-neutral-400">
11
- Full blog post view with sidebar, rich content, and navigation.
12
- </p>
13
- </div>
14
-
15
- <!-- Demo: Full Layout -->
16
- <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
17
- <XMarkBlogDetail
18
- :post="post"
19
- :previous-post="previousPost"
20
- :next-post="nextPost"
21
- :toc="tableOfContents"
22
- >
23
- <template #default>
24
- <article class="prose dark:prose-invert max-w-none">
25
- <p class="lead">
26
- Building a marketing website has never been easier. With modern
27
- tools like Nuxt, Vue, and Tailwind CSS, developers can create
28
- stunning, performant sites in record time. This guide walks you
29
- through the essential patterns and best practices for crafting
30
- marketing sites that convert.
31
- </p>
32
-
33
- <h2 id="getting-started">Getting Started</h2>
34
- <p>
35
- Before diving into the code, it's important to understand the core
36
- principles that make marketing websites effective. These include
37
- clear messaging, compelling visuals, and optimized performance.
38
- </p>
39
- <p>
40
- The nuxt-x-marketing layer provides 33 production-ready components
41
- specifically designed for marketing sites. From hero sections to
42
- testimonials, each component is crafted with conversion in mind.
43
- </p>
44
-
45
- <h2 id="project-setup">Project Setup</h2>
46
- <p>
47
- Start by creating a new Nuxt project and adding the marketing
48
- layer:
49
- </p>
50
-
51
- <XMarkCodeBlock :code="bashCode" language="bash" show-copy />
52
-
53
- <p>Then configure your <code>nuxt.config.ts</code>:</p>
54
-
55
- <XMarkCodeBlock
56
- :code="nuxtConfigCode"
57
- language="typescript"
58
- show-copy
59
- />
60
-
61
- <h2 id="hero-sections">Creating Hero Sections</h2>
62
- <p>
63
- The hero section is the first thing visitors see. It needs to
64
- capture attention immediately and communicate your value
65
- proposition clearly.
66
- </p>
67
-
68
- <figure>
69
- <img
70
- src="https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=800&h=400&fit=crop"
71
- alt="Dashboard design"
72
- />
73
- <figcaption>
74
- A well-designed hero section can increase conversions by up to
75
- 35%.
76
- </figcaption>
77
- </figure>
78
-
79
- <p>Key elements of an effective hero section:</p>
80
- <ul>
81
- <li>
82
- <strong>Clear headline</strong> — Communicate your main value
83
- proposition in under 10 words
84
- </li>
85
- <li>
86
- <strong>Supporting text</strong> — Expand on the headline with
87
- 1-2 sentences
88
- </li>
89
- <li>
90
- <strong>Strong CTA</strong> — Use action-oriented button text
91
- </li>
92
- <li>
93
- <strong>Visual element</strong> — High-quality image or video
94
- that reinforces the message
95
- </li>
96
- </ul>
97
-
98
- <h2 id="social-proof">Adding Social Proof</h2>
99
- <p>
100
- Social proof is one of the most powerful conversion tools.
101
- Testimonials, logos, and trust badges help establish credibility.
102
- </p>
103
-
104
- <blockquote>
105
- "These components saved us weeks of development time. The quality
106
- and attention to detail is outstanding."
107
- <cite>— Sarah Chen, CTO at TechCorp</cite>
108
- </blockquote>
109
-
110
- <p>
111
- Use the testimonials component to showcase customer feedback. The
112
- grid layout works well for displaying multiple testimonials, while
113
- the featured layout highlights a single powerful quote.
114
- </p>
115
-
116
- <h2 id="pricing-tables">Pricing Tables</h2>
117
- <p>
118
- Your pricing page is where conversions happen. Make it easy for
119
- visitors to understand their options and choose the right plan.
120
- </p>
121
-
122
- <h3>Best Practices</h3>
123
- <ol>
124
- <li>Limit to 3-4 pricing tiers to avoid decision paralysis</li>
125
- <li>Highlight the most popular or recommended plan</li>
126
- <li>Use clear feature comparisons</li>
127
- <li>Include trust badges near the pricing</li>
128
- <li>Offer a money-back guarantee to reduce friction</li>
129
- </ol>
130
-
131
- <h2 id="performance">Performance Optimization</h2>
132
- <p>
133
- Performance directly impacts conversions. Studies show that a
134
- <mark>1-second delay</mark> in page load time can result in a
135
- <strong>7% reduction</strong> in conversions.
136
- </p>
137
-
138
- <p>The marketing layer includes built-in optimizations:</p>
139
-
140
- <div class="not-prose">
141
- <UTable
142
- :data="performanceData"
143
- :columns="performanceColumns"
144
- class="flex-1"
145
- />
146
- </div>
147
-
148
- <hr />
149
-
150
- <h2 id="conclusion">Conclusion</h2>
151
- <p>
152
- Building effective marketing websites requires the right
153
- combination of design, performance, and conversion optimization.
154
- With nuxt-x-marketing, you get battle-tested components that
155
- handle the heavy lifting, letting you focus on your content and
156
- messaging.
157
- </p>
158
- <p>
159
- Ready to get started? Check out the
160
- <a href="/content/features">features documentation</a> or browse
161
- the <a href="/">component library</a> to see what's available.
162
- </p>
163
- </article>
164
- </template>
165
-
166
- <!-- Custom Sidebar Content -->
167
- <template #sidebar>
168
- <XMarkBlogSidebar
169
- :categories="categories"
170
- :tags="tags"
171
- :recent-posts="recentPosts"
172
- :has-search="true"
173
- :has-cta="true"
174
- />
175
- </template>
176
- </XMarkBlogDetail>
177
- </div>
178
-
179
- <!-- Props Documentation -->
180
- <div class="border-t border-neutral-200 dark:border-neutral-800">
181
- <div class="max-w-4xl mx-auto px-8 py-12">
182
- <h2 class="text-lg font-semibold mb-6">Blog Detail Props</h2>
183
- <div class="not-prose">
184
- <UTable :data="propsData" :columns="propsColumns" class="flex-1" />
185
- </div>
186
-
187
- <h2 class="text-lg font-semibold mt-12 mb-6">Slots</h2>
188
- <div class="not-prose">
189
- <UTable :data="slotsData" :columns="slotsColumns" class="flex-1" />
190
- </div>
191
-
192
- <h2 class="text-lg font-semibold mt-12 mb-6">Post Object Structure</h2>
193
- <div
194
- class="bg-neutral-100 dark:bg-neutral-800 rounded-lg p-4 text-sm font-mono overflow-x-auto"
195
- >
196
- <pre>
197
- {
198
- title: "Post Title",
199
- excerpt: "Brief description...",
200
- img: { src: "https://...", alt: "Image description" },
201
- date: "2024-01-15",
202
- readingTime: "5 min read",
203
- category: "Tutorial",
204
- author: {
205
- name: "Author Name",
206
- avatar: "https://...",
207
- bio: "Author bio...",
208
- twitter: "@handle"
209
- }
210
- }</pre
211
- >
212
- </div>
213
-
214
- <h2 class="text-lg font-semibold mt-12 mb-4">Code Example</h2>
215
- <CodeExample title="Blog Detail Usage" :code="codeExample" />
216
- </div>
217
- </div>
218
- </div>
219
- </template>
220
-
221
- <script setup>
222
- import { h, resolveComponent } from "vue";
223
-
224
- // Code examples for Shiki highlighting
225
- const bashCode = `# Create new project
226
- npx nuxi init my-marketing-site
227
- cd my-marketing-site
228
-
229
- # Install dependencies
230
- npm install
231
-
232
- # Add the marketing layer
233
- npm install @xenterprises/nuxt-x-marketing`;
234
-
235
- const nuxtConfigCode = `export default defineNuxtConfig({
236
- extends: ['@xenterprises/nuxt-x-marketing'],
237
-
238
- modules: ['@nuxt/ui'],
239
-
240
- app: {
241
- head: {
242
- title: 'My Marketing Site'
243
- }
244
- }
245
- })`;
246
-
247
- const codeExample = `<!-- With Nuxt Content v3 -->
248
- <script setup>
249
- const route = useRoute()
250
-
251
- // Fetch post
252
- const { data: post } = await useAsyncData('post', () =>
253
- queryCollection('blog')
254
- .where('slug', '=', route.params.slug)
255
- .findOne()
256
- )
257
-
258
- // Fetch navigation
259
- const { data: surround } = await useAsyncData('surround', () =>
260
- queryCollectionItemSurroundings('blog', route.path)
261
- )
262
- <\/script>
263
-
264
- <template>
265
- <XMarkBlogDetail
266
- :post="post"
267
- :previous-post="surround?.[0]"
268
- :next-post="surround?.[1]"
269
- :toc="post?.body?.toc?.links || []"
270
- >
271
- <ContentRenderer :value="post" />
272
-
273
- <template #sidebar>
274
- <XMarkBlogSidebar
275
- :categories="categories"
276
- :recent-posts="recentPosts"
277
- />
278
- </template>
279
- </XMarkBlogDetail>
280
- </template>`;
281
-
282
- // Performance table data
283
- const performanceData = ref([
284
- { feature: "Lazy loading", benefit: "Images load only when visible" },
285
- { feature: "CSS purging", benefit: "Only used styles are shipped" },
286
- { feature: "Component splitting", benefit: "Components load on demand" },
287
- { feature: "Font optimization", benefit: "Fonts preloaded and subset" },
288
- ]);
289
-
290
- const performanceColumns = [
291
- {
292
- accessorKey: "feature",
293
- header: "Feature",
294
- cell: ({ row }) => row.getValue("feature"),
295
- },
296
- {
297
- accessorKey: "benefit",
298
- header: "Benefit",
299
- cell: ({ row }) => row.getValue("benefit"),
300
- },
301
- ];
302
-
303
- // Props documentation table data
304
- const propsData = ref([
305
- {
306
- prop: "post",
307
- type: "Object",
308
- default: "required",
309
- description:
310
- "Post object with title, img: { src, alt? }, date, author, etc.",
311
- },
312
- {
313
- prop: "previousPost",
314
- type: "Object",
315
- default: "null",
316
- description: "Previous post for navigation",
317
- },
318
- {
319
- prop: "nextPost",
320
- type: "Object",
321
- default: "null",
322
- description: "Next post for navigation",
323
- },
324
- {
325
- prop: "toc",
326
- type: "Array",
327
- default: "[]",
328
- description: "Table of contents [{ id, text, depth }]",
329
- },
330
- ]);
331
-
332
- const propsColumns = [
333
- {
334
- accessorKey: "prop",
335
- header: "Prop",
336
- cell: ({ row }) =>
337
- h("code", { class: "text-xs font-mono" }, row.getValue("prop")),
338
- },
339
- {
340
- accessorKey: "type",
341
- header: "Type",
342
- cell: ({ row }) => row.getValue("type"),
343
- },
344
- {
345
- accessorKey: "default",
346
- header: "Default",
347
- cell: ({ row }) => row.getValue("default"),
348
- },
349
- {
350
- accessorKey: "description",
351
- header: "Description",
352
- cell: ({ row }) => row.getValue("description"),
353
- },
354
- ];
355
-
356
- // Slots table data
357
- const slotsData = ref([
358
- { slot: "default", description: "Main article content (prose)" },
359
- {
360
- slot: "sidebar",
361
- description: "Custom sidebar content (overrides default)",
362
- },
363
- ]);
364
-
365
- const slotsColumns = [
366
- {
367
- accessorKey: "slot",
368
- header: "Slot",
369
- cell: ({ row }) =>
370
- h("code", { class: "text-xs font-mono" }, row.getValue("slot")),
371
- },
372
- {
373
- accessorKey: "description",
374
- header: "Description",
375
- cell: ({ row }) => row.getValue("description"),
376
- },
377
- ];
378
-
379
- // Main post
380
- const post = {
381
- title: "Building Modern Marketing Sites with Nuxt",
382
- excerpt:
383
- "A comprehensive guide to creating beautiful, performant marketing websites using Vue, Nuxt, and modern web technologies.",
384
- img: {
385
- src: "https://images.unsplash.com/photo-1519389950473-47ba0277781c?w=1200&h=600&fit=crop",
386
- alt: "Team working on laptops",
387
- },
388
- date: "2024-01-15",
389
- readingTime: "8 min read",
390
- category: "Tutorial",
391
- author: {
392
- name: "Sarah Chen",
393
- avatar:
394
- "https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=100&h=100&fit=crop",
395
- bio: "Sarah is a frontend developer specializing in Vue and Nuxt. She writes about web development and design systems.",
396
- twitter: "@sarahchen",
397
- },
398
- };
399
-
400
- // Navigation posts
401
- const previousPost = {
402
- title: "Introduction to Vue 3 Composition API",
403
- slug: "vue-composition-api",
404
- };
405
-
406
- const nextPost = {
407
- title: "Optimizing Nuxt for Production",
408
- slug: "nuxt-production-optimization",
409
- };
410
-
411
- // Table of contents
412
- const tableOfContents = [
413
- { id: "getting-started", text: "Getting Started", depth: 2 },
414
- { id: "project-setup", text: "Project Setup", depth: 2 },
415
- { id: "hero-sections", text: "Creating Hero Sections", depth: 2 },
416
- { id: "social-proof", text: "Adding Social Proof", depth: 2 },
417
- { id: "pricing-tables", text: "Pricing Tables", depth: 2 },
418
- { id: "performance", text: "Performance Optimization", depth: 2 },
419
- { id: "conclusion", text: "Conclusion", depth: 2 },
420
- ];
421
-
422
- // Sidebar data
423
- const categories = [
424
- { name: "Tutorial", slug: "tutorial", count: 12 },
425
- { name: "Guide", slug: "guide", count: 8 },
426
- { name: "Design", slug: "design", count: 6 },
427
- { name: "Performance", slug: "performance", count: 4 },
428
- { name: "News", slug: "news", count: 3 },
429
- ];
430
-
431
- const tags = [
432
- { name: "Nuxt", slug: "nuxt" },
433
- { name: "Vue", slug: "vue" },
434
- { name: "Tailwind CSS", slug: "tailwind" },
435
- { name: "Components", slug: "components" },
436
- { name: "Marketing", slug: "marketing" },
437
- { name: "SEO", slug: "seo" },
438
- { name: "Performance", slug: "performance" },
439
- { name: "Design", slug: "design" },
440
- ];
441
-
442
- const recentPosts = [
443
- {
444
- title: "Dark Mode Best Practices",
445
- slug: "dark-mode",
446
- img: {
447
- src: "https://images.unsplash.com/photo-1555066931-4365d14bab8c?w=200&h=200&fit=crop",
448
- alt: "Dark mode",
449
- },
450
- date: "2024-01-10",
451
- },
452
- {
453
- title: "Building a Landing Page in 10 Minutes",
454
- slug: "landing-page-tutorial",
455
- img: {
456
- src: "https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=200&h=200&fit=crop",
457
- alt: "Landing page",
458
- },
459
- date: "2024-01-05",
460
- },
461
- {
462
- title: "CSS Grid vs Flexbox: When to Use Each",
463
- slug: "css-grid-flexbox",
464
- img: {
465
- src: "https://images.unsplash.com/photo-1517694712202-14dd9538aa97?w=200&h=200&fit=crop",
466
- alt: "CSS layout",
467
- },
468
- date: "2024-01-02",
469
- },
470
- ];
471
- </script>