@xenterprises/nuxt-x-marketing 0.0.7 → 0.0.9

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/app.config.ts CHANGED
@@ -13,6 +13,7 @@ export default defineAppConfig({
13
13
  header: {
14
14
  logo: {
15
15
  src: "",
16
+ srcDark: "",
16
17
  alt: "",
17
18
  },
18
19
  nav: {
@@ -50,16 +51,20 @@ declare module "@nuxt/schema" {
50
51
  header?: {
51
52
  logo?: {
52
53
  src?: string;
54
+ srcDark?: string;
53
55
  alt?: string;
54
56
  };
55
57
  nav?: {
56
58
  buttons?: {
57
59
  label: string;
58
60
  to: string;
61
+ icon?: string;
62
+ target?: string;
59
63
  }[];
60
64
  links?: {
61
65
  label: string;
62
66
  to: string;
67
+ target?: string;
63
68
  }[];
64
69
  };
65
70
  };
@@ -86,6 +91,7 @@ declare module "@nuxt/schema" {
86
91
  links: {
87
92
  label: string;
88
93
  to: string;
94
+ target?: string;
89
95
  }[];
90
96
  }[];
91
97
  };
@@ -69,6 +69,7 @@
69
69
  >
70
70
  <nuxt-link
71
71
  :to="link?.to"
72
+ :target="link?.target ? link?.target : '_self'"
72
73
  class="text-white hover:text-gray-200 font-medium leading-relaxed"
73
74
  >{{ link?.label }}</nuxt-link
74
75
  >
@@ -1,20 +1,28 @@
1
1
  <template>
2
2
  <UHeader :links="links">
3
3
  <template #logo>
4
- <img
5
- :src="header?.logo?.src"
6
- :alt="header?.logo?.alt"
7
- class="h-8"
8
- v-if="header?.logo?.src"
9
- />
4
+ <nuxt-link to="/" v-if="header?.logo?.src">
5
+ <UColorModeImage
6
+ :light="header?.logo?.src"
7
+ :dark="
8
+ header?.logo?.srcDark ? header?.logo?.srcDark : header?.logo?.src
9
+ "
10
+ :alt="header?.logo?.alt"
11
+ class="h-8"
12
+ />
13
+ </nuxt-link>
10
14
  <span v-else>{{ header?.logo?.alt }}</span>
11
15
  </template>
12
16
 
13
17
  <template #right>
14
18
  <span v-for="(button, index) in header?.nav?.buttons" :key="index"
15
- ><UButton class="hidden md:block py-2" :to="button?.to">{{
16
- button?.label
17
- }}</UButton></span
19
+ ><UButton
20
+ class="hidden md:block py-2"
21
+ :to="button?.to"
22
+ :icon="button?.icon ? button?.icon : null"
23
+ :target="link?.target ? link?.target : '_self'"
24
+ >{{ button?.label }}</UButton
25
+ ></span
18
26
  >
19
27
  </template>
20
28
 
@@ -24,6 +32,8 @@
24
32
  ><UButton
25
33
  class="md:hidden mt-5 py-2 w-full flex flex-row justify-center"
26
34
  :to="button?.to"
35
+ :icon="button?.icon ? button?.icon : null"
36
+ :target="link?.target ? link?.target : '_self'"
27
37
  >{{ button?.label }}</UButton
28
38
  ></span
29
39
  >
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xenterprises/nuxt-x-marketing",
3
3
  "type": "module",
4
- "version": "0.0.7",
4
+ "version": "0.0.9",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",