@xenterprises/nuxt-x-marketing 0.0.3 → 0.0.5

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.
@@ -4,8 +4,38 @@ export default defineAppConfig({
4
4
  config: {
5
5
  markerProjectId: "67191169861c84dffad87d71",
6
6
  },
7
+ header: {
8
+ logo: {
9
+ src: "https://cdn.x.enterprises/logo-x.png",
10
+ alt: "X Enterprises",
11
+ },
12
+ nav: {
13
+ buttons: [
14
+ {
15
+ label: "Get Started",
16
+ to: "/get-started",
17
+ },
18
+ ],
19
+ links: [
20
+ {
21
+ label: "Home",
22
+ to: "/",
23
+ },
24
+ ],
25
+ },
26
+ },
7
27
  footer: {
8
- logo: "https://cdn.x.enterprises/logo-x.png",
28
+ logo: {
29
+ src: "https://cdn.x.enterprises/logo-x.png",
30
+ alt: "",
31
+ },
32
+ bg: {
33
+ color: "",
34
+ img: {
35
+ src: "https://cdn.x.enterprises/bg-gradient.svg",
36
+ alt: "Gradient background",
37
+ },
38
+ },
9
39
  body: "Rock Your Band's World with Bandmate - the all-in-one platform designed to streamline your band's management, collaboration, and growth. Stay connected, stay inspired, and keep rocking with Bandmate! Follow us on social media and join our newsletter for the latest updates, tips, and industry news. Let's make music together!",
10
40
  socials: [
11
41
  {
@@ -16,19 +46,19 @@ export default defineAppConfig({
16
46
  ],
17
47
  columns: [
18
48
  {
19
- name: "Product",
49
+ headerLabel: "Products",
20
50
  links: [
21
51
  {
22
- name: "Features",
23
- url: "/features",
52
+ label: "Features",
53
+ to: "/features",
24
54
  },
25
55
  {
26
- name: "Pricing",
27
- url: "/pricing",
56
+ label: "Pricing",
57
+ to: "/pricing",
28
58
  },
29
59
  {
30
- name: "Customers",
31
- url: "/customers",
60
+ label: "Customers",
61
+ to: "/customers",
32
62
  },
33
63
  ],
34
64
  },
@@ -1,5 +1,5 @@
1
1
  export default defineNuxtConfig({
2
- extends: [["..", { install: true }], "@nuxt/ui-pro"],
3
- modules: ["@nuxt/ui"],
2
+ extends: [["..", { install: true }]],
3
+
4
4
  compatibilityDate: "2024-10-23",
5
5
  });
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div>🌮 Hola</div>
2
+ <div></div>
3
3
  </template>
4
4
  <script setup>
5
5
  </script>
package/README.md CHANGED
@@ -1,73 +1,230 @@
1
- # Nuxt Layer Starter
1
+ # @xenterprises/nuxt-x-marketing
2
2
 
3
- Create Nuxt extendable layer with this GitHub template.
3
+ `@xenterprises/nuxt-x-marketing` is a Nuxt.js layer designed specifically for creating marketing-centric sites. It provides a customizable layout and structure for marketing components such as headers, footers, and social links, allowing you to quickly set up a cohesive, branded marketing site.
4
4
 
5
- ## Setup
5
+ ## Features
6
6
 
7
- Make sure to install the dependencies:
7
+ - **Customizable UI**: Configure primary UI elements such as colors, container layouts, and screen width.
8
+ - **Header & Footer Configuration**: Easily manage header and footer elements, including logos, navigation links, and social media icons.
9
+ - **Project-specific Branding**: Define project-specific settings such as project name, logos, and links for both the header and footer.
10
+ - **Flexible Navigation and Social Links**: Add buttons, links, and social media icons to header and footer sections.
11
+
12
+ ## Installation
13
+
14
+ 1. **Install the package via npm**:
8
15
 
9
16
  ```bash
10
- pnpm install
17
+ npm install @xenterprises/nuxt-x-marketing
11
18
  ```
12
19
 
13
- ## Working on your layer
14
-
15
- Your layer is at the root of this repository, it is exactly like a regular Nuxt project, except you can publish it on NPM.
20
+ 2. **Add the Layer to Your Nuxt Config**
16
21
 
17
- The `.playground` directory should help you on trying your layer during development.
22
+ In your `nuxt.config.js` or `nuxt.config.ts` file, import the `@xenterprises/nuxt-x-marketing` layer:
18
23
 
19
- Running `pnpm dev` will prepare and boot `.playground` directory, which imports your layer itself.
24
+ ```javascript
25
+ export default defineNuxtConfig({
26
+ extends: "@xenterprises/nuxt-x-marketing",
27
+ });
28
+ ```
20
29
 
21
- ## Distributing your layer
30
+ 3. **Configure Your Project Settings**
31
+
32
+ Add configuration settings in your `app.config.ts` or `app.config.js` file to set up branding, navigation, and other customizable options.
33
+
34
+ ```javascript
35
+ export default defineAppConfig({
36
+ ui: {
37
+ primary: "sky",
38
+ header: {
39
+ container: "max-w-screen-2xl container mx-auto",
40
+ },
41
+ },
42
+ xMarketing: {
43
+ name: "X Enterprises",
44
+ config: {
45
+ markerProjectId: "project-1234",
46
+ },
47
+ header: {
48
+ logo: {
49
+ src: "/images/logo.png",
50
+ alt: "X Enterprises",
51
+ },
52
+ nav: {
53
+ buttons: [{ label: "Contact Us", to: "/contact" }],
54
+ links: [{ label: "About", to: "/about" }],
55
+ },
56
+ },
57
+ footer: {
58
+ logo: {
59
+ src: "/images/footer-logo.png",
60
+ alt: "X Enterprises Footer Logo",
61
+ },
62
+ bg: {
63
+ color: "#f3f3f3",
64
+ img: {
65
+ src: "/images/footer-bg.png",
66
+ alt: "Footer Background Image",
67
+ },
68
+ },
69
+ body: "© 2024 X Enterprises. All rights reserved.",
70
+ socials: [
71
+ {
72
+ name: "Facebook",
73
+ url: "https://facebook.com",
74
+ icon: "facebook-icon",
75
+ },
76
+ ],
77
+ columns: [
78
+ {
79
+ headerLabel: "Company",
80
+ links: [{ label: "About Us", to: "/about" }],
81
+ },
82
+ ],
83
+ },
84
+ },
85
+ });
86
+ ```
22
87
 
23
- Your Nuxt layer is shaped exactly the same as any other Nuxt project, except you can publish it on NPM.
88
+ 4. **Run Your Nuxt Application**
24
89
 
25
- To do so, you only have to check if `files` in `package.json` are valid, then run:
90
+ Start your Nuxt application to see `@xenterprises/nuxt-x-marketing` in action:
26
91
 
27
92
  ```bash
28
- npm publish --access public
93
+ npm run dev
29
94
  ```
30
95
 
31
- Once done, your users will only have to run:
96
+ ## Configuration Options
32
97
 
33
- ```bash
34
- npm install --save your-layer
35
- ```
98
+ The following options are available for customization in the `xMarketing` layer configuration:
36
99
 
37
- Then add the dependency to their `extends` in `nuxt.config`:
100
+ ### UI
38
101
 
39
- ```ts
40
- defineNuxtConfig({
41
- extends: 'your-layer'
42
- })
102
+ Configure general UI settings for the app layout.
103
+
104
+ ```javascript
105
+ ui: {
106
+ primary: "sky", // Primary color theme
107
+ header: {
108
+ container: "max-w-screen-2xl container mx-auto" // Maximum screen width for container
109
+ }
110
+ }
43
111
  ```
44
112
 
45
- ## Development Server
113
+ ### xMarketing
46
114
 
47
- Start the development server on http://localhost:3000
115
+ Define the core marketing elements for your project under `xMarketing`.
48
116
 
49
- ```bash
50
- pnpm dev
117
+ ```javascript
118
+ xMarketing: {
119
+ name: "X Enterprises", // Project name to display
120
+ config: {
121
+ markerProjectId: "", // Placeholder for your project ID if needed
122
+ },
51
123
  ```
52
124
 
53
- ## Production
54
-
55
- Build the application for production:
56
-
57
- ```bash
58
- pnpm build
125
+ #### Header Configuration
126
+
127
+ Set up the header, including logo and navigation elements.
128
+
129
+ ```javascript
130
+ header: {
131
+ logo: {
132
+ src: "", // Source URL of the logo
133
+ alt: "", // Alt text for the logo
134
+ },
135
+ nav: {
136
+ buttons: [], // Array of buttons with `label` and `to` attributes
137
+ links: [], // Array of navigation links with `label` and `to` attributes
138
+ },
139
+ }
59
140
  ```
60
141
 
61
- Or statically generate it with:
142
+ #### Footer Configuration
143
+
144
+ Define the footer layout, logo, background, and social links.
145
+
146
+ ```javascript
147
+ footer: {
148
+ logo: {
149
+ src: "", // Footer logo URL
150
+ alt: "", // Footer logo alt text
151
+ },
152
+ bg: {
153
+ color: "", // Background color for the footer
154
+ img: {
155
+ src: "", // Background image URL for the footer
156
+ alt: "", // Alt text for the background image
157
+ },
158
+ },
159
+ body: "", // Optional text for the footer
160
+ socials: [], // Array of social media objects with `name`, `url`, and `icon`
161
+ columns: [], // Footer columns with links
162
+ }
163
+ ```
62
164
 
63
- ```bash
64
- pnpm generate
165
+ ### Example Configuration
166
+
167
+ Below is an example configuration for `xMarketing`:
168
+
169
+ ```javascript
170
+ export default defineAppConfig({
171
+ ui: {
172
+ primary: "sky",
173
+ header: {
174
+ container: "max-w-screen-2xl container mx-auto",
175
+ },
176
+ },
177
+ xMarketing: {
178
+ name: "X Enterprises",
179
+ config: {
180
+ markerProjectId: "project-1234",
181
+ },
182
+ header: {
183
+ logo: {
184
+ src: "/images/logo.png",
185
+ alt: "X Enterprises",
186
+ },
187
+ nav: {
188
+ buttons: [{ label: "Contact Us", to: "/contact" }],
189
+ links: [{ label: "About", to: "/about" }],
190
+ },
191
+ },
192
+ footer: {
193
+ logo: {
194
+ src: "/images/footer-logo.png",
195
+ alt: "X Enterprises Footer Logo",
196
+ },
197
+ bg: {
198
+ color: "#f3f3f3",
199
+ img: {
200
+ src: "/images/footer-bg.png",
201
+ alt: "Footer Background Image",
202
+ },
203
+ },
204
+ body: "© 2024 X Enterprises. All rights reserved.",
205
+ socials: [
206
+ {
207
+ name: "Facebook",
208
+ url: "https://facebook.com",
209
+ icon: "facebook-icon",
210
+ },
211
+ ],
212
+ columns: [
213
+ {
214
+ headerLabel: "Company",
215
+ links: [{ label: "About Us", to: "/about" }],
216
+ },
217
+ ],
218
+ },
219
+ },
220
+ });
65
221
  ```
66
222
 
67
- Locally preview production build:
223
+ ### Additional Notes
68
224
 
69
- ```bash
70
- pnpm preview
71
- ```
225
+ - **Icons for Socials**: Icons should be referenced by name and sourced from your project’s icon library.
226
+ - **Responsive Layouts**: Use `container` and `max-w-screen` utilities for responsive designs.
227
+
228
+ ## License
72
229
 
73
- Checkout the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
230
+ This project is open-source and can be modified as per your project requirements.
package/app.config.ts CHANGED
@@ -1,11 +1,37 @@
1
1
  export default defineAppConfig({
2
+ ui: {
3
+ primary: "sky",
4
+ header: {
5
+ container: "max-w-screen-2xl container mx-auto",
6
+ },
7
+ },
2
8
  xMarketing: {
3
9
  name: "X Enterprises",
4
10
  config: {
5
11
  markerProjectId: "",
6
12
  },
13
+ header: {
14
+ logo: {
15
+ src: "",
16
+ alt: "",
17
+ },
18
+ nav: {
19
+ buttons: [],
20
+ links: [],
21
+ },
22
+ },
7
23
  footer: {
8
- logo: "",
24
+ logo: {
25
+ src: "",
26
+ alt: "",
27
+ },
28
+ bg: {
29
+ color: "",
30
+ img: {
31
+ src: "",
32
+ alt: "",
33
+ },
34
+ },
9
35
  body: "",
10
36
  socials: [],
11
37
  columns: [],
@@ -21,19 +47,45 @@ declare module "@nuxt/schema" {
21
47
  config?: {
22
48
  markerProjectId?: string;
23
49
  };
50
+ header?: {
51
+ logo?: {
52
+ src?: string;
53
+ alt?: string;
54
+ };
55
+ nav?: {
56
+ buttons?: {
57
+ label: string;
58
+ to: string;
59
+ }[];
60
+ links?: {
61
+ label: string;
62
+ to: string;
63
+ }[];
64
+ };
65
+ };
24
66
  footer?: {
25
67
  body?: string;
26
- logo?: string;
68
+ bg?: {
69
+ color?: string;
70
+ img?: {
71
+ src?: string;
72
+ alt?: string;
73
+ };
74
+ };
75
+ logo?: {
76
+ src?: string;
77
+ alt?: string;
78
+ };
27
79
  socials?: {
28
80
  name: string;
29
81
  url: string;
30
82
  icon: string;
31
83
  }[];
32
84
  columns?: {
33
- name: string;
85
+ headerLabel: string;
34
86
  links: {
35
- name: string;
36
- url: string;
87
+ label: string;
88
+ to: string;
37
89
  }[];
38
90
  }[];
39
91
  };
package/app.vue CHANGED
@@ -1,5 +1,6 @@
1
1
  <template>
2
2
  <main class="min-h-screen flex flex-col justify-between">
3
+ <XHeaderNav />
3
4
  <section class="flex-grow">
4
5
  <NuxtLoadingIndicator />
5
6
  <NuxtLayout>
@@ -2,20 +2,22 @@
2
2
  <footer
3
3
  class="bg-gray-900 text-gray-400 text-xs relative overflow-visible pt-2"
4
4
  >
5
- <img
6
- src="https://cdn.x.enterprises/logo-x.png"
7
- alt="X Enterprises"
8
- class="h-6 w-6 mx-auto -mt-5 relative z-10"
9
- />
5
+ <a href="https://x.enterprises" target="_blank">
6
+ <img
7
+ src="https://cdn.x.enterprises/logo-x.png"
8
+ alt="X Enterprises"
9
+ class="h-6 w-6 mx-auto -mt-5 relative z-10"
10
+ />
11
+ </a>
10
12
  <main
11
- class="flex flex-col md:flex-row justify-between items-center px-6 pt-3 pb-5"
13
+ class="flex flex-col md:flex-row justify-between items-center px-6 pt-3 pb-5 max-w-screen-2xl mx-auto"
12
14
  >
13
- <div>
15
+ <div class="pb-4 md:pb-0 text-center md:text-left">
14
16
  Copyright &copy;2016-{{ new Date().getFullYear() }} X Enterprises, LLC.
15
17
  All Rights Reserved.
16
18
  </div>
17
19
 
18
- <div class="text-right">
20
+ <div class="text-center md:text-right pb-14 md:pb-0">
19
21
  <a
20
22
  href="https://x.enterprises/legal/terms"
21
23
  class="hover:underline"
@@ -1,79 +1,76 @@
1
1
  <template>
2
2
  <div>
3
- <section class="relative pt-24 bg-black overflow-hidden">
3
+ <section
4
+ class="relative pt-24 overflow-hidden"
5
+ :class="footer?.bg?.color ? footer?.bg?.color : 'bg-gray-900'"
6
+ >
4
7
  <img
5
8
  class="absolute left-1/2 bottom-0 h-full transform -translate-x-1/2"
6
- src="/flaro-assets/images/footers/gradient.svg"
7
- alt=""
9
+ :src="footer?.bg?.img?.src"
10
+ :alt="footer?.bg?.img?.alt"
11
+ v-if="footer?.bg?.img?.src"
8
12
  />
9
- <div class="relative z-10 container px-4 mx-auto">
13
+ <div class="relative z-10 container mx-auto max-w-screen-2xl">
10
14
  <div class="pb-24 border-b border-gray-900">
11
- <div class="flex flex-wrap -m-8">
12
- <div class="w-full sm:w-1/2 lg:w-6/12 p-8">
15
+ <div class="flex flex-wrap justify-between">
16
+ <div class="w-full sm:w-1/2 lg:w-6/12 p-4 md:p-8">
13
17
  <div class="lg:max-w-xl">
14
- <a class="mb-8 inline-block" href="#">
15
- <img :src="footer?.logo" alt="" class="h-6" />
18
+ <a class="mb-8 inline-block" href="/">
19
+ <img
20
+ :src="footer?.logo?.src"
21
+ :alt="footer?.logo?.alt"
22
+ class="h-6"
23
+ />
16
24
  </a>
17
25
  <p
18
26
  class="mb-20 text-gray-400 font-medium leading-relaxed md:max-w-7xl"
19
27
  >
20
28
  {{ footer?.body }}
21
29
  </p>
22
- <div class="flex flex-wrap -m-1.5">
23
- <div class="w-auto p-1.5">
24
- <span
25
- v-for="(social, index) in footer?.socials"
26
- :key="index"
30
+ <div
31
+ class="flex flex-row flex-wrap gap-2 justify-center md:justify-start md:-m-1.5"
32
+ >
33
+ <div
34
+ class="w-auto"
35
+ v-for="(social, index) in footer?.socials"
36
+ :key="index"
37
+ >
38
+ <UButton
39
+ :to="social.url"
40
+ :icon="social?.icon"
41
+ :alt="social?.name"
42
+ color="gray"
43
+ square
44
+ target="_blank"
45
+ variant="ghost"
27
46
  >
28
- <a :href="social.url" target="_blank">
29
- <UIcon
30
- :name="social?.icon"
31
- class="w-5 h-5"
32
- :alt="social?.name"
33
- />
34
- </a>
35
- </span>
47
+ </UButton>
36
48
  </div>
49
+ <UColorModeButton />
37
50
  </div>
38
51
  </div>
39
52
  </div>
40
53
  <div class="w-full sm:w-1/2 lg:w-2/12 p-8"></div>
41
54
  <div
42
- class="w-full sm:w-1/2 lg:w-2/12 p-8"
55
+ class="w-full sm:w-1/2 lg:w-2/12 p-8 text-center md:text-right"
43
56
  v-for="(column, index) in footer.columns"
44
57
  :key="index"
45
58
  >
46
59
  <h3
47
60
  class="mb-8 text-sm text-gray-600 uppercase font-semibold leading-normal tracking-px"
48
61
  >
49
- {{ column?.name }}
62
+ {{ column?.headerLabel }}
50
63
  </h3>
51
64
  <ul>
52
- <li class="mb-5">
53
- <nuxt-link
54
- to="/features"
55
- class="text-white hover:text-gray-200 font-medium leading-relaxed"
56
- >Features</nuxt-link
57
- >
58
- </li>
59
- <li class="mb-5">
60
- <nuxt-link
61
- to="/who-its-for"
62
- class="text-white hover:text-gray-200 font-medium leading-relaxed"
63
- >Who It's For</nuxt-link
64
- >
65
- </li>
66
- <li class="mb-5">
67
- <nuxt-link
68
- to="/faqs"
69
- class="text-white hover:text-gray-200 font-medium leading-relaxed"
70
- >FAQs</nuxt-link
71
- >
72
- </li>
73
- <li>
65
+ <li
66
+ class="mb-5"
67
+ v-for="link in column?.links"
68
+ :key="link?.label"
69
+ >
74
70
  <nuxt-link
71
+ :to="link?.to"
75
72
  class="text-white hover:text-gray-200 font-medium leading-relaxed"
76
- >Articles</nuxt-link
73
+ >{{ link?.label }}</nuxt-link
77
74
  >
78
75
  </li>
79
76
  </ul>
@@ -0,0 +1,38 @@
1
+ <template>
2
+ <UHeader :links="links">
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
+ />
10
+ <span v-else>{{ header?.logo?.alt }}</span>
11
+ </template>
12
+
13
+ <template #right>
14
+ <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
18
+ >
19
+ </template>
20
+
21
+ <template #panel>
22
+ <UNavigationTree :links="links" />
23
+ <span v-for="(button, index) in header?.nav?.buttons" :key="index"
24
+ ><UButton
25
+ class="md:hidden mt-5 py-2 w-full flex flex-row justify-center"
26
+ :to="button?.to"
27
+ >{{ button?.label }}</UButton
28
+ ></span
29
+ >
30
+ </template>
31
+ </UHeader>
32
+ </template>
33
+
34
+ <script setup>
35
+ const appConfig = useAppConfig();
36
+ const header = appConfig?.xMarketing?.header;
37
+ const links = header?.nav?.links || [];
38
+ </script>
@@ -0,0 +1,11 @@
1
+ export function useXBlog() {
2
+ const config = useRuntimeConfig();
3
+ const endpoint = config.public.apiURL + "/general";
4
+ const get = async () => {
5
+ const general = await $fetch(endpoint);
6
+ return general;
7
+ };
8
+ return {
9
+ get,
10
+ };
11
+ }
package/nuxt.config.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  // https://nuxt.com/docs/api/configuration/nuxt-config
2
2
  export default defineNuxtConfig({
3
3
  devtools: { enabled: true },
4
+ extends: ["@nuxt/ui-pro"],
5
+ modules: ["@nuxt/ui"],
4
6
  ui: {
5
7
  icons: ["heroicons", "simple-icons"],
6
8
  },
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.3",
4
+ "version": "0.0.5",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",
@@ -11,14 +11,14 @@
11
11
  "preview": "nuxt preview .playground"
12
12
  },
13
13
  "devDependencies": {
14
- "@nuxt/ui": "^2.18.7",
15
- "@nuxt/ui-pro": "^1.4.4",
16
14
  "nuxt": "^3.13.2",
17
15
  "typescript": "^5.6.3",
18
16
  "vue": "latest"
19
17
  },
20
18
  "dependencies": {
21
19
  "@marker.io/browser": "^0.19.0",
22
- "simple-icons": "^13.15.0"
20
+ "simple-icons": "^13.15.0",
21
+ "@nuxt/ui": "^2.18.7",
22
+ "@nuxt/ui-pro": "^1.4.4"
23
23
  }
24
24
  }
@@ -0,0 +1,10 @@
1
+ <template>
2
+ <div class="max-w-screen-2xl mx-auto px-4 md:px-8">
3
+ <UPageHero
4
+ title="Blog"
5
+ description="Read the latest articles from our blog."
6
+ />
7
+ </div>
8
+ </template>
9
+ <script setup>
10
+ </script>