From dfaefc1ef2c6b6425205f6d548779c12819e3e54 Mon Sep 17 00:00:00 2001 From: Suvodip Ghosh Date: Sat, 18 Feb 2023 20:07:08 +0530 Subject: [PATCH] occasion --- src/components/Homepage.vue | 28 ++-- src/pages/occasion/index.astro | 287 +++++++++++++++++++++++++++++++-- 2 files changed, 288 insertions(+), 27 deletions(-) diff --git a/src/components/Homepage.vue b/src/components/Homepage.vue index 5d77048..68df6b6 100644 --- a/src/components/Homepage.vue +++ b/src/components/Homepage.vue @@ -244,22 +244,22 @@ -
-
-
-

Frequently Asked Questions

-
-
- -
  {{ faqHome.title }}
-
-
-
+
+
+
+

Frequently Asked Questions

+
+
+ +
  {{ faqHome.title }}
+
+
+
+
+
-
-
-
+
diff --git a/src/pages/occasion/index.astro b/src/pages/occasion/index.astro index 50e5c60..0e7da78 100644 --- a/src/pages/occasion/index.astro +++ b/src/pages/occasion/index.astro @@ -8,15 +8,33 @@ const occassion = data.data; const thisOccasionID = data.data[0].id; +const blogResp = await fetch('https://curriculum-app-api.beanstalkedu.com/items/blog?filter[category][_eq]=occassions&filter[property][_eq]=teenybeans_curriculum'); +const blogRespJson = await blogResp.json(); +const blogRespData = blogRespJson.data.reverse().slice(0, 4); + const csResp = await fetch('https://curriculum-app-api.beanstalkedu.com/items/occassion_celebration_stories?filter[occassion_key][_in]=' + thisOccasionID); const csRespJson = await csResp.json(); const csRespData = csRespJson.data.reverse().slice(0, 4); +const wkstResp = await fetch('https://curriculum-app-api.beanstalkedu.com/items/occassion_worksheets?filter[occassion_key][_in]=' + thisOccasionID); +const wkstRespJson = await wkstResp.json(); +const wkstRespData = wkstRespJson.data.reverse().slice(0, 3); +const wkstRespData2 = wkstRespJson.data[3]; + +const ytResp = await fetch('https://curriculum-app-api.beanstalkedu.com/items/occassion_youtube_videos?filter[occassion_key][_in]=' + thisOccasionID); +const ytRespJson = await ytResp.json(); +const ytRespData = ytRespJson.data; + +const faqResp = await fetch('https://curriculum-app-api.beanstalkedu.com/items/FAQ?filter[slug][_eq]=occassion'); +const faqRespJson = await faqResp.json(); +const faqRespData = faqRespJson.data; + import Footer from "../../components/Footer.vue"; --- - +
+
@@ -31,28 +49,271 @@ import Footer from "../../components/Footer.vue";
- +
+

Check Out Our Occasion Blog

+

Find relevant helpful articles for marketing preschool solutions below and get to know more about the same.

+
+
+ {blogRespData.map((data) => + +
{ data.date}
+

{ data.title}

+
+ Read More + )} + +
+
+ +
+ +
+
+
+ +
+
Worksheets
+

{occassion[0].worksheets_text}

+ +
+

Celebretion stories

{occassion[0].celebretion_stories_text}

-
+
{csRespData.map((data) => - -
+
{data.title}
-

{data.text}

+

{data.text}


Read Full Storry >>
- )} - + )}
- - -

{thisOccasionID}

+
+
YouTube Videos for your reference
+

{occassion[0].youtube_text}

+
+ {ytRespData.map((data) => + + )} +
+
+
+
+
+

Frequently Asked Questions

+ {faqRespData.map((data) => +
+ +
{data.title}
+
+
+
+ )} +
+
+ +
+
+
+