From 3011bdcbb61c8643deeef0602524032059f46627 Mon Sep 17 00:00:00 2001 From: bazamel Date: Wed, 8 Jul 2026 19:51:53 +0700 Subject: [PATCH] added video testimonial + customer story component / content --- app/components/VideoCustomerStory.vue | 131 +++++++++++++++++++++++ app/components/VideoTestimonial.vue | 131 +++++++++++++++++++++++ app/composables/useVideoCustomerStory.js | 14 +++ app/composables/useVideoTestimonial.js | 14 +++ app/pages/index.vue | 4 + content.config.ts | 4 +- content/en_pages.json | 42 +++++++- 7 files changed, 338 insertions(+), 2 deletions(-) create mode 100644 app/components/VideoCustomerStory.vue create mode 100644 app/components/VideoTestimonial.vue create mode 100644 app/composables/useVideoCustomerStory.js create mode 100644 app/composables/useVideoTestimonial.js diff --git a/app/components/VideoCustomerStory.vue b/app/components/VideoCustomerStory.vue new file mode 100644 index 00000000..b5d08836 --- /dev/null +++ b/app/components/VideoCustomerStory.vue @@ -0,0 +1,131 @@ + + + + + \ No newline at end of file diff --git a/app/components/VideoTestimonial.vue b/app/components/VideoTestimonial.vue new file mode 100644 index 00000000..f037270f --- /dev/null +++ b/app/components/VideoTestimonial.vue @@ -0,0 +1,131 @@ + + + + + \ No newline at end of file diff --git a/app/composables/useVideoCustomerStory.js b/app/composables/useVideoCustomerStory.js new file mode 100644 index 00000000..5bd58556 --- /dev/null +++ b/app/composables/useVideoCustomerStory.js @@ -0,0 +1,14 @@ +export function useVideoCustomerStory(slug, locale) { + async function queryVideoCustomerStory() { + let res = await queryCollection('jsonPages') + .where('lang', '=', locale.value) + .where('pageType', '=', 'video_testimonials') + .all() + + res = res.filter(t => t.stem.split('/')[2] == slug.value) + + return res[0] + } + + return { queryVideoCustomerStory } +} diff --git a/app/composables/useVideoTestimonial.js b/app/composables/useVideoTestimonial.js new file mode 100644 index 00000000..68dd8536 --- /dev/null +++ b/app/composables/useVideoTestimonial.js @@ -0,0 +1,14 @@ +export function useVideoTestimonial(slug, locale) { + async function queryVideoTestimonial() { + let res = await queryCollection('jsonPages') + .where('lang', '=', locale.value) + .where('pageType', '=', 'video_testimonials') + .all() + + res = res.filter(t => t.stem.split('/')[2] == slug.value) + + return res[0] + } + + return { queryVideoTestimonial } +} diff --git a/app/pages/index.vue b/app/pages/index.vue index 22f91ddb..54e468b4 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -32,6 +32,8 @@ + +