@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.
- package/README.md +130 -11
- package/app/components/X/Mark/CodeBlock/index.vue +19 -7
- package/app/components/X/Mark/Divider/Glow.vue +25 -19
- package/app/components/X/Mark/Section/Stitch.vue +45 -31
- package/app/composables/{useParallax.ts → useParallax.js} +6 -7
- package/app/composables/{useScrollReveal.ts → useScrollReveal.js} +4 -4
- package/nuxt.config.ts +1 -11
- package/package.json +1 -1
- package/.claude/settings.local.json +0 -23
- package/.nuxtrc +0 -1
- package/.playground/app.config.ts +0 -74
- package/.playground/app.vue +0 -269
- package/.playground/components/AppFooter.vue +0 -103
- package/.playground/components/AppHeader.vue +0 -41
- package/.playground/components/CodeExample.vue +0 -70
- package/.playground/components/ComponentPlayground.vue +0 -117
- package/.playground/components/DocsHeader.vue +0 -19
- package/.playground/layouts/default.vue +0 -15
- package/.playground/layouts/docs-layout.vue +0 -161
- package/.playground/layouts/docs.vue +0 -11
- package/.playground/nuxt.config.ts +0 -5
- package/.playground/package-lock.json +0 -6
- package/.playground/pages/blog/author.vue +0 -145
- package/.playground/pages/blog/card.vue +0 -149
- package/.playground/pages/blog/cta.vue +0 -131
- package/.playground/pages/blog/detail.vue +0 -471
- package/.playground/pages/blog/list.vue +0 -261
- package/.playground/pages/blog/navigation.vue +0 -228
- package/.playground/pages/blog/sidebar.vue +0 -279
- package/.playground/pages/config.vue +0 -289
- package/.playground/pages/content/comparison.vue +0 -253
- package/.playground/pages/content/cta.vue +0 -245
- package/.playground/pages/content/features.vue +0 -217
- package/.playground/pages/content/newsletter-section.vue +0 -260
- package/.playground/pages/content/newsletter.vue +0 -200
- package/.playground/pages/content/pricing.vue +0 -335
- package/.playground/pages/content/testimonials.vue +0 -188
- package/.playground/pages/hero.vue +0 -257
- package/.playground/pages/index.vue +0 -381
- package/.playground/pages/layout/footer.vue +0 -210
- package/.playground/pages/layout/legal-footer.vue +0 -121
- package/.playground/pages/layout/navbar.vue +0 -285
- package/.playground/pages/layout/section.vue +0 -266
- package/.playground/pages/layout/x-legal.vue +0 -199
- package/.playground/pages/modals/feature-modal.vue +0 -320
- package/.playground/pages/modals/image-lightbox.vue +0 -277
- package/.playground/pages/modals/video-modal.vue +0 -222
- package/.playground/pages/notifications/announcement-bar.vue +0 -164
- package/.playground/pages/notifications/cookie-banner.vue +0 -210
- package/.playground/pages/notifications/cookie-toast.vue +0 -143
- package/.playground/pages/notifications/gdpr.vue +0 -276
- package/.playground/pages/notifications/social-proof-toast.vue +0 -515
- package/.playground/pages/ui/badge.vue +0 -161
- package/.playground/pages/ui/bg-pattern.vue +0 -177
- package/.playground/pages/ui/glass-card.vue +0 -179
- package/.playground/pages/ui/glow-divider.vue +0 -179
- package/.playground/pages/ui/promo-card.vue +0 -259
- package/.playground/pages/ui/section-stitch.vue +0 -411
- package/.playground/pages/utilities/back-to-top.vue +0 -153
- package/.playground/pages/utilities/popup-chat.vue +0 -224
- package/componentList.json +0 -2129
- package/screenshots/playground-home.png +0 -0
- package/tsconfig.json +0 -3
- /package/app/composables/{useXBlog.ts → useXBlog.js} +0 -0
|
@@ -1,261 +0,0 @@
|
|
|
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 List</h1>
|
|
5
|
-
<p class="mt-2 text-neutral-600 dark:text-neutral-400">Blog listing with grid layout, filtering, and pagination.</p>
|
|
6
|
-
</div>
|
|
7
|
-
|
|
8
|
-
<div class="space-y-0">
|
|
9
|
-
<!-- 3 Column Grid (Default) -->
|
|
10
|
-
<XMarkSection bg="default">
|
|
11
|
-
<div class="text-center mb-8">
|
|
12
|
-
<span class="inline-block px-3 py-1 rounded-full bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400 text-xs font-medium mb-4">columns="3"</span>
|
|
13
|
-
<h2 class="xText-headline">3 Column Grid (Default)</h2>
|
|
14
|
-
<p class="mt-4 text-neutral-600 dark:text-neutral-400">Standard blog listing with 3 columns on desktop</p>
|
|
15
|
-
</div>
|
|
16
|
-
<XMarkBlogList
|
|
17
|
-
:posts="posts"
|
|
18
|
-
:columns="3"
|
|
19
|
-
/>
|
|
20
|
-
</XMarkSection>
|
|
21
|
-
|
|
22
|
-
<!-- 2 Column Grid -->
|
|
23
|
-
<XMarkSection bg="subtle">
|
|
24
|
-
<div class="text-center mb-8">
|
|
25
|
-
<span class="inline-block px-3 py-1 rounded-full bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400 text-xs font-medium mb-4">columns="2"</span>
|
|
26
|
-
<h2 class="xText-headline">2 Column Grid</h2>
|
|
27
|
-
<p class="mt-4 text-neutral-600 dark:text-neutral-400">Wider cards for featured content</p>
|
|
28
|
-
</div>
|
|
29
|
-
<XMarkBlogList
|
|
30
|
-
:posts="posts.slice(0, 4)"
|
|
31
|
-
:columns="2"
|
|
32
|
-
/>
|
|
33
|
-
</XMarkSection>
|
|
34
|
-
|
|
35
|
-
<!-- With Filters -->
|
|
36
|
-
<XMarkSection bg="default">
|
|
37
|
-
<div class="text-center mb-8">
|
|
38
|
-
<span class="inline-block px-3 py-1 rounded-full bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400 text-xs font-medium mb-4">hasFilters="true"</span>
|
|
39
|
-
<h2 class="xText-headline">With Search & Category Filters</h2>
|
|
40
|
-
<p class="mt-4 text-neutral-600 dark:text-neutral-400">Interactive filtering for larger blog sections</p>
|
|
41
|
-
</div>
|
|
42
|
-
<XMarkBlogList
|
|
43
|
-
:posts="posts"
|
|
44
|
-
:columns="3"
|
|
45
|
-
:has-filters="true"
|
|
46
|
-
:categories="categories"
|
|
47
|
-
/>
|
|
48
|
-
</XMarkSection>
|
|
49
|
-
|
|
50
|
-
<!-- Minimal (No Categories/Authors) -->
|
|
51
|
-
<XMarkSection bg="subtle">
|
|
52
|
-
<div class="text-center mb-8">
|
|
53
|
-
<span class="inline-block px-3 py-1 rounded-full bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400 text-xs font-medium mb-4">Minimal</span>
|
|
54
|
-
<h2 class="xText-headline">Minimal Style</h2>
|
|
55
|
-
<p class="mt-4 text-neutral-600 dark:text-neutral-400">Without category badges and author info</p>
|
|
56
|
-
</div>
|
|
57
|
-
<XMarkBlogList
|
|
58
|
-
:posts="posts.slice(0, 3)"
|
|
59
|
-
:columns="3"
|
|
60
|
-
:has-categories="false"
|
|
61
|
-
:has-authors="false"
|
|
62
|
-
/>
|
|
63
|
-
</XMarkSection>
|
|
64
|
-
|
|
65
|
-
<!-- Props Documentation -->
|
|
66
|
-
<XMarkSection bg="default">
|
|
67
|
-
<h2 class="text-lg font-semibold mb-6">Props</h2>
|
|
68
|
-
<div class="overflow-x-auto">
|
|
69
|
-
<table class="w-full text-sm">
|
|
70
|
-
<thead>
|
|
71
|
-
<tr class="border-b border-neutral-200 dark:border-neutral-700">
|
|
72
|
-
<th class="text-left py-3 px-4 font-medium">Prop</th>
|
|
73
|
-
<th class="text-left py-3 px-4 font-medium">Type</th>
|
|
74
|
-
<th class="text-left py-3 px-4 font-medium">Default</th>
|
|
75
|
-
<th class="text-left py-3 px-4 font-medium">Description</th>
|
|
76
|
-
</tr>
|
|
77
|
-
</thead>
|
|
78
|
-
<tbody class="divide-y divide-neutral-200 dark:divide-neutral-700">
|
|
79
|
-
<tr>
|
|
80
|
-
<td class="py-3 px-4 font-mono text-xs">posts</td>
|
|
81
|
-
<td class="py-3 px-4">Array</td>
|
|
82
|
-
<td class="py-3 px-4">required</td>
|
|
83
|
-
<td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Array of post objects with img: { src, alt? }</td>
|
|
84
|
-
</tr>
|
|
85
|
-
<tr>
|
|
86
|
-
<td class="py-3 px-4 font-mono text-xs">columns</td>
|
|
87
|
-
<td class="py-3 px-4">Number</td>
|
|
88
|
-
<td class="py-3 px-4">3</td>
|
|
89
|
-
<td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">1, 2, or 3 columns</td>
|
|
90
|
-
</tr>
|
|
91
|
-
<tr>
|
|
92
|
-
<td class="py-3 px-4 font-mono text-xs">perPage</td>
|
|
93
|
-
<td class="py-3 px-4">Number</td>
|
|
94
|
-
<td class="py-3 px-4">9</td>
|
|
95
|
-
<td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Posts per page for pagination</td>
|
|
96
|
-
</tr>
|
|
97
|
-
<tr>
|
|
98
|
-
<td class="py-3 px-4 font-mono text-xs">hasFilters</td>
|
|
99
|
-
<td class="py-3 px-4">Boolean</td>
|
|
100
|
-
<td class="py-3 px-4">false</td>
|
|
101
|
-
<td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Show search input and category filter</td>
|
|
102
|
-
</tr>
|
|
103
|
-
<tr>
|
|
104
|
-
<td class="py-3 px-4 font-mono text-xs">hasCategories</td>
|
|
105
|
-
<td class="py-3 px-4">Boolean</td>
|
|
106
|
-
<td class="py-3 px-4">true</td>
|
|
107
|
-
<td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Show category badges on cards</td>
|
|
108
|
-
</tr>
|
|
109
|
-
<tr>
|
|
110
|
-
<td class="py-3 px-4 font-mono text-xs">hasAuthors</td>
|
|
111
|
-
<td class="py-3 px-4">Boolean</td>
|
|
112
|
-
<td class="py-3 px-4">true</td>
|
|
113
|
-
<td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Show author avatar and name on cards</td>
|
|
114
|
-
</tr>
|
|
115
|
-
<tr>
|
|
116
|
-
<td class="py-3 px-4 font-mono text-xs">categories</td>
|
|
117
|
-
<td class="py-3 px-4">Array</td>
|
|
118
|
-
<td class="py-3 px-4">[]</td>
|
|
119
|
-
<td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Available categories for filter dropdown</td>
|
|
120
|
-
</tr>
|
|
121
|
-
<tr>
|
|
122
|
-
<td class="py-3 px-4 font-mono text-xs">cardButton</td>
|
|
123
|
-
<td class="py-3 px-4">Object</td>
|
|
124
|
-
<td class="py-3 px-4">null</td>
|
|
125
|
-
<td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Button config for all cards { label, color?, variant?, icon? }</td>
|
|
126
|
-
</tr>
|
|
127
|
-
</tbody>
|
|
128
|
-
</table>
|
|
129
|
-
</div>
|
|
130
|
-
</XMarkSection>
|
|
131
|
-
|
|
132
|
-
<!-- Post Object Structure -->
|
|
133
|
-
<XMarkSection bg="subtle">
|
|
134
|
-
<h2 class="text-lg font-semibold mb-4">Post Object Structure</h2>
|
|
135
|
-
<div class="bg-neutral-100 dark:bg-neutral-800 rounded-lg p-4 text-sm font-mono overflow-x-auto">
|
|
136
|
-
<pre>{
|
|
137
|
-
title: "Post Title",
|
|
138
|
-
description: "Brief description...",
|
|
139
|
-
img: { src: "https://...", alt: "Image description" },
|
|
140
|
-
slug: "post-slug",
|
|
141
|
-
date: "2024-01-15",
|
|
142
|
-
readingTime: 5,
|
|
143
|
-
author: { name: "Author Name", avatar: "https://..." },
|
|
144
|
-
category: "Tutorial"
|
|
145
|
-
}</pre>
|
|
146
|
-
</div>
|
|
147
|
-
</XMarkSection>
|
|
148
|
-
|
|
149
|
-
<!-- Code Example -->
|
|
150
|
-
<XMarkSection bg="default">
|
|
151
|
-
<h2 class="text-lg font-semibold mb-4">Code Example</h2>
|
|
152
|
-
<CodeExample title="Blog List Usage" :code="codeExample" />
|
|
153
|
-
</XMarkSection>
|
|
154
|
-
</div>
|
|
155
|
-
</div>
|
|
156
|
-
</template>
|
|
157
|
-
|
|
158
|
-
<script setup>
|
|
159
|
-
// Initialize scroll reveal animations
|
|
160
|
-
useScrollReveal()
|
|
161
|
-
|
|
162
|
-
const codeExample = `<!-- 3 column grid (default) -->
|
|
163
|
-
<XMarkBlogList :posts="posts" />
|
|
164
|
-
|
|
165
|
-
<!-- 2 column grid for featured posts -->
|
|
166
|
-
<XMarkBlogList :posts="posts" :columns="2" />
|
|
167
|
-
|
|
168
|
-
<!-- With search and category filters -->
|
|
169
|
-
<XMarkBlogList
|
|
170
|
-
:posts="posts"
|
|
171
|
-
:columns="3"
|
|
172
|
-
:has-filters="true"
|
|
173
|
-
:categories="['Tutorial', 'Design', 'Performance']"
|
|
174
|
-
/>
|
|
175
|
-
|
|
176
|
-
<!-- Minimal style without author/category -->
|
|
177
|
-
<XMarkBlogList
|
|
178
|
-
:posts="posts"
|
|
179
|
-
:has-categories="false"
|
|
180
|
-
:has-authors="false"
|
|
181
|
-
/>
|
|
182
|
-
|
|
183
|
-
<!-- With Nuxt Content v3 -->
|
|
184
|
-
<script setup>
|
|
185
|
-
const { data: posts } = await useAsyncData('posts', () =>
|
|
186
|
-
queryCollection('blog')
|
|
187
|
-
.where('published', '=', true)
|
|
188
|
-
.order('date', 'desc')
|
|
189
|
-
.find()
|
|
190
|
-
)
|
|
191
|
-
<\/script>
|
|
192
|
-
|
|
193
|
-
<template>
|
|
194
|
-
<XMarkBlogList :posts="posts" :columns="3" />
|
|
195
|
-
</template>`
|
|
196
|
-
|
|
197
|
-
const categories = ['Tutorial', 'Dev', 'Design', 'Performance', 'Testing', 'DevOps']
|
|
198
|
-
|
|
199
|
-
const posts = [
|
|
200
|
-
{
|
|
201
|
-
title: 'Getting Started with Nuxt',
|
|
202
|
-
description: 'Learn the basics of building modern web applications with Nuxt 3.',
|
|
203
|
-
img: { src: 'https://images.unsplash.com/photo-1517694712202-14dd9538aa97?w=400&h=300&fit=crop', alt: 'Code on laptop' },
|
|
204
|
-
slug: 'getting-started',
|
|
205
|
-
date: '2024-01-15',
|
|
206
|
-
readingTime: 5,
|
|
207
|
-
author: { name: 'Sarah Chen', avatar: 'https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=50&h=50&fit=crop' },
|
|
208
|
-
category: 'Tutorial'
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
title: 'Advanced Composition Patterns',
|
|
212
|
-
description: 'Deep dive into Vue 3 composition API patterns and best practices.',
|
|
213
|
-
img: { src: 'https://images.unsplash.com/photo-1555066931-4365d14bab8c?w=400&h=300&fit=crop', alt: 'Programming code' },
|
|
214
|
-
slug: 'composition-patterns',
|
|
215
|
-
date: '2024-01-10',
|
|
216
|
-
readingTime: 8,
|
|
217
|
-
author: { name: 'Michael Torres', avatar: 'https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=50&h=50&fit=crop' },
|
|
218
|
-
category: 'Dev'
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
title: 'Design System Fundamentals',
|
|
222
|
-
description: 'Create beautiful, consistent design systems for your projects.',
|
|
223
|
-
img: { src: 'https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=400&h=300&fit=crop', alt: 'Design dashboard' },
|
|
224
|
-
slug: 'design-systems',
|
|
225
|
-
date: '2024-01-05',
|
|
226
|
-
readingTime: 6,
|
|
227
|
-
author: { name: 'Emma Williams', avatar: 'https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=50&h=50&fit=crop' },
|
|
228
|
-
category: 'Design'
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
title: 'Performance Optimization',
|
|
232
|
-
description: 'Optimize your Nuxt application for maximum performance.',
|
|
233
|
-
img: { src: 'https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=400&h=300&fit=crop', alt: 'Analytics' },
|
|
234
|
-
slug: 'performance',
|
|
235
|
-
date: '2024-01-01',
|
|
236
|
-
readingTime: 7,
|
|
237
|
-
author: { name: 'Alex Johnson', avatar: 'https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=50&h=50&fit=crop' },
|
|
238
|
-
category: 'Performance'
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
title: 'Testing Best Practices',
|
|
242
|
-
description: 'Write better tests for your Vue and Nuxt applications.',
|
|
243
|
-
img: { src: 'https://images.unsplash.com/photo-1504639725590-34d0984388bd?w=400&h=300&fit=crop', alt: 'Testing' },
|
|
244
|
-
slug: 'testing-guide',
|
|
245
|
-
date: '2023-12-28',
|
|
246
|
-
readingTime: 4,
|
|
247
|
-
author: { name: 'Lisa Park', avatar: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=50&h=50&fit=crop' },
|
|
248
|
-
category: 'Testing'
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
title: 'Deployment Strategies',
|
|
252
|
-
description: 'Deploy your Nuxt app with confidence using modern CI/CD.',
|
|
253
|
-
img: { src: 'https://images.unsplash.com/photo-1558494949-ef010cbdcc31?w=400&h=300&fit=crop', alt: 'Server room' },
|
|
254
|
-
slug: 'deployment',
|
|
255
|
-
date: '2023-12-25',
|
|
256
|
-
readingTime: 5,
|
|
257
|
-
author: { name: 'James Wilson', avatar: 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=50&h=50&fit=crop' },
|
|
258
|
-
category: 'DevOps'
|
|
259
|
-
}
|
|
260
|
-
]
|
|
261
|
-
</script>
|
|
@@ -1,228 +0,0 @@
|
|
|
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 Navigation</h1>
|
|
5
|
-
<p class="mt-2 text-neutral-600 dark:text-neutral-400">
|
|
6
|
-
Previous/next post navigation using Nuxt UI buttons.
|
|
7
|
-
</p>
|
|
8
|
-
</div>
|
|
9
|
-
|
|
10
|
-
<div class="space-y-0">
|
|
11
|
-
<!-- With Both Links -->
|
|
12
|
-
<XMarkSection bg="default">
|
|
13
|
-
<div class="text-center mb-8">
|
|
14
|
-
<span class="inline-block px-3 py-1 rounded-full bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400 text-xs font-medium mb-4">Both Links</span>
|
|
15
|
-
<h2 class="xText-headline">Previous & Next</h2>
|
|
16
|
-
<p class="mt-4 text-neutral-600 dark:text-neutral-400">Full navigation with both previous and next post links</p>
|
|
17
|
-
</div>
|
|
18
|
-
|
|
19
|
-
<div class="max-w-3xl mx-auto">
|
|
20
|
-
<XMarkBlogNavigation
|
|
21
|
-
:previous="previousPost"
|
|
22
|
-
:next="nextPost"
|
|
23
|
-
/>
|
|
24
|
-
</div>
|
|
25
|
-
</XMarkSection>
|
|
26
|
-
|
|
27
|
-
<!-- Previous Only -->
|
|
28
|
-
<XMarkSection bg="subtle">
|
|
29
|
-
<div class="text-center mb-8">
|
|
30
|
-
<span class="inline-block px-3 py-1 rounded-full bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400 text-xs font-medium mb-4">Single Link</span>
|
|
31
|
-
<h2 class="xText-headline">Previous Only</h2>
|
|
32
|
-
<p class="mt-4 text-neutral-600 dark:text-neutral-400">When there's no next post (e.g., newest article)</p>
|
|
33
|
-
</div>
|
|
34
|
-
|
|
35
|
-
<div class="max-w-3xl mx-auto">
|
|
36
|
-
<XMarkBlogNavigation
|
|
37
|
-
:previous="previousPost"
|
|
38
|
-
/>
|
|
39
|
-
</div>
|
|
40
|
-
</XMarkSection>
|
|
41
|
-
|
|
42
|
-
<!-- Next Only -->
|
|
43
|
-
<XMarkSection bg="default">
|
|
44
|
-
<div class="text-center mb-8">
|
|
45
|
-
<span class="inline-block px-3 py-1 rounded-full bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400 text-xs font-medium mb-4">Single Link</span>
|
|
46
|
-
<h2 class="xText-headline">Next Only</h2>
|
|
47
|
-
<p class="mt-4 text-neutral-600 dark:text-neutral-400">When there's no previous post (e.g., oldest article)</p>
|
|
48
|
-
</div>
|
|
49
|
-
|
|
50
|
-
<div class="max-w-3xl mx-auto">
|
|
51
|
-
<XMarkBlogNavigation
|
|
52
|
-
:next="nextPost"
|
|
53
|
-
/>
|
|
54
|
-
</div>
|
|
55
|
-
</XMarkSection>
|
|
56
|
-
|
|
57
|
-
<!-- Custom Labels -->
|
|
58
|
-
<XMarkSection bg="subtle">
|
|
59
|
-
<div class="text-center mb-8">
|
|
60
|
-
<span class="inline-block px-3 py-1 rounded-full bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400 text-xs font-medium mb-4">Custom Labels</span>
|
|
61
|
-
<h2 class="xText-headline">With Custom Labels</h2>
|
|
62
|
-
<p class="mt-4 text-neutral-600 dark:text-neutral-400">Override the default "Previous" and "Next" labels</p>
|
|
63
|
-
</div>
|
|
64
|
-
|
|
65
|
-
<div class="max-w-3xl mx-auto">
|
|
66
|
-
<XMarkBlogNavigation
|
|
67
|
-
:previous="previousPost"
|
|
68
|
-
:next="nextPost"
|
|
69
|
-
previous-label="Older Post"
|
|
70
|
-
next-label="Newer Post"
|
|
71
|
-
/>
|
|
72
|
-
</div>
|
|
73
|
-
</XMarkSection>
|
|
74
|
-
|
|
75
|
-
<!-- With Nuxt Content _path -->
|
|
76
|
-
<XMarkSection bg="default">
|
|
77
|
-
<div class="text-center mb-8">
|
|
78
|
-
<span class="inline-block px-3 py-1 rounded-full bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400 text-xs font-medium mb-4">Nuxt Content</span>
|
|
79
|
-
<h2 class="xText-headline">With Nuxt Content _path</h2>
|
|
80
|
-
<p class="mt-4 text-neutral-600 dark:text-neutral-400">Supports both slug and _path from Nuxt Content</p>
|
|
81
|
-
</div>
|
|
82
|
-
|
|
83
|
-
<div class="max-w-3xl mx-auto">
|
|
84
|
-
<XMarkBlogNavigation
|
|
85
|
-
:previous="contentPreviousPost"
|
|
86
|
-
:next="contentNextPost"
|
|
87
|
-
/>
|
|
88
|
-
</div>
|
|
89
|
-
</XMarkSection>
|
|
90
|
-
|
|
91
|
-
<!-- Props Documentation -->
|
|
92
|
-
<XMarkSection bg="subtle">
|
|
93
|
-
<h2 class="text-lg font-semibold mb-6">Props</h2>
|
|
94
|
-
<div class="overflow-x-auto">
|
|
95
|
-
<table class="w-full text-sm">
|
|
96
|
-
<thead>
|
|
97
|
-
<tr class="border-b border-neutral-200 dark:border-neutral-700">
|
|
98
|
-
<th class="text-left py-3 px-4 font-medium">Prop</th>
|
|
99
|
-
<th class="text-left py-3 px-4 font-medium">Type</th>
|
|
100
|
-
<th class="text-left py-3 px-4 font-medium">Default</th>
|
|
101
|
-
<th class="text-left py-3 px-4 font-medium">Description</th>
|
|
102
|
-
</tr>
|
|
103
|
-
</thead>
|
|
104
|
-
<tbody class="divide-y divide-neutral-200 dark:divide-neutral-700">
|
|
105
|
-
<tr>
|
|
106
|
-
<td class="py-3 px-4 font-mono text-xs">previous</td>
|
|
107
|
-
<td class="py-3 px-4">Object</td>
|
|
108
|
-
<td class="py-3 px-4">null</td>
|
|
109
|
-
<td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Previous post { title, slug } or { title, _path }</td>
|
|
110
|
-
</tr>
|
|
111
|
-
<tr>
|
|
112
|
-
<td class="py-3 px-4 font-mono text-xs">next</td>
|
|
113
|
-
<td class="py-3 px-4">Object</td>
|
|
114
|
-
<td class="py-3 px-4">null</td>
|
|
115
|
-
<td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Next post { title, slug } or { title, _path }</td>
|
|
116
|
-
</tr>
|
|
117
|
-
<tr>
|
|
118
|
-
<td class="py-3 px-4 font-mono text-xs">basePath</td>
|
|
119
|
-
<td class="py-3 px-4">String</td>
|
|
120
|
-
<td class="py-3 px-4">'/blog'</td>
|
|
121
|
-
<td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Base path for blog posts (used with slug)</td>
|
|
122
|
-
</tr>
|
|
123
|
-
<tr>
|
|
124
|
-
<td class="py-3 px-4 font-mono text-xs">previousLabel</td>
|
|
125
|
-
<td class="py-3 px-4">String</td>
|
|
126
|
-
<td class="py-3 px-4">'Previous'</td>
|
|
127
|
-
<td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Label for previous link</td>
|
|
128
|
-
</tr>
|
|
129
|
-
<tr>
|
|
130
|
-
<td class="py-3 px-4 font-mono text-xs">nextLabel</td>
|
|
131
|
-
<td class="py-3 px-4">String</td>
|
|
132
|
-
<td class="py-3 px-4">'Next'</td>
|
|
133
|
-
<td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Label for next link</td>
|
|
134
|
-
</tr>
|
|
135
|
-
</tbody>
|
|
136
|
-
</table>
|
|
137
|
-
</div>
|
|
138
|
-
</XMarkSection>
|
|
139
|
-
|
|
140
|
-
<!-- Post Object Structure -->
|
|
141
|
-
<XMarkSection bg="default">
|
|
142
|
-
<h2 class="text-lg font-semibold mb-4">Post Object Structure</h2>
|
|
143
|
-
<div class="bg-neutral-100 dark:bg-neutral-800 rounded-lg p-4 text-sm font-mono overflow-x-auto">
|
|
144
|
-
<pre>// Using slug (combined with basePath)
|
|
145
|
-
{
|
|
146
|
-
title: "Getting Started with Vue 3",
|
|
147
|
-
slug: "vue-3-getting-started"
|
|
148
|
-
}
|
|
149
|
-
// Result: /blog/vue-3-getting-started
|
|
150
|
-
|
|
151
|
-
// Using _path (from Nuxt Content)
|
|
152
|
-
{
|
|
153
|
-
title: "Getting Started with Vue 3",
|
|
154
|
-
_path: "/articles/vue-3-getting-started"
|
|
155
|
-
}
|
|
156
|
-
// Result: /articles/vue-3-getting-started</pre>
|
|
157
|
-
</div>
|
|
158
|
-
</XMarkSection>
|
|
159
|
-
|
|
160
|
-
<!-- Code Example -->
|
|
161
|
-
<XMarkSection bg="subtle">
|
|
162
|
-
<h2 class="text-lg font-semibold mb-4">Code Example</h2>
|
|
163
|
-
<CodeExample title="Blog Navigation Usage" :code="codeExample" />
|
|
164
|
-
</XMarkSection>
|
|
165
|
-
</div>
|
|
166
|
-
</div>
|
|
167
|
-
</template>
|
|
168
|
-
|
|
169
|
-
<script setup>
|
|
170
|
-
// Initialize scroll reveal animations
|
|
171
|
-
useScrollReveal()
|
|
172
|
-
|
|
173
|
-
const codeExample = `<!-- Both previous and next -->
|
|
174
|
-
<XMarkBlogNavigation
|
|
175
|
-
:previous="{ title: 'Vue 3 Getting Started', slug: 'vue-3-getting-started' }"
|
|
176
|
-
:next="{ title: 'Advanced Patterns', slug: 'advanced-patterns' }"
|
|
177
|
-
/>
|
|
178
|
-
|
|
179
|
-
<!-- Custom labels -->
|
|
180
|
-
<XMarkBlogNavigation
|
|
181
|
-
:previous="previousPost"
|
|
182
|
-
:next="nextPost"
|
|
183
|
-
previous-label="Older Post"
|
|
184
|
-
next-label="Newer Post"
|
|
185
|
-
/>
|
|
186
|
-
|
|
187
|
-
<!-- With Nuxt Content _path -->
|
|
188
|
-
<XMarkBlogNavigation
|
|
189
|
-
:previous="{ title: 'Previous', _path: '/articles/previous' }"
|
|
190
|
-
:next="{ title: 'Next', _path: '/articles/next' }"
|
|
191
|
-
/>
|
|
192
|
-
|
|
193
|
-
<!-- With Nuxt Content surround -->
|
|
194
|
-
<script setup>
|
|
195
|
-
const { data: surround } = await useAsyncData('surround', () =>
|
|
196
|
-
queryCollectionItemSurroundings('blog', route.path)
|
|
197
|
-
)
|
|
198
|
-
<\/script>
|
|
199
|
-
|
|
200
|
-
<template>
|
|
201
|
-
<XMarkBlogNavigation
|
|
202
|
-
:previous="surround?.[0]"
|
|
203
|
-
:next="surround?.[1]"
|
|
204
|
-
/>
|
|
205
|
-
</template>`
|
|
206
|
-
|
|
207
|
-
// Using slug format (will be combined with basePath)
|
|
208
|
-
const previousPost = {
|
|
209
|
-
title: 'Getting Started with Vue 3',
|
|
210
|
-
slug: 'vue-3-getting-started'
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
const nextPost = {
|
|
214
|
-
title: 'Advanced Composition API Patterns',
|
|
215
|
-
slug: 'composition-api-patterns'
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
// Using Nuxt Content _path format
|
|
219
|
-
const contentPreviousPost = {
|
|
220
|
-
title: 'Understanding Reactive State',
|
|
221
|
-
_path: '/articles/reactive-state'
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
const contentNextPost = {
|
|
225
|
-
title: 'Building Custom Composables',
|
|
226
|
-
_path: '/articles/custom-composables'
|
|
227
|
-
}
|
|
228
|
-
</script>
|