diff --git a/src/components/BNCategory.vue b/src/components/BNCategory.vue new file mode 100644 index 0000000..e6920c0 --- /dev/null +++ b/src/components/BNCategory.vue @@ -0,0 +1,134 @@ + + + + + + \ No newline at end of file diff --git a/src/components/ENCategory.vue b/src/components/ENCategory.vue index 9897cd9..efc6357 100644 --- a/src/components/ENCategory.vue +++ b/src/components/ENCategory.vue @@ -1,51 +1,55 @@ + + + + \ No newline at end of file diff --git a/src/components/HICategory.vue b/src/components/HICategory.vue new file mode 100644 index 0000000..d6b2ce5 --- /dev/null +++ b/src/components/HICategory.vue @@ -0,0 +1,134 @@ + + + + + + \ No newline at end of file diff --git a/src/components/ZHCategory.vue b/src/components/ZHCategory.vue new file mode 100644 index 0000000..35b0497 --- /dev/null +++ b/src/components/ZHCategory.vue @@ -0,0 +1,134 @@ + + + + + + \ No newline at end of file diff --git a/src/pages/bn/[id].astro b/src/pages/bn/[id].astro index a86960e..660a85a 100644 --- a/src/pages/bn/[id].astro +++ b/src/pages/bn/[id].astro @@ -1,97 +1,94 @@ --- -import LayoutBN from '../../layouts/LayoutBN.astro'; +import Layout from "../../layouts/Layout.astro"; export async function getStaticPaths() { - const response = await fetch('https://api7.siliconpin.com/items/barta?filter[status][_eq]=published&filter[lang][_eq]=bengali'); - const data = await response.json(); - const finalData = data.data.map((n: { slug: string | undefined; })=>{ - return {params: {id:n.slug}} - }) - return finalData; + const postData = { key1: 'value1', key2: 'value2'}; + const options = { method: 'POST', headers: { 'Content-Type': 'application/json', 'Origin': 'https://2024.dev2-cs.siliconpin.com' }, body: JSON.stringify(postData)}; + const response = await fetch('https://apisp.dev2.cicdhosting.com/_dedicated/dwd/get-news/?action=news_bn', options); + const data = await response.json(); + const finalData = data.map((n: { slug: string | undefined; })=>{ + return {params: {id:n.slug}} + }) + return finalData; } -const response = await fetch('https://api7.siliconpin.com/items/barta?filter[status][_eq]=published&filter[lang][_eq]=bengali'); +const postData = { key1: 'value1', key2: 'value2'}; +const options = { method: 'POST', headers: { 'Content-Type': 'application/json', 'Origin': 'https://2024.dev2-cs.siliconpin.com' }, body: JSON.stringify(postData)}; +const response = await fetch('https://apisp.dev2.cicdhosting.com/_dedicated/dwd/get-news/?action=news_bn', options); const data = await response.json(); const { id } = Astro.params; -const idx = data.data.findIndex((n: { slug: string | undefined; }) => n.slug ===id); -const items = data.data[idx]; -// console.log(data.data[idx]) +const idx = data.findIndex((n: { slug: string | undefined; }) => n.slug ===id); +const items = data[idx]; +// console.log(items) --- - +
-
-
-
-

{items.heading}

-

{items.title}

-
- {items.title} -
-
-
-

Share on:

- WhatsApp Logo - Facebook Logo - Twitter/X Logo - Linkdin Logo +
+
+
+

{items.heading}

+

{items.title}

+
+ {items.title}
-
-

-
-
-
-
+
+
+

Share on:

+ WhatsApp Logo + Facebook Logo + Twitter/X Logo + Linkdin Logo +
+
+

{items.content}

+ + + + - - + + function startSpeech() { + let message1 = document.getElementById('message1').innerText; + let message2 = document.getElementById('message2').innerText; + let allSpeechText = message1 + ' ' + message2; + + let speechText = new SpeechSynthesisUtterance(allSpeechText); + speechText.lang = 'bn'; // Set language to Bengali + + speechSynthesisInstance.speak(speechText); + + document.getElementById('listenButton').innerText = 'Stop'; + isListening = true; + } + + function stopSpeech() { + speechSynthesisInstance.cancel(); + document.getElementById('listenButton').innerText = 'Listen'; + isListening = false; + } + // if(window.location.reload()){ + // isListening = false; + // } + diff --git a/src/pages/bn/cat/index.astro b/src/pages/bn/cat/index.astro new file mode 100644 index 0000000..96194aa --- /dev/null +++ b/src/pages/bn/cat/index.astro @@ -0,0 +1,29 @@ +--- +import Layout from "../../../layouts/Layout.astro" +import BNCategory from "../../../components/BNCategory.vue"; +const postData = { key1: 'value1', key2: 'value2'}; +const options = { method: 'POST', headers: { 'Content-Type': 'application/json', 'Origin': 'https://2024.dev2-cs.siliconpin.com' }, body: JSON.stringify(postData)}; +const response = await fetch('https://apisp.dev2.cicdhosting.com/_dedicated/dwd/get-news/?action=news_en', options); +const data = await response.json(); +const news = data; +// console.log(news); +--- + +
+
+
+
+  >  +

+
+ +
+
+
+
+ \ No newline at end of file diff --git a/src/pages/bn/index.astro b/src/pages/bn/index.astro index 7e39d30..29c916c 100644 --- a/src/pages/bn/index.astro +++ b/src/pages/bn/index.astro @@ -1,44 +1,33 @@ --- -import LayoutBN from '../../layouts/LayoutBN.astro'; -const fetchData = await fetch('https://api7.siliconpin.com/items/barta?sort=-date_created&filter[lang][_eq]=bengali'); -const dataJSON = await fetchData.json(); -const data = dataJSON.data; -const fetchMeta = await fetch('https://api7.siliconpin.com/items/meta_data?filter[status][_eq]=published&filter[domain][_eq]=barta&filter[pages][_eq]=home_bn'); -const metaJSON = await fetchMeta.json(); -const items = metaJSON.data[0]; -// const imageData = data.image; -// const data = fetchDataJSON.data; -// console.log() +import Layout from "../../layouts/Layout.astro"; +const postData = { key1: 'value1', key2: 'value2'}; +const options = { method: 'POST', headers: { 'Content-Type': 'application/json', 'Origin': 'https://2024.dev2-cs.siliconpin.com' }, body: JSON.stringify(postData)}; +const response = await fetch('https://apisp.dev2.cicdhosting.com/_dedicated/dwd/get-news/?action=news_bn', options); +const data = await response.json(); +const news = data; +// console.log(news); --- - - -
+ +

Latest News

+
- {data.map((items: {id: string | undefined; heading: string | undefined; img: string | undefined; title : string | undefined; content : string | undefined; slug : string | undefined; date_created : string | undefined; in_brief: string | undefined;}) => + {news.map((items: {id: string | undefined; heading: string | undefined; img: string | undefined; title : string | undefined; content : string | undefined; slug : string | undefined; date_created : string | undefined; in_brief: string | undefined;}) =>
@@ -47,16 +36,16 @@ const items = metaJSON.data[0];
- {items.title} + {items.title}

{items.heading}

{items.in_brief}

- WhatsApp Logo - Facebook Logo - Twitter/X Logo - Linkdin Logo + WhatsApp Logo + Facebook Logo + Twitter/X Logo + Linkdin Logo
@@ -69,21 +58,14 @@ const items = metaJSON.data[0];
-

Publish at:
{items.date_created.split(':')[0].split('T')[0]}

Details
)} + +
- - - +
diff --git a/src/pages/bn_old/[id].astro b/src/pages/bn_old/[id].astro new file mode 100644 index 0000000..a86960e --- /dev/null +++ b/src/pages/bn_old/[id].astro @@ -0,0 +1,97 @@ +--- +import LayoutBN from '../../layouts/LayoutBN.astro'; +export async function getStaticPaths() { + const response = await fetch('https://api7.siliconpin.com/items/barta?filter[status][_eq]=published&filter[lang][_eq]=bengali'); + const data = await response.json(); + const finalData = data.data.map((n: { slug: string | undefined; })=>{ + return {params: {id:n.slug}} + }) + return finalData; +} +const response = await fetch('https://api7.siliconpin.com/items/barta?filter[status][_eq]=published&filter[lang][_eq]=bengali'); +const data = await response.json(); +const { id } = Astro.params; +const idx = data.data.findIndex((n: { slug: string | undefined; }) => n.slug ===id); +const items = data.data[idx]; +// console.log(data.data[idx]) +--- + +
+
+
+
+

{items.heading}

+

{items.title}

+
+ {items.title} +
+
+
+

Share on:

+ WhatsApp Logo + Facebook Logo + Twitter/X Logo + Linkdin Logo +
+
+

+
+
+
+
+ + + diff --git a/src/pages/bn_old/index.astro b/src/pages/bn_old/index.astro new file mode 100644 index 0000000..7e39d30 --- /dev/null +++ b/src/pages/bn_old/index.astro @@ -0,0 +1,89 @@ +--- +import LayoutBN from '../../layouts/LayoutBN.astro'; +const fetchData = await fetch('https://api7.siliconpin.com/items/barta?sort=-date_created&filter[lang][_eq]=bengali'); +const dataJSON = await fetchData.json(); +const data = dataJSON.data; +const fetchMeta = await fetch('https://api7.siliconpin.com/items/meta_data?filter[status][_eq]=published&filter[domain][_eq]=barta&filter[pages][_eq]=home_bn'); +const metaJSON = await fetchMeta.json(); +const items = metaJSON.data[0]; +// const imageData = data.image; +// const data = fetchDataJSON.data; +// console.log() +--- + + +
+
+
+ +

Latest News

+
+
+ {data.map((items: {id: string | undefined; heading: string | undefined; img: string | undefined; title : string | undefined; content : string | undefined; slug : string | undefined; date_created : string | undefined; in_brief: string | undefined;}) => +
+
+ +
+ + +
+ + {items.title} +

{items.heading}

+

{items.in_brief}

+
+
+
+ WhatsApp Logo + Facebook Logo + Twitter/X Logo + Linkdin Logo +
+
+ +
+
+
+ +
+
+
+
+ +

Publish at:
{items.date_created.split(':')[0].split('T')[0]}

+ Details +
+
+ )} + +
+
+
+
+ + diff --git a/src/pages/bn/local/[id].astro b/src/pages/bn_old/local/[id].astro similarity index 100% rename from src/pages/bn/local/[id].astro rename to src/pages/bn_old/local/[id].astro diff --git a/src/pages/bn/local/index.astro b/src/pages/bn_old/local/index.astro similarity index 100% rename from src/pages/bn/local/index.astro rename to src/pages/bn_old/local/index.astro diff --git a/src/pages/bn/national/[id].astro b/src/pages/bn_old/national/[id].astro similarity index 100% rename from src/pages/bn/national/[id].astro rename to src/pages/bn_old/national/[id].astro diff --git a/src/pages/bn/national/index.astro b/src/pages/bn_old/national/index.astro similarity index 100% rename from src/pages/bn/national/index.astro rename to src/pages/bn_old/national/index.astro diff --git a/src/pages/bn/politics/[id].astro b/src/pages/bn_old/politics/[id].astro similarity index 100% rename from src/pages/bn/politics/[id].astro rename to src/pages/bn_old/politics/[id].astro diff --git a/src/pages/bn/politics/index.astro b/src/pages/bn_old/politics/index.astro similarity index 100% rename from src/pages/bn/politics/index.astro rename to src/pages/bn_old/politics/index.astro diff --git a/src/pages/bn/technology/[id].astro b/src/pages/bn_old/technology/[id].astro similarity index 100% rename from src/pages/bn/technology/[id].astro rename to src/pages/bn_old/technology/[id].astro diff --git a/src/pages/bn/technology/index.astro b/src/pages/bn_old/technology/index.astro similarity index 100% rename from src/pages/bn/technology/index.astro rename to src/pages/bn_old/technology/index.astro diff --git a/src/pages/en/cat/index.astro b/src/pages/en/cat/index.astro index 95ee13b..5afb1d2 100644 --- a/src/pages/en/cat/index.astro +++ b/src/pages/en/cat/index.astro @@ -12,10 +12,18 @@ const news = data;
-

Page > Name

+
+  >  +

+
-
- \ No newline at end of file + + \ No newline at end of file diff --git a/src/pages/es/[id].astro b/src/pages/es/[id].astro new file mode 100644 index 0000000..2d5b754 --- /dev/null +++ b/src/pages/es/[id].astro @@ -0,0 +1,94 @@ +--- +import Layout from "../../layouts/Layout.astro"; +export async function getStaticPaths() { + const postData = { key1: 'value1', key2: 'value2'}; + const options = { method: 'POST', headers: { 'Content-Type': 'application/json', 'Origin': 'https://2024.dev2-cs.siliconpin.com' }, body: JSON.stringify(postData)}; + const response = await fetch('https://apisp.dev2.cicdhosting.com/_dedicated/dwd/get-news/?action=news_es', options); + const data = await response.json(); + const finalData = data.map((n: { slug: string | undefined; })=>{ + return {params: {id:n.slug}} + }) + return finalData; +} +const postData = { key1: 'value1', key2: 'value2'}; +const options = { method: 'POST', headers: { 'Content-Type': 'application/json', 'Origin': 'https://2024.dev2-cs.siliconpin.com' }, body: JSON.stringify(postData)}; +const response = await fetch('https://apisp.dev2.cicdhosting.com/_dedicated/dwd/get-news/?action=news_es', options); +const data = await response.json(); +const { id } = Astro.params; +const idx = data.findIndex((n: { slug: string | undefined; }) => n.slug ===id); +const items = data[idx]; +// console.log(items) +--- + +
+
+
+
+

{items.heading}

+

{items.title}

+
+ {items.title} +
+
+
+

Share on:

+ WhatsApp Logo + Facebook Logo + Twitter/X Logo + Linkdin Logo +
+
+

{items.content}

+
+
+
+
+ diff --git a/src/pages/es/cat/index.astro b/src/pages/es/cat/index.astro new file mode 100644 index 0000000..1d7e958 --- /dev/null +++ b/src/pages/es/cat/index.astro @@ -0,0 +1,29 @@ +--- +import Layout from "../../../layouts/Layout.astro" +import ESCategory from "../../../components/ESCategory.vue"; +const postData = { key1: 'value1', key2: 'value2'}; +const options = { method: 'POST', headers: { 'Content-Type': 'application/json', 'Origin': 'https://2024.dev2-cs.siliconpin.com' }, body: JSON.stringify(postData)}; +const response = await fetch('https://apisp.dev2.cicdhosting.com/_dedicated/dwd/get-news/?action=news_zh', options); +const data = await response.json(); +const news = data; +// console.log(news); +--- + +
+
+
+
+  >  +

+
+ +
+
+
+
+ \ No newline at end of file diff --git a/src/pages/es/index.astro b/src/pages/es/index.astro new file mode 100644 index 0000000..7322a9e --- /dev/null +++ b/src/pages/es/index.astro @@ -0,0 +1,71 @@ +--- +import Layout from "../../layouts/Layout.astro"; +const postData = { key1: 'value1', key2: 'value2'}; +const options = { method: 'POST', headers: { 'Content-Type': 'application/json', 'Origin': 'https://2024.dev2-cs.siliconpin.com' }, body: JSON.stringify(postData)}; +const response = await fetch('https://apisp.dev2.cicdhosting.com/_dedicated/dwd/get-news/?action=news_es', options); +const data = await response.json(); +const news = data; +// console.log(news); +--- + +
+
+
+ +

Latest News

+
+ +
+ {news.map((items: {id: string | undefined; heading: string | undefined; img: string | undefined; title : string | undefined; content : string | undefined; slug : string | undefined; date_created : string | undefined; in_brief: string | undefined;}) => +
+
+ +
+ +
+
+ + {items.title} +

{items.heading}

+

{items.in_brief}

+
+
+
+ WhatsApp Logo + Facebook Logo + Twitter/X Logo + Linkdin Logo +
+
+ +
+
+
+
+
+
+
+
+ + Details +
+
+ )} + + + +
+
+
+
diff --git a/src/pages/hi/[id].astro b/src/pages/hi/[id].astro new file mode 100644 index 0000000..4421e26 --- /dev/null +++ b/src/pages/hi/[id].astro @@ -0,0 +1,94 @@ +--- +import Layout from "../../layouts/Layout.astro"; +export async function getStaticPaths() { + const postData = { key1: 'value1', key2: 'value2'}; + const options = { method: 'POST', headers: { 'Content-Type': 'application/json', 'Origin': 'https://2024.dev2-cs.siliconpin.com' }, body: JSON.stringify(postData)}; + const response = await fetch('https://apisp.dev2.cicdhosting.com/_dedicated/dwd/get-news/?action=news_hi', options); + const data = await response.json(); + const finalData = data.map((n: { slug: string | undefined; })=>{ + return {params: {id:n.slug}} + }) + return finalData; +} +const postData = { key1: 'value1', key2: 'value2'}; +const options = { method: 'POST', headers: { 'Content-Type': 'application/json', 'Origin': 'https://2024.dev2-cs.siliconpin.com' }, body: JSON.stringify(postData)}; +const response = await fetch('https://apisp.dev2.cicdhosting.com/_dedicated/dwd/get-news/?action=news_hi', options); +const data = await response.json(); +const { id } = Astro.params; +const idx = data.findIndex((n: { slug: string | undefined; }) => n.slug ===id); +const items = data[idx]; +// console.log(items) +--- + +
+
+
+
+

{items.heading}

+

{items.title}

+
+ {items.title} +
+
+
+

Share on:

+ WhatsApp Logo + Facebook Logo + Twitter/X Logo + Linkdin Logo +
+
+

{items.content}

+
+
+
+
+ diff --git a/src/pages/hi/cat/index.astro b/src/pages/hi/cat/index.astro new file mode 100644 index 0000000..0899829 --- /dev/null +++ b/src/pages/hi/cat/index.astro @@ -0,0 +1,29 @@ +--- +import Layout from "../../../layouts/Layout.astro" +import HICategory from "../../../components/HICategory.vue"; +const postData = { key1: 'value1', key2: 'value2'}; +const options = { method: 'POST', headers: { 'Content-Type': 'application/json', 'Origin': 'https://2024.dev2-cs.siliconpin.com' }, body: JSON.stringify(postData)}; +const response = await fetch('https://apisp.dev2.cicdhosting.com/_dedicated/dwd/get-news/?action=news_hi', options); +const data = await response.json(); +const news = data; +// console.log(news); +--- + +
+
+
+
+  >  +

+
+ +
+
+
+
+ \ No newline at end of file diff --git a/src/pages/hi/index.astro b/src/pages/hi/index.astro new file mode 100644 index 0000000..92ec8eb --- /dev/null +++ b/src/pages/hi/index.astro @@ -0,0 +1,71 @@ +--- +import Layout from "../../layouts/Layout.astro"; +const postData = { key1: 'value1', key2: 'value2'}; +const options = { method: 'POST', headers: { 'Content-Type': 'application/json', 'Origin': 'https://2024.dev2-cs.siliconpin.com' }, body: JSON.stringify(postData)}; +const response = await fetch('https://apisp.dev2.cicdhosting.com/_dedicated/dwd/get-news/?action=news_hi', options); +const data = await response.json(); +const news = data; +// console.log(news); +--- + +
+
+
+ +

Latest News

+
+ +
+ {news.map((items: {id: string | undefined; heading: string | undefined; img: string | undefined; title : string | undefined; content : string | undefined; slug : string | undefined; date_created : string | undefined; in_brief: string | undefined;}) => +
+
+ +
+ +
+
+ + {items.title} +

{items.heading}

+

{items.in_brief}

+
+
+
+ WhatsApp Logo + Facebook Logo + Twitter/X Logo + Linkdin Logo +
+
+ +
+
+
+
+
+
+
+
+ + Details +
+
+ )} + + + +
+
+
+
diff --git a/src/pages/zh/[id].astro b/src/pages/zh/[id].astro new file mode 100644 index 0000000..eeafdd1 --- /dev/null +++ b/src/pages/zh/[id].astro @@ -0,0 +1,94 @@ +--- +import Layout from "../../layouts/Layout.astro"; +export async function getStaticPaths() { + const postData = { key1: 'value1', key2: 'value2'}; + const options = { method: 'POST', headers: { 'Content-Type': 'application/json', 'Origin': 'https://2024.dev2-cs.siliconpin.com' }, body: JSON.stringify(postData)}; + const response = await fetch('https://apisp.dev2.cicdhosting.com/_dedicated/dwd/get-news/?action=news_zh', options); + const data = await response.json(); + const finalData = data.map((n: { slug: string | undefined; })=>{ + return {params: {id:n.slug}} + }) + return finalData; +} +const postData = { key1: 'value1', key2: 'value2'}; +const options = { method: 'POST', headers: { 'Content-Type': 'application/json', 'Origin': 'https://2024.dev2-cs.siliconpin.com' }, body: JSON.stringify(postData)}; +const response = await fetch('https://apisp.dev2.cicdhosting.com/_dedicated/dwd/get-news/?action=news_zh', options); +const data = await response.json(); +const { id } = Astro.params; +const idx = data.findIndex((n: { slug: string | undefined; }) => n.slug ===id); +const items = data[idx]; +// console.log(items) +--- + +
+
+
+
+

{items.heading}

+

{items.title}

+
+ {items.title} +
+
+
+

Share on:

+ WhatsApp Logo + Facebook Logo + Twitter/X Logo + Linkdin Logo +
+
+

{items.content}

+
+
+
+
+ diff --git a/src/pages/zh/cat/index.astro b/src/pages/zh/cat/index.astro new file mode 100644 index 0000000..5ee9af6 --- /dev/null +++ b/src/pages/zh/cat/index.astro @@ -0,0 +1,29 @@ +--- +import Layout from "../../../layouts/Layout.astro" +import ZHCategory from "../../../components/ZHCategory.vue"; +const postData = { key1: 'value1', key2: 'value2'}; +const options = { method: 'POST', headers: { 'Content-Type': 'application/json', 'Origin': 'https://2024.dev2-cs.siliconpin.com' }, body: JSON.stringify(postData)}; +const response = await fetch('https://apisp.dev2.cicdhosting.com/_dedicated/dwd/get-news/?action=news_zh', options); +const data = await response.json(); +const news = data; +// console.log(news); +--- + +
+
+
+
+  >  +

+
+ +
+
+
+
+ \ No newline at end of file diff --git a/src/pages/zh/index.astro b/src/pages/zh/index.astro new file mode 100644 index 0000000..05f4046 --- /dev/null +++ b/src/pages/zh/index.astro @@ -0,0 +1,71 @@ +--- +import Layout from "../../layouts/Layout.astro"; +const postData = { key1: 'value1', key2: 'value2'}; +const options = { method: 'POST', headers: { 'Content-Type': 'application/json', 'Origin': 'https://2024.dev2-cs.siliconpin.com' }, body: JSON.stringify(postData)}; +const response = await fetch('https://apisp.dev2.cicdhosting.com/_dedicated/dwd/get-news/?action=news_zh', options); +const data = await response.json(); +const news = data; +// console.log(news); +--- + +
+
+
+ +

Latest News

+
+ +
+ {news.map((items: {id: string | undefined; heading: string | undefined; img: string | undefined; title : string | undefined; content : string | undefined; slug : string | undefined; date_created : string | undefined; in_brief: string | undefined;}) => +
+
+ +
+ +
+
+ + {items.title} +

{items.heading}

+

{items.in_brief}

+
+
+
+ WhatsApp Logo + Facebook Logo + Twitter/X Logo + Linkdin Logo +
+
+ +
+
+
+
+
+
+
+
+ + Details +
+
+ )} + + + +
+
+
+