@xenterprises/nuxt-x-marketing 0.0.19 → 0.0.21

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.
@@ -1,5 +1,5 @@
1
1
  export default defineNuxtConfig({
2
- extends: [["..", { install: true }]],
2
+ extends: ['..'],
3
3
 
4
4
  compatibilityDate: "2024-10-23",
5
5
  });
@@ -1,5 +1,4 @@
1
1
  <template>
2
- <div></div>
2
+ <div></div>
3
3
  </template>
4
- <script setup>
5
- </script>
4
+ <script setup></script>
package/app/app.vue ADDED
@@ -0,0 +1,33 @@
1
+ <template>
2
+ <main class="min-h-screen flex flex-col justify-between">
3
+ <XHeaderNav />
4
+ <section class="flex-grow">
5
+ <NuxtLoadingIndicator />
6
+ <UApp>
7
+ <NuxtLayout>
8
+ <NuxtPage />
9
+ </NuxtLayout>
10
+ </UApp>
11
+ </section>
12
+ <section>
13
+ <XFooter />
14
+ <XFooterXLegal />
15
+ </section>
16
+ </main>
17
+ </template>
18
+ <script setup>
19
+ import { ref, onMounted } from "vue";
20
+ import markerSDK from "@marker.io/browser";
21
+
22
+ const appConfig = useAppConfig();
23
+ useSeoMeta({
24
+ titleTemplate: `%s`,
25
+ });
26
+ if (appConfig && appConfig?.xMarketing?.config?.markerProjectId) {
27
+ onMounted(() => {
28
+ const widget = markerSDK.loadWidget({
29
+ project: appConfig?.xMarketing?.config?.markerProjectId,
30
+ });
31
+ });
32
+ }
33
+ </script>
@@ -0,0 +1,2 @@
1
+ @import "tailwindcss";
2
+ @import "@nuxt/ui";
@@ -0,0 +1,64 @@
1
+ <template>
2
+ <div class="pb-8 max-w-screen-2xl px-8 mx-auto">
3
+ <UPageHero :title="blog?.title" :description="blog?.description" />
4
+
5
+ <UPageBody>
6
+ <UBlogPosts>
7
+ <UBlogPost
8
+ v-for="(post, index) in blogPosts?.results"
9
+ :key="index"
10
+ :to="`/blog/${post?.data?.slug}`"
11
+ :title="post?.name"
12
+ :description="post?.data?.summary"
13
+ :image="{ src: post?.data?.thumbnail, alt: post?.name }"
14
+ :orientation="index === 0 ? 'horizontal' : 'vertical'"
15
+ :class="[index === 0 && 'col-span-full']"
16
+ :ui="{
17
+ description: 'line-clamp-3',
18
+ }"
19
+ >
20
+ <div class="mt-4">
21
+ <UButton
22
+ :to="`/blog/${post?.data?.slug}`"
23
+ variant="outline"
24
+ color="gray"
25
+ label="Read More"
26
+ />
27
+ </div>
28
+ </UBlogPost>
29
+ </UBlogPosts>
30
+ </UPageBody>
31
+ </div>
32
+ </template>
33
+
34
+ <script setup>
35
+ const appConfig = useAppConfig()?.xMarketing;
36
+ const blog = appConfig?.blog;
37
+ const route = useRoute();
38
+ const config = useRuntimeConfig();
39
+
40
+ const blogPosts = await $fetch("https://cdn.builder.io/api/v3/content/posts", {
41
+ query: {
42
+ apiKey: config?.public?.BUILDERIO_KEY,
43
+ offset: 0,
44
+ fields: "id,name,data.slug,data.summary,data.thumbnail",
45
+ },
46
+ });
47
+ const title = blog?.meta?.title;
48
+ const description = blog?.meta?.description;
49
+ useSeoMeta({
50
+ title,
51
+ ogTitle: title,
52
+ description,
53
+ ogDescription: description,
54
+ });
55
+
56
+ // useHead({
57
+ // link: [
58
+ // {
59
+ // rel: "canonical",
60
+ // href: appConfig?.url + "/blog",
61
+ // },
62
+ // ],
63
+ // });
64
+ </script>
package/nuxt.config.ts CHANGED
@@ -1,4 +1,7 @@
1
1
  // https://nuxt.com/docs/api/configuration/nuxt-config
2
+ import tailwindcss from "@tailwindcss/vite";
3
+ import { fileURLToPath } from 'url';
4
+ import { dirname, resolve } from 'path';
2
5
  export default defineNuxtConfig({
3
6
  compatibilityDate: "2024-04-03",
4
7
  ssr: true,
@@ -8,9 +11,12 @@ export default defineNuxtConfig({
8
11
  BUILDERIO_KEY: "",
9
12
  },
10
13
  },
11
- extends: ["@nuxt/ui-pro"],
12
14
  modules: ["@nuxt/ui", "@nuxtjs/seo", "@nuxt/image"],
15
+ css: [resolve(__dirname, 'app/assets/css/main.css')],
13
16
  ui: {
14
17
  icons: ["heroicons", "simple-icons"],
15
18
  },
19
+ vite: {
20
+ plugins: [tailwindcss()],
21
+ },
16
22
  });
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.19",
4
+ "version": "0.0.21",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",
@@ -11,17 +11,18 @@
11
11
  "preview": "nuxt preview .playground"
12
12
  },
13
13
  "devDependencies": {
14
- "nuxt": "^3.13.2",
14
+ "nuxt": "^4.2.1",
15
15
  "typescript": "^5.6.3",
16
16
  "vue": "latest"
17
17
  },
18
18
  "dependencies": {
19
19
  "@marker.io/browser": "^0.19.0",
20
- "@nuxt/image": "^1.8.1",
21
- "@nuxt/ui": "^2.18.7",
22
- "@nuxt/ui-pro": "^1.4.4",
23
- "@nuxtjs/seo": "^2.0.0-rc.23",
20
+ "@nuxt/image": "^2.0.0",
21
+ "@nuxt/ui": "^4.0.0",
22
+ "@nuxtjs/seo": "^3.2.2",
23
+ "@tailwindcss/vite": "^4.1.17",
24
24
  "simple-icons": "^13.15.0",
25
+ "tailwindcss": "^4.1.17",
25
26
  "zod": "^3.23.8"
26
27
  }
27
- }
28
+ }
package/app.vue DELETED
@@ -1,33 +0,0 @@
1
- <template>
2
- <main class="min-h-screen flex flex-col justify-between">
3
- <XHeaderNav />
4
- <section class="flex-grow">
5
- <NuxtLoadingIndicator />
6
- <NuxtLayout>
7
- <NuxtPage />
8
- </NuxtLayout>
9
- <UNotifications />
10
- <UModals />
11
- </section>
12
- <section>
13
- <XFooter />
14
- <XFooterXLegal />
15
- </section>
16
- </main>
17
- </template>
18
- <script setup>
19
- import { ref, onMounted } from "vue";
20
- import markerSDK from "@marker.io/browser";
21
-
22
- const appConfig = useAppConfig();
23
- useSeoMeta({
24
- titleTemplate: `%s`,
25
- });
26
- if (appConfig && appConfig?.xMarketing?.config?.markerProjectId) {
27
- onMounted(() => {
28
- const widget = markerSDK.loadWidget({
29
- project: appConfig?.xMarketing?.config?.markerProjectId,
30
- });
31
- });
32
- }
33
- </script>
@@ -1,64 +0,0 @@
1
- <template>
2
- <div class="pb-8 max-w-screen-2xl px-8 mx-auto">
3
- <UPageHero :title="blog?.title" :description="blog?.description" />
4
-
5
- <UPageBody>
6
- <UBlogList>
7
- <UBlogPost
8
- v-for="(post, index) in blogPosts?.results"
9
- :key="index"
10
- :to="`/blog/${post?.data?.slug}`"
11
- :title="post?.name"
12
- :description="post?.data?.summary"
13
- :image="{ src: post?.data?.thumbnail, alt: post?.name }"
14
- :orientation="index === 0 ? 'horizontal' : 'vertical'"
15
- :class="[index === 0 && 'col-span-full']"
16
- :ui="{
17
- description: 'line-clamp-3',
18
- }"
19
- >
20
- <div class="mt-4">
21
- <UButton
22
- :to="`/blog/${post?.data?.slug}`"
23
- variant="outline"
24
- color="gray"
25
- label="Read More"
26
- />
27
- </div>
28
- </UBlogPost>
29
- </UBlogList>
30
- </UPageBody>
31
- </div>
32
- </template>
33
-
34
- <script setup>
35
- const appConfig = useAppConfig()?.xMarketing;
36
- const blog = appConfig?.blog;
37
- const route = useRoute();
38
- const config = useRuntimeConfig();
39
-
40
- const blogPosts = await $fetch("https://cdn.builder.io/api/v3/content/posts", {
41
- query: {
42
- apiKey: config?.public?.BUILDERIO_KEY,
43
- offset: 0,
44
- fields: "id,name,data.slug,data.summary,data.thumbnail",
45
- },
46
- });
47
- const title = blog?.meta?.title;
48
- const description = blog?.meta?.description;
49
- useSeoMeta({
50
- title,
51
- ogTitle: title,
52
- description,
53
- ogDescription: description,
54
- });
55
-
56
- // useHead({
57
- // link: [
58
- // {
59
- // rel: "canonical",
60
- // href: appConfig?.url + "/blog",
61
- // },
62
- // ],
63
- // });
64
- </script>
File without changes
File without changes
File without changes