@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,210 +0,0 @@
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">Footer</h1>
6
- <p class="mt-2 text-neutral-600 dark:text-neutral-400">
7
- Full footer with logo, description, link columns, social icons, and newsletter.
8
- </p>
9
- </div>
10
-
11
- <!-- Demo Content -->
12
- <div class="p-8 space-y-12">
13
- <!-- Live Demo -->
14
- <section>
15
- <h2 class="text-lg font-semibold mb-4">Live Demo</h2>
16
- <div class="rounded-lg overflow-hidden">
17
- <XMarkLayoutFooter
18
- :logo="{ src: 'https://cdn.x.enterprises/logo-x.png', alt: 'Company Logo' }"
19
- description="Building beautiful marketing components for the modern web."
20
- :columns="columns"
21
- :social="socialLinks"
22
- :has-newsletter="true"
23
- newsletter-title="Subscribe to our newsletter"
24
- newsletter-description="Get the latest news and updates."
25
- copyright="© 2024 Company Name. All rights reserved."
26
- />
27
- </div>
28
- </section>
29
-
30
- <!-- Without Newsletter -->
31
- <section>
32
- <h2 class="text-lg font-semibold mb-4">Without Newsletter</h2>
33
- <div class="rounded-lg overflow-hidden">
34
- <XMarkLayoutFooter
35
- :logo="{ src: 'https://cdn.x.enterprises/logo-x.png' }"
36
- description="Minimal footer without the newsletter section."
37
- :columns="columns"
38
- :social="socialLinks"
39
- :has-newsletter="false"
40
- />
41
- </div>
42
- </section>
43
-
44
- <!-- Props Table -->
45
- <section>
46
- <h2 class="text-lg font-semibold mb-4">Props</h2>
47
- <div class="overflow-x-auto">
48
- <table class="w-full text-sm">
49
- <thead>
50
- <tr class="border-b border-neutral-200 dark:border-neutral-700">
51
- <th class="text-left py-3 px-4 font-medium">Prop</th>
52
- <th class="text-left py-3 px-4 font-medium">Type</th>
53
- <th class="text-left py-3 px-4 font-medium">Default</th>
54
- <th class="text-left py-3 px-4 font-medium">Description</th>
55
- </tr>
56
- </thead>
57
- <tbody class="divide-y divide-neutral-200 dark:divide-neutral-700">
58
- <tr>
59
- <td class="py-3 px-4 font-mono text-xs">logo</td>
60
- <td class="py-3 px-4">Object</td>
61
- <td class="py-3 px-4">-</td>
62
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Logo object { src, alt? }</td>
63
- </tr>
64
- <tr>
65
- <td class="py-3 px-4 font-mono text-xs">description</td>
66
- <td class="py-3 px-4">String</td>
67
- <td class="py-3 px-4">-</td>
68
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Company description text</td>
69
- </tr>
70
- <tr>
71
- <td class="py-3 px-4 font-mono text-xs">columns</td>
72
- <td class="py-3 px-4">Array</td>
73
- <td class="py-3 px-4">[]</td>
74
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Array of { title, links: [{ label, to }] }</td>
75
- </tr>
76
- <tr>
77
- <td class="py-3 px-4 font-mono text-xs">social</td>
78
- <td class="py-3 px-4">Array</td>
79
- <td class="py-3 px-4">[]</td>
80
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Array of { name, icon, href }</td>
81
- </tr>
82
- <tr>
83
- <td class="py-3 px-4 font-mono text-xs">legalLinks</td>
84
- <td class="py-3 px-4">Array</td>
85
- <td class="py-3 px-4">[]</td>
86
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Array of { label, to } for legal/policy links</td>
87
- </tr>
88
- <tr>
89
- <td class="py-3 px-4 font-mono text-xs">copyright</td>
90
- <td class="py-3 px-4">String</td>
91
- <td class="py-3 px-4">auto</td>
92
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Copyright text</td>
93
- </tr>
94
- <tr>
95
- <td class="py-3 px-4 font-mono text-xs">hasNewsletter</td>
96
- <td class="py-3 px-4">Boolean</td>
97
- <td class="py-3 px-4">false</td>
98
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Has newsletter signup section</td>
99
- </tr>
100
- <tr>
101
- <td class="py-3 px-4 font-mono text-xs">newsletterTitle</td>
102
- <td class="py-3 px-4">String</td>
103
- <td class="py-3 px-4">'Subscribe to our newsletter'</td>
104
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Newsletter section title</td>
105
- </tr>
106
- <tr>
107
- <td class="py-3 px-4 font-mono text-xs">newsletterDescription</td>
108
- <td class="py-3 px-4">String</td>
109
- <td class="py-3 px-4">'Get the latest updates and news.'</td>
110
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Newsletter section description</td>
111
- </tr>
112
- </tbody>
113
- </table>
114
- </div>
115
- </section>
116
-
117
- <!-- Slots -->
118
- <section>
119
- <h2 class="text-lg font-semibold mb-4">Slots</h2>
120
- <div class="space-y-4">
121
- <div class="p-4 bg-neutral-50 dark:bg-neutral-800/50 rounded-lg">
122
- <p class="font-mono text-sm text-primary-500">#brand</p>
123
- <p class="text-sm text-neutral-600 dark:text-neutral-400 mt-1">Custom brand section (logo + description)</p>
124
- </div>
125
- </div>
126
- </section>
127
-
128
- <!-- Code Example -->
129
- <section>
130
- <h2 class="text-lg font-semibold mb-4">Code Example</h2>
131
- <CodeExample title="Footer Usage" :code="codeExample" />
132
- </section>
133
- </div>
134
- </div>
135
- </template>
136
-
137
- <script setup>
138
- const codeExample = `<XMarkLayoutFooter
139
- :logo="{ src: 'https://cdn.x.enterprises/logo-x.png', alt: 'Company Logo' }"
140
- description="Building beautiful marketing components."
141
- :columns="[
142
- {
143
- title: 'Product',
144
- links: [
145
- { label: 'Features', to: '/features' },
146
- { label: 'Pricing', to: '/pricing' }
147
- ]
148
- },
149
- {
150
- title: 'Company',
151
- links: [
152
- { label: 'About', to: '/about' },
153
- { label: 'Blog', to: '/blog' }
154
- ]
155
- }
156
- ]"
157
- :social="[
158
- { name: 'Twitter', icon: 'i-lucide-twitter', href: '#' },
159
- { name: 'GitHub', icon: 'i-lucide-github', href: '#' }
160
- ]"
161
- :has-newsletter="true"
162
- newsletter-title="Subscribe to our newsletter"
163
- copyright="© 2024 Company Name. All rights reserved."
164
- />`
165
-
166
- const columns = [
167
- {
168
- title: 'Product',
169
- links: [
170
- { label: 'Features', to: '#' },
171
- { label: 'Pricing', to: '#' },
172
- { label: 'Changelog', to: '#' },
173
- { label: 'Roadmap', to: '#' }
174
- ]
175
- },
176
- {
177
- title: 'Company',
178
- links: [
179
- { label: 'About', to: '#' },
180
- { label: 'Blog', to: '#' },
181
- { label: 'Careers', to: '#' },
182
- { label: 'Contact', to: '#' }
183
- ]
184
- },
185
- {
186
- title: 'Resources',
187
- links: [
188
- { label: 'Documentation', to: '#' },
189
- { label: 'Help Center', to: '#' },
190
- { label: 'Community', to: '#' },
191
- { label: 'Status', to: '#' }
192
- ]
193
- },
194
- {
195
- title: 'Legal',
196
- links: [
197
- { label: 'Privacy', to: '#' },
198
- { label: 'Terms', to: '#' },
199
- { label: 'Cookies', to: '#' }
200
- ]
201
- }
202
- ]
203
-
204
- const socialLinks = [
205
- { name: 'Twitter', icon: 'i-lucide-twitter', href: '#' },
206
- { name: 'GitHub', icon: 'i-lucide-github', href: '#' },
207
- { name: 'LinkedIn', icon: 'i-lucide-linkedin', href: '#' },
208
- { name: 'YouTube', icon: 'i-lucide-youtube', href: '#' }
209
- ]
210
- </script>
@@ -1,121 +0,0 @@
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">Legal Footer</h1>
6
- <p class="mt-2 text-neutral-600 dark:text-neutral-400">
7
- Minimal footer with copyright text and legal/policy links.
8
- </p>
9
- </div>
10
-
11
- <!-- Demo Content -->
12
- <div class="p-8 space-y-12">
13
- <!-- Default -->
14
- <section>
15
- <h2 class="text-lg font-semibold mb-4">Default</h2>
16
- <div class="border border-neutral-200 dark:border-neutral-700 rounded-lg overflow-hidden">
17
- <XMarkLayoutFooterLegal />
18
- </div>
19
- </section>
20
-
21
- <!-- Custom Copyright -->
22
- <section>
23
- <h2 class="text-lg font-semibold mb-4">Custom Copyright</h2>
24
- <div class="border border-neutral-200 dark:border-neutral-700 rounded-lg overflow-hidden">
25
- <XMarkLayoutFooterLegal
26
- copyright="© 2024 Acme Inc. Built with love."
27
- />
28
- </div>
29
- </section>
30
-
31
- <!-- Custom Links -->
32
- <section>
33
- <h2 class="text-lg font-semibold mb-4">Custom Links</h2>
34
- <div class="border border-neutral-200 dark:border-neutral-700 rounded-lg overflow-hidden">
35
- <XMarkLayoutFooterLegal
36
- copyright="© 2024 Your Company. All rights reserved."
37
- :links="customLinks"
38
- />
39
- </div>
40
- </section>
41
-
42
- <!-- No Links -->
43
- <section>
44
- <h2 class="text-lg font-semibold mb-4">No Links</h2>
45
- <div class="border border-neutral-200 dark:border-neutral-700 rounded-lg overflow-hidden">
46
- <XMarkLayoutFooterLegal
47
- copyright="© 2024 Simple Company"
48
- :links="[]"
49
- />
50
- </div>
51
- </section>
52
-
53
- <!-- Props Table -->
54
- <section>
55
- <h2 class="text-lg font-semibold mb-4">Props</h2>
56
- <div class="overflow-x-auto">
57
- <table class="w-full text-sm">
58
- <thead>
59
- <tr class="border-b border-neutral-200 dark:border-neutral-700">
60
- <th class="text-left py-3 px-4 font-medium">Prop</th>
61
- <th class="text-left py-3 px-4 font-medium">Type</th>
62
- <th class="text-left py-3 px-4 font-medium">Default</th>
63
- <th class="text-left py-3 px-4 font-medium">Description</th>
64
- </tr>
65
- </thead>
66
- <tbody class="divide-y divide-neutral-200 dark:divide-neutral-700">
67
- <tr>
68
- <td class="py-3 px-4 font-mono text-xs">copyright</td>
69
- <td class="py-3 px-4">String</td>
70
- <td class="py-3 px-4">Auto-generated with year</td>
71
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Copyright text displayed on the left</td>
72
- </tr>
73
- <tr>
74
- <td class="py-3 px-4 font-mono text-xs">links</td>
75
- <td class="py-3 px-4">Array</td>
76
- <td class="py-3 px-4">[Privacy, Terms]</td>
77
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Array of { label, to } for legal links</td>
78
- </tr>
79
- </tbody>
80
- </table>
81
- </div>
82
- </section>
83
-
84
- <!-- Code Example -->
85
- <section>
86
- <h2 class="text-lg font-semibold mb-4">Code Example</h2>
87
- <CodeExample title="Legal Footer Usage" :code="codeExample" />
88
- </section>
89
- </div>
90
- </div>
91
- </template>
92
-
93
- <script setup>
94
- const codeExample = `<!-- Basic usage with defaults -->
95
- <XMarkLayoutFooterLegal />
96
-
97
- <!-- Custom copyright and links -->
98
- <XMarkLayoutFooterLegal
99
- copyright="© 2024 Your Company. All rights reserved."
100
- :links="[
101
- { label: 'Privacy Policy', to: '/privacy' },
102
- { label: 'Terms of Service', to: '/terms' },
103
- { label: 'Cookie Policy', to: '/cookies' },
104
- { label: 'GDPR', to: '/gdpr' }
105
- ]"
106
- />
107
-
108
- <!-- Minimal (no links) -->
109
- <XMarkLayoutFooterLegal
110
- copyright="© 2024 Simple Company"
111
- :links="[]"
112
- />`
113
-
114
- const customLinks = [
115
- { label: 'Privacy Policy', to: '/privacy' },
116
- { label: 'Terms of Service', to: '/terms' },
117
- { label: 'Cookie Policy', to: '/cookies' },
118
- { label: 'GDPR', to: '/gdpr' },
119
- { label: 'Accessibility', to: '/accessibility' }
120
- ]
121
- </script>
@@ -1,285 +0,0 @@
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">Navbar</h1>
6
- <p class="mt-2 text-neutral-600 dark:text-neutral-400">
7
- Fixed navigation header with scroll transition, mobile menu, and appConfig support.
8
- </p>
9
- </div>
10
-
11
- <!-- Demo Content -->
12
- <div class="space-y-0">
13
- <!-- Live Demo - Transparent -->
14
- <XMarkSection bg="default">
15
- <div class="text-center mb-8">
16
- <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">Transparent Mode</span>
17
- <h2 class="xText-headline">Transparent Navbar</h2>
18
- <p class="mt-4 text-neutral-600 dark:text-neutral-400">Starts transparent over hero content, becomes solid on scroll</p>
19
- </div>
20
-
21
- <div class="relative rounded-xl overflow-hidden border border-neutral-200 dark:border-neutral-700">
22
- <div class="bg-gradient-to-br from-primary-600 to-primary-800 h-64 relative">
23
- <XMarkLayoutNavbar
24
- :links="links"
25
- :buttons="buttons"
26
- logo-alt="Acme Inc"
27
- :transparent="true"
28
- class="!fixed !relative"
29
- >
30
- <template #logo>
31
- <span class="text-xl font-bold transition-colors duration-300" :class="logoColor">Acme Inc</span>
32
- </template>
33
- </XMarkLayoutNavbar>
34
- <div class="absolute inset-0 flex items-center justify-center pt-16">
35
- <div class="text-center text-white">
36
- <h3 class="text-2xl font-bold">Transparent Navbar Demo</h3>
37
- <p class="mt-2 text-white/80">Buttons adapt to transparent state with soft variant</p>
38
- </div>
39
- </div>
40
- </div>
41
- </div>
42
- </XMarkSection>
43
-
44
- <!-- Solid Navbar -->
45
- <XMarkSection bg="subtle">
46
- <div class="text-center mb-8">
47
- <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">Solid Mode</span>
48
- <h2 class="xText-headline">Solid Navbar</h2>
49
- <p class="mt-4 text-neutral-600 dark:text-neutral-400">Non-transparent with white/dark background</p>
50
- </div>
51
-
52
- <div class="relative rounded-xl overflow-hidden border border-neutral-200 dark:border-neutral-700">
53
- <XMarkLayoutNavbar
54
- :links="links"
55
- :buttons="buttons"
56
- logo-alt="Acme Inc"
57
- :transparent="false"
58
- class="!fixed !relative"
59
- >
60
- <template #logo>
61
- <span class="text-xl font-bold text-neutral-900 dark:text-white">Acme Inc</span>
62
- </template>
63
- </XMarkLayoutNavbar>
64
- </div>
65
- </XMarkSection>
66
-
67
- <!-- AppConfig Example -->
68
- <XMarkSection bg="default">
69
- <div class="text-center mb-8">
70
- <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">AppConfig</span>
71
- <h2 class="xText-headline">Using AppConfig</h2>
72
- <p class="mt-4 text-neutral-600 dark:text-neutral-400">Configure navbar via app.config.ts for centralized management</p>
73
- </div>
74
-
75
- <div class="bg-neutral-100 dark:bg-neutral-800 rounded-lg p-4 text-sm font-mono overflow-x-auto">
76
- <pre>// app.config.ts
77
- export default defineAppConfig({
78
- xMarketing: {
79
- header: {
80
- logo: {
81
- src: 'https://cdn.x.enterprises/logo-x.png', // For transparent state
82
- srcDark: 'https://cdn.x.enterprises/logo-x.png', // For scrolled/solid state
83
- alt: 'Company Name'
84
- },
85
- nav: {
86
- links: [
87
- { label: 'Features', to: '/features' },
88
- { label: 'Pricing', to: '/pricing' },
89
- { label: 'About', to: '/about' }
90
- ],
91
- buttons: [
92
- { label: 'Sign In', to: '/login' },
93
- { label: 'Get Started', to: '/signup' }
94
- ]
95
- }
96
- }
97
- }
98
- })
99
-
100
- // Then use without props:
101
- &lt;XMarkLayoutNavbar /&gt;</pre>
102
- </div>
103
- </XMarkSection>
104
-
105
- <!-- Props Table -->
106
- <XMarkSection bg="subtle">
107
- <h2 class="text-lg font-semibold mb-6">Props</h2>
108
- <div class="overflow-x-auto">
109
- <table class="w-full text-sm">
110
- <thead>
111
- <tr class="border-b border-neutral-200 dark:border-neutral-700">
112
- <th class="text-left py-3 px-4 font-medium">Prop</th>
113
- <th class="text-left py-3 px-4 font-medium">Type</th>
114
- <th class="text-left py-3 px-4 font-medium">Default</th>
115
- <th class="text-left py-3 px-4 font-medium">Description</th>
116
- </tr>
117
- </thead>
118
- <tbody class="divide-y divide-neutral-200 dark:divide-neutral-700">
119
- <tr>
120
- <td class="py-3 px-4 font-mono text-xs">transparent</td>
121
- <td class="py-3 px-4">Boolean</td>
122
- <td class="py-3 px-4">true</td>
123
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Start transparent over hero content</td>
124
- </tr>
125
- <tr>
126
- <td class="py-3 px-4 font-mono text-xs">links</td>
127
- <td class="py-3 px-4">Array</td>
128
- <td class="py-3 px-4">appConfig</td>
129
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Navigation links [{ label, to }]</td>
130
- </tr>
131
- <tr>
132
- <td class="py-3 px-4 font-mono text-xs">buttons</td>
133
- <td class="py-3 px-4">Array</td>
134
- <td class="py-3 px-4">appConfig</td>
135
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Action buttons [{ label, to, icon?, target? }]</td>
136
- </tr>
137
- <tr>
138
- <td class="py-3 px-4 font-mono text-xs">logo</td>
139
- <td class="py-3 px-4">Object</td>
140
- <td class="py-3 px-4">appConfig</td>
141
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Logo object { src, srcDark?, alt? }</td>
142
- </tr>
143
- <tr>
144
- <td class="py-3 px-4 font-mono text-xs">scrollThreshold</td>
145
- <td class="py-3 px-4">Number</td>
146
- <td class="py-3 px-4">100</td>
147
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Pixels to scroll before transition</td>
148
- </tr>
149
- </tbody>
150
- </table>
151
- </div>
152
- </XMarkSection>
153
-
154
- <!-- Button Behavior -->
155
- <XMarkSection bg="default">
156
- <h2 class="text-lg font-semibold mb-6">Button Behavior</h2>
157
- <div class="grid md:grid-cols-2 gap-6">
158
- <div class="p-4 bg-neutral-50 dark:bg-neutral-800/50 rounded-lg">
159
- <h3 class="font-medium mb-2">Transparent State</h3>
160
- <ul class="text-sm text-neutral-600 dark:text-neutral-400 space-y-1">
161
- <li>• First buttons: <code class="text-primary-500">soft</code> variant, <code class="text-primary-500">white</code> color</li>
162
- <li>• Last button: <code class="text-primary-500">solid</code> variant, <code class="text-primary-500">primary</code> color</li>
163
- <li>• Links: white with drop shadow</li>
164
- </ul>
165
- </div>
166
- <div class="p-4 bg-neutral-50 dark:bg-neutral-800/50 rounded-lg">
167
- <h3 class="font-medium mb-2">Scrolled/Solid State</h3>
168
- <ul class="text-sm text-neutral-600 dark:text-neutral-400 space-y-1">
169
- <li>• First buttons: <code class="text-primary-500">outline</code> variant, <code class="text-primary-500">neutral</code> color</li>
170
- <li>• Last button: <code class="text-primary-500">solid</code> variant, <code class="text-primary-500">primary</code> color</li>
171
- <li>• Links: neutral text color</li>
172
- </ul>
173
- </div>
174
- </div>
175
- </XMarkSection>
176
-
177
- <!-- Slots -->
178
- <XMarkSection bg="subtle">
179
- <h2 class="text-lg font-semibold mb-4">Slots</h2>
180
- <div class="grid md:grid-cols-2 gap-4">
181
- <div class="p-4 bg-white dark:bg-neutral-800 rounded-lg">
182
- <p class="font-mono text-sm text-primary-500">#logo</p>
183
- <p class="text-sm text-neutral-600 dark:text-neutral-400 mt-1">Custom logo content</p>
184
- </div>
185
- <div class="p-4 bg-white dark:bg-neutral-800 rounded-lg">
186
- <p class="font-mono text-sm text-primary-500">#links</p>
187
- <p class="text-sm text-neutral-600 dark:text-neutral-400 mt-1">Custom navigation links</p>
188
- </div>
189
- <div class="p-4 bg-white dark:bg-neutral-800 rounded-lg">
190
- <p class="font-mono text-sm text-primary-500">#actions</p>
191
- <p class="text-sm text-neutral-600 dark:text-neutral-400 mt-1">Custom action buttons</p>
192
- </div>
193
- <div class="p-4 bg-white dark:bg-neutral-800 rounded-lg">
194
- <p class="font-mono text-sm text-primary-500">#mobile-actions</p>
195
- <p class="text-sm text-neutral-600 dark:text-neutral-400 mt-1">Custom mobile menu actions</p>
196
- </div>
197
- </div>
198
- </XMarkSection>
199
-
200
- <!-- Code Example -->
201
- <XMarkSection bg="default">
202
- <h2 class="text-lg font-semibold mb-4">Code Example</h2>
203
- <CodeExample title="Navbar Usage" :code="codeExample" />
204
- </XMarkSection>
205
- </div>
206
- </div>
207
- </template>
208
-
209
- <script setup>
210
- // Initialize scroll reveal animations
211
- useScrollReveal()
212
-
213
- // Demo data
214
- const links = [
215
- { label: 'Features', to: '#features' },
216
- { label: 'Pricing', to: '#pricing' },
217
- { label: 'About', to: '#about' },
218
- { label: 'Blog', to: '#blog' }
219
- ]
220
-
221
- const buttons = [
222
- { label: 'Sign In', to: '/login' },
223
- { label: 'Get Started', to: '/signup' }
224
- ]
225
-
226
- const codeExample = `<!-- Basic navbar with props -->
227
- <XMarkLayoutNavbar
228
- :links="[
229
- { label: 'Features', to: '/features' },
230
- { label: 'Pricing', to: '/pricing' },
231
- { label: 'About', to: '/about' }
232
- ]"
233
- :buttons="[
234
- { label: 'Sign In', to: '/login' },
235
- { label: 'Get Started', to: '/signup' }
236
- ]"
237
- :transparent="true"
238
- />
239
-
240
- <!-- With custom logo slot -->
241
- <XMarkLayoutNavbar :links="links" :buttons="buttons">
242
- <template #logo>
243
- <span class="text-xl font-bold">Acme Inc</span>
244
- </template>
245
- </XMarkLayoutNavbar>
246
-
247
- <!-- Using appConfig (recommended) -->
248
- // app.config.ts
249
- export default defineAppConfig({
250
- xMarketing: {
251
- header: {
252
- logo: { src: '/logo.svg', alt: 'Company' },
253
- nav: {
254
- links: [...],
255
- buttons: [...]
256
- }
257
- }
258
- }
259
- })
260
-
261
- // Then simply:
262
- <XMarkLayoutNavbar />`
263
-
264
- // Transparent navbar demo - track scroll for logo color
265
- const isScrolled = ref(false)
266
-
267
- const logoColor = computed(() => {
268
- return isScrolled.value
269
- ? 'text-neutral-900 dark:text-white'
270
- : 'text-white'
271
- })
272
-
273
- onMounted(() => {
274
- const handleScroll = () => {
275
- isScrolled.value = window.scrollY > 100
276
- }
277
-
278
- window.addEventListener('scroll', handleScroll, { passive: true })
279
- handleScroll()
280
-
281
- onUnmounted(() => {
282
- window.removeEventListener('scroll', handleScroll)
283
- })
284
- })
285
- </script>