@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.
- 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 +64 -0
- package/nuxt.config.ts +7 -1
- package/package.json +8 -7
- package/app.vue +0 -33
- package/pages/blog/index.vue +0 -64
- /package/{app.config.ts → app/app.config.ts} +0 -0
- /package/{components → app/components}/X/Footer/XLegal/index.vue +0 -0
- /package/{components → app/components}/X/Footer/index.vue +0 -0
- /package/{components → app/components}/X/Header/Nav/index.vue +0 -0
- /package/{components → app/components}/X/Marketing/Sections/EmailSubscription/index.vue +0 -0
- /package/{composables → app/composables}/useXBlog.ts +0 -0
- /package/{pages → app/pages}/blog/[...slug].vue +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>
|
|
@@ -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.
|
|
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": "^
|
|
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": "^
|
|
21
|
-
"@nuxt/ui": "^
|
|
22
|
-
"@
|
|
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>
|
package/pages/blog/index.vue
DELETED
|
@@ -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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|