@xenterprises/nuxt-x-marketing 0.0.23 → 1.0.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 (115) hide show
  1. package/.claude/settings.local.json +22 -0
  2. package/.playground/app.config.ts +44 -45
  3. package/.playground/app.vue +263 -0
  4. package/.playground/components/AppFooter.vue +103 -0
  5. package/.playground/components/AppHeader.vue +41 -0
  6. package/.playground/components/CodeExample.vue +70 -0
  7. package/.playground/components/ComponentPlayground.vue +117 -0
  8. package/.playground/components/DocsHeader.vue +19 -0
  9. package/.playground/layouts/default.vue +13 -3
  10. package/.playground/layouts/docs-layout.vue +161 -0
  11. package/.playground/layouts/docs.vue +11 -0
  12. package/.playground/package-lock.json +6 -0
  13. package/.playground/pages/blog/author.vue +145 -0
  14. package/.playground/pages/blog/card.vue +149 -0
  15. package/.playground/pages/blog/cta.vue +131 -0
  16. package/.playground/pages/blog/detail.vue +379 -0
  17. package/.playground/pages/blog/list.vue +261 -0
  18. package/.playground/pages/blog/navigation.vue +228 -0
  19. package/.playground/pages/blog/sidebar.vue +279 -0
  20. package/.playground/pages/config.vue +289 -0
  21. package/.playground/pages/content/comparison.vue +253 -0
  22. package/.playground/pages/content/cta.vue +245 -0
  23. package/.playground/pages/content/features.vue +217 -0
  24. package/.playground/pages/content/newsletter-section.vue +260 -0
  25. package/.playground/pages/content/newsletter.vue +200 -0
  26. package/.playground/pages/content/pricing.vue +335 -0
  27. package/.playground/pages/content/testimonials.vue +188 -0
  28. package/.playground/pages/hero.vue +257 -0
  29. package/.playground/pages/index.vue +379 -2
  30. package/.playground/pages/layout/footer.vue +210 -0
  31. package/.playground/pages/layout/legal-footer.vue +121 -0
  32. package/.playground/pages/layout/navbar.vue +285 -0
  33. package/.playground/pages/layout/section.vue +266 -0
  34. package/.playground/pages/layout/x-legal.vue +199 -0
  35. package/.playground/pages/modals/feature-modal.vue +320 -0
  36. package/.playground/pages/modals/image-lightbox.vue +277 -0
  37. package/.playground/pages/modals/video-modal.vue +222 -0
  38. package/.playground/pages/notifications/announcement-bar.vue +164 -0
  39. package/.playground/pages/notifications/cookie-banner.vue +210 -0
  40. package/.playground/pages/notifications/cookie-toast.vue +143 -0
  41. package/.playground/pages/notifications/gdpr.vue +276 -0
  42. package/.playground/pages/notifications/social-proof-toast.vue +255 -0
  43. package/.playground/pages/ui/badge.vue +161 -0
  44. package/.playground/pages/ui/bg-pattern.vue +177 -0
  45. package/.playground/pages/ui/glass-card.vue +179 -0
  46. package/.playground/pages/ui/glow-divider.vue +179 -0
  47. package/.playground/pages/ui/promo-card.vue +259 -0
  48. package/.playground/pages/ui/section-stitch.vue +411 -0
  49. package/.playground/pages/utilities/back-to-top.vue +153 -0
  50. package/.playground/pages/utilities/popup-chat.vue +224 -0
  51. package/README.md +799 -164
  52. package/app/app.config.ts +88 -2
  53. package/app/app.vue +106 -11
  54. package/app/assets/css/x-marketing.css +668 -0
  55. package/app/components/X/Footer/XLegal/index.vue +63 -26
  56. package/app/components/X/Footer/index.vue +89 -89
  57. package/app/components/X/Header/App.vue +63 -0
  58. package/app/components/X/Mark/Blog/Author.vue +170 -0
  59. package/app/components/X/Mark/Blog/CTANewsletter.vue +197 -0
  60. package/app/components/X/Mark/Blog/Card.vue +117 -0
  61. package/app/components/X/Mark/Blog/Detail.vue +240 -0
  62. package/app/components/X/Mark/Blog/List.vue +156 -0
  63. package/app/components/X/Mark/Blog/Navigation.vue +100 -0
  64. package/app/components/X/Mark/Blog/Sidebar.vue +160 -0
  65. package/app/components/X/Mark/Button/BackToTop.vue +99 -0
  66. package/app/components/X/Mark/CTA/index.vue +294 -0
  67. package/app/components/X/Mark/Card/Glass.vue +64 -0
  68. package/app/components/X/Mark/Card/Promo.vue +164 -0
  69. package/app/components/X/Mark/Divider/Glow.vue +113 -0
  70. package/app/components/X/Mark/Features/index.vue +194 -0
  71. package/app/components/X/Mark/Hero/index.vue +217 -0
  72. package/app/components/X/Mark/Layout/AnnouncementBar.vue +139 -0
  73. package/app/components/X/Mark/Layout/Footer.vue +160 -0
  74. package/app/components/X/Mark/Layout/FooterLegal.vue +42 -0
  75. package/app/components/X/Mark/Layout/Navbar.vue +267 -0
  76. package/app/components/X/Mark/Modal/Chat.vue +151 -0
  77. package/app/components/X/Mark/Modal/Feature.vue +197 -0
  78. package/app/components/X/Mark/Modal/Image.vue +226 -0
  79. package/app/components/X/Mark/Modal/Video.vue +203 -0
  80. package/app/components/X/Mark/Modal/index.vue +133 -0
  81. package/app/components/X/Mark/Newsletter/Form.vue +174 -0
  82. package/app/components/X/Mark/Pattern/Bg.vue +86 -0
  83. package/app/components/X/Mark/Pricing/Comparison.vue +126 -0
  84. package/app/components/X/Mark/Pricing/Plans.vue +181 -0
  85. package/app/components/X/Mark/Privacy/CookieBanner.vue +112 -0
  86. package/app/components/X/Mark/Privacy/CookieToast.vue +43 -0
  87. package/app/components/X/Mark/Privacy/GDPR.vue +245 -0
  88. package/app/components/X/Mark/Section/Newsletter.vue +183 -0
  89. package/app/components/X/Mark/Section/Stitch.vue +156 -0
  90. package/app/components/X/Mark/Section/index.vue +151 -0
  91. package/app/components/X/Mark/SocialProof/Badge.vue +102 -0
  92. package/app/components/X/Mark/SocialProof/Testimonials.vue +326 -0
  93. package/app/components/X/Mark/SocialProof/Toast.vue +136 -0
  94. package/app/components/X/Mark/_archive/Pattern/Background.vue +83 -0
  95. package/app/components/X/Mark/_archive/Pattern/CheckBg.vue +35 -0
  96. package/app/components/X/Mark/_archive/Pattern/CircuitBg.vue +41 -0
  97. package/app/components/X/Mark/_archive/Pattern/DotsBg.vue +35 -0
  98. package/app/components/X/Mark/_archive/Pattern/GlowDivider.vue +86 -0
  99. package/app/components/X/Mark/_archive/Pattern/HexBg.vue +35 -0
  100. package/app/components/X/Mark/_archive/Pattern/PlaidBg.vue +47 -0
  101. package/app/components/X/Mark/_archive/Pattern/SectionStitch.vue +168 -0
  102. package/app/components/X/Mark/_archive/Pattern/WaveBg.vue +41 -0
  103. package/app/components/X/_archive/Newsletter/Form.vue +123 -0
  104. package/app/components/X/_archive/Newsletter/Section.vue +131 -0
  105. package/app/composables/useParallax.ts +124 -0
  106. package/app/composables/useScrollReveal.ts +92 -0
  107. package/app/pages/index.vue +210 -0
  108. package/app/plugins/marketing.client.ts +13 -0
  109. package/app/types/marketing.d.ts +268 -0
  110. package/componentList.json +511 -0
  111. package/nuxt.config.ts +6 -13
  112. package/package.json +21 -9
  113. package/.editorconfig +0 -12
  114. package/app/assets/css/main.css +0 -2
  115. package/app/components/X/Marketing/Sections/EmailSubscription/index.vue +0 -129
@@ -0,0 +1,131 @@
1
+ <template>
2
+ <div class="min-h-screen">
3
+ <div class="bg-white dark:bg-neutral-900 border-b border-neutral-200 dark:border-neutral-800 px-8 py-6">
4
+ <h1 class="text-2xl font-bold text-neutral-900 dark:text-white">Blog Newsletter CTA</h1>
5
+ <p class="mt-2 text-neutral-600 dark:text-neutral-400">In-article call-to-action for newsletter signups.</p>
6
+ </div>
7
+
8
+ <div class="p-8 space-y-16">
9
+ <div class="space-y-12">
10
+ <!-- Default -->
11
+ <section>
12
+ <h3 class="text-lg font-semibold mb-4">Default</h3>
13
+ <div class="max-w-2xl">
14
+ <XMarkBlogCTANewsletter
15
+ title="Enjoying this article?"
16
+ description="Subscribe to get notified when we publish new content."
17
+ :button="{ label: 'Subscribe' }"
18
+ />
19
+ </div>
20
+ </section>
21
+
22
+ <!-- Featured -->
23
+ <section>
24
+ <h3 class="text-lg font-semibold mb-4">Featured</h3>
25
+ <div class="max-w-2xl">
26
+ <XMarkBlogCTANewsletter
27
+ title="Join our newsletter"
28
+ description="Get the latest posts delivered right to your inbox."
29
+ :button="{ label: 'Subscribe Now' }"
30
+ variant="featured"
31
+ />
32
+ </div>
33
+ </section>
34
+
35
+ <!-- Inline -->
36
+ <section>
37
+ <h3 class="text-lg font-semibold mb-4">Inline</h3>
38
+ <div class="max-w-2xl">
39
+ <XMarkBlogCTANewsletter
40
+ title="Stay updated"
41
+ description="New posts every week."
42
+ :button="{ label: 'Join' }"
43
+ variant="inline"
44
+ />
45
+ </div>
46
+ </section>
47
+
48
+ <!-- Compact -->
49
+ <section>
50
+ <h3 class="text-lg font-semibold mb-4">Compact (for sidebars)</h3>
51
+ <div class="max-w-xs">
52
+ <XMarkBlogCTANewsletter
53
+ title="Subscribe"
54
+ description="Get notified about new posts."
55
+ :button="{ label: 'Subscribe' }"
56
+ variant="compact"
57
+ />
58
+ </div>
59
+ </section>
60
+ </div>
61
+
62
+ <!-- Props Documentation -->
63
+ <div class="border-t border-neutral-200 dark:border-neutral-800 pt-16">
64
+ <h2 class="text-lg font-semibold mb-6">Props</h2>
65
+ <div class="overflow-x-auto">
66
+ <table class="w-full text-sm">
67
+ <thead>
68
+ <tr class="border-b border-neutral-200 dark:border-neutral-700">
69
+ <th class="text-left py-3 px-4 font-medium">Prop</th>
70
+ <th class="text-left py-3 px-4 font-medium">Type</th>
71
+ <th class="text-left py-3 px-4 font-medium">Default</th>
72
+ <th class="text-left py-3 px-4 font-medium">Description</th>
73
+ </tr>
74
+ </thead>
75
+ <tbody class="divide-y divide-neutral-200 dark:divide-neutral-700">
76
+ <tr><td class="py-3 px-4 font-mono text-xs">title</td><td class="py-3 px-4">String</td><td class="py-3 px-4">'Subscribe to our newsletter'</td><td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">CTA heading</td></tr>
77
+ <tr><td class="py-3 px-4 font-mono text-xs">description</td><td class="py-3 px-4">String</td><td class="py-3 px-4">'Get the latest posts...'</td><td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Supporting text</td></tr>
78
+ <tr><td class="py-3 px-4 font-mono text-xs">button</td><td class="py-3 px-4">Object</td><td class="py-3 px-4">{ label: 'Subscribe' }</td><td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Button config { label, color? }</td></tr>
79
+ <tr><td class="py-3 px-4 font-mono text-xs">placeholder</td><td class="py-3 px-4">String</td><td class="py-3 px-4">'Enter your email'</td><td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Email input placeholder</td></tr>
80
+ <tr><td class="py-3 px-4 font-mono text-xs">variant</td><td class="py-3 px-4">String</td><td class="py-3 px-4">'default'</td><td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">default, featured, inline, compact</td></tr>
81
+ <tr><td class="py-3 px-4 font-mono text-xs">icon</td><td class="py-3 px-4">String</td><td class="py-3 px-4">'i-lucide-mail'</td><td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Optional icon name</td></tr>
82
+ <tr><td class="py-3 px-4 font-mono text-xs">hasPrivacy</td><td class="py-3 px-4">Boolean</td><td class="py-3 px-4">true</td><td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Show privacy note</td></tr>
83
+ <tr><td class="py-3 px-4 font-mono text-xs">privacyText</td><td class="py-3 px-4">String</td><td class="py-3 px-4">'No spam. Unsubscribe anytime.'</td><td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Privacy note text</td></tr>
84
+ <tr><td class="py-3 px-4 font-mono text-xs">successMessage</td><td class="py-3 px-4">String</td><td class="py-3 px-4">'Thanks for subscribing!'</td><td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Message shown on success</td></tr>
85
+ </tbody>
86
+ </table>
87
+ </div>
88
+
89
+ <h2 class="text-lg font-semibold mt-12 mb-4">Events</h2>
90
+ <div class="space-y-4">
91
+ <div class="p-4 bg-neutral-50 dark:bg-neutral-800/50 rounded-lg">
92
+ <p class="font-mono text-sm text-primary-500">@submit</p>
93
+ <p class="text-sm text-neutral-600 dark:text-neutral-400 mt-1">Emitted with email address when newsletter form is submitted</p>
94
+ </div>
95
+ </div>
96
+ </div>
97
+
98
+ <!-- Code Example -->
99
+ <section>
100
+ <h2 class="text-lg font-semibold mb-4">Code Example</h2>
101
+ <CodeExample title="Blog Newsletter CTA" :code="codeExample" />
102
+ </section>
103
+ </div>
104
+ </div>
105
+ </template>
106
+
107
+ <script setup>
108
+ const codeExample = `<!-- Default -->
109
+ <XMarkBlogCTANewsletter
110
+ title="Enjoying this article?"
111
+ description="Subscribe to get notified."
112
+ :button="{ label: 'Subscribe' }"
113
+ @submit="handleSubscribe"
114
+ />
115
+
116
+ <!-- Featured -->
117
+ <XMarkBlogCTANewsletter
118
+ title="Join our newsletter"
119
+ :button="{ label: 'Subscribe Now' }"
120
+ variant="featured"
121
+ @submit="handleSubscribe"
122
+ />
123
+
124
+ <!-- Compact (for sidebars) -->
125
+ <XMarkBlogCTANewsletter
126
+ title="Subscribe"
127
+ :button="{ label: 'Join' }"
128
+ variant="compact"
129
+ @submit="handleSubscribe"
130
+ />`
131
+ </script>
@@ -0,0 +1,379 @@
1
+ <template>
2
+ <div class="min-h-screen">
3
+ <!-- Page Header -->
4
+ <div class="bg-white dark:bg-neutral-900 border-b border-neutral-200 dark:border-neutral-800 px-8 py-6">
5
+ <h1 class="text-2xl font-bold text-neutral-900 dark:text-white">Blog Detail</h1>
6
+ <p class="mt-2 text-neutral-600 dark:text-neutral-400">
7
+ Full blog post view with sidebar, rich content, and navigation.
8
+ </p>
9
+ </div>
10
+
11
+ <!-- Demo: Full Layout -->
12
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
13
+ <XMarkBlogDetail
14
+ :post="post"
15
+ :previous-post="previousPost"
16
+ :next-post="nextPost"
17
+ :toc="tableOfContents"
18
+ >
19
+ <template #default>
20
+ <article class="prose dark:prose-invert max-w-none">
21
+ <p class="lead">
22
+ Building a marketing website has never been easier. With modern tools like Nuxt, Vue, and Tailwind CSS, developers can create stunning, performant sites in record time. This guide walks you through the essential patterns and best practices for crafting marketing sites that convert.
23
+ </p>
24
+
25
+ <h2 id="getting-started">Getting Started</h2>
26
+ <p>
27
+ Before diving into the code, it's important to understand the core principles that make marketing websites effective. These include clear messaging, compelling visuals, and optimized performance.
28
+ </p>
29
+ <p>
30
+ The nuxt-x-marketing layer provides 33 production-ready components specifically designed for marketing sites. From hero sections to testimonials, each component is crafted with conversion in mind.
31
+ </p>
32
+
33
+ <h2 id="project-setup">Project Setup</h2>
34
+ <p>Start by creating a new Nuxt project and adding the marketing layer:</p>
35
+
36
+ <pre><code class="language-bash"># Create new project
37
+ npx nuxi init my-marketing-site
38
+ cd my-marketing-site
39
+
40
+ # Install dependencies
41
+ npm install
42
+
43
+ # Add the marketing layer
44
+ npm install @xenterprises/nuxt-x-marketing</code></pre>
45
+
46
+ <p>Then configure your <code>nuxt.config.ts</code>:</p>
47
+
48
+ <pre><code class="language-javascript">export default defineNuxtConfig({
49
+ extends: ['@xenterprises/nuxt-x-marketing'],
50
+
51
+ modules: ['@nuxt/ui'],
52
+
53
+ app: {
54
+ head: {
55
+ title: 'My Marketing Site'
56
+ }
57
+ }
58
+ })</code></pre>
59
+
60
+ <h2 id="hero-sections">Creating Hero Sections</h2>
61
+ <p>
62
+ The hero section is the first thing visitors see. It needs to capture attention immediately and communicate your value proposition clearly.
63
+ </p>
64
+
65
+ <figure>
66
+ <img src="https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=800&h=400&fit=crop" alt="Dashboard design" class="rounded-xl" />
67
+ <figcaption>A well-designed hero section can increase conversions by up to 35%.</figcaption>
68
+ </figure>
69
+
70
+ <p>Key elements of an effective hero section:</p>
71
+ <ul>
72
+ <li><strong>Clear headline</strong> - Communicate your main value proposition in under 10 words</li>
73
+ <li><strong>Supporting text</strong> - Expand on the headline with 1-2 sentences</li>
74
+ <li><strong>Strong CTA</strong> - Use action-oriented button text</li>
75
+ <li><strong>Visual element</strong> - High-quality image or video that reinforces the message</li>
76
+ </ul>
77
+
78
+ <h2 id="social-proof">Adding Social Proof</h2>
79
+ <p>
80
+ Social proof is one of the most powerful conversion tools. Testimonials, logos, and trust badges help establish credibility.
81
+ </p>
82
+
83
+ <blockquote>
84
+ "These components saved us weeks of development time. The quality and attention to detail is outstanding."
85
+ <cite>— Sarah Chen, CTO at TechCorp</cite>
86
+ </blockquote>
87
+
88
+ <p>
89
+ Use the testimonials component to showcase customer feedback. The grid layout works well for displaying multiple testimonials, while the featured layout highlights a single powerful quote.
90
+ </p>
91
+
92
+ <h2 id="pricing-tables">Pricing Tables</h2>
93
+ <p>
94
+ Your pricing page is where conversions happen. Make it easy for visitors to understand their options and choose the right plan.
95
+ </p>
96
+
97
+ <h3>Best Practices</h3>
98
+ <ol>
99
+ <li>Limit to 3-4 pricing tiers to avoid decision paralysis</li>
100
+ <li>Highlight the most popular or recommended plan</li>
101
+ <li>Use clear feature comparisons</li>
102
+ <li>Include trust badges near the pricing</li>
103
+ <li>Offer a money-back guarantee to reduce friction</li>
104
+ </ol>
105
+
106
+ <h2 id="performance">Performance Optimization</h2>
107
+ <p>
108
+ Performance directly impacts conversions. Studies show that a 1-second delay in page load time can result in a 7% reduction in conversions.
109
+ </p>
110
+
111
+ <p>The marketing layer includes built-in optimizations:</p>
112
+
113
+ <table>
114
+ <thead>
115
+ <tr>
116
+ <th>Feature</th>
117
+ <th>Benefit</th>
118
+ </tr>
119
+ </thead>
120
+ <tbody>
121
+ <tr>
122
+ <td>Lazy loading</td>
123
+ <td>Images load only when visible</td>
124
+ </tr>
125
+ <tr>
126
+ <td>CSS purging</td>
127
+ <td>Only used styles are shipped</td>
128
+ </tr>
129
+ <tr>
130
+ <td>Component splitting</td>
131
+ <td>Components load on demand</td>
132
+ </tr>
133
+ <tr>
134
+ <td>Font optimization</td>
135
+ <td>Fonts preloaded and subset</td>
136
+ </tr>
137
+ </tbody>
138
+ </table>
139
+
140
+ <h2 id="conclusion">Conclusion</h2>
141
+ <p>
142
+ Building effective marketing websites requires the right combination of design, performance, and conversion optimization. With nuxt-x-marketing, you get battle-tested components that handle the heavy lifting, letting you focus on your content and messaging.
143
+ </p>
144
+ <p>
145
+ Ready to get started? Check out the <a href="/content/features">features documentation</a> or browse the <a href="/">component library</a> to see what's available.
146
+ </p>
147
+ </article>
148
+ </template>
149
+
150
+ <!-- Custom Sidebar Content -->
151
+ <template #sidebar>
152
+ <XMarkBlogSidebar
153
+ :categories="categories"
154
+ :tags="tags"
155
+ :recent-posts="recentPosts"
156
+ :has-search="true"
157
+ :has-cta="true"
158
+ />
159
+ </template>
160
+ </XMarkBlogDetail>
161
+ </div>
162
+
163
+ <!-- Props Documentation -->
164
+ <div class="border-t border-neutral-200 dark:border-neutral-800">
165
+ <div class="max-w-4xl mx-auto px-8 py-12">
166
+ <h2 class="text-lg font-semibold mb-6">Blog Detail Props</h2>
167
+ <div class="overflow-x-auto">
168
+ <table class="w-full text-sm">
169
+ <thead>
170
+ <tr class="border-b border-neutral-200 dark:border-neutral-700">
171
+ <th class="text-left py-3 px-4 font-medium">Prop</th>
172
+ <th class="text-left py-3 px-4 font-medium">Type</th>
173
+ <th class="text-left py-3 px-4 font-medium">Default</th>
174
+ <th class="text-left py-3 px-4 font-medium">Description</th>
175
+ </tr>
176
+ </thead>
177
+ <tbody class="divide-y divide-neutral-200 dark:divide-neutral-700">
178
+ <tr>
179
+ <td class="py-3 px-4 font-mono text-xs">post</td>
180
+ <td class="py-3 px-4">Object</td>
181
+ <td class="py-3 px-4">required</td>
182
+ <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Post object with title, img: { src, alt? }, date, author, etc.</td>
183
+ </tr>
184
+ <tr>
185
+ <td class="py-3 px-4 font-mono text-xs">previousPost</td>
186
+ <td class="py-3 px-4">Object</td>
187
+ <td class="py-3 px-4">null</td>
188
+ <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Previous post for navigation</td>
189
+ </tr>
190
+ <tr>
191
+ <td class="py-3 px-4 font-mono text-xs">nextPost</td>
192
+ <td class="py-3 px-4">Object</td>
193
+ <td class="py-3 px-4">null</td>
194
+ <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Next post for navigation</td>
195
+ </tr>
196
+ <tr>
197
+ <td class="py-3 px-4 font-mono text-xs">toc</td>
198
+ <td class="py-3 px-4">Array</td>
199
+ <td class="py-3 px-4">[]</td>
200
+ <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Table of contents [{ id, text, depth }]</td>
201
+ </tr>
202
+ </tbody>
203
+ </table>
204
+ </div>
205
+
206
+ <h2 class="text-lg font-semibold mt-12 mb-6">Slots</h2>
207
+ <div class="overflow-x-auto">
208
+ <table class="w-full text-sm">
209
+ <thead>
210
+ <tr class="border-b border-neutral-200 dark:border-neutral-700">
211
+ <th class="text-left py-3 px-4 font-medium">Slot</th>
212
+ <th class="text-left py-3 px-4 font-medium">Description</th>
213
+ </tr>
214
+ </thead>
215
+ <tbody class="divide-y divide-neutral-200 dark:divide-neutral-700">
216
+ <tr>
217
+ <td class="py-3 px-4 font-mono text-xs">default</td>
218
+ <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Main article content (prose)</td>
219
+ </tr>
220
+ <tr>
221
+ <td class="py-3 px-4 font-mono text-xs">sidebar</td>
222
+ <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Custom sidebar content (overrides default)</td>
223
+ </tr>
224
+ </tbody>
225
+ </table>
226
+ </div>
227
+
228
+ <h2 class="text-lg font-semibold mt-12 mb-6">Post Object Structure</h2>
229
+ <div class="bg-neutral-100 dark:bg-neutral-800 rounded-lg p-4 text-sm font-mono overflow-x-auto">
230
+ <pre>{
231
+ title: "Post Title",
232
+ excerpt: "Brief description...",
233
+ img: { src: "https://...", alt: "Image description" },
234
+ date: "2024-01-15",
235
+ readingTime: "5 min read",
236
+ category: "Tutorial",
237
+ author: {
238
+ name: "Author Name",
239
+ avatar: "https://...",
240
+ bio: "Author bio...",
241
+ twitter: "@handle"
242
+ }
243
+ }</pre>
244
+ </div>
245
+
246
+ <h2 class="text-lg font-semibold mt-12 mb-4">Code Example</h2>
247
+ <CodeExample title="Blog Detail Usage" :code="codeExample" />
248
+ </div>
249
+ </div>
250
+ </div>
251
+ </template>
252
+
253
+ <script setup>
254
+ const codeExample = `<!-- With Nuxt Content v3 -->
255
+ <script setup>
256
+ const route = useRoute()
257
+
258
+ // Fetch post
259
+ const { data: post } = await useAsyncData('post', () =>
260
+ queryCollection('blog')
261
+ .where('slug', '=', route.params.slug)
262
+ .findOne()
263
+ )
264
+
265
+ // Fetch navigation
266
+ const { data: surround } = await useAsyncData('surround', () =>
267
+ queryCollectionItemSurroundings('blog', route.path)
268
+ )
269
+ <\/script>
270
+
271
+ <template>
272
+ <XMarkBlogDetail
273
+ :post="post"
274
+ :previous-post="surround?.[0]"
275
+ :next-post="surround?.[1]"
276
+ :toc="post?.body?.toc?.links || []"
277
+ >
278
+ <ContentRenderer :value="post" />
279
+
280
+ <template #sidebar>
281
+ <XMarkBlogSidebar
282
+ :categories="categories"
283
+ :recent-posts="recentPosts"
284
+ />
285
+ </template>
286
+ </XMarkBlogDetail>
287
+ </template>`
288
+
289
+ // Main post
290
+ const post = {
291
+ title: 'Building Modern Marketing Sites with Nuxt',
292
+ excerpt: 'A comprehensive guide to creating beautiful, performant marketing websites using Vue, Nuxt, and modern web technologies.',
293
+ img: {
294
+ src: 'https://images.unsplash.com/photo-1519389950473-47ba0277781c?w=1200&h=600&fit=crop',
295
+ alt: 'Team working on laptops'
296
+ },
297
+ date: '2024-01-15',
298
+ readingTime: '8 min read',
299
+ category: 'Tutorial',
300
+ author: {
301
+ name: 'Sarah Chen',
302
+ avatar: 'https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=100&h=100&fit=crop',
303
+ bio: 'Sarah is a frontend developer specializing in Vue and Nuxt. She writes about web development and design systems.',
304
+ twitter: '@sarahchen'
305
+ }
306
+ }
307
+
308
+ // Navigation posts
309
+ const previousPost = {
310
+ title: 'Introduction to Vue 3 Composition API',
311
+ slug: 'vue-composition-api'
312
+ }
313
+
314
+ const nextPost = {
315
+ title: 'Optimizing Nuxt for Production',
316
+ slug: 'nuxt-production-optimization'
317
+ }
318
+
319
+ // Table of contents
320
+ const tableOfContents = [
321
+ { id: 'getting-started', text: 'Getting Started', depth: 2 },
322
+ { id: 'project-setup', text: 'Project Setup', depth: 2 },
323
+ { id: 'hero-sections', text: 'Creating Hero Sections', depth: 2 },
324
+ { id: 'social-proof', text: 'Adding Social Proof', depth: 2 },
325
+ { id: 'pricing-tables', text: 'Pricing Tables', depth: 2 },
326
+ { id: 'performance', text: 'Performance Optimization', depth: 2 },
327
+ { id: 'conclusion', text: 'Conclusion', depth: 2 }
328
+ ]
329
+
330
+ // Sidebar data
331
+ const categories = [
332
+ { name: 'Tutorial', slug: 'tutorial', count: 12 },
333
+ { name: 'Guide', slug: 'guide', count: 8 },
334
+ { name: 'Design', slug: 'design', count: 6 },
335
+ { name: 'Performance', slug: 'performance', count: 4 },
336
+ { name: 'News', slug: 'news', count: 3 }
337
+ ]
338
+
339
+ const tags = [
340
+ { name: 'Nuxt', slug: 'nuxt' },
341
+ { name: 'Vue', slug: 'vue' },
342
+ { name: 'Tailwind CSS', slug: 'tailwind' },
343
+ { name: 'Components', slug: 'components' },
344
+ { name: 'Marketing', slug: 'marketing' },
345
+ { name: 'SEO', slug: 'seo' },
346
+ { name: 'Performance', slug: 'performance' },
347
+ { name: 'Design', slug: 'design' }
348
+ ]
349
+
350
+ const recentPosts = [
351
+ {
352
+ title: 'Dark Mode Best Practices',
353
+ slug: 'dark-mode',
354
+ img: {
355
+ src: 'https://images.unsplash.com/photo-1555066931-4365d14bab8c?w=200&h=200&fit=crop',
356
+ alt: 'Dark mode'
357
+ },
358
+ date: '2024-01-10'
359
+ },
360
+ {
361
+ title: 'Building a Landing Page in 10 Minutes',
362
+ slug: 'landing-page-tutorial',
363
+ img: {
364
+ src: 'https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=200&h=200&fit=crop',
365
+ alt: 'Landing page'
366
+ },
367
+ date: '2024-01-05'
368
+ },
369
+ {
370
+ title: 'CSS Grid vs Flexbox: When to Use Each',
371
+ slug: 'css-grid-flexbox',
372
+ img: {
373
+ src: 'https://images.unsplash.com/photo-1517694712202-14dd9538aa97?w=200&h=200&fit=crop',
374
+ alt: 'CSS layout'
375
+ },
376
+ date: '2024-01-02'
377
+ }
378
+ ]
379
+ </script>