-
-
-
-
+
+
+
+
\ 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}
-
-

-
-
-
-
Share on:
-

-

-

-

+
+
+
+
{items.heading}
+
{items.title}
+
+
-
-
-
-
-
-
+
+
{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];