@xenterprises/nuxt-x-marketing 0.0.20 → 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.
- package/.playground/nuxt.config.ts +1 -1
- package/.playground/pages/index.vue +2 -3
- package/app/app.vue +33 -0
- package/app/assets/css/main.css +2 -0
- package/app/pages/blog/index.vue +38 -38
- package/nuxt.config.ts +7 -1
- package/package.json +4 -3
- package/app.vue +0 -33
- /package/{app.config.ts → app/app.config.ts} +0 -0
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>
|
package/app/pages/blog/index.vue
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
<div class="pb-8 max-w-screen-2xl px-8 mx-auto">
|
|
3
|
+
<UPageHero :title="blog?.title" :description="blog?.description" />
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
32
|
</template>
|
|
33
33
|
|
|
34
34
|
<script setup>
|
|
@@ -38,19 +38,19 @@ const route = useRoute();
|
|
|
38
38
|
const config = useRuntimeConfig();
|
|
39
39
|
|
|
40
40
|
const blogPosts = await $fetch("https://cdn.builder.io/api/v3/content/posts", {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
query: {
|
|
42
|
+
apiKey: config?.public?.BUILDERIO_KEY,
|
|
43
|
+
offset: 0,
|
|
44
|
+
fields: "id,name,data.slug,data.summary,data.thumbnail",
|
|
45
|
+
},
|
|
46
46
|
});
|
|
47
47
|
const title = blog?.meta?.title;
|
|
48
48
|
const description = blog?.meta?.description;
|
|
49
49
|
useSeoMeta({
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
title,
|
|
51
|
+
ogTitle: title,
|
|
52
|
+
description,
|
|
53
|
+
ogDescription: description,
|
|
54
54
|
});
|
|
55
55
|
|
|
56
56
|
// useHead({
|
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.
|
|
4
|
+
"version": "0.0.21",
|
|
5
5
|
"main": "./nuxt.config.ts",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "nuxi dev .playground",
|
|
@@ -18,10 +18,11 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@marker.io/browser": "^0.19.0",
|
|
20
20
|
"@nuxt/image": "^2.0.0",
|
|
21
|
-
"@nuxt/ui": "^
|
|
22
|
-
"@nuxt/ui-pro": "^1.4.4",
|
|
21
|
+
"@nuxt/ui": "^4.0.0",
|
|
23
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>
|
|
File without changes
|