Compare commits
61 Commits
51db48cf2b
...
b7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d6e51ff9d | ||
|
|
2a3c99ace9 | ||
|
|
12c6a9584c | ||
|
|
10e2829ced | ||
|
|
90a2fe8d9b | ||
|
|
136ceab9b6 | ||
|
|
c06befa343 | ||
|
|
00a1640ff5 | ||
|
|
abb1200c95 | ||
|
|
74973dfc1e | ||
|
|
ae8f0c0b77 | ||
|
|
5d2a3f552e | ||
|
|
d920cba449 | ||
|
|
629a1fba25 | ||
|
|
f2fe34c82c | ||
|
|
7593e3b823 | ||
|
|
f378065344 | ||
|
|
e59a1168ce | ||
|
|
80e8bc4f91 | ||
|
|
aeb9362f6d | ||
| c75595b741 | |||
|
|
78d9081f87 | ||
|
|
d4043d1678 | ||
|
|
e90b7329c4 | ||
|
|
4982a72f0c | ||
|
|
ee0bc8482a | ||
|
|
318e7f4c48 | ||
|
|
443422300d | ||
|
|
37155aa643 | ||
|
|
9191fb5642 | ||
|
|
5d5c73b65b | ||
|
|
f808d907b0 | ||
|
|
289a30d3ee | ||
|
|
e72c19dc49 | ||
|
|
012c01469f | ||
|
|
47717e7300 | ||
|
|
edb7796bcf | ||
| 8fd1f94629 | |||
|
|
3d1a486912 | ||
|
|
733c398be0 | ||
| 4a528ac9f4 | |||
| a9fe87c827 | |||
|
|
cc10b266be | ||
|
|
7d95d64f9e | ||
|
|
8d6bedad24 | ||
|
|
5af60161c5 | ||
|
|
98e7021d7c | ||
|
|
b99917c87f | ||
| 9a8ad821e6 | |||
| 80bf4918c0 | |||
|
|
d3d14ac03a | ||
| 7c7dab3638 | |||
|
|
90949cfa69 | ||
|
|
23338f28b4 | ||
| d6b5b00ca8 | |||
|
|
634f248962 | ||
| e4daf09489 | |||
|
|
bf1083dc11 | ||
|
|
9defecb6fa | ||
|
|
b918651d5f | ||
|
|
49c020553f |
2
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
||||
@@ -15,7 +15,7 @@ Inside of your Astro project, you'll see the following folders and files:
|
||||
```
|
||||
/
|
||||
├── public/
|
||||
│ └── favicon.svg
|
||||
│ └── favicon.ico
|
||||
├── src/
|
||||
│ ├── components/
|
||||
│ │ └── Card.astro
|
||||
|
||||
@@ -4,15 +4,18 @@
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "astro dev --host --port 2008",
|
||||
"start": "astro dev --host --port 2008",
|
||||
"dev": "astro dev --host --port 2024",
|
||||
"start": "astro dev --host --port 2024",
|
||||
"build": "astro build",
|
||||
"preview": "astro preview",
|
||||
"push": "rsync -azP dist/ barta-india@51.222.206.100:/home/barta-india/public_html",
|
||||
"astro": "astro"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/tailwind": "^2.1.3",
|
||||
"@astrojs/vue": "^1.2.2",
|
||||
"@bytescale/upload-widget-vue": "^4.13.0",
|
||||
"@upload-io/vue-uploader": "^3.37.1",
|
||||
"astro": "^1.7.2",
|
||||
"astro-eslint-parser": "^0.14.0",
|
||||
"eslint": "^8.44.0",
|
||||
|
||||
4
public/.htaccess
Normal file
@@ -0,0 +1,4 @@
|
||||
RewriteEngine On
|
||||
RewriteBase /
|
||||
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
|
||||
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
|
||||
1
public/ads.txt
Normal file
@@ -0,0 +1 @@
|
||||
google.com, pub-9252259454702469, DIRECT, f08c47fec0942fa0
|
||||
BIN
public/favicon.ico
Normal file
|
After Width: | Height: | Size: 142 KiB |
@@ -1,13 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 36 36">
|
||||
<path fill="#000" d="M22.25 4h-8.5a1 1 0 0 0-.96.73l-5.54 19.4a.5.5 0 0 0 .62.62l5.05-1.44a2 2 0 0 0 1.38-1.4l3.22-11.66a.5.5 0 0 1 .96 0l3.22 11.67a2 2 0 0 0 1.38 1.39l5.05 1.44a.5.5 0 0 0 .62-.62l-5.54-19.4a1 1 0 0 0-.96-.73Z"/>
|
||||
<path fill="url(#gradient)" d="M18 28a7.63 7.63 0 0 1-5-2c-1.4 2.1-.35 4.35.6 5.55.14.17.41.07.47-.15.44-1.8 2.93-1.22 2.93.6 0 2.28.87 3.4 1.72 3.81.34.16.59-.2.49-.56-.31-1.05-.29-2.46 1.29-3.25 3-1.5 3.17-4.83 2.5-6-.67.67-2.6 2-5 2Z"/>
|
||||
<defs>
|
||||
<linearGradient id="gradient" x1="16" x2="16" y1="32" y2="24" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#000"/>
|
||||
<stop offset="1" stop-color="#000" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<style>
|
||||
@media (prefers-color-scheme:dark){:root{filter:invert(100%)}}
|
||||
</style>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 873 B |
BIN
public/img/barta_logo.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
1
public/img/camera.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg width="70px" height="70px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path opacity="0.5" fill-rule="evenodd" clip-rule="evenodd" d="M9.77778 21H14.2222C17.3433 21 18.9038 21 20.0248 20.2646C20.51 19.9462 20.9267 19.5371 21.251 19.0607C22 17.9601 22 16.4279 22 13.3636C22 10.2994 22 8.76721 21.251 7.6666C20.9267 7.19014 20.51 6.78104 20.0248 6.46268C19.3044 5.99013 18.4027 5.82123 17.022 5.76086C16.3631 5.76086 15.7959 5.27068 15.6667 4.63636C15.4728 3.68489 14.6219 3 13.6337 3H10.3663C9.37805 3 8.52715 3.68489 8.33333 4.63636C8.20412 5.27068 7.63685 5.76086 6.978 5.76086C5.59733 5.82123 4.69555 5.99013 3.97524 6.46268C3.48995 6.78104 3.07328 7.19014 2.74902 7.6666C2 8.76721 2 10.2994 2 13.3636C2 16.4279 2 17.9601 2.74902 19.0607C3.07328 19.5371 3.48995 19.9462 3.97524 20.2646C5.09624 21 6.65675 21 9.77778 21ZM16 13C16 15.2091 14.2091 17 12 17C9.79086 17 8 15.2091 8 13C8 10.7909 9.79086 9 12 9C14.2091 9 16 10.7909 16 13ZM18 9.25C17.5858 9.25 17.25 9.58579 17.25 10C17.25 10.4142 17.5858 10.75 18 10.75H19C19.4142 10.75 19.75 10.4142 19.75 10C19.75 9.58579 19.4142 9.25 19 9.25H18Z" fill="#780a0a"></path> <path fill-rule="evenodd" clip-rule="evenodd" d="M16 13C16 15.2091 14.2091 17 12 17C9.79086 17 8 15.2091 8 13C8 10.7909 9.79086 9 12 9C14.2091 9 16 10.7909 16 13ZM12.75 11C12.75 10.5858 12.4142 10.25 12 10.25C11.5858 10.25 11.25 10.5858 11.25 11V12.25H10C9.58579 12.25 9.25 12.5858 9.25 13C9.25 13.4142 9.58579 13.75 10 13.75H11.25V15C11.25 15.4142 11.5858 15.75 12 15.75C12.4142 15.75 12.75 15.4142 12.75 15V13.75H14C14.4142 13.75 14.75 13.4142 14.75 13C14.75 12.5858 14.4142 12.25 14 12.25H12.75V11Z" fill="#780a0a"></path> <path d="M18 9.25C17.5858 9.25 17.25 9.58579 17.25 10C17.25 10.4142 17.5858 10.75 18 10.75H19C19.4142 10.75 19.75 10.4142 19.75 10C19.75 9.58579 19.4142 9.25 19 9.25H18Z" fill="#780a0a"></path> </g></svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
BIN
public/img/clear_sky.webp
Normal file
|
After Width: | Height: | Size: 15 KiB |
1
public/img/facebook.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg width="40px" height="40px" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <circle cx="16" cy="16" r="14" fill="url(#paint0_linear_87_7208)"></circle> <path d="M21.2137 20.2816L21.8356 16.3301H17.9452V13.767C17.9452 12.6857 18.4877 11.6311 20.2302 11.6311H22V8.26699C22 8.26699 20.3945 8 18.8603 8C15.6548 8 13.5617 9.89294 13.5617 13.3184V16.3301H10V20.2816H13.5617V29.8345C14.2767 29.944 15.0082 30 15.7534 30C16.4986 30 17.2302 29.944 17.9452 29.8345V20.2816H21.2137Z" fill="white"></path> <defs> <linearGradient id="paint0_linear_87_7208" x1="16" y1="2" x2="16" y2="29.917" gradientUnits="userSpaceOnUse"> <stop stop-color="#18ACFE"></stop> <stop offset="1" stop-color="#0163E0"></stop> </linearGradient> </defs> </g></svg>
|
||||
|
After Width: | Height: | Size: 908 B |
1
public/img/link.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg width="45px" height="45px" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <rect x="2" y="2" width="28" height="28" rx="14" fill="#1275B1"></rect> <path d="M12.6186 9.69215C12.6186 10.6267 11.8085 11.3843 10.8093 11.3843C9.81004 11.3843 9 10.6267 9 9.69215C9 8.7576 9.81004 8 10.8093 8C11.8085 8 12.6186 8.7576 12.6186 9.69215Z" fill="white"></path> <path d="M9.24742 12.6281H12.3402V22H9.24742V12.6281Z" fill="white"></path> <path d="M17.3196 12.6281H14.2268V22H17.3196C17.3196 22 17.3196 19.0496 17.3196 17.2049C17.3196 16.0976 17.6977 14.9855 19.2062 14.9855C20.911 14.9855 20.9008 16.4345 20.8928 17.5571C20.8824 19.0244 20.9072 20.5219 20.9072 22H24V17.0537C23.9738 13.8954 23.1508 12.4401 20.4433 12.4401C18.8354 12.4401 17.8387 13.1701 17.3196 13.8305V12.6281Z" fill="white"></path> </g></svg>
|
||||
|
After Width: | Height: | Size: 981 B |
1
public/img/whatsapp.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg width="50px" height="50px" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path fill-rule="evenodd" clip-rule="evenodd" d="M16 31C23.732 31 30 24.732 30 17C30 9.26801 23.732 3 16 3C8.26801 3 2 9.26801 2 17C2 19.5109 2.661 21.8674 3.81847 23.905L2 31L9.31486 29.3038C11.3014 30.3854 13.5789 31 16 31ZM16 28.8462C22.5425 28.8462 27.8462 23.5425 27.8462 17C27.8462 10.4576 22.5425 5.15385 16 5.15385C9.45755 5.15385 4.15385 10.4576 4.15385 17C4.15385 19.5261 4.9445 21.8675 6.29184 23.7902L5.23077 27.7692L9.27993 26.7569C11.1894 28.0746 13.5046 28.8462 16 28.8462Z" fill="#BFC8D0"></path> <path d="M28 16C28 22.6274 22.6274 28 16 28C13.4722 28 11.1269 27.2184 9.19266 25.8837L5.09091 26.9091L6.16576 22.8784C4.80092 20.9307 4 18.5589 4 16C4 9.37258 9.37258 4 16 4C22.6274 4 28 9.37258 28 16Z" fill="url(#paint0_linear_87_7264)"></path> <path fill-rule="evenodd" clip-rule="evenodd" d="M16 30C23.732 30 30 23.732 30 16C30 8.26801 23.732 2 16 2C8.26801 2 2 8.26801 2 16C2 18.5109 2.661 20.8674 3.81847 22.905L2 30L9.31486 28.3038C11.3014 29.3854 13.5789 30 16 30ZM16 27.8462C22.5425 27.8462 27.8462 22.5425 27.8462 16C27.8462 9.45755 22.5425 4.15385 16 4.15385C9.45755 4.15385 4.15385 9.45755 4.15385 16C4.15385 18.5261 4.9445 20.8675 6.29184 22.7902L5.23077 26.7692L9.27993 25.7569C11.1894 27.0746 13.5046 27.8462 16 27.8462Z" fill="white"></path> <path d="M12.5 9.49989C12.1672 8.83131 11.6565 8.8905 11.1407 8.8905C10.2188 8.8905 8.78125 9.99478 8.78125 12.05C8.78125 13.7343 9.52345 15.578 12.0244 18.3361C14.438 20.9979 17.6094 22.3748 20.2422 22.3279C22.875 22.2811 23.4167 20.0154 23.4167 19.2503C23.4167 18.9112 23.2062 18.742 23.0613 18.696C22.1641 18.2654 20.5093 17.4631 20.1328 17.3124C19.7563 17.1617 19.5597 17.3656 19.4375 17.4765C19.0961 17.8018 18.4193 18.7608 18.1875 18.9765C17.9558 19.1922 17.6103 19.083 17.4665 19.0015C16.9374 18.7892 15.5029 18.1511 14.3595 17.0426C12.9453 15.6718 12.8623 15.2001 12.5959 14.7803C12.3828 14.4444 12.5392 14.2384 12.6172 14.1483C12.9219 13.7968 13.3426 13.254 13.5313 12.9843C13.7199 12.7145 13.5702 12.305 13.4803 12.05C13.0938 10.953 12.7663 10.0347 12.5 9.49989Z" fill="white"></path> <defs> <linearGradient id="paint0_linear_87_7264" x1="26.5" y1="7" x2="4" y2="28" gradientUnits="userSpaceOnUse"> <stop stop-color="#5BD066"></stop> <stop offset="1" stop-color="#27B43E"></stop> </linearGradient> </defs> </g></svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
1
public/img/x.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" stroke="#000000" fill="#000000" viewBox="0 0 50 50" width="43px" height="43px"><path d="M 11 4 C 7.1456661 4 4 7.1456661 4 11 L 4 39 C 4 42.854334 7.1456661 46 11 46 L 39 46 C 42.854334 46 46 42.854334 46 39 L 46 11 C 46 7.1456661 42.854334 4 39 4 L 11 4 z M 11 6 L 39 6 C 41.773666 6 44 8.2263339 44 11 L 44 39 C 44 41.773666 41.773666 44 39 44 L 11 44 C 8.2263339 44 6 41.773666 6 39 L 6 11 C 6 8.2263339 8.2263339 6 11 6 z M 13.085938 13 L 22.308594 26.103516 L 13 37 L 15.5 37 L 23.4375 27.707031 L 29.976562 37 L 37.914062 37 L 27.789062 22.613281 L 36 13 L 33.5 13 L 26.660156 21.009766 L 21.023438 13 L 13.085938 13 z M 16.914062 15 L 19.978516 15 L 34.085938 35 L 31.021484 35 L 16.914062 15 z"/></svg>
|
||||
|
After Width: | Height: | Size: 751 B |
70
public/js/js-0.1.0.js
Normal file
@@ -0,0 +1,70 @@
|
||||
function getCookie(cname) {
|
||||
let name = cname + "=";
|
||||
let ca = document.cookie.split(';');
|
||||
for (let i = 0; i < ca.length; i++) {
|
||||
let c = ca[i];
|
||||
while (c.charAt(0) == ' ') {
|
||||
c = c.substring(1);
|
||||
}
|
||||
if (c.indexOf(name) == 0) {
|
||||
const cookieValue = c.substring(name.length, c.length);
|
||||
// console.log(`Cookie ${cname} found with value: ${cookieValue}`);
|
||||
return cookieValue;
|
||||
}
|
||||
}
|
||||
// console.log(`Cookie ${cname} not found`);
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
function makeProtectedRequest(apiUrl, renewUrl, access_token, formData) {
|
||||
|
||||
return fetch(apiUrl, {
|
||||
method: 'POST',
|
||||
// mode: "cors",
|
||||
headers: {
|
||||
// 'Authorization': `Bearer ${accessToken}`,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
// credentials: 'same-origin',
|
||||
body: JSON.stringify(formData),
|
||||
})
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error('Request failed');
|
||||
} else if(response.status === 204) {
|
||||
// Token is expired or invalid, trigger refresh
|
||||
// console.log(access_token)
|
||||
return renewToken(renewUrl, access_token).then(access_token_new => {
|
||||
// Retry the original request with the new token
|
||||
// console.log("formData :" +access_token_new)
|
||||
formData.access_token=access_token_new;
|
||||
return fetch(apiUrl, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
// 'Authorization': `Bearer ${newAccessToken}`,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify(formData),
|
||||
});
|
||||
});
|
||||
}
|
||||
return response.json();
|
||||
});
|
||||
}
|
||||
|
||||
function renewToken(renewUrl, access_token) {
|
||||
return fetch(renewUrl, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({ tokenToRenew: access_token }),
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
document.cookie = `access_token=${data.access_token}; path=/`;
|
||||
// console.log('New Access Token:', data);
|
||||
return data.access_token;
|
||||
});
|
||||
}
|
||||
9
public/robots.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
User-agent: Googlebot
|
||||
Disallow: /nogooglebot/
|
||||
Disallow: /ad-file/
|
||||
Disallow: /add-news/
|
||||
|
||||
User-agent: *
|
||||
Allow: /
|
||||
|
||||
Sitemap: https://barta-india.in/sitemap.xml
|
||||
887
public/sitemap.xml
Normal file
@@ -0,0 +1,887 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset
|
||||
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
|
||||
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
|
||||
<!-- created with Free Online Sitemap Generator www.xml-sitemaps.com -->
|
||||
|
||||
|
||||
<url>
|
||||
<loc>https://barta-india.in/</loc>
|
||||
<lastmod>2024-02-16T14:05:06+00:00</lastmod>
|
||||
<priority>1.00</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/</loc>
|
||||
<lastmod>2024-02-16T14:06:01+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/</loc>
|
||||
<lastmod>2024-02-16T14:05:08+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/politics/</loc>
|
||||
<lastmod>2024-02-16T14:05:19+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/local/</loc>
|
||||
<lastmod>2024-02-16T14:06:00+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/technology/</loc>
|
||||
<lastmod>2024-02-16T14:05:07+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/contact/</loc>
|
||||
<lastmod>2024-02-16T14:05:22+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/google-introduces-a-paid-subscription-service-with-gemini-ai-formerly-known-as-bard-chatbot/</loc>
|
||||
<lastmod>2024-02-16T14:06:31+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/this-month-saud-the-foreign-minister-of-nepal-will-visit-india/</loc>
|
||||
<lastmod>2024-02-16T14:06:31+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/indias-4-5-billion-dollar-investment-plan-is-unveiled-by-uaes-adia-through-gujarats-finance-hub/</loc>
|
||||
<lastmod>2024-02-16T14:06:30+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/with-the-support-of-business-finland-finnish-companies-are-expanding-into-the-thriving-indian-market/</loc>
|
||||
<lastmod>2024-02-16T14:06:30+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/brother-shehbaz-says-that-if-the-pml-n-wins-a-majority-nawaz-sharif-would-become-prime-minister/</loc>
|
||||
<lastmod>2024-02-16T14:06:30+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/rbi-maintains-6-point-5-percent-repo-rateforthe-sixth-time-fy-24percent-gdp-is-maintained-at-7percent-inflation-is-projectedat5-poin-4percent/</loc>
|
||||
<lastmod>2024-02-16T14:06:29+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/although-us-sees-potentialfor-improvement-israeli-pm-netanyahu-labels-hamas-ceasefire-proposal-delusional/</loc>
|
||||
<lastmod>2024-02-16T14:06:29+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/before-chinese-new-year-millions-of-peoples-travels-are-disrupted-by-snow-and-ice/</loc>
|
||||
<lastmod>2024-02-16T14:06:29+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/hanuman-spotted-followingthe-ayodhya-inauguration-monkeys-visit-ram-temples/</loc>
|
||||
<lastmod>2024-02-16T14:06:28+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/today-pm-narendra-modi-will-respond-in-the-rajya-sabha-to-the-motion-of-thanks/</loc>
|
||||
<lastmod>2024-02-16T14:06:28+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/indias-14-billion-budget-proposal-for-jammu-and-kashmir-dwarfs-pakistans-3-billion-imf-bailout/</loc>
|
||||
<lastmod>2024-02-16T14:06:28+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/after-divorcing-shoaib-malik-sania-mirza-shares-another-cryptic-instagram-story-see-inside/</loc>
|
||||
<lastmod>2024-02-16T14:06:28+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/who-is-maulana-mufti-salman-azhari-who-was-arrested-in-a-hate-speech-caseby-gujarat-ats/</loc>
|
||||
<lastmod>2024-02-16T14:06:27+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/hearing-on-the-muslim-sides-plea-in-the-gyanvapi-case-today-at-the-allahabad-high-court/</loc>
|
||||
<lastmod>2024-02-16T14:06:27+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/third-deadliest-wildfire-of-the-century-struck-chile-killing-122-people/</loc>
|
||||
<lastmod>2024-02-16T14:06:27+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/after-meeting-with-netanyahu-the-french-minister-declared-that-israeli-settler-violence-against-palestinians-must-stop/</loc>
|
||||
<lastmod>2024-02-16T14:06:26+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/since-gaining-independence-senegal-has-never-experienced-a-coup-willthe-presidential-polls-delay-affect-that/</loc>
|
||||
<lastmod>2024-02-16T14:06:26+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/chinasaidthat-russia-is-deliberately-trying-to-create-war-china-also-says-the-us-is-destroying-peace-in-west-asia/</loc>
|
||||
<lastmod>2024-02-16T14:06:26+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/prince-harry-will-meet-king-charles-with-a-royal-interview-after-the-king-was-diagnosed-with-cancer/</loc>
|
||||
<lastmod>2024-02-16T14:06:25+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/a-new-political-party-associated-with-the-banned-outfitof-mumbai-attacks-mastermind-hafiz-saeed-enters-pakistani-elections/</loc>
|
||||
<lastmod>2024-02-16T14:06:25+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/denver-airport-walkway-swallows-pilots-foot-injuries-him-maker-sues/</loc>
|
||||
<lastmod>2024-02-16T14:06:25+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/the-us-senate-unveilsa118-billion-bill-that-combines-aidfor-israeland-ukrainewith-border-policies/</loc>
|
||||
<lastmod>2024-02-16T14:06:25+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/before-may10-indian-troops-will-depart-the-maldives-says-prez-muizzuin-first-parliamentary-address/</loc>
|
||||
<lastmod>2024-02-16T14:06:24+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/deadliest-forest-firesin-chile112-deadinthe-deadliest-catastrophe-sincethe2010-earthquake/</loc>
|
||||
<lastmod>2024-02-16T14:06:24+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/gyanvapi-case-todays-scientific-surveyof-shivalinga-plea-will-be-heardby-supreme-court/</loc>
|
||||
<lastmod>2024-02-16T14:06:24+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/conflict-regarding-mehrauli-mosque-demolition-dda-allegation-differs-from-asi-document/</loc>
|
||||
<lastmod>2024-02-16T14:06:23+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/pakistan-terrorist-attackon-police-stationin-dera-leaves-ten-deadand-six-injured/</loc>
|
||||
<lastmod>2024-02-16T14:06:23+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/poonam-pandey-is-a-live-see-actress-stages-her-death-to-draw-attention-to-cervical-cancer/</loc>
|
||||
<lastmod>2024-02-16T14:06:23+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/do-you-think-poonam-pandey-is-dead-there-has-been-no-formal-statement-from-the-family-or-authorities-yet/</loc>
|
||||
<lastmod>2024-02-16T14:06:22+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/yashasvi-jaiswal-a-future-test-master-who-will-give-team-india-a-sehwag-like-approach/</loc>
|
||||
<lastmod>2024-02-16T14:06:22+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/doesthe-indi-alliances-game-end-attacking-congress-mamata-banerjee-claims-that-the-party-wont-get-even-40-seats-in-ls-polls/</loc>
|
||||
<lastmod>2024-02-16T14:06:22+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/probable-playing-elevens-for-indiavs-englands-second-test-will-rohit-sharma-support-sarfaraz-khan-washington-sundar-for-a-potential-rank-turner-at-vizag/</loc>
|
||||
<lastmod>2024-02-16T14:06:21+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/live-streaming-of-al-nassrvs-inter-miami-riyadh-seasons-cup-no-cristiano-ronaldo-find-out-where-whenand-howto-watch-lionel-messis-match-liveon-tv-laptopand-mobile-apps/</loc>
|
||||
<lastmod>2024-02-16T14:06:21+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/ce-oof-facebookand-instagram-mark-zuckerberg-has-apologized-to-the-united-statesfor-thi-sreason-however-what-about-india/</loc>
|
||||
<lastmod>2024-02-16T14:06:21+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/breaking-following-the-approval-of-the-varanasi-court-a-puja-was-performed-at-gyanvapis-vyas-parivar-tehkhana-this-is-the-first-image/</loc>
|
||||
<lastmod>2024-02-16T14:06:21+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/updates-on-the-budget-the-new-income-tax-slabs-for-2024-25-staythe-same/</loc>
|
||||
<lastmod>2024-02-16T14:06:20+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/following-the-formation-of-a-new-government-we-will-present-a-full-budget-pm-narendra-modi/</loc>
|
||||
<lastmod>2024-02-16T14:06:20+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/parliaments-budget-session-president-murmu-says-indian-forces-are-responding-to-terrorism-appropriately/</loc>
|
||||
<lastmod>2024-02-16T14:06:20+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bollywood-stars-disha-patani-to-kriti-kharbanda-professional-beachwear-outfit-inspiration/</loc>
|
||||
<lastmod>2024-02-16T14:06:19+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/moon-is-shrinking-new-research-alerts-usto-more-landslidesand-moonshakesin-its-south-pole/</loc>
|
||||
<lastmod>2024-02-16T14:06:19+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/ed-interrogates-lalu-yadav-for-nine-hours-in-land-regarding-jobs-case-rjd-claims-pm-modi-is-terrified/</loc>
|
||||
<lastmod>2024-02-16T14:06:19+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/rahul-dravid-says-we-didnt-get-a-in-his-admission-that-india-made-a-major-error-in-their-first-test-loss-to-england/</loc>
|
||||
<lastmod>2024-02-16T14:06:19+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/in-dvs-eng-ahamstring-injury-makes-ravindra-jadeja-doubtful-for-the-second-test-against-england/</loc>
|
||||
<lastmod>2024-02-16T14:06:18+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/pariksha-pe-charcha-prime-minister-modi-engages-with-exam-warriorsat-bharat-mandapamin-delhi/</loc>
|
||||
<lastmod>2024-02-16T14:06:18+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/sports-france-assures-support-for-indias-olympic-games-bid/</loc>
|
||||
<lastmod>2024-02-16T14:06:18+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/politics-in-bihar-are-chaos-as-nitish-kumar-is-expected-to-take-the-oath-of-office-tomorrow-with-bjp-backing-him/</loc>
|
||||
<lastmod>2024-02-16T14:06:17+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/isthe-un-ableto-stepin-when-pakistan-knocks-on-the-door-regarding-the-ayodhya-ram-temple/</loc>
|
||||
<lastmod>2024-02-16T14:06:17+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/review-of-karmma-calling-karmma-lacks-sting-raveena-tandon-savesthe-show/</loc>
|
||||
<lastmod>2024-02-16T14:06:17+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/ina-republic-daymessage-vladimir-putinof-russiapraises-prime-minister-modi-and-indias-independent-foreign-policy/</loc>
|
||||
<lastmod>2024-02-16T14:06:16+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/venkaiah-naidu-chiranjeevi-and-vyjayantimala-are-among-the-132-recipients-of-the-padma-awards-2024-view-the-full-list/</loc>
|
||||
<lastmod>2024-02-16T14:06:16+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/republic-day-2024-parade-indias-military-power-to-be-displayed-with-french-president-as-chief-guest-key-details/</loc>
|
||||
<lastmod>2024-02-16T14:06:16+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/netaji-boses-2024-jayanti-top-few-inspiring-quotes-on-his-birthday/</loc>
|
||||
<lastmod>2024-02-16T14:06:16+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/why-did-akhilesh-grant-jayant-seven-seats-while-charu-will-also-run-for-office-understand-the-answers-to-these-four-alliance-related-questions/</loc>
|
||||
<lastmod>2024-02-16T14:06:15+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/union-home-minister-amit-shahdeclared-in-assamthat-lord-ramreturnedhomeafter550yearsofbadtimes/</loc>
|
||||
<lastmod>2024-02-16T14:06:15+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/600-burmese-soldiers-enter-india-amid-crisis-mizoram-chief-minister-requests-intervention-from-center/</loc>
|
||||
<lastmod>2024-02-16T14:06:15+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/asaduddin-owaisi-babri-masjid-taken-from-muslims-very-systematically/</loc>
|
||||
<lastmod>2024-02-16T14:06:14+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/following-split-from-sania-mirza-shoaib-malik-remarries-and-shares-a-picture-of-himself-with-his-second-wife-on-instagram/</loc>
|
||||
<lastmod>2024-02-16T14:06:14+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/explained-the-historyof-balochistan-and-tensions-along-the-pakistan-iran-border/</loc>
|
||||
<lastmod>2024-02-16T14:06:14+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/began-as-a-background-dancer-and-artist-as-a-child-today-she-is-best-friends-with-famous-bollywood-actresses-like-kiara-deepika/</loc>
|
||||
<lastmod>2024-02-16T14:06:14+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/when-the-israeli-soldiers-head-was-put-up-forauction-by-hamas-the-soldiers-father-voiced-his-sorrow-and-declared-this-is-barbarism/</loc>
|
||||
<lastmod>2024-02-16T14:06:13+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/whenthe-estate-directorate-team-arrived-at-mahuas-government-residence-the-officer-stated-that-they-were-there-to-vacate/</loc>
|
||||
<lastmod>2024-02-16T14:06:13+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/ayodhya-ram-mandir-before-it-was-dedicated-what-else-did-followers-of-ramsayin-ayodhya-ready-to-sacrifice-my-life-for-modi/</loc>
|
||||
<lastmod>2024-02-16T16:32:34+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/notice-to-facebook-youtube-to-dhirendra-shastri/</loc>
|
||||
<lastmod>2024-02-16T16:32:33+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/puri-thousands-of-people-attended-the-launch-of-the-rs-800-crore-srimandir-parikrama-project-and-the-cultural-corridor-surrounding-the-jagannath-shrine/</loc>
|
||||
<lastmod>2024-02-16T16:32:33+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/there-are-four-days-remaining-till-ram-mandir-opens-and-today-the-sanctum-sanctorum-will-host-ramlalas-architectural-figure/</loc>
|
||||
<lastmod>2024-02-16T16:32:33+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/by-2025-when-the-sun-reaches-solar-maximum-there-will-probably-be-a-worldwide-internet-outage/</loc>
|
||||
<lastmod>2024-02-16T16:32:32+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/weather-alert-a-warning-has-been-issued-for-any-district-due-to-heavy-winter-rains/</loc>
|
||||
<lastmod>2024-02-16T16:32:32+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/tmc-congress-seat-sharing-tm-csdemandto-congresswas-will-not-join-nyay-yatra-until-seat-sharing-formula-is-decided/</loc>
|
||||
<lastmod>2024-02-16T16:32:31+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/flying-turns-become-a-headache-traveler-trapped-in-aircraft-lavatory-spent-entire-trip-sitting-on-commoded/</loc>
|
||||
<lastmod>2024-02-16T16:32:31+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/r-praggnanandhaa-r-praggnanandhaa-overcame-ding-liren-the-world-champion-and-also-overthrew-vishwanathan-anand/</loc>
|
||||
<lastmod>2024-02-16T16:32:31+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/manipur-violence-manipur-violence-has-returned-kuki-militants-murdered-cdo-after-attacking-security-personnel-and-hurling-bombs-at-a-police-check-point/</loc>
|
||||
<lastmod>2024-02-16T16:32:30+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/mahuas-government-bungalow-is-going-to-be-taken-after-mp-noticeto-center-please-leave-immediately-or-face-for-cible-eviction/</loc>
|
||||
<lastmod>2024-02-16T16:32:30+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/shaurya-the-namibian-cheetah-diesin-kuno-madhya-pradesh-becoming-the-tenth-death-in-the-national-park/</loc>
|
||||
<lastmod>2024-02-16T16:32:30+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/lord-ram-is-a-symbol-of-good-governance-andhra-pradesh-pm-modi-said/</loc>
|
||||
<lastmod>2024-02-16T16:32:29+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bjp-rss-event-focused-on-pm-modi-rahul-gandhi-dismissesthe-pran-pratishtha-ceremonyat-ayodhya-ram-mandir/</loc>
|
||||
<lastmod>2024-02-16T16:32:29+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/indias-growing-presence-in-international-politics-how-pm-modis-call-with-putin-and-jaishankars-visit-to-iran-are-changing-storylines/</loc>
|
||||
<lastmod>2024-02-16T16:32:29+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/hrithik-roshanand-deepika-padukones-fighter-trailer-has-fans-praising-it-and-calling-it-pure-goosebumps/</loc>
|
||||
<lastmod>2024-02-16T16:32:28+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/retail-inflation-rate-due-to-the-sharp-increase-in-the-cost-of-dal-and-vegetables-this-is-the-greatest-rate-of-retail-inflation-in-the-previous-four-months-rice/</loc>
|
||||
<lastmod>2024-02-16T16:32:28+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/mahasamaroh-is-located-near-the-ayodhya-ram-mandir-but-when-will-the-300-year-old-mahishadal-temple-be-restored/</loc>
|
||||
<lastmod>2024-02-16T16:32:28+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/three-monks-were-lynched-in-purulia-after-being-suspected-of-kidnapping-12-arrested-palghar-bj-praises-the-matter/</loc>
|
||||
<lastmod>2024-02-16T16:32:27+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/anurag-tagore-is-being-targeted-by-the-statement-west-bengal-government-shelters-corrupt-people-in-kolkata/</loc>
|
||||
<lastmod>2024-02-16T16:32:27+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/launch-of-the-ram-mandir-how-does-the-ramayan-actor-feel-about-getting-invited-to-the-launch-of-the-ram-mandir/</loc>
|
||||
<lastmod>2024-02-16T16:32:27+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/flipkart-is-offering-the-iphone15/</loc>
|
||||
<lastmod>2024-02-16T16:32:26+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/first-t20-ibetween-new-zealandand-pakistan-finn-allen-hits-shaheen-afridi-for-24-runs-in-an-over-setting-a-record-for-the-mos-texpensive-over-in-t20-ihistory/</loc>
|
||||
<lastmod>2024-02-16T16:32:26+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/west-bengal-minister-sujit-boseshomeisraidedbythe-ed-due-to-a-municipal-jobs-fraud/</loc>
|
||||
<lastmod>2024-02-16T16:32:26+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/in-advance-of-the-ayodhya-ram-mandir-consecration-ceremony-pm-modi-starts-an11-day-anushthan/</loc>
|
||||
<lastmod>2024-02-16T16:32:25+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/be-at-ease-everything-will-work-out-this-is-nitish-kumar-most-recent-assurancere-garding-seat-sharingin-bihar/</loc>
|
||||
<lastmod>2024-02-16T16:32:25+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/in-manipur-four-villagers-were-kidnappedand-killedby-suspected-kuki-militants-including-father-son/</loc>
|
||||
<lastmod>2024-02-16T16:32:25+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/mamata-banerjee-invites-pm-modi-to-visit-ganga-sagar-mela-despite-differences/</loc>
|
||||
<lastmod>2024-02-16T16:32:24+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/mamata-banerjee-rejects-one-nation-one-election-writing-to-the-kovind-led-panel-that-it/</loc>
|
||||
<lastmod>2024-02-16T16:32:24+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/article/</loc>
|
||||
<lastmod>2024-01-12T06:57:29+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/terms-and-conditions/</loc>
|
||||
<lastmod>2024-02-16T16:31:22+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/privacy-policy/</loc>
|
||||
<lastmod>2024-02-16T16:31:22+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/cat/?cat=local</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/cat/?cat=national</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/cat/?cat=world</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/cat/?cat=politics</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/cat/?cat=technology</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/indonesian-presidential-contender-prabowo-projected-to-win-in-single-round/</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/leonardo-dicaprio-urges-end-to-native-forest-logging-in-australia-to-protect-swift-parrot-habitat/</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/controversy-surrounding-andra-days-performance-of-the-black-national-anthem-at-super-bowl-lviii/</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/effective-lessons-for-classroom-and-homeschool/</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/australian-prime-minister-anthony-albanese-gets-engaged/</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/pakistan-tehreek-insaaf-nominates-omar-ayub-as-prime-minister-candidate/</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/prosecutor-urges-supreme-court-to-reject-trumps-delay-request/</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/kansas-city-super-bowl-celebration-ends-in-shooting/</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/maharashtra-assembly-speaker-pronounces-verdict-in-ncp-faction-disqualification-petitions/</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/victims-of-jeffrey-epstein-sue-fbi-over-failure-to-investigate-abuse/</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/donald-trumps-recent-mixing-up-of-names-was-intentional/</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/sonia-gandhi-writes-emotional-letter-to-constituents-wont-contest-2024-polls/</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/mamata-banerjee-accuses-bjp-of-inciting-trouble-in-sandeshkhali/</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/poll-20-of-americans-believe-taylor-swift-conspiracy-theory/</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/poll-nearly-20-of-americans-believe-taylor-swift-conspiracy-theory/</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/bangkok-pollution-reaches-unhealthy-levels-government-employees-asked-to-work-from-home/</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/the-dangers-of-ai-romance-privacy-risks-and-troubling-content/</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/bn/nyc-mayor-files-lawsuit-against-social-media-platforms-for-mental-health-crisis/</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/rbi-maintains-6-point-5-percent-repo-rateforthe-sixth-time-fy-24percent-gdp-is-maintained-at-7percent-inflation-is-projectedat5-poin-4percent/</loc>
|
||||
<lastmod>2024-02-16T16:31:35+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/hanuman-spotted-followingthe-ayodhya-inauguration-monkeys-visit-ram-temples/</loc>
|
||||
<lastmod>2024-02-16T16:31:35+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/who-is-maulana-mufti-salman-azhari-who-was-arrested-in-a-hate-speech-caseby-gujarat-ats/</loc>
|
||||
<lastmod>2024-02-16T16:31:34+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/hearing-on-the-muslim-sides-plea-in-the-gyanvapi-case-today-at-the-allahabad-high-court/</loc>
|
||||
<lastmod>2024-02-16T16:31:34+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/gyanvapi-case-todays-scientific-surveyof-shivalinga-plea-will-be-heardby-supreme-court/</loc>
|
||||
<lastmod>2024-02-16T16:31:34+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/conflict-regarding-mehrauli-mosque-demolition-dda-allegation-differs-from-asi-document/</loc>
|
||||
<lastmod>2024-02-16T16:31:34+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/breaking-following-the-approval-of-the-varanasi-court-a-puja-was-performed-at-gyanvapis-vyas-parivar-tehkhana-this-is-the-first-image/</loc>
|
||||
<lastmod>2024-02-16T16:31:33+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/updates-on-the-budget-the-new-income-tax-slabs-for-2024-25-staythe-same/</loc>
|
||||
<lastmod>2024-02-16T16:31:33+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/following-the-formation-of-a-new-government-we-will-present-a-full-budget-pm-narendra-modi/</loc>
|
||||
<lastmod>2024-02-16T16:31:33+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/parliaments-budget-session-president-murmu-says-indian-forces-are-responding-to-terrorism-appropriately/</loc>
|
||||
<lastmod>2024-02-16T16:31:32+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/bollywood-stars-disha-patani-to-kriti-kharbanda-professional-beachwear-outfit-inspiration/</loc>
|
||||
<lastmod>2024-02-16T16:31:32+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/ed-interrogates-lalu-yadav-for-nine-hours-in-land-regarding-jobs-case-rjd-claims-pm-modi-is-terrified/</loc>
|
||||
<lastmod>2024-02-16T16:31:32+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/rahul-dravid-says-we-didnt-get-a-in-his-admission-that-india-made-a-major-error-in-their-first-test-loss-to-england/</loc>
|
||||
<lastmod>2024-02-16T16:31:31+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/in-dvs-eng-ahamstring-injury-makes-ravindra-jadeja-doubtful-for-the-second-test-against-england/</loc>
|
||||
<lastmod>2024-02-16T16:31:31+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/pariksha-pe-charcha-prime-minister-modi-engages-with-exam-warriorsat-bharat-mandapamin-delhi/</loc>
|
||||
<lastmod>2024-02-16T16:31:31+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/ina-republic-daymessage-vladimir-putinof-russiapraises-prime-minister-modi-and-indias-independent-foreign-policy/</loc>
|
||||
<lastmod>2024-02-16T16:31:31+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/venkaiah-naidu-chiranjeevi-and-vyjayantimala-are-among-the-132-recipients-of-the-padma-awards-2024-view-the-full-list/</loc>
|
||||
<lastmod>2024-02-16T16:31:30+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/republic-day-2024-parade-indias-military-power-to-be-displayed-with-french-president-as-chief-guest-key-details/</loc>
|
||||
<lastmod>2024-02-16T16:31:30+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/netaji-boses-2024-jayanti-top-few-inspiring-quotes-on-his-birthday/</loc>
|
||||
<lastmod>2024-02-16T16:31:30+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/why-did-akhilesh-grant-jayant-seven-seats-while-charu-will-also-run-for-office-understand-the-answers-to-these-four-alliance-related-questions/</loc>
|
||||
<lastmod>2024-02-16T16:31:29+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/union-home-minister-amit-shahdeclared-in-assamthat-lord-ramreturnedhomeafter550yearsofbadtimes/</loc>
|
||||
<lastmod>2024-02-16T16:31:29+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/600-burmese-soldiers-enter-india-amid-crisis-mizoram-chief-minister-requests-intervention-from-center/</loc>
|
||||
<lastmod>2024-02-16T16:31:29+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/asaduddin-owaisi-babri-masjid-taken-from-muslims-very-systematically/</loc>
|
||||
<lastmod>2024-02-16T16:31:28+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/ayodhya-ram-mandir-before-it-was-dedicated-what-else-did-followers-of-ramsayin-ayodhya-ready-to-sacrifice-my-life-for-modi/</loc>
|
||||
<lastmod>2024-02-16T16:31:28+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/puri-thousands-of-people-attended-the-launch-of-the-rs-800-crore-srimandir-parikrama-project-and-the-cultural-corridor-surrounding-the-jagannath-shrine/</loc>
|
||||
<lastmod>2024-02-16T16:31:28+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/there-are-four-days-remaining-till-ram-mandir-opens-and-today-the-sanctum-sanctorum-will-host-ramlalas-architectural-figure/</loc>
|
||||
<lastmod>2024-02-16T16:31:28+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/flying-turns-become-a-headache-traveler-trapped-in-aircraft-lavatory-spent-entire-trip-sitting-on-commoded/</loc>
|
||||
<lastmod>2024-02-16T16:31:27+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/r-praggnanandhaa-r-praggnanandhaa-overcame-ding-liren-the-world-champion-and-also-overthrew-vishwanathan-anand/</loc>
|
||||
<lastmod>2024-02-16T16:31:27+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/manipur-violence-manipur-violence-has-returned-kuki-militants-murdered-cdo-after-attacking-security-personnel-and-hurling-bombs-at-a-police-check-point/</loc>
|
||||
<lastmod>2024-02-16T16:31:27+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/shaurya-the-namibian-cheetah-diesin-kuno-madhya-pradesh-becoming-the-tenth-death-in-the-national-park/</loc>
|
||||
<lastmod>2024-02-16T16:31:26+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/lord-ram-is-a-symbol-of-good-governance-andhra-pradesh-pm-modi-said/</loc>
|
||||
<lastmod>2024-02-16T16:31:26+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/indias-growing-presence-in-international-politics-how-pm-modis-call-with-putin-and-jaishankars-visit-to-iran-are-changing-storylines/</loc>
|
||||
<lastmod>2024-02-16T16:31:26+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/retail-inflation-rate-due-to-the-sharp-increase-in-the-cost-of-dal-and-vegetables-this-is-the-greatest-rate-of-retail-inflation-in-the-previous-four-months-rice/</loc>
|
||||
<lastmod>2024-02-16T16:31:26+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/mahasamaroh-is-located-near-the-ayodhya-ram-mandir-but-when-will-the-300-year-old-mahishadal-temple-be-restored/</loc>
|
||||
<lastmod>2024-02-16T16:31:25+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/launch-of-the-ram-mandir-how-does-the-ramayan-actor-feel-about-getting-invited-to-the-launch-of-the-ram-mandir/</loc>
|
||||
<lastmod>2024-02-16T16:31:25+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/west-bengal-minister-sujit-boseshomeisraidedbythe-ed-due-to-a-municipal-jobs-fraud/</loc>
|
||||
<lastmod>2024-02-16T16:31:25+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/in-advance-of-the-ayodhya-ram-mandir-consecration-ceremony-pm-modi-starts-an11-day-anushthan/</loc>
|
||||
<lastmod>2024-02-16T16:31:24+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/national/mamata-banerjee-invites-pm-modi-to-visit-ganga-sagar-mela-despite-differences/</loc>
|
||||
<lastmod>2024-02-16T16:31:24+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/politics/today-pm-narendra-modi-will-respond-in-the-rajya-sabha-to-the-motion-of-thanks/</loc>
|
||||
<lastmod>2024-02-16T16:31:38+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/politics/doesthe-indi-alliances-game-end-attacking-congress-mamata-banerjee-claims-that-the-party-wont-get-even-40-seats-in-ls-polls/</loc>
|
||||
<lastmod>2024-02-16T16:31:38+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/politics/politics-in-bihar-are-chaos-as-nitish-kumar-is-expected-to-take-the-oath-of-office-tomorrow-with-bjp-backing-him/</loc>
|
||||
<lastmod>2024-02-16T16:31:38+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/politics/tmc-congress-seat-sharing-tm-csdemandto-congresswas-will-not-join-nyay-yatra-until-seat-sharing-formula-is-decided/</loc>
|
||||
<lastmod>2024-02-16T16:31:37+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/politics/mahuas-government-bungalow-is-going-to-be-taken-after-mp-noticeto-center-please-leave-immediately-or-face-for-cible-eviction/</loc>
|
||||
<lastmod>2024-02-16T16:31:37+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/politics/bjp-rss-event-focused-on-pm-modi-rahul-gandhi-dismissesthe-pran-pratishtha-ceremonyat-ayodhya-ram-mandir/</loc>
|
||||
<lastmod>2024-02-16T16:31:37+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/politics/anurag-tagore-is-being-targeted-by-the-statement-west-bengal-government-shelters-corrupt-people-in-kolkata/</loc>
|
||||
<lastmod>2024-02-16T16:31:37+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/politics/be-at-ease-everything-will-work-out-this-is-nitish-kumar-most-recent-assurancere-garding-seat-sharingin-bihar/</loc>
|
||||
<lastmod>2024-02-16T16:31:36+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/politics/mamata-banerjee-rejects-one-nation-one-election-writing-to-the-kovind-led-panel-that-it/</loc>
|
||||
<lastmod>2024-02-16T16:31:36+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/local/weather-alert-a-warning-has-been-issued-for-any-district-due-to-heavy-winter-rains/</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/local/three-monks-were-lynched-in-purulia-after-being-suspected-of-kidnapping-12-arrested-palghar-bj-praises-the-matter/</loc>
|
||||
<lastmod>2024-02-16T16:32:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/local/in-manipur-four-villagers-were-kidnappedand-killedby-suspected-kuki-militants-including-father-son/</loc>
|
||||
<lastmod>2024-02-16T16:32:20+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/technology/flipkart-is-offering-the-iphone15/</loc>
|
||||
<lastmod>2024-02-16T16:31:23+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://barta-india.in/article/in-manipur-four-villagers-were-kidnappedand-killedby-suspected-kuki-militants-including-father-son/</loc>
|
||||
<lastmod>2024-01-12T06:57:29+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
|
||||
|
||||
</urlset>
|
||||
7
robots.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
User-agent: Googlebot
|
||||
Disallow: /nogooglebot/
|
||||
|
||||
User-agent: *
|
||||
Allow: /
|
||||
|
||||
Sitemap: https://barta-india.in/sitemap.xml
|
||||
367
sitemap.xml
Normal file
@@ -0,0 +1,367 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset
|
||||
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
|
||||
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
|
||||
<!-- created with Free Online Sitemap Generator www.xml-sitemaps.com -->
|
||||
|
||||
|
||||
<url>
|
||||
<loc>http://barta-india.in/</loc>
|
||||
<lastmod>2024-01-12T16:29:37+00:00</lastmod>
|
||||
<priority>1.00</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/</loc>
|
||||
<lastmod>2024-01-12T16:29:46+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/national/</loc>
|
||||
<lastmod>2024-01-12T16:29:40+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/politics/</loc>
|
||||
<lastmod>2024-01-12T16:29:42+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/local/</loc>
|
||||
<lastmod>2024-01-12T16:29:43+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/technology/</loc>
|
||||
<lastmod>2024-01-12T16:29:38+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/contact/</loc>
|
||||
<lastmod>2024-01-12T16:29:43+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/flipkart-is-offering-the-iphone15-for-rs68999-see-how-the-deal-works/</loc>
|
||||
<lastmod>2024-01-12T16:30:26+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/first-t20-ibetween-new-zealandand-pakistan-finn-allen-hits-shaheen-afridi-for-24-runs-in-an-over-setting-a-record-for-the-mos-texpensive-over-in-t20-ihistory/</loc>
|
||||
<lastmod>2024-01-12T16:30:26+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/west-bengal-minister-sujit-boseshomeisraidedbythe-ed-due-to-a-municipal-jobs-fraud/</loc>
|
||||
<lastmod>2024-01-12T16:30:25+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/in-advance-of-the-ayodhya-ram-mandir-consecration-ceremony-pm-modi-starts-an11-day-anushthan/</loc>
|
||||
<lastmod>2024-01-12T16:30:25+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/be-at-ease-everything-will-work-out-this-is-nitish-kumar-most-recent-assurancere-garding-seat-sharingin-bihar/</loc>
|
||||
<lastmod>2024-01-12T16:30:24+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/in-manipur-four-villagers-were-kidnappedand-killedby-suspected-kuki-militants-including-father-son/</loc>
|
||||
<lastmod>2024-01-12T16:30:24+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/mamata-banerjee-invites-pm-modi-to-visit-ganga-sagar-mela-despite-differences/</loc>
|
||||
<lastmod>2024-01-12T16:30:23+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/mamata-banerjee-rejects-one-nation-one-election-writing-to-the-kovind-led-panel-that-it/</loc>
|
||||
<lastmod>2024-01-12T16:30:22+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/article/</loc>
|
||||
<lastmod>2024-01-12T06:57:29+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/terms-and-conditions/</loc>
|
||||
<lastmod>2024-01-12T16:29:37+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/privacy-policy/</loc>
|
||||
<lastmod>2024-01-12T16:29:37+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/national/</loc>
|
||||
<lastmod>2024-01-12T16:29:49+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/politics/</loc>
|
||||
<lastmod>2024-01-12T16:29:57+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/local/</loc>
|
||||
<lastmod>2024-01-12T16:30:00+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/technology/</loc>
|
||||
<lastmod>2024-01-12T16:29:47+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/shuvendu-adhikari-responding-to-eds-harassment-says-start-packing-bags-keep-winter-stuff-too/</loc>
|
||||
<lastmod>2024-01-12T16:30:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/mercury-fell-before-makar-sankranti-what-is-the-temperature-of-kolkata-now/</loc>
|
||||
<lastmod>2024-01-12T16:30:21+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/india-vs-afghanistan-ind-vs-afg-1st-t20-ilive-cricket-scorecard-updates-team-indiaface-afghanistanin-mohali/</loc>
|
||||
<lastmod>2024-01-12T16:30:19+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/sonu-sood-released-his-new-film-fateh-gift-which-is-a-tribute-to-cybercrime-victims/</loc>
|
||||
<lastmod>2024-01-12T16:30:18+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/finance-minister-nirmala-sitharaman-is-al-lset-to-present-the-interim-budgeton-february1/</loc>
|
||||
<lastmod>2024-01-12T16:30:18+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/personally-dasand-rbi-as-an-institution-are-opposed-to-private-cryptocurrencies-on-the-grounds-that-they-pose-tremendous-threat-to-the-financial-stability/</loc>
|
||||
<lastmod>2024-01-12T16:30:16+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/chandigarh-jaipur-earthquake-residentsin-chandigarh-jaipur-delhi-gurugram-noida-and-surrounding-are-as-felt-mild-tremors/</loc>
|
||||
<lastmod>2024-01-12T16:30:15+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/the-stamp-bear-stheyear-2024-in-vikram-samvatthe-hindu-calendar-thatis-followed-in-nepal-and-some-parts-of-india/</loc>
|
||||
<lastmod>2024-01-12T16:30:14+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/watchthe29th-critics-choice-awards-liv-eon-lionsgate-playon15th-january-2023/</loc>
|
||||
<lastmod>2024-01-12T16:30:14+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/raptee-energy-showcases-high-voltage-electric-motorcycle-at-global-investors-meet2024/</loc>
|
||||
<lastmod>2024-01-12T16:30:13+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/high-traar-queen-whois-mallika-srinivasan-1000-cror-erevenue-company-sanswer-trailblazer-woman/</loc>
|
||||
<lastmod>2024-01-12T16:30:12+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/after-galwan-china-admits-india-is-no-longer-a-weak-nation-rajnath-singh/</loc>
|
||||
<lastmod>2024-01-12T16:30:12+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/flipkart-republic-day-big-deal-sale-2024-date-announced-know-the-offers-on-smartphones/</loc>
|
||||
<lastmod>2024-01-12T16:30:11+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/polycab-india-shares-jump-after-cable-and-wire-craftsman-denies-tax-evasion-reports/</loc>
|
||||
<lastmod>2024-01-12T16:30:10+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/government-plan-that-empower-women-making-them-economically-strong/</loc>
|
||||
<lastmod>2024-01-12T16:30:10+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/kolkata-accident-audi-car-collided-with-van-allegedly-rude-behave-with-police-after-being-detained/</loc>
|
||||
<lastmod>2024-01-12T16:30:09+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/tmc-mp-abhishek-banerjee-petition-to-supreme-court-against-calcutta-high-court-justices-abhijit-gangopadhyay-and-amrita-sinha-s-remarks/</loc>
|
||||
<lastmod>2024-01-12T16:30:07+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/sandeep-lamichhane-nepal-cricketer-gets-8-years-in-jail-for-physical-rape-get-to-know/</loc>
|
||||
<lastmod>2024-01-12T16:30:07+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/north-24-pargana-physically-challenged-youth-going-to-ayodhya-ram-mandir-on-ramlalla-pran-pratistha-event-on-bicycle/</loc>
|
||||
<lastmod>2024-01-12T16:30:06+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/tmc-supremo-mamatabanerjee-caution-party-members-for-inner-battle/</loc>
|
||||
<lastmod>2024-01-12T16:30:05+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/bjp-suvenduadhikari-invasion-cpm-refer-minakshi-mukherjees-candidateship-from-nadigram/</loc>
|
||||
<lastmod>2024-01-12T16:30:04+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/congress-will-not-attend-ram-mandir-commencement-in-ayodhya-calls-it-bjp-rss-event/</loc>
|
||||
<lastmod>2024-01-12T16:30:04+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/national/in-advance-of-the-ayodhya-ram-mandir-consecration-ceremony-pm-modi-starts-an11-day-anushthan/</loc>
|
||||
<lastmod>2024-01-12T16:29:41+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/national/mamata-banerjee-invites-pm-modi-to-visit-ganga-sagar-mela-despite-differences/</loc>
|
||||
<lastmod>2024-01-12T16:29:40+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/politics/be-at-ease-everything-will-work-out-this-is-nitish-kumar-most-recent-assurancere-garding-seat-sharingin-bihar/</loc>
|
||||
<lastmod>2024-01-12T16:29:43+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/politics/mamata-banerjee-rejects-one-nation-one-election-writing-to-the-kovind-led-panel-that-it/</loc>
|
||||
<lastmod>2024-01-12T16:29:42+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/local/in-manipur-four-villagers-were-kidnappedand-killedby-suspected-kuki-militants-including-father-son/</loc>
|
||||
<lastmod>2024-01-12T16:29:45+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/technology/flipkart-is-offering-the-iphone15-for-rs68999-see-how-the-deal-works/</loc>
|
||||
<lastmod>2024-01-12T16:29:39+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/article/in-manipur-four-villagers-were-kidnappedand-killedby-suspected-kuki-militants-including-father-son/</loc>
|
||||
<lastmod>2024-01-12T06:57:29+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/national/finance-minister-nirmala-sitharaman-is-al-lset-to-present-the-interim-budgeton-february1/</loc>
|
||||
<lastmod>2024-01-12T16:29:56+00:00</lastmod>
|
||||
<priority>0.51</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/national/personally-dasand-rbi-as-an-institution-are-opposed-to-private-cryptocurrencies-on-the-grounds-that-they-pose-tremendous-threat-to-the-financial-stability/</loc>
|
||||
<lastmod>2024-01-12T16:29:55+00:00</lastmod>
|
||||
<priority>0.51</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/national/the-stamp-bear-stheyear-2024-in-vikram-samvatthe-hindu-calendar-thatis-followed-in-nepal-and-some-parts-of-india/</loc>
|
||||
<lastmod>2024-01-12T16:29:55+00:00</lastmod>
|
||||
<priority>0.51</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/national/high-traar-queen-whois-mallika-srinivasan-1000-cror-erevenue-company-sanswer-trailblazer-woman/</loc>
|
||||
<lastmod>2024-01-12T16:29:54+00:00</lastmod>
|
||||
<priority>0.51</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/national/after-galwan-china-admits-india-is-no-longer-a-weak-nation-rajnath-singh/</loc>
|
||||
<lastmod>2024-01-12T16:29:54+00:00</lastmod>
|
||||
<priority>0.51</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/national/polycab-india-shares-jump-after-cable-and-wire-craftsman-denies-tax-evasion-reports/</loc>
|
||||
<lastmod>2024-01-12T16:29:53+00:00</lastmod>
|
||||
<priority>0.51</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/national/government-plan-that-empower-women-making-them-economically-strong/</loc>
|
||||
<lastmod>2024-01-12T16:29:52+00:00</lastmod>
|
||||
<priority>0.51</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/national/sandeep-lamichhane-nepal-cricketer-gets-8-years-in-jail-for-physical-rape-get-to-know/</loc>
|
||||
<lastmod>2024-01-12T16:29:51+00:00</lastmod>
|
||||
<priority>0.51</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/national/north-24-pargana-physically-challenged-youth-going-to-ayodhya-ram-mandir-on-ramlalla-pran-pratistha-event-on-bicycle/</loc>
|
||||
<lastmod>2024-01-12T16:29:51+00:00</lastmod>
|
||||
<priority>0.51</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/national/congress-will-not-attend-ram-mandir-commencement-in-ayodhya-calls-it-bjp-rss-event/</loc>
|
||||
<lastmod>2024-01-12T16:29:50+00:00</lastmod>
|
||||
<priority>0.51</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/politics/shuvendu-adhikari-responding-to-eds-harassment-says-start-packing-bags-keep-winter-stuff-too/</loc>
|
||||
<lastmod>2024-01-12T16:29:59+00:00</lastmod>
|
||||
<priority>0.51</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/politics/tmc-mp-abhishek-banerjee-petition-to-supreme-court-against-calcutta-high-court-justices-abhijit-gangopadhyay-and-amrita-sinha-s-remarks/</loc>
|
||||
<lastmod>2024-01-12T16:29:58+00:00</lastmod>
|
||||
<priority>0.51</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/politics/tmc-supremo-mamatabanerjee-caution-party-members-for-inner-battle/</loc>
|
||||
<lastmod>2024-01-12T16:29:58+00:00</lastmod>
|
||||
<priority>0.51</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/politics/bjp-suvenduadhikari-invasion-cpm-refer-minakshi-mukherjees-candidateship-from-nadigram/</loc>
|
||||
<lastmod>2024-01-12T16:29:57+00:00</lastmod>
|
||||
<priority>0.51</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/local/mercury-fell-before-makar-sankranti-what-is-the-temperature-of-kolkata-now/</loc>
|
||||
<lastmod>2024-01-12T16:30:02+00:00</lastmod>
|
||||
<priority>0.51</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/local/sonu-sood-released-his-new-film-fateh-gift-which-is-a-tribute-to-cybercrime-victims/</loc>
|
||||
<lastmod>2024-01-12T16:30:02+00:00</lastmod>
|
||||
<priority>0.51</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/local/watchthe29th-critics-choice-awards-liv-eon-lionsgate-playon15th-january-2023/</loc>
|
||||
<lastmod>2024-01-12T16:30:01+00:00</lastmod>
|
||||
<priority>0.51</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/local/kolkata-accident-audi-car-collided-with-van-allegedly-rude-behave-with-police-after-being-detained/</loc>
|
||||
<lastmod>2024-01-12T16:30:01+00:00</lastmod>
|
||||
<priority>0.51</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/technology/raptee-energy-showcases-high-voltage-electric-motorcycle-at-global-investors-meet2024/</loc>
|
||||
<lastmod>2024-01-12T16:29:48+00:00</lastmod>
|
||||
<priority>0.51</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://barta-india.in/bn/technology/flipkart-republic-day-big-deal-sale-2024-date-announced-know-the-offers-on-smartphones/</loc>
|
||||
<lastmod>2024-01-12T16:29:48+00:00</lastmod>
|
||||
<priority>0.51</priority>
|
||||
</url>
|
||||
|
||||
|
||||
</urlset>
|
||||
23
src/components/About.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1 class="text-4xl">About Page Content</h1>
|
||||
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ipsa, ipsam! Nisi aspernatur quibusdam soluta commodi labore optio? Molestias quasi fugiat voluptatibus impedit laboriosam cumque illo alias repellendus, similique minus ullam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ipsa, ipsam! Nisi aspernatur quibusdam soluta commodi labore optio? Molestias quasi fugiat voluptatibus impedit laboriosam cumque illo alias repellendus, similique minus ullam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ipsa, ipsam! Nisi aspernatur quibusdam soluta commodi labore optio? Molestias quasi fugiat voluptatibus impedit laboriosam cumque illo alias repellendus, similique minus ullam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ipsa, ipsam! Nisi aspernatur quibusdam soluta commodi labore optio? Molestias quasi fugiat voluptatibus impedit laboriosam cumque illo alias repellendus, similique minus ullam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ipsa, ipsam! Nisi aspernatur quibusdam soluta commodi labore optio? Molestias quasi fugiat voluptatibus impedit laboriosam cumque illo alias repellendus, similique minus ullam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ipsa, ipsam! Nisi aspernatur quibusdam soluta commodi labore optio? Molestias quasi fugiat voluptatibus impedit laboriosam cumque illo alias repellendus, similique minus ullam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ipsa, ipsam! Nisi aspernatur quibusdam soluta commodi labore optio? Molestias quasi fugiat voluptatibus impedit laboriosam cumque illo alias repellendus, similique minus ullam.</p>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'About'
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
p{
|
||||
font-size: 20px;
|
||||
}
|
||||
</style>
|
||||
103
src/components/AddFile.vue
Normal file
@@ -0,0 +1,103 @@
|
||||
<template>
|
||||
<div class="my-10">
|
||||
<section class="container mx-auto px-4 max-w-2xl shadow-lg rounded-xl p-6">
|
||||
<p class="text-2xl py-4">Edit News</p>
|
||||
<form id="formID">
|
||||
<p class="text-red-500" style="display: none;" id="errorMessage"></p>
|
||||
<p class="text-red-500" style="display: none;" id="errorMessage2"></p>
|
||||
<label for="file">Choose a file:</label>
|
||||
<input @change="saveFile" type="file" name="fileToUploadToSpApi" id="fileToUpload" required />
|
||||
</form>
|
||||
<form action="">
|
||||
<div>
|
||||
<input :value="data.file_url" type="text" name="fileLink" id="fileLink" class="p-2 border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl"/>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
slugURLbn: "",
|
||||
fullURL: "",
|
||||
spliturl: "",
|
||||
bartaData: {}, // Initialize bartaData as an object
|
||||
bnData: {},
|
||||
data:{},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// this.getBarta();
|
||||
let fullURL = window.location.href.split("/")[5].split('?add=')[1];
|
||||
console.log(fullURL)
|
||||
},
|
||||
methods: {
|
||||
saveFile(event) {
|
||||
event.preventDefault();
|
||||
let formData = new FormData();
|
||||
// Append the selected file to the FormData object
|
||||
formData.append('file', event.target.files[0]);
|
||||
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/upload_file/v2/`, {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(data => data.json())
|
||||
.then(data => {
|
||||
console.log(data);
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
},
|
||||
|
||||
// getBarta() {
|
||||
// let currentUrl = window.location.href;
|
||||
// console.log('full url', currentUrl)
|
||||
// let langValue = currentUrl.split("/")[5].split('?add=')[1];
|
||||
// console.log( langValue);
|
||||
// let formData = new FormData();
|
||||
// formData.append('slug', langValue);
|
||||
// fetch(`https://apisp.dev2.cicdhosting.com/_dedicated/dwd/edit-news/`, {
|
||||
// method: 'POST',
|
||||
// body: formData,
|
||||
// })
|
||||
// .then(response => response.json())
|
||||
// .then(data => {
|
||||
// // Assign fetched data to bartaData property
|
||||
// // console.log(data)
|
||||
// this.bartaData = data;
|
||||
// console.log(this.bartaData)
|
||||
// })
|
||||
// .catch(error => {
|
||||
// // console.log('An error occurred', error);
|
||||
// });
|
||||
// },
|
||||
// getBartaBN() {
|
||||
// let currentUrl = window.location.href;
|
||||
// let spliturl = currentUrl.split("/")[3].split("edit=")[1];
|
||||
// // console.log(spliturl);
|
||||
// let formData = new FormData();
|
||||
// formData.append('slug', spliturl);
|
||||
// fetch(`https://apisp.dev2.cicdhosting.com/_dedicated/dwd/edit-news/?action=news_bn`, {
|
||||
// method: 'POST',
|
||||
// body: formData,
|
||||
// })
|
||||
// .then(response => response.json())
|
||||
// .then(data => {
|
||||
// // Assign fetched data to bartaData property
|
||||
// // console.log(data)
|
||||
// this.bnData = data;
|
||||
// console.log(this.bnData)
|
||||
// })
|
||||
// .catch(error => {
|
||||
// // console.log('An error occurred', error);
|
||||
// });
|
||||
// },
|
||||
},
|
||||
};
|
||||
</script>
|
||||
18
src/components/AdminHeader.astro
Normal file
@@ -0,0 +1,18 @@
|
||||
<main>
|
||||
<div>
|
||||
<section class="bg-[#780A0A]">
|
||||
<div class="container mx-auto px-4 text-white ">
|
||||
<div class="flex flex-row ">
|
||||
<a class="p-4" href="/editor/add-news">Add News</a>
|
||||
<a class="p-4" href="/editor/edit-news">Edit News</a>
|
||||
<a class="p-4" href="/editor/add-file-list">Add Image</a>
|
||||
</div>
|
||||
<!-- <a href="/editor/add-news">Add News</a>
|
||||
<a href="/editor/add-news">Add News</a> -->
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
134
src/components/BNCategory.vue
Normal file
@@ -0,0 +1,134 @@
|
||||
<template>
|
||||
<div>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
|
||||
<div v-for="item in items" :key="item.id" class="flex flex-col border-2 border-[#780a0a] gap-6 p-4 place-content-between rounded-lg">
|
||||
<div class="flex flex-col">
|
||||
<div>
|
||||
<a class="flex flex-col" :href="`/bn/${item.slug}`">
|
||||
<img class="aspect-video rounded-t-lg" :src="item.img" :alt="item.title" />
|
||||
<h2 class="text-lg text-justify">{{ item.title }}</h2>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<!-- Overlay -->
|
||||
<div v-if="item.dialogOpen" class="fixed inset-0 bg-black opacity-50"></div>
|
||||
<dialog :id="`d-${item.id}`" class="shadow-xl rounded-xl md:w-[50%] xl:w-[30%] dialog" :open="item.dialogOpen">
|
||||
<form method="dialog">
|
||||
<div class="flex flex-col md:flex-col">
|
||||
<a :href="`/bn/${item.slug}`" class="flex flex-col md:flex-col">
|
||||
<img class="rounded-t-xl" :src="item.img" :alt="item.title" />
|
||||
<h1 class="text-lg font-bold">{{ item.heading }}</h1>
|
||||
<h2 class="text-justify">{{ item.in_brief }}</h2>
|
||||
</a>
|
||||
<div class="flex flex-row place-content-between place-items-center">
|
||||
<div class="flex flex-row place-content-between place-items-center p-2 space-x-6 shadow-lg shadow-gray-400 rounded-2xl">
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`whatsapp://send?text=${item.title}%20%0A%20https://barta-india.in/bn/${item.slug}`" data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`https://www.facebook.com/share.php?u=https://barta-india.in/bn/${item.slug}`" target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`http://www.twitter.com/share?url=https://barta-india.in/bn/${item.slug}&text=%20${item.title}`" target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/bn/${item.slug}&title=${item.title}&summary=${item.title}&source=${item.title}`" onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
<!-- <a class="hover:-translate-y-2 duration-[1s]" :href="`whatsapp://send?text=${item.title}%20%0A%20https://barta-india.in/${item.slug}`" data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`https://www.facebook.com/share.php?u=https://barta-india.in/bn/${item.slug}`" target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`http://www.twitter.com/share?url=https://barta-india.in/${item.slug}&text=${item.title}`" target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/${item.slug}&title=${item.title}&summary=${item.title}&source=${item.title}`" onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a> -->
|
||||
</div>
|
||||
<div class="flex border-b-4 border-gray-500 border-t rounded-full text-3xl hover:rotate-180 duration-[3s]">
|
||||
<button class="text-white font-bold py-2 px-4 bg-[#780a0a] rounded-full shadow-xl" @click="closeDialog(item)">✘</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row place-content-between">
|
||||
<button @click="openDialog(item)" class="bg-[#780a0a] text-white rounded-md font-bold py-2 px-6">In Brief</button>
|
||||
<a :href="`/bn/${item.slug}`" class="bg-[#780a0a] text-white rounded-md font-bold py-2 px-6">Details</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
items: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
openDialog(item) {
|
||||
item.dialogOpen = true;
|
||||
|
||||
window.addEventListener('keydown', this.handleKeyDown);
|
||||
},
|
||||
closeDialog(item) {
|
||||
item.dialogOpen = false;
|
||||
|
||||
window.removeEventListener('keydown', this.handleKeyDown);
|
||||
},
|
||||
handleKeyDown(event) {
|
||||
if (event.key === 'Escape') {
|
||||
|
||||
this.items.forEach(item => {
|
||||
item.dialogOpen = false;
|
||||
});
|
||||
|
||||
window.removeEventListener('keydown', this.handleKeyDown);
|
||||
}
|
||||
},
|
||||
getData() {
|
||||
let fullURL = window.location.href.split('/')[5].split('?cat=')[1];
|
||||
// console.log(fullURL);
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/_dedicated/dwd/category-bn/?cat=${fullURL}`)
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error('Network response was not ok');
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
// console.log(data);
|
||||
this.items = data;
|
||||
|
||||
this.items.forEach(item => {
|
||||
item.dialogOpen = false;
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('There was a problem with the fetch operation:', error);
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getData();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.dialog {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background-color: white; /* Adjust as needed */
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
/* Additional styles for the overlay (optional) */
|
||||
.dialog-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
||||
z-index: 999; /* Ensure the overlay is above other content */
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
134
src/components/ENCategory.vue
Normal file
@@ -0,0 +1,134 @@
|
||||
<template>
|
||||
<div>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
|
||||
<div v-for="item in items" :key="item.id" class="flex flex-col border-2 border-[#780a0a] gap-6 p-4 place-content-between rounded-lg">
|
||||
<div class="flex flex-col">
|
||||
<div>
|
||||
<a class="flex flex-col" :href="`/en/${item.slug}`">
|
||||
<img class="aspect-video rounded-t-lg" :src="item.img" :alt="item.title" />
|
||||
<h2 class="text-lg text-justify">{{ item.title }}</h2>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<!-- Overlay -->
|
||||
<div v-if="item.dialogOpen" class="fixed inset-0 bg-black opacity-50"></div>
|
||||
<dialog :id="`d-${item.id}`" class="shadow-xl rounded-xl md:w-[50%] xl:w-[30%] dialog" :open="item.dialogOpen">
|
||||
<form method="dialog">
|
||||
<div class="flex flex-col md:flex-col">
|
||||
<a :href="`/en/${item.slug}`" class="flex flex-col md:flex-col">
|
||||
<img class="rounded-t-xl" :src="item.img" :alt="item.title" />
|
||||
<h1 class="text-lg font-bold">{{ item.heading }}</h1>
|
||||
<h2 class="text-justify">{{ item.in_brief }}</h2>
|
||||
</a>
|
||||
<div class="flex flex-row place-content-between place-items-center">
|
||||
<div class="flex flex-row place-content-between place-items-center p-2 space-x-6 shadow-lg shadow-gray-400 rounded-2xl">
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`whatsapp://send?text=${item.title}%20%0A%20https://barta-india.in/en/${item.slug}`" data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`https://www.facebook.com/share.php?u=https://barta-india.in/en/${item.slug}`" target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`http://www.twitter.com/share?url=https://barta-india.in/en/${item.slug}&text=%20${item.title}`" target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/en/${item.slug}&title=${item.title}&summary=${item.title}&source=${item.title}`" onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
<!-- <a class="hover:-translate-y-2 duration-[1s]" :href="`whatsapp://send?text=${item.title}%20%0A%20https://barta-india.in/${item.slug}`" data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`https://www.facebook.com/share.php?u=https://barta-india.in/en/${item.slug}`" target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`http://www.twitter.com/share?url=https://barta-india.in/${item.slug}&text=${item.title}`" target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/${item.slug}&title=${item.title}&summary=${item.title}&source=${item.title}`" onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a> -->
|
||||
</div>
|
||||
<div class="flex border-b-4 border-gray-500 border-t rounded-full text-3xl hover:rotate-180 duration-[3s]">
|
||||
<button class="text-white font-bold py-2 px-4 bg-[#780a0a] rounded-full shadow-xl" @click="closeDialog(item)">✘</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row place-content-between">
|
||||
<button @click="openDialog(item)" class="bg-[#780a0a] text-white rounded-md font-bold py-2 px-6">In Brief</button>
|
||||
<a :href="`/en/${item.slug}`" class="bg-[#780a0a] text-white rounded-md font-bold py-2 px-6">Details</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
items: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
openDialog(item) {
|
||||
item.dialogOpen = true;
|
||||
|
||||
window.addEventListener('keydown', this.handleKeyDown);
|
||||
},
|
||||
closeDialog(item) {
|
||||
item.dialogOpen = false;
|
||||
|
||||
window.removeEventListener('keydown', this.handleKeyDown);
|
||||
},
|
||||
handleKeyDown(event) {
|
||||
if (event.key === 'Escape') {
|
||||
|
||||
this.items.forEach(item => {
|
||||
item.dialogOpen = false;
|
||||
});
|
||||
|
||||
window.removeEventListener('keydown', this.handleKeyDown);
|
||||
}
|
||||
},
|
||||
getData() {
|
||||
let fullURL = window.location.href.split('/')[5].split('?cat=')[1];
|
||||
// console.log(fullURL);
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/_dedicated/dwd/category-en/?cat=${fullURL}`)
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error('Network response was not ok');
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
// console.log(data);
|
||||
this.items = data;
|
||||
|
||||
this.items.forEach(item => {
|
||||
item.dialogOpen = false;
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('There was a problem with the fetch operation:', error);
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getData();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.dialog {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background-color: white; /* Adjust as needed */
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
/* Additional styles for the overlay (optional) */
|
||||
.dialog-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
||||
z-index: 999; /* Ensure the overlay is above other content */
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
134
src/components/ESCategory.vue
Normal file
@@ -0,0 +1,134 @@
|
||||
<template>
|
||||
<div>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
|
||||
<div v-for="item in items" :key="item.id" class="flex flex-col border-2 border-[#780a0a] gap-6 p-4 place-content-between rounded-lg">
|
||||
<div class="flex flex-col">
|
||||
<div>
|
||||
<a class="flex flex-col" :href="`/es/${item.slug}`">
|
||||
<img class="aspect-video rounded-t-lg" :src="item.img" :alt="item.title" />
|
||||
<h2 class="text-lg text-justify">{{ item.title }}</h2>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<!-- Overlay -->
|
||||
<div v-if="item.dialogOpen" class="fixed inset-0 bg-black opacity-50"></div>
|
||||
<dialog :id="`d-${item.id}`" class="shadow-xl rounded-xl md:w-[50%] xl:w-[30%] dialog" :open="item.dialogOpen">
|
||||
<form method="dialog">
|
||||
<div class="flex flex-col md:flex-col">
|
||||
<a :href="`/es/${item.slug}`" class="flex flex-col md:flex-col">
|
||||
<img class="rounded-t-xl" :src="item.img" :alt="item.title" />
|
||||
<h1 class="text-lg font-bold">{{ item.heading }}</h1>
|
||||
<h2 class="text-justify">{{ item.in_brief }}</h2>
|
||||
</a>
|
||||
<div class="flex flex-row place-content-between place-items-center">
|
||||
<div class="flex flex-row place-content-between place-items-center p-2 space-x-6 shadow-lg shadow-gray-400 rounded-2xl">
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`whatsapp://send?text=${item.title}%20%0A%20https://barta-india.in/es/${item.slug}`" data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`https://www.facebook.com/share.php?u=https://barta-india.in/es/${item.slug}`" target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`http://www.twitter.com/share?url=https://barta-india.in/es/${item.slug}&text=%20${item.title}`" target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/es/${item.slug}&title=${item.title}&summary=${item.title}&source=${item.title}`" onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
<!-- <a class="hover:-translate-y-2 duration-[1s]" :href="`whatsapp://send?text=${item.title}%20%0A%20https://barta-india.in/${item.slug}`" data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`https://www.facebook.com/share.php?u=https://barta-india.in/es/${item.slug}`" target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`http://www.twitter.com/share?url=https://barta-india.in/${item.slug}&text=${item.title}`" target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/${item.slug}&title=${item.title}&summary=${item.title}&source=${item.title}`" onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a> -->
|
||||
</div>
|
||||
<div class="flex border-b-4 border-gray-500 border-t rounded-full text-3xl hover:rotate-180 duration-[3s]">
|
||||
<button class="text-white font-bold py-2 px-4 bg-[#780a0a] rounded-full shadow-xl" @click="closeDialog(item)">✘</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row place-content-between">
|
||||
<button @click="openDialog(item)" class="bg-[#780a0a] text-white rounded-md font-bold py-2 px-6">In Brief</button>
|
||||
<a :href="`/es/${item.slug}`" class="bg-[#780a0a] text-white rounded-md font-bold py-2 px-6">Details</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
items: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
openDialog(item) {
|
||||
item.dialogOpen = true;
|
||||
|
||||
window.addEventListener('keydown', this.handleKeyDown);
|
||||
},
|
||||
closeDialog(item) {
|
||||
item.dialogOpen = false;
|
||||
|
||||
window.removeEventListener('keydown', this.handleKeyDown);
|
||||
},
|
||||
handleKeyDown(event) {
|
||||
if (event.key === 'Escape') {
|
||||
|
||||
this.items.forEach(item => {
|
||||
item.dialogOpen = false;
|
||||
});
|
||||
|
||||
window.removeEventListener('keydown', this.handleKeyDown);
|
||||
}
|
||||
},
|
||||
getData() {
|
||||
let fullURL = window.location.href.split('/')[5].split('?cat=')[1];
|
||||
// console.log(fullURL);
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/_dedicated/dwd/category-es/?cat=${fullURL}`)
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error('Network response was not ok');
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
// console.log(data);
|
||||
this.items = data;
|
||||
|
||||
this.items.forEach(item => {
|
||||
item.dialogOpen = false;
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('There was a problem with the fetch operation:', error);
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getData();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.dialog {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background-color: white; /* Adjust as needed */
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
/* Additional styles for the overlay (optional) */
|
||||
.dialog-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
||||
z-index: 999; /* Ensure the overlay is above other content */
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
149
src/components/EditNews.vue
Normal file
@@ -0,0 +1,149 @@
|
||||
<template>
|
||||
<div class="my-10">
|
||||
<section class="container mx-auto px-4 max-w-2xl shadow-lg rounded-xl p-6">
|
||||
<div class="flex flex-row place-content-evenly">
|
||||
<a :href="'?edit=' + bartaData.slug + '&lang=en'" class="bg-[#580a0a] text-white px-4 py-2 rounded-lg">English</a>
|
||||
<a :href="'?edit=' + bartaData.slug + '&lang=bn'" class="bg-[#580a0a] text-white px-4 py-2 rounded-lg">Bengali</a>
|
||||
<a :href="'?edit=' + bartaData.slug + '&lang=hi'" class="bg-[#580a0a] text-white px-4 py-2 rounded-lg">Hindi</a>
|
||||
<a :href="'?edit=' + bartaData.slug + '&lang=zh'" class="bg-[#580a0a] text-white px-4 py-2 rounded-lg">Mandarin</a>
|
||||
<a :href="'?edit=' + bartaData.slug + '&lang=es'" class="bg-[#580a0a] text-white px-4 py-2 rounded-lg">Spanish</a>
|
||||
|
||||
</div>
|
||||
<p class="text-2xl py-4">Edit News</p>
|
||||
<form id="newsForm" class="flex flex-col space-y-4">
|
||||
<div class="flex flex-col">
|
||||
<label for="status">Status<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<select name="status" id="status" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2" required>
|
||||
<option :value="bartaData.status">{{ bartaData.status }}</option>
|
||||
<option value="published">Published</option>
|
||||
<option value="draft">Draft</option>
|
||||
<option value="archived">Archived</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<label for="language">Language<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<select name="language" id="language" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2" required>
|
||||
<option value="null">-Select-</option>
|
||||
<option value="bengali">Bengali</option>
|
||||
<option value="english">English</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<label for="category">Category<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<select name="category" id="category" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2">
|
||||
<option :value="bartaData.category">{{ bartaData.category }}</option>
|
||||
<option value="national">National</option>
|
||||
<option value="politics">Politics</option>
|
||||
<option value="local">Local</option>
|
||||
<option value="technology">Technology</option>
|
||||
<option value="world">World</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<label for="title">Title<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<input :value="bartaData.title" name="title" id="title" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2" type="text" required>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<label for="slug">Slug<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<input oninput="updateSlug();" name="slug" id="slug" :value="bartaData.slug" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2" type="text" required>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<label for="heading">Heading<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<input :value="bartaData.heading" name="heading" id="heading" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2" type="text" required>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<label for="meta_title">Meta Title<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<input :value="bartaData.meta_title" name="meta_title" id="meta_title" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2" type="text" placeholder="max: length 60 characters & try to use common words" required>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<label for="meta_description">Meta Description<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<input :value="bartaData.meta_description" name="meta_description" id="meta_description" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2" type="text" placeholder="max: length 160 characters & try to use common words" required>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<label for="in_brief">In Brief<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<input :value="bartaData.in_brief" name="in_brief" id="in_brief" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2" type="text" placeholder="max: length 280 characters & try to descibe" required>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<label class="text-lg" for="content">News Description<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<textarea class="border-2 p-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl" name="content" id="content" cols="30" rows="10" required>{{ bartaData.content }}</textarea>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<label for="upldFile">Upload File</label>
|
||||
<input id="upldFile" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl" type="file">
|
||||
</div>
|
||||
<div class="flex float-right">
|
||||
<button onclick="callApi(event);" class="bg-[#580a0a] text-white px-4 py-2 rounded-lg">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<div></div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
slugURLbn: "",
|
||||
fullURL: "",
|
||||
spliturl: "",
|
||||
bartaData: {}, // Initialize bartaData as an object
|
||||
bnData: {},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getBarta();
|
||||
let fullURL = window.location.href.split("/")[4];
|
||||
// console.log(fullURL + '&lang=en')
|
||||
},
|
||||
methods: {
|
||||
getBarta() {
|
||||
let currentUrl = window.location.href;
|
||||
let langValue = currentUrl.split("/")[4].split("lang=")[1];
|
||||
let spliturl = currentUrl.split("/")[4].split("edit=")[1].split(`lang=${langValue}`)[0].split(`&`)[0];
|
||||
console.log(spliturl, langValue);
|
||||
let formData = new FormData();
|
||||
formData.append('slug', spliturl);
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/_dedicated/dwd/edit-news/?action=news_${langValue}`, {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
// Assign fetched data to bartaData property
|
||||
// console.log(data)
|
||||
this.bartaData = data;
|
||||
console.log(this.bartaData)
|
||||
})
|
||||
.catch(error => {
|
||||
// console.log('An error occurred', error);
|
||||
});
|
||||
},
|
||||
// getBartaBN() {
|
||||
// let currentUrl = window.location.href;
|
||||
// let spliturl = currentUrl.split("/")[3].split("edit=")[1];
|
||||
// // console.log(spliturl);
|
||||
// let formData = new FormData();
|
||||
// formData.append('slug', spliturl);
|
||||
// fetch(`https://apisp.dev2.cicdhosting.com/_dedicated/dwd/edit-news/?action=news_bn`, {
|
||||
// method: 'POST',
|
||||
// body: formData,
|
||||
// })
|
||||
// .then(response => response.json())
|
||||
// .then(data => {
|
||||
// // Assign fetched data to bartaData property
|
||||
// // console.log(data)
|
||||
// this.bnData = data;
|
||||
// console.log(this.bnData)
|
||||
// })
|
||||
// .catch(error => {
|
||||
// // console.log('An error occurred', error);
|
||||
// });
|
||||
// },
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -1,169 +1,46 @@
|
||||
<footer class="text-center lg:text-left bg-gray-100 text-gray-600">
|
||||
<div class="flex justify-center items-center lg:justify-between p-6 border-b border-gray-300">
|
||||
<div class="mr-12 hidden lg:block">
|
||||
<span>Get connected with us on social networks:</span>
|
||||
</div>
|
||||
<div class="flex justify-center">
|
||||
<a href="#!" class="mr-6 text-gray-600">
|
||||
<svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="facebook-f"
|
||||
class="w-2.5" role="img" xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 320 512">
|
||||
<path fill="currentColor"
|
||||
d="M279.14 288l14.22-92.66h-88.91v-60.13c0-25.35 12.42-50.06 52.24-50.06h40.42V6.26S260.43 0 225.36 0c-73.22 0-121.08 44.38-121.08 124.72v70.62H22.89V288h81.39v224h100.17V288z">
|
||||
</path>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="#!" class="mr-6 text-gray-600">
|
||||
<svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="twitter"
|
||||
class="w-4" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
||||
<path fill="currentColor"
|
||||
d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z">
|
||||
</path>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="#!" class="mr-6 text-gray-600">
|
||||
<svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="google"
|
||||
class="w-3.5" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 488 512">
|
||||
<path fill="currentColor"
|
||||
d="M488 261.8C488 403.3 391.1 504 248 504 110.8 504 0 393.2 0 256S110.8 8 248 8c66.8 0 123 24.5 166.3 64.9l-67.5 64.9C258.5 52.6 94.3 116.6 94.3 256c0 86.5 69.1 156.6 153.7 156.6 98.2 0 135-70.4 140.8-106.9H248v-85.3h236.1c2.3 12.7 3.9 24.9 3.9 41.4z">
|
||||
</path>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="#!" class="mr-6 text-gray-600">
|
||||
<svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="instagram"
|
||||
class="w-3.5" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
|
||||
<path fill="currentColor"
|
||||
d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z">
|
||||
</path>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="#!" class="mr-6 text-gray-600">
|
||||
<svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="linkedin-in"
|
||||
class="w-3.5" role="img" xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 448 512">
|
||||
<path fill="currentColor"
|
||||
d="M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z">
|
||||
</path>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="#!" class="text-gray-600">
|
||||
<svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="github"
|
||||
class="w-4" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512">
|
||||
<path fill="currentColor"
|
||||
d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z">
|
||||
</path>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mx-6 py-10 text-center md:text-left">
|
||||
<div class="grid grid-1 md:grid-cols-2 lg:grid-cols-4 gap-8">
|
||||
<div class="">
|
||||
<h6 class="
|
||||
uppercase
|
||||
font-semibold
|
||||
mb-4
|
||||
flex
|
||||
items-center
|
||||
justify-center
|
||||
md:justify-start
|
||||
">
|
||||
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="cubes"
|
||||
class="w-4 mr-3" role="img" xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 512 512">
|
||||
<path fill="currentColor"
|
||||
d="M488.6 250.2L392 214V105.5c0-15-9.3-28.4-23.4-33.7l-100-37.5c-8.1-3.1-17.1-3.1-25.3 0l-100 37.5c-14.1 5.3-23.4 18.7-23.4 33.7V214l-96.6 36.2C9.3 255.5 0 268.9 0 283.9V394c0 13.6 7.7 26.1 19.9 32.2l100 50c10.1 5.1 22.1 5.1 32.2 0l103.9-52 103.9 52c10.1 5.1 22.1 5.1 32.2 0l100-50c12.2-6.1 19.9-18.6 19.9-32.2V283.9c0-15-9.3-28.4-23.4-33.7zM358 214.8l-85 31.9v-68.2l85-37v73.3zM154 104.1l102-38.2 102 38.2v.6l-102 41.4-102-41.4v-.6zm84 291.1l-85 42.5v-79.1l85-38.8v75.4zm0-112l-102 41.4-102-41.4v-.6l102-38.2 102 38.2v.6zm240 112l-85 42.5v-79.1l85-38.8v75.4zm0-112l-102 41.4-102-41.4v-.6l102-38.2 102 38.2v.6z">
|
||||
</path>
|
||||
</svg>
|
||||
Tailwind ELEMENTS
|
||||
</h6>
|
||||
<p>
|
||||
Here you can use rows and columns to organize your footer content. Lorem ipsum dolor
|
||||
sit amet, consectetur adipisicing elit.
|
||||
</p>
|
||||
<main>
|
||||
<div class="mt-20">
|
||||
<section class="container-fluid bg-[#780a0a]">
|
||||
<div class="container mx-auto grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-4 p-4">
|
||||
<div class="flex flex-col border-2 rounded-xl p-2 justify-center">
|
||||
<img class="w-[150px]" src="/img/barta_logo.png" alt="Barta Logo" />
|
||||
<p class="text-white text-justify">Barta India (barta-india.in) is your trusted online news hub, delivering timely and reliable updates on global events. Explore breaking news, in-depth analyses, and engaging stories covering diverse topics from politics to technology. Stay well-informed with Barta India - your window to the world.</p>
|
||||
</div>
|
||||
<div class="">
|
||||
<h6 class="uppercase font-semibold mb-4 flex justify-center md:justify-start">
|
||||
Products
|
||||
</h6>
|
||||
<p class="mb-4">
|
||||
<a href="#!" class="text-gray-600">Angular</a>
|
||||
</p>
|
||||
<p class="mb-4">
|
||||
<a href="#!" class="text-gray-600">React</a>
|
||||
</p>
|
||||
<p class="mb-4">
|
||||
<a href="#!" class="text-gray-600">Vue</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="#!" class="text-gray-600">Laravel</a>
|
||||
</p>
|
||||
<div class="flex flex-col border-2 rounded-xl p-2 text-white ">
|
||||
<h2 class="text-xl font-bold border-b-2 border-white pb-2 mb-3">Category Link</h2>
|
||||
<div class="flex flex-col space-y-5">
|
||||
<a href="/national">National</a>
|
||||
<a href="/politics">Politics</a>
|
||||
<a href="/local">Local</a>
|
||||
<a href="/article">Article</a>
|
||||
<!-- <a href="/contact">Contact</a> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<h6 class="uppercase font-semibold mb-4 flex justify-center md:justify-start">
|
||||
Useful links
|
||||
</h6>
|
||||
<p class="mb-4">
|
||||
<a href="#!" class="text-gray-600">Pricing</a>
|
||||
</p>
|
||||
<p class="mb-4">
|
||||
<a href="#!" class="text-gray-600">Settings</a>
|
||||
</p>
|
||||
<p class="mb-4">
|
||||
<a href="#!" class="text-gray-600">Orders</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="#!" class="text-gray-600">Help</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="">
|
||||
<h6 class="uppercase font-semibold mb-4 flex justify-center md:justify-start">
|
||||
Contact
|
||||
</h6>
|
||||
<p class="flex items-center justify-center md:justify-start mb-4">
|
||||
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="home"
|
||||
class="w-4 mr-4" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">
|
||||
<path fill="currentColor"
|
||||
d="M280.37 148.26L96 300.11V464a16 16 0 0 0 16 16l112.06-.29a16 16 0 0 0 15.92-16V368a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16v95.64a16 16 0 0 0 16 16.05L464 480a16 16 0 0 0 16-16V300L295.67 148.26a12.19 12.19 0 0 0-15.3 0zM571.6 251.47L488 182.56V44.05a12 12 0 0 0-12-12h-56a12 12 0 0 0-12 12v72.61L318.47 43a48 48 0 0 0-61 0L4.34 251.47a12 12 0 0 0-1.6 16.9l25.5 31A12 12 0 0 0 45.15 301l235.22-193.74a12.19 12.19 0 0 1 15.3 0L530.9 301a12 12 0 0 0 16.9-1.6l25.5-31a12 12 0 0 0-1.7-16.93z">
|
||||
</path>
|
||||
</svg>
|
||||
New York, NY 10012, US
|
||||
</p>
|
||||
<p class="flex items-center justify-center md:justify-start mb-4">
|
||||
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="envelope"
|
||||
class="w-4 mr-4" role="img" xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 512 512">
|
||||
<path fill="currentColor"
|
||||
d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z">
|
||||
</path>
|
||||
</svg>
|
||||
info@example.com
|
||||
</p>
|
||||
<p class="flex items-center justify-center md:justify-start mb-4">
|
||||
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="phone"
|
||||
class="w-4 mr-4" role="img" xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 512 512">
|
||||
<path fill="currentColor"
|
||||
d="M493.4 24.6l-104-24c-11.3-2.6-22.9 3.3-27.5 13.9l-48 112c-4.2 9.8-1.4 21.3 6.9 28l60.6 49.6c-36 76.7-98.9 140.5-177.2 177.2l-49.6-60.6c-6.8-8.3-18.2-11.1-28-6.9l-112 48C3.9 366.5-2 378.1.6 389.4l24 104C27.1 504.2 36.7 512 48 512c256.1 0 464-207.5 464-464 0-11.2-7.7-20.9-18.6-23.4z">
|
||||
</path>
|
||||
</svg>
|
||||
+ 01 234 567 88
|
||||
</p>
|
||||
<p class="flex items-center justify-center md:justify-start">
|
||||
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="print"
|
||||
class="w-4 mr-4" role="img" xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 512 512">
|
||||
<path fill="currentColor"
|
||||
d="M448 192V77.25c0-8.49-3.37-16.62-9.37-22.63L393.37 9.37c-6-6-14.14-9.37-22.63-9.37H96C78.33 0 64 14.33 64 32v160c-35.35 0-64 28.65-64 64v112c0 8.84 7.16 16 16 16h48v96c0 17.67 14.33 32 32 32h320c17.67 0 32-14.33 32-32v-96h48c8.84 0 16-7.16 16-16V256c0-35.35-28.65-64-64-64zm-64 256H128v-96h256v96zm0-224H128V64h192v48c0 8.84 7.16 16 16 16h48v96zm48 72c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z">
|
||||
</path>
|
||||
</svg>
|
||||
+ 01 234 567 89
|
||||
</p>
|
||||
<div class="flex flex-col border-2 rounded-xl p-2 text-white ">
|
||||
<h2 class="text-xl font-bold border-b-2 border-white pb-2 mb-3">Other's Link</h2>
|
||||
<div class="flex flex-col space-y-8">
|
||||
<a href="/terms-and-conditions">Terms & Conditions</a>
|
||||
<a href="/privacy-policy">Privacy Policy</a>
|
||||
<a href="/contact">Contact Us</a>
|
||||
<!-- <a href="/article">Article</a> -->
|
||||
<!-- <a href="/contact">Contact</a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div class="flex bg-[#780a0a] text-white justify-center place-items-center border-t-4 border-white py-4">
|
||||
<a href="https://dwd.siliconpin.com/" target="_blank">Powered by <span class="font-bold">DWD Consultancy Services</span></a>
|
||||
</div>
|
||||
<div class="text-center p-6 bg-gray-200">
|
||||
<span>© 2021 Copyright:</span>
|
||||
<a class="text-gray-600 font-semibold" href="https://tailwind-elements.com/">Tailwind Elements</a>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</main>
|
||||
<script defer type="text/javascript" src="/js/js-0.1.0.js"></script>
|
||||
<!-- Google tag (gtag.js) -->
|
||||
|
||||
<script is:inline async src="https://www.googletagmanager.com/gtag/js?id=G-GXF4D64859"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'G-GXF4D64859');
|
||||
</script>
|
||||
64
src/components/GetData.vue
Normal file
@@ -0,0 +1,64 @@
|
||||
<template>
|
||||
<div>
|
||||
<section class="container mx-auto px-4">
|
||||
<label for="langValue">Read Also:</label>
|
||||
<select v-on:change="dataCall()" v-model="langValue" name="langValue" id="langValue">
|
||||
<option value="en">English</option>
|
||||
<option value="bn">Bengali</option>
|
||||
<option value="hi">Hindi</option>
|
||||
<option value="zh">Mandarin</option>
|
||||
<option value="es">Espanish</option>
|
||||
</select>
|
||||
<div v-for="items in items" :key="items.id">
|
||||
<p>{{ items.title }}</p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
data: "",
|
||||
items: "",
|
||||
langValue: 'en'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
dataCall(){
|
||||
// let fullURL = window.location.href;
|
||||
// console.log(fullURL)
|
||||
console.log(langValue)
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/_dedicated/dwd/get-news/?action=news_${this.langValue}`)
|
||||
.then(data => data.json())
|
||||
.then(data => {
|
||||
console.log(data)
|
||||
this.items = data;
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error)
|
||||
})
|
||||
}
|
||||
// getData() {
|
||||
// fetch('https://apisp.dev2.cicdhosting.com/_dedicated/dwd/get-news/')
|
||||
// .then(response => {
|
||||
// if (!response.ok) {
|
||||
// throw new Error('Network response was not ok');
|
||||
// }
|
||||
// return response.json();
|
||||
// })
|
||||
// .then(data => {
|
||||
// // Handle the JSON response data
|
||||
// console.log(data);
|
||||
// })
|
||||
// .catch(error => {
|
||||
// // Handle any errors that occurred during the fetch
|
||||
// console.error('Fetch error:', error);
|
||||
// });
|
||||
// }
|
||||
},
|
||||
mounted() {
|
||||
this.dataCall(); // Call the getData function when the component is mounted
|
||||
}
|
||||
};
|
||||
</script>
|
||||
134
src/components/HICategory.vue
Normal file
@@ -0,0 +1,134 @@
|
||||
<template>
|
||||
<div>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
|
||||
<div v-for="item in items" :key="item.id" class="flex flex-col border-2 border-[#780a0a] gap-6 p-4 place-content-between rounded-lg">
|
||||
<div class="flex flex-col">
|
||||
<div>
|
||||
<a class="flex flex-col" :href="`/hi/${item.slug}`">
|
||||
<img class="aspect-video rounded-t-lg" :src="item.img" :alt="item.title" />
|
||||
<h2 class="text-lg text-justify">{{ item.title }}</h2>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<!-- Overlay -->
|
||||
<div v-if="item.dialogOpen" class="fixed inset-0 bg-black opacity-50"></div>
|
||||
<dialog :id="`d-${item.id}`" class="shadow-xl rounded-xl md:w-[50%] xl:w-[30%] dialog" :open="item.dialogOpen">
|
||||
<form method="dialog">
|
||||
<div class="flex flex-col md:flex-col">
|
||||
<a :href="`/hi/${item.slug}`" class="flex flex-col md:flex-col">
|
||||
<img class="rounded-t-xl" :src="item.img" :alt="item.title" />
|
||||
<h1 class="text-lg font-bold">{{ item.heading }}</h1>
|
||||
<h2 class="text-justify">{{ item.in_brief }}</h2>
|
||||
</a>
|
||||
<div class="flex flex-row place-content-between place-items-center">
|
||||
<div class="flex flex-row place-content-between place-items-center p-2 space-x-6 shadow-lg shadow-gray-400 rounded-2xl">
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`whatsapp://send?text=${item.title}%20%0A%20https://barta-india.in/hi/${item.slug}`" data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`https://www.facebook.com/share.php?u=https://barta-india.in/hi/${item.slug}`" target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`http://www.twitter.com/share?url=https://barta-india.in/hi/${item.slug}&text=%20${item.title}`" target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/hi/${item.slug}&title=${item.title}&summary=${item.title}&source=${item.title}`" onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
<!-- <a class="hover:-translate-y-2 duration-[1s]" :href="`whatsapp://send?text=${item.title}%20%0A%20https://barta-india.in/${item.slug}`" data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`https://www.facebook.com/share.php?u=https://barta-india.in/hi/${item.slug}`" target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`http://www.twitter.com/share?url=https://barta-india.in/${item.slug}&text=${item.title}`" target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/${item.slug}&title=${item.title}&summary=${item.title}&source=${item.title}`" onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a> -->
|
||||
</div>
|
||||
<div class="flex border-b-4 border-gray-500 border-t rounded-full text-3xl hover:rotate-180 duration-[3s]">
|
||||
<button class="text-white font-bold py-2 px-4 bg-[#780a0a] rounded-full shadow-xl" @click="closeDialog(item)">✘</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row place-content-between">
|
||||
<button @click="openDialog(item)" class="bg-[#780a0a] text-white rounded-md font-bold py-2 px-6">In Brief</button>
|
||||
<a :href="`/hi/${item.slug}`" class="bg-[#780a0a] text-white rounded-md font-bold py-2 px-6">Details</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
items: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
openDialog(item) {
|
||||
item.dialogOpen = true;
|
||||
|
||||
window.addEventListener('keydown', this.handleKeyDown);
|
||||
},
|
||||
closeDialog(item) {
|
||||
item.dialogOpen = false;
|
||||
|
||||
window.removeEventListener('keydown', this.handleKeyDown);
|
||||
},
|
||||
handleKeyDown(event) {
|
||||
if (event.key === 'Escape') {
|
||||
|
||||
this.items.forEach(item => {
|
||||
item.dialogOpen = false;
|
||||
});
|
||||
|
||||
window.removeEventListener('keydown', this.handleKeyDown);
|
||||
}
|
||||
},
|
||||
getData() {
|
||||
let fullURL = window.location.href.split('/')[5].split('?cat=')[1];
|
||||
// console.log(fullURL);
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/_dedicated/dwd/category-hi/?cat=${fullURL}`)
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error('Network response was not ok');
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
// console.log(data);
|
||||
this.items = data;
|
||||
|
||||
this.items.forEach(item => {
|
||||
item.dialogOpen = false;
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('There was a problem with the fetch operation:', error);
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getData();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.dialog {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background-color: white; /* Adjust as needed */
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
/* Additional styles for the overlay (optional) */
|
||||
.dialog-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
||||
z-index: 999; /* Ensure the overlay is above other content */
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
103
src/components/HashRouting.vue
Normal file
@@ -0,0 +1,103 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<div>
|
||||
<!-- <a href="#/" @click.prevent="navigateTo('/')">Home</a> |
|
||||
<a href="#/about" @click.prevent="navigateTo('/about')">About</a> -->
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<!-- <component :is="currentComponent"></component> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- <script>
|
||||
import Home from './Home.vue';
|
||||
import About from './About.vue';
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
data() {
|
||||
return {
|
||||
currentRoute: window.location.hash.substr(1),
|
||||
routes: {
|
||||
'/': Home,
|
||||
'/about': About
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
currentComponent() {
|
||||
return this.routes[this.currentRoute] || Home;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
navigateTo(route) {
|
||||
this.currentRoute = route;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
currentRoute() {
|
||||
window.location.hash = this.currentRoute;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script> -->
|
||||
|
||||
<style>
|
||||
/* Add your styles here if needed */
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <template>
|
||||
<div>
|
||||
<div class="flex flex-row space-4 z-10 my-20">
|
||||
<a href="#section1">Section - 1</a>
|
||||
<a href="#section2">Section - 2</a>
|
||||
<a href="#section3">Section - 3</a>
|
||||
</div>
|
||||
<section id="section1">
|
||||
<div>
|
||||
<h1 class="text-4xl">Section - 1</h1>
|
||||
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Veritatis rem id distinctio officia odio, quasi ratione perferendis. Soluta delectus aspernatur, dicta voluptatibus autem consectetur, error, enim saepe possimus quidem ex?</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Repellat eaque quas maiores doloremque. Esse quos aliquam doloremque impedit consequatur, dignissimos exercitationem quaerat incidunt numquam voluptatum quae deserunt voluptas quod laboriosam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Repellat eaque quas maiores doloremque. Esse quos aliquam doloremque impedit consequatur, dignissimos exercitationem quaerat incidunt numquam voluptatum quae deserunt voluptas quod laboriosam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Repellat eaque quas maiores doloremque. Esse quos aliquam doloremque impedit consequatur, dignissimos exercitationem quaerat incidunt numquam voluptatum quae deserunt voluptas quod laboriosam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Repellat eaque quas maiores doloremque. Esse quos aliquam doloremque impedit consequatur, dignissimos exercitationem quaerat incidunt numquam voluptatum quae deserunt voluptas quod laboriosam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Repellat eaque quas maiores doloremque. Esse quos aliquam doloremque impedit consequatur, dignissimos exercitationem quaerat incidunt numquam voluptatum quae deserunt voluptas quod laboriosam.</p>
|
||||
</div>
|
||||
</section>
|
||||
<section id="section2">
|
||||
<div>
|
||||
<h1 class="text-4xl">Section - 1</h1>
|
||||
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Veritatis rem id distinctio officia odio, quasi ratione perferendis. Soluta delectus aspernatur, dicta voluptatibus autem consectetur, error, enim saepe possimus quidem ex?</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Repellat eaque quas maiores doloremque. Esse quos aliquam doloremque impedit consequatur, dignissimos exercitationem quaerat incidunt numquam voluptatum quae deserunt voluptas quod laboriosam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Repellat eaque quas maiores doloremque. Esse quos aliquam doloremque impedit consequatur, dignissimos exercitationem quaerat incidunt numquam voluptatum quae deserunt voluptas quod laboriosam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Repellat eaque quas maiores doloremque. Esse quos aliquam doloremque impedit consequatur, dignissimos exercitationem quaerat incidunt numquam voluptatum quae deserunt voluptas quod laboriosam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Repellat eaque quas maiores doloremque. Esse quos aliquam doloremque impedit consequatur, dignissimos exercitationem quaerat incidunt numquam voluptatum quae deserunt voluptas quod laboriosam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Repellat eaque quas maiores doloremque. Esse quos aliquam doloremque impedit consequatur, dignissimos exercitationem quaerat incidunt numquam voluptatum quae deserunt voluptas quod laboriosam.</p>
|
||||
</div>
|
||||
</section>
|
||||
<section id="section3">
|
||||
<div>
|
||||
<h1 class="text-4xl">Section - 1</h1>
|
||||
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Veritatis rem id distinctio officia odio, quasi ratione perferendis. Soluta delectus aspernatur, dicta voluptatibus autem consectetur, error, enim saepe possimus quidem ex?</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Repellat eaque quas maiores doloremque. Esse quos aliquam doloremque impedit consequatur, dignissimos exercitationem quaerat incidunt numquam voluptatum quae deserunt voluptas quod laboriosam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Repellat eaque quas maiores doloremque. Esse quos aliquam doloremque impedit consequatur, dignissimos exercitationem quaerat incidunt numquam voluptatum quae deserunt voluptas quod laboriosam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Repellat eaque quas maiores doloremque. Esse quos aliquam doloremque impedit consequatur, dignissimos exercitationem quaerat incidunt numquam voluptatum quae deserunt voluptas quod laboriosam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Repellat eaque quas maiores doloremque. Esse quos aliquam doloremque impedit consequatur, dignissimos exercitationem quaerat incidunt numquam voluptatum quae deserunt voluptas quod laboriosam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Repellat eaque quas maiores doloremque. Esse quos aliquam doloremque impedit consequatur, dignissimos exercitationem quaerat incidunt numquam voluptatum quae deserunt voluptas quod laboriosam.</p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
<style>
|
||||
p{
|
||||
font-size: 20px;
|
||||
}
|
||||
</style> -->
|
||||
22
src/components/Home.vue
Normal file
@@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1 class="text-4xl">Home Page Content</h1>
|
||||
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ipsa, ipsam! Nisi aspernatur quibusdam soluta commodi labore optio? Molestias quasi fugiat voluptatibus impedit laboriosam cumque illo alias repellendus, similique minus ullam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ipsa, ipsam! Nisi aspernatur quibusdam soluta commodi labore optio? Molestias quasi fugiat voluptatibus impedit laboriosam cumque illo alias repellendus, similique minus ullam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ipsa, ipsam! Nisi aspernatur quibusdam soluta commodi labore optio? Molestias quasi fugiat voluptatibus impedit laboriosam cumque illo alias repellendus, similique minus ullam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ipsa, ipsam! Nisi aspernatur quibusdam soluta commodi labore optio? Molestias quasi fugiat voluptatibus impedit laboriosam cumque illo alias repellendus, similique minus ullam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ipsa, ipsam! Nisi aspernatur quibusdam soluta commodi labore optio? Molestias quasi fugiat voluptatibus impedit laboriosam cumque illo alias repellendus, similique minus ullam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ipsa, ipsam! Nisi aspernatur quibusdam soluta commodi labore optio? Molestias quasi fugiat voluptatibus impedit laboriosam cumque illo alias repellendus, similique minus ullam.</p>
|
||||
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ipsa, ipsam! Nisi aspernatur quibusdam soluta commodi labore optio? Molestias quasi fugiat voluptatibus impedit laboriosam cumque illo alias repellendus, similique minus ullam.</p>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'Home'
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
p{
|
||||
font-size: 20px;
|
||||
}
|
||||
</style>
|
||||
37
src/components/ImageUpload.vue
Normal file
@@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<!-- <button @click="uploadFile">Upload a file...</button> -->
|
||||
</template>
|
||||
|
||||
<!-- <script lang="ts">
|
||||
import { openUploadModal } from "@bytescale/upload-widget-vue";
|
||||
import type { UploadWidgetConfig, UploadWidgetResult } from "@bytescale/upload-widget";
|
||||
import type { PreventableEvent } from "@bytescale/upload-widget-vue";
|
||||
|
||||
// -----
|
||||
// Configuration:
|
||||
// https://www.bytescale.com/docs/upload-widget#configuration
|
||||
// -----
|
||||
const options: UploadWidgetConfig = {
|
||||
apiKey: "public_W142iS49Lc7EEN1moVR4ekPmkG13", // Get API key: https://www.bytescale.com/get-started
|
||||
maxFileCount: 10
|
||||
};
|
||||
|
||||
export default {
|
||||
name: "App",
|
||||
methods: {
|
||||
uploadFile(event: PreventableEvent) {
|
||||
openUploadModal({
|
||||
event,
|
||||
options,
|
||||
onComplete: (files: UploadWidgetResult[]) => {
|
||||
if (files.length === 0) {
|
||||
alert("No files selected.");
|
||||
} else {
|
||||
alert(files.map(f => f.fileUrl).join("\n"));
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script> -->
|
||||
238
src/components/MainHeader.astro
Normal file
@@ -0,0 +1,238 @@
|
||||
<main>
|
||||
<div>
|
||||
<nav>
|
||||
<div class="logo">
|
||||
<!-- <img class="w-[50px] rounded-full drop-shadow-2xl p-0.5 animate-[spin_3s_ease]" src="/img/logo.svg" alt="" /> animate-[bounce_3s_ease] -->
|
||||
<a href="/en"><img class=" border-2 rounded-md border-white shadow-md shadow-white drop-shadow-2xl " src="/img/barta_logo.png" alt="Barta Logo" /></a>
|
||||
</div>
|
||||
<div class="hamburger">
|
||||
<div class="line1"></div>
|
||||
<div class="line2"></div>
|
||||
<div class="line3"></div>
|
||||
</div>
|
||||
<ul class="nav-links">
|
||||
<li><a class="text-yellow-500" href="/bn">বাংলা</a></li>
|
||||
<li><a href="/en">Home</a></li>
|
||||
<li><a href="/national">National</a></li>
|
||||
<li><a href="/politics">Politics</a></li>
|
||||
<li><a href="/local">Local</a></li>
|
||||
<li><a href="/technology">Technology</a></li>
|
||||
<!-- <li><a href="/about-us">About</a></li> -->
|
||||
<li><a href="/contact">Contact</a></li>
|
||||
|
||||
<!-- <li><a href="/login">Login</a></li> -->
|
||||
<!-- <li><a href="/sign-up">Signup</a></li> -->
|
||||
|
||||
<!-- <li><button class="login-button">Login</button></li>
|
||||
<li><button class="join-button">Join</button></li> -->
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</main>
|
||||
<script is:inline>
|
||||
const hamburger = document.querySelector(".hamburger");
|
||||
const navLinks = document.querySelector(".nav-links");
|
||||
const links = document.querySelectorAll(".nav-links li");
|
||||
|
||||
hamburger.addEventListener('click', ()=>{
|
||||
//Animate Links
|
||||
navLinks.classList.toggle("open");
|
||||
links.forEach(link => {
|
||||
link.classList.toggle("fade");
|
||||
});
|
||||
|
||||
//Hamburger Animation
|
||||
hamburger.classList.toggle("toggle");
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
*{
|
||||
/* margin: 0;
|
||||
padding: 0; */
|
||||
color: #FFFFFF;
|
||||
z-index: 0;
|
||||
/* font-family: sans-serif;
|
||||
letter-spacing: 1px;
|
||||
font-weight: 300; */
|
||||
}
|
||||
body{
|
||||
overflow-x: hidden;
|
||||
}
|
||||
nav{
|
||||
height: 6rem;
|
||||
width: 100vw;
|
||||
top: 0px;
|
||||
/* margin-bottom: 800px; */
|
||||
background-color: #780a0a;
|
||||
box-shadow: 0 3px 20px rgba(0, 0, 0, 0.2);
|
||||
display: flex;
|
||||
position: fixed;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
/*Styling logo*/
|
||||
.logo{
|
||||
padding:1vh 1vw;
|
||||
text-align: center;
|
||||
}
|
||||
.logo img {
|
||||
height: 5rem;
|
||||
width: 8rem;
|
||||
}
|
||||
|
||||
/*Styling Links*/
|
||||
.nav-links{
|
||||
display: flex;
|
||||
list-style: none;
|
||||
width: 88vw;
|
||||
padding: 0 0.7vw;
|
||||
justify-content: right;
|
||||
/* justify-content: space-evenly; */
|
||||
align-items: center;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.nav-links li a{
|
||||
text-decoration: none;
|
||||
margin: 0 0.7vw;
|
||||
}
|
||||
.nav-links li a:hover {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.nav-links li {
|
||||
position: relative;
|
||||
}
|
||||
.nav-links li a::before {
|
||||
content: "";
|
||||
display: block;
|
||||
height: 3px;
|
||||
width: 0%;
|
||||
background-color: #FFFFFF;
|
||||
position: absolute;
|
||||
transition: all ease-in-out 250ms;
|
||||
margin: 0 0 0 10%;
|
||||
}
|
||||
.nav-links li a:hover::before{
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
/*Styling Buttons*/
|
||||
.login-button{
|
||||
background-color: transparent;
|
||||
border: 1.5px solid #f2f5f7;
|
||||
border-radius: 2em;
|
||||
padding: 0.6rem 0.8rem;
|
||||
margin-left: 2vw;
|
||||
font-size: 1rem;
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
.login-button:hover {
|
||||
color: #131418;
|
||||
background-color: #f2f5f7;
|
||||
border:1.5px solid #f2f5f7;
|
||||
transition: all ease-in-out 350ms;
|
||||
}
|
||||
.join-button{
|
||||
color: #131418;
|
||||
background-color: #61DAFB;
|
||||
border: 1.5px solid #61DAFB;
|
||||
border-radius: 2em;
|
||||
padding: 0.6rem 0.8rem;
|
||||
font-size: 1rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
.join-button:hover {
|
||||
color: #f2f5f7;
|
||||
background-color: transparent;
|
||||
border:1.5px solid #f2f5f7;
|
||||
transition: all ease-in-out 350ms;
|
||||
}
|
||||
|
||||
/*Styling Hamburger Icon*/
|
||||
.hamburger div{
|
||||
width: 30px;
|
||||
height:3px;
|
||||
background: #7c4c23;
|
||||
margin: 5px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.hamburger{
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*Stying for small screens*/
|
||||
@media screen and (max-width: 800px){
|
||||
nav{
|
||||
position: fixed;
|
||||
z-index: 3;
|
||||
}
|
||||
.hamburger{
|
||||
display:block;
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
right: 5%;
|
||||
top: 50%;
|
||||
transform: translate(-5%, -50%);
|
||||
z-index: 2;
|
||||
transition: all 0.7s ease;
|
||||
}
|
||||
.nav-links{
|
||||
position: fixed;
|
||||
background: #131418;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
/* margin-left: 50%; */
|
||||
flex-direction: column;
|
||||
clip-path: circle(50px at 90% -20%);
|
||||
-webkit-clip-path: circle(50px at 90% -10%);
|
||||
transition: all 1s ease-out;
|
||||
pointer-events: none;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
.nav-links.open{
|
||||
clip-path: circle(1000px at 90% -10%);
|
||||
-webkit-clip-path: circle(1000px at 90% -10%);
|
||||
pointer-events: all;
|
||||
}
|
||||
.nav-links li{
|
||||
opacity: 0;
|
||||
}
|
||||
.nav-links li:nth-child(1){
|
||||
transition: all 0.5s ease 0.2s;
|
||||
}
|
||||
.nav-links li:nth-child(2){
|
||||
transition: all 0.5s ease 0.4s;
|
||||
}
|
||||
.nav-links li:nth-child(3){
|
||||
transition: all 0.5s ease 0.6s;
|
||||
}
|
||||
.nav-links li:nth-child(4){
|
||||
transition: all 0.5s ease 0.7s;
|
||||
}
|
||||
.nav-links li:nth-child(5){
|
||||
transition: all 0.5s ease 0.8s;
|
||||
}
|
||||
.nav-links li:nth-child(6){
|
||||
transition: all 0.5s ease 0.9s;
|
||||
margin: 0;
|
||||
}
|
||||
.nav-links li:nth-child(7){
|
||||
transition: all 0.5s ease 1s;
|
||||
margin: 0;
|
||||
}
|
||||
li.fade{
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
/*Animating Hamburger Icon on Click*/
|
||||
.toggle .line1{
|
||||
transform: rotate(-45deg) translate(-5px,6px);
|
||||
}
|
||||
.toggle .line2{
|
||||
transition: all 0.7s ease;
|
||||
width:0;
|
||||
}
|
||||
.toggle .line3{
|
||||
transform: rotate(45deg) translate(-5px,-6px);
|
||||
}
|
||||
</style>
|
||||
@@ -1,216 +0,0 @@
|
||||
<template>
|
||||
<header>
|
||||
<nav class="bg-gray-800">
|
||||
<div class="mx-auto max-w-7xl px-2 sm:px-6 lg:px-8">
|
||||
<div class="relative flex h-16 items-center justify-between">
|
||||
<div class="absolute inset-y-0 left-0 flex items-center sm:hidden">
|
||||
<!-- Mobile menu button-->
|
||||
<button type="button" class="inline-flex items-center justify-center rounded-md p-2 text-gray-400 hover:bg-gray-700 hover:text-white focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white" aria-controls="mobile-menu" aria-expanded="false">
|
||||
<span class="sr-only">Open main menu</span>
|
||||
<!--
|
||||
Icon when menu is closed.
|
||||
|
||||
Heroicon name: outline/bars-3
|
||||
|
||||
Menu open: "hidden", Menu closed: "block"
|
||||
-->
|
||||
<svg class="block h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" />
|
||||
</svg>
|
||||
<!--
|
||||
Icon when menu is open.
|
||||
|
||||
Heroicon name: outline/x-mark
|
||||
|
||||
Menu open: "block", Menu closed: "hidden"
|
||||
-->
|
||||
<svg class="hidden h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="flex flex-1 items-center justify-center sm:items-stretch sm:justify-start">
|
||||
<div class="flex flex-shrink-0 items-center">
|
||||
<img class="block h-8 w-auto lg:hidden" src="https://tailwindui.com/img/logos/mark.svg?color=indigo&shade=500" alt="Your Company">
|
||||
<img class="hidden h-8 w-auto lg:block" src="https://tailwindui.com/img/logos/mark.svg?color=indigo&shade=500" alt="Your Company">
|
||||
</div>
|
||||
<div class="hidden sm:ml-6 sm:block">
|
||||
<div class="flex space-x-4">
|
||||
<!-- Current: "bg-gray-900 text-white", Default: "text-gray-300 hover:bg-gray-700 hover:text-white" -->
|
||||
<a href="#" class="bg-gray-900 text-white px-3 py-2 rounded-md text-sm font-medium" aria-current="page">Dashboard</a>
|
||||
|
||||
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Team</a>
|
||||
|
||||
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Projects</a>
|
||||
|
||||
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Calendar</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="absolute inset-y-0 right-0 flex items-center pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0">
|
||||
<button type="button" class="rounded-full bg-gray-800 p-1 text-gray-400 hover:text-white focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-gray-800">
|
||||
<span class="sr-only">View notifications</span>
|
||||
<!-- Heroicon name: outline/bell -->
|
||||
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<!-- Profile dropdown -->
|
||||
<div class="relative ml-3">
|
||||
<div>
|
||||
<button type="button" class="flex rounded-full bg-gray-800 text-sm focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-gray-800" id="user-menu-button" aria-expanded="false" aria-haspopup="true">
|
||||
<span class="sr-only">Open user menu</span>
|
||||
<img class="h-8 w-8 rounded-full" src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="">
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
Dropdown menu, show/hide based on menu state.
|
||||
|
||||
Entering: "transition ease-out duration-100"
|
||||
From: "transform opacity-0 scale-95"
|
||||
To: "transform opacity-100 scale-100"
|
||||
Leaving: "transition ease-in duration-75"
|
||||
From: "transform opacity-100 scale-100"
|
||||
To: "transform opacity-0 scale-95"
|
||||
-->
|
||||
<div class="absolute right-0 z-10 mt-2 w-48 origin-top-right rounded-md bg-white py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none" role="menu" aria-orientation="vertical" aria-labelledby="user-menu-button" tabindex="-1">
|
||||
<!-- Active: "bg-gray-100", Not Active: "" -->
|
||||
<a href="#" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1" id="user-menu-item-0">Your Profile</a>
|
||||
<a href="#" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1" id="user-menu-item-1">Settings</a>
|
||||
<a href="#" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1" id="user-menu-item-2">Sign out</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Mobile menu, show/hide based on menu state. -->
|
||||
<div class="sm:hidden" id="mobile-menu">
|
||||
<div class="space-y-1 px-2 pt-2 pb-3">
|
||||
<!-- Current: "bg-gray-900 text-white", Default: "text-gray-300 hover:bg-gray-700 hover:text-white" -->
|
||||
<a href="#" class="bg-gray-900 text-white block px-3 py-2 rounded-md text-base font-medium" aria-current="page">Dashboard</a>
|
||||
|
||||
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white block px-3 py-2 rounded-md text-base font-medium">Team</a>
|
||||
|
||||
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white block px-3 py-2 rounded-md text-base font-medium">Projects</a>
|
||||
|
||||
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white block px-3 py-2 rounded-md text-base font-medium">Calendar</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.navbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 20px;
|
||||
|
||||
}
|
||||
|
||||
.nav-links a {
|
||||
color: #7a4211;
|
||||
}
|
||||
.nav-links a:hover {
|
||||
color: #fff;
|
||||
}
|
||||
/* LOGO */
|
||||
.logo {
|
||||
font-size: 32px;
|
||||
}
|
||||
/* NAVBAR MENU */
|
||||
.menu {
|
||||
z-index: 999;
|
||||
display: flex;
|
||||
gap: 1em;
|
||||
font-size: 18px;
|
||||
}
|
||||
.menu li:hover {
|
||||
background-color: #3b82f6;
|
||||
border-radius: 5px;
|
||||
transition: 0.3s ease;
|
||||
}
|
||||
.menu li {
|
||||
padding: 5px 14px;
|
||||
}
|
||||
/* DROPDOWN MENU */
|
||||
.services {
|
||||
position: relative;
|
||||
}
|
||||
.dropdown {
|
||||
z-index: 999;
|
||||
background-color: rgb(247, 235, 173);
|
||||
padding: 1em 0;
|
||||
position: absolute; /*WITH RESPECT TO PARENT*/
|
||||
display: none;
|
||||
border-radius: 8px;
|
||||
top: 35px;
|
||||
margin-left: -30px;
|
||||
}
|
||||
.dropdown li + li {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.dropdown li {
|
||||
padding: 0.5em 1em;
|
||||
width: 8em;
|
||||
text-align: center;
|
||||
}
|
||||
.dropdown li:hover {
|
||||
background-color: rgb(250, 230, 133);
|
||||
color: #ff0000;
|
||||
}
|
||||
.services:hover .dropdown {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
|
||||
input[type=checkbox]{
|
||||
display: none;
|
||||
}
|
||||
/*HAMBURGER MENU*/
|
||||
.hamburger {
|
||||
display: none;
|
||||
font-size: 24px;
|
||||
user-select: none;
|
||||
}
|
||||
/* APPLYING MEDIA QUERIES */
|
||||
@media (max-width: 768px) {
|
||||
.menu {
|
||||
display:none;
|
||||
position: absolute;
|
||||
background-color:#f0f9ff;
|
||||
right: 0;
|
||||
left: 0;
|
||||
text-align: center;
|
||||
padding: 16px 0;
|
||||
}
|
||||
.menu li:hover {
|
||||
display: inline-block;
|
||||
background-color:#4c9e9e;
|
||||
transition: 0.3s ease;
|
||||
}
|
||||
.menu li + li {
|
||||
margin-top: 12px;
|
||||
}
|
||||
input[type=checkbox]:checked ~ .menu{
|
||||
display: block;
|
||||
}
|
||||
.hamburger {
|
||||
display: block;
|
||||
}
|
||||
.dropdown {
|
||||
left: 50%;
|
||||
top: 30px;
|
||||
transform: translateX(35%);
|
||||
}
|
||||
.dropdown li:hover {
|
||||
background-color: #4c9e9e;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
238
src/components/MainHeaderBN.astro
Normal file
@@ -0,0 +1,238 @@
|
||||
<main>
|
||||
<div>
|
||||
<nav>
|
||||
<div class="logo">
|
||||
<!-- <img class="w-[50px] rounded-full drop-shadow-2xl p-0.5 animate-[spin_3s_ease]" src="/img/logo.svg" alt="" /> animate-[bounce_3s_ease] -->
|
||||
<a href="/bn"><img class=" border-2 rounded-md border-white shadow-md shadow-white drop-shadow-2xl " src="/img/barta_logo.png" alt="Barta Logo" /></a>
|
||||
</div>
|
||||
<div class="hamburger">
|
||||
<div class="line1"></div>
|
||||
<div class="line2"></div>
|
||||
<div class="line3"></div>
|
||||
</div>
|
||||
<ul class="nav-links">
|
||||
<li><a class="text-yellow-500" href="/en">English</a></li>
|
||||
<li><a href="/bn">হোম</a></li>
|
||||
<li><a href="/bn/national">জাতীয়</a></li>
|
||||
<li><a href="/bn/politics">রাজনীতি</a></li>
|
||||
<li><a href="/bn/local">স্থানীয়</a></li>
|
||||
<li><a href="/bn/technology">প্রযুক্তি</a></li>
|
||||
<!-- <li><a href="/about-us">About</a></li> -->
|
||||
<li><a href="/contact">যোগাযোগ</a></li>
|
||||
|
||||
<!-- <li><a href="/login">Login</a></li> -->
|
||||
<!-- <li><a href="/sign-up">Signup</a></li> -->
|
||||
|
||||
<!-- <li><button class="login-button">Login</button></li>
|
||||
<li><button class="join-button">Join</button></li> -->
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</main>
|
||||
<script is:inline>
|
||||
const hamburger = document.querySelector(".hamburger");
|
||||
const navLinks = document.querySelector(".nav-links");
|
||||
const links = document.querySelectorAll(".nav-links li");
|
||||
|
||||
hamburger.addEventListener('click', ()=>{
|
||||
//Animate Links
|
||||
navLinks.classList.toggle("open");
|
||||
links.forEach(link => {
|
||||
link.classList.toggle("fade");
|
||||
});
|
||||
|
||||
//Hamburger Animation
|
||||
hamburger.classList.toggle("toggle");
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
*{
|
||||
/* margin: 0;
|
||||
padding: 0; */
|
||||
color: #FFFFFF;
|
||||
z-index: 0;
|
||||
/* font-family: sans-serif;
|
||||
letter-spacing: 1px;
|
||||
font-weight: 300; */
|
||||
}
|
||||
body{
|
||||
overflow-x: hidden;
|
||||
}
|
||||
nav{
|
||||
height: 6rem;
|
||||
width: 100vw;
|
||||
top: 0px;
|
||||
/* margin-bottom: 800px; */
|
||||
background-color: #780a0a;
|
||||
box-shadow: 0 3px 20px rgba(0, 0, 0, 0.2);
|
||||
display: flex;
|
||||
position: fixed;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
/*Styling logo*/
|
||||
.logo{
|
||||
padding:1vh 1vw;
|
||||
text-align: center;
|
||||
}
|
||||
.logo img {
|
||||
height: 5rem;
|
||||
width: 8rem;
|
||||
}
|
||||
|
||||
/*Styling Links*/
|
||||
.nav-links{
|
||||
display: flex;
|
||||
list-style: none;
|
||||
width: 88vw;
|
||||
padding: 0 0.7vw;
|
||||
justify-content: right;
|
||||
/* justify-content: space-evenly; */
|
||||
align-items: center;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.nav-links li a{
|
||||
text-decoration: none;
|
||||
margin: 0 0.7vw;
|
||||
}
|
||||
.nav-links li a:hover {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.nav-links li {
|
||||
position: relative;
|
||||
}
|
||||
.nav-links li a::before {
|
||||
content: "";
|
||||
display: block;
|
||||
height: 3px;
|
||||
width: 0%;
|
||||
background-color: #FFFFFF;
|
||||
position: absolute;
|
||||
transition: all ease-in-out 250ms;
|
||||
margin: 0 0 0 10%;
|
||||
}
|
||||
.nav-links li a:hover::before{
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
/*Styling Buttons*/
|
||||
.login-button{
|
||||
background-color: transparent;
|
||||
border: 1.5px solid #f2f5f7;
|
||||
border-radius: 2em;
|
||||
padding: 0.6rem 0.8rem;
|
||||
margin-left: 2vw;
|
||||
font-size: 1rem;
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
.login-button:hover {
|
||||
color: #131418;
|
||||
background-color: #f2f5f7;
|
||||
border:1.5px solid #f2f5f7;
|
||||
transition: all ease-in-out 350ms;
|
||||
}
|
||||
.join-button{
|
||||
color: #131418;
|
||||
background-color: #61DAFB;
|
||||
border: 1.5px solid #61DAFB;
|
||||
border-radius: 2em;
|
||||
padding: 0.6rem 0.8rem;
|
||||
font-size: 1rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
.join-button:hover {
|
||||
color: #f2f5f7;
|
||||
background-color: transparent;
|
||||
border:1.5px solid #f2f5f7;
|
||||
transition: all ease-in-out 350ms;
|
||||
}
|
||||
|
||||
/*Styling Hamburger Icon*/
|
||||
.hamburger div{
|
||||
width: 30px;
|
||||
height:3px;
|
||||
background: #7c4c23;
|
||||
margin: 5px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.hamburger{
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*Stying for small screens*/
|
||||
@media screen and (max-width: 800px){
|
||||
nav{
|
||||
position: fixed;
|
||||
z-index: 3;
|
||||
}
|
||||
.hamburger{
|
||||
display:block;
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
right: 5%;
|
||||
top: 50%;
|
||||
transform: translate(-5%, -50%);
|
||||
z-index: 2;
|
||||
transition: all 0.7s ease;
|
||||
}
|
||||
.nav-links{
|
||||
position: fixed;
|
||||
background: #131418;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
/* margin-left: 50%; */
|
||||
flex-direction: column;
|
||||
clip-path: circle(50px at 90% -20%);
|
||||
-webkit-clip-path: circle(50px at 90% -10%);
|
||||
transition: all 1s ease-out;
|
||||
pointer-events: none;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
.nav-links.open{
|
||||
clip-path: circle(1000px at 90% -10%);
|
||||
-webkit-clip-path: circle(1000px at 90% -10%);
|
||||
pointer-events: all;
|
||||
}
|
||||
.nav-links li{
|
||||
opacity: 0;
|
||||
}
|
||||
.nav-links li:nth-child(1){
|
||||
transition: all 0.5s ease 0.2s;
|
||||
}
|
||||
.nav-links li:nth-child(2){
|
||||
transition: all 0.5s ease 0.4s;
|
||||
}
|
||||
.nav-links li:nth-child(3){
|
||||
transition: all 0.5s ease 0.6s;
|
||||
}
|
||||
.nav-links li:nth-child(4){
|
||||
transition: all 0.5s ease 0.7s;
|
||||
}
|
||||
.nav-links li:nth-child(5){
|
||||
transition: all 0.5s ease 0.8s;
|
||||
}
|
||||
.nav-links li:nth-child(6){
|
||||
transition: all 0.5s ease 0.9s;
|
||||
margin: 0;
|
||||
}
|
||||
.nav-links li:nth-child(7){
|
||||
transition: all 0.5s ease 1s;
|
||||
margin: 0;
|
||||
}
|
||||
li.fade{
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
/*Animating Hamburger Icon on Click*/
|
||||
.toggle .line1{
|
||||
transform: rotate(-45deg) translate(-5px,6px);
|
||||
}
|
||||
.toggle .line2{
|
||||
transition: all 0.7s ease;
|
||||
width:0;
|
||||
}
|
||||
.toggle .line3{
|
||||
transform: rotate(45deg) translate(-5px,-6px);
|
||||
}
|
||||
</style>
|
||||
50
src/components/Modal.vue
Normal file
@@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<div class="modal-mask" v-if="show" @click="closeModal">
|
||||
<div class="modal-container" @click.stop>
|
||||
<slot></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.$parent.$on('open-modal', this.openModal);
|
||||
},
|
||||
methods: {
|
||||
openModal(itemId) {
|
||||
// Logic to show modal, optionally filter by itemId if needed
|
||||
this.show = true;
|
||||
},
|
||||
closeModal() {
|
||||
this.show = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.modal-mask {
|
||||
position: fixed;
|
||||
z-index: 9998;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.modal-container {
|
||||
background-color: white;
|
||||
border-radius: 0.5rem;
|
||||
padding: 2rem;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
</style>
|
||||
0
src/components/TopHeader.astro
Normal file
140
src/components/WeatherandTime.astro
Normal file
@@ -0,0 +1,140 @@
|
||||
<main>
|
||||
<div>
|
||||
<section class="container mx-auto px-4">
|
||||
<div id="swicthDIVBG">
|
||||
<p id="cityName"></p>
|
||||
<p id="temper"></p>
|
||||
<p id="description"></p>
|
||||
</div>
|
||||
</section>
|
||||
<div class="flex flex-col justify-center place-items-center fixed top-[50%] right-[50%] bg-white md:max-w-lg w-full p-6 rounded-2xl shadow-xl" style="display: none;" id="weatherPermission">
|
||||
<p>know weather information allow location Permission</p>
|
||||
<div class="flex flex-row gap-6">
|
||||
<button id="yesButton" class="border-2 border-[#580a0a] text-[#580a0a] px-4 py-2 rounded-xl">Allow</button>
|
||||
<button id="noButton" class="border-2 border-[#580a0a] text-[#580a0a] px-4 py-2 rounded-xl">Deny</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- <div class="bg-red-500 text-black" id="weatherInfo"></div> -->
|
||||
|
||||
</div>
|
||||
</main>
|
||||
<script is:inline>
|
||||
async function getCurrentLocation() {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (navigator.geolocation) {
|
||||
navigator.geolocation.getCurrentPosition(
|
||||
(position) => resolve(position.coords),
|
||||
(error) => reject(error)
|
||||
);
|
||||
} else {
|
||||
reject(new Error('Geolocation is not supported by this browser.'));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function getCityName(latitude, longitude) {
|
||||
const apiKey = '4d54049b61eb45c4b121ab2cff9808ba'; // Replace with your OpenCage API key
|
||||
const apiUrl = `https://api.opencagedata.com/geocode/v1/json?q=${latitude}+${longitude}&key=${apiKey}`;
|
||||
|
||||
try {
|
||||
const response = await fetch(apiUrl);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error('Error fetching data from the server.');
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
|
||||
if (data.results && data.results.length > 0) {
|
||||
const city = data.results[0].components.city;
|
||||
return city;
|
||||
} else {
|
||||
throw new Error('City not found.');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error:', error.message);
|
||||
throw new Error('Error fetching city name.');
|
||||
}
|
||||
}
|
||||
|
||||
async function getWeatherData(city) {
|
||||
const apiKey = 'aed8dd87581613e1d2bbbf63eeb618da';
|
||||
const apiUrl = `https://api.openweathermap.org/data/2.5/weather?q=${city}&appid=${apiKey}`;
|
||||
|
||||
try {
|
||||
const response = await fetch(apiUrl);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error('Error fetching weather data from the server.');
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
return data;
|
||||
} catch (error) {
|
||||
console.error('Error:', error.message);
|
||||
throw new Error('Error fetching weather data.');
|
||||
}
|
||||
}
|
||||
|
||||
async function showCityName() {
|
||||
try {
|
||||
const location = await getCurrentLocation();
|
||||
const city = await getCityName(location.latitude, location.longitude);
|
||||
// document.getElementById('weatherInfo').innerText = 'Current City: ' + city;
|
||||
|
||||
const weatherData = await getWeatherData(city);
|
||||
displayWeather(weatherData);
|
||||
} catch (error) {
|
||||
console.error(error.message);
|
||||
// document.getElementById('weatherInfo').innerText = 'Error fetching data.';
|
||||
}
|
||||
}
|
||||
|
||||
function displayWeather(data) {
|
||||
// const weatherInfoDiv = document.getElementById('weatherInfo');
|
||||
|
||||
// Extract relevant information from the API response
|
||||
const cityName = data.name;
|
||||
const temperature = data.main.temp;
|
||||
const description = data.weather[0].description;
|
||||
document.getElementById('cityName').innerHTML= 'City: ' + cityName;
|
||||
document.getElementById('temper').innerHTML = 'Temperature: ' + temperature;
|
||||
document.getElementById('description').innerHTML = 'Description: ' + description;
|
||||
let switchBG = document.innerHTML = description;
|
||||
if (switchBG === 'clear sky') {
|
||||
let clearSkyBG = document.getElementById('swicthDIVBG').style.backgroundImage = 'url(/img/clear_sky.webp)';
|
||||
clearSkyBG.style.backgroundRepeat = 'no-repeat';
|
||||
clearSkyBG.style.backgroundSize = 'cover';
|
||||
}
|
||||
// Display the weather information switchDiv.style.backgroundImage = 'url("path/to/clear-sky-image.jpg")';
|
||||
|
||||
// weatherInfoDiv.innerHTML = `
|
||||
// <p>City: ${cityName}</p>
|
||||
// <p>Temperature: ${temperature} °C</p>
|
||||
// <p>Description: ${description}</p>
|
||||
// `;
|
||||
}
|
||||
function windowOnload() {
|
||||
document.getElementById('weatherPermission').style.display = 'block';
|
||||
|
||||
// Attach click event handlers to the buttons
|
||||
document.getElementById('yesButton').addEventListener('click', onYesButtonClick);
|
||||
document.getElementById('noButton').addEventListener('click', onNoButtonClick);
|
||||
}
|
||||
|
||||
function onYesButtonClick() {
|
||||
// Call the function to display the city name and weather information
|
||||
showCityName();
|
||||
|
||||
// Hide the weather permission div
|
||||
document.getElementById('weatherPermission').style.display = 'none';
|
||||
}
|
||||
|
||||
function onNoButtonClick() {
|
||||
// Hide the weather permission div without fetching weather information
|
||||
document.getElementById('weatherPermission').style.display = 'none';
|
||||
}
|
||||
|
||||
window.onload = windowOnload;
|
||||
</script>
|
||||
134
src/components/ZHCategory.vue
Normal file
@@ -0,0 +1,134 @@
|
||||
<template>
|
||||
<div>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
|
||||
<div v-for="item in items" :key="item.id" class="flex flex-col border-2 border-[#780a0a] gap-6 p-4 place-content-between rounded-lg">
|
||||
<div class="flex flex-col">
|
||||
<div>
|
||||
<a class="flex flex-col" :href="`/zh/${item.slug}`">
|
||||
<img class="aspect-video rounded-t-lg" :src="item.img" :alt="item.title" />
|
||||
<h2 class="text-lg text-justify">{{ item.title }}</h2>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<!-- Overlay -->
|
||||
<div v-if="item.dialogOpen" class="fixed inset-0 bg-black opacity-50"></div>
|
||||
<dialog :id="`d-${item.id}`" class="shadow-xl rounded-xl md:w-[50%] xl:w-[30%] dialog" :open="item.dialogOpen">
|
||||
<form method="dialog">
|
||||
<div class="flex flex-col md:flex-col">
|
||||
<a :href="`/zh/${item.slug}`" class="flex flex-col md:flex-col">
|
||||
<img class="rounded-t-xl" :src="item.img" :alt="item.title" />
|
||||
<h1 class="text-lg font-bold">{{ item.heading }}</h1>
|
||||
<h2 class="text-justify">{{ item.in_brief }}</h2>
|
||||
</a>
|
||||
<div class="flex flex-row place-content-between place-items-center">
|
||||
<div class="flex flex-row place-content-between place-items-center p-2 space-x-6 shadow-lg shadow-gray-400 rounded-2xl">
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`whatsapp://send?text=${item.title}%20%0A%20https://barta-india.in/zh/${item.slug}`" data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`https://www.facebook.com/share.php?u=https://barta-india.in/zh/${item.slug}`" target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`http://www.twitter.com/share?url=https://barta-india.in/zh/${item.slug}&text=%20${item.title}`" target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/zh/${item.slug}&title=${item.title}&summary=${item.title}&source=${item.title}`" onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
<!-- <a class="hover:-translate-y-2 duration-[1s]" :href="`whatsapp://send?text=${item.title}%20%0A%20https://barta-india.in/${item.slug}`" data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`https://www.facebook.com/share.php?u=https://barta-india.in/zh/${item.slug}`" target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`http://www.twitter.com/share?url=https://barta-india.in/${item.slug}&text=${item.title}`" target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" :href="`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/${item.slug}&title=${item.title}&summary=${item.title}&source=${item.title}`" onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a> -->
|
||||
</div>
|
||||
<div class="flex border-b-4 border-gray-500 border-t rounded-full text-3xl hover:rotate-180 duration-[3s]">
|
||||
<button class="text-white font-bold py-2 px-4 bg-[#780a0a] rounded-full shadow-xl" @click="closeDialog(item)">✘</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row place-content-between">
|
||||
<button @click="openDialog(item)" class="bg-[#780a0a] text-white rounded-md font-bold py-2 px-6">In Brief</button>
|
||||
<a :href="`/zh/${item.slug}`" class="bg-[#780a0a] text-white rounded-md font-bold py-2 px-6">Details</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
items: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
openDialog(item) {
|
||||
item.dialogOpen = true;
|
||||
|
||||
window.addEventListener('keydown', this.handleKeyDown);
|
||||
},
|
||||
closeDialog(item) {
|
||||
item.dialogOpen = false;
|
||||
|
||||
window.removeEventListener('keydown', this.handleKeyDown);
|
||||
},
|
||||
handleKeyDown(event) {
|
||||
if (event.key === 'Escape') {
|
||||
|
||||
this.items.forEach(item => {
|
||||
item.dialogOpen = false;
|
||||
});
|
||||
|
||||
window.removeEventListener('keydown', this.handleKeyDown);
|
||||
}
|
||||
},
|
||||
getData() {
|
||||
let fullURL = window.location.href.split('/')[5].split('?cat=')[1];
|
||||
// console.log(fullURL);
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/_dedicated/dwd/category-zh/?cat=${fullURL}`)
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error('Network response was not ok');
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
// console.log(data);
|
||||
this.items = data;
|
||||
|
||||
this.items.forEach(item => {
|
||||
item.dialogOpen = false;
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('There was a problem with the fetch operation:', error);
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getData();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.dialog {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background-color: white; /* Adjust as needed */
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
/* Additional styles for the overlay (optional) */
|
||||
.dialog-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
||||
z-index: 999; /* Ensure the overlay is above other content */
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
---
|
||||
import MainHeader from '../components/MainHeader.astro';
|
||||
import Footer from '../components/Footer.astro';
|
||||
import WeatherandTime from '../components/WeatherandTime.astro';
|
||||
export interface Props {
|
||||
title: string;
|
||||
title: string; metaTitle: string; description: string; ogImg: string; tiwtterCard: string; tiwtterImage: string; tiwtterTitle: string; tiwtterDesc: string; tiwtterURL: string; artPubTime: string; artUpdtTime: string; ogSiteName: string; ogType: string; ogTitle: string; ogDesc: string; ogURL: string; canonical: string;
|
||||
}
|
||||
|
||||
const { title } = Astro.props;
|
||||
const { title, metaTitle, description, ogImg, tiwtterCard, tiwtterImage, tiwtterTitle, tiwtterDesc, tiwtterURL, artPubTime, artUpdtTime, ogSiteName, ogType, ogTitle, ogDesc, ogURL, canonical} = Astro.props;
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
@@ -11,14 +14,59 @@ const { title } = Astro.props;
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
<link rel="icon" type="image/ico+xml" href="/favicon.ico" />
|
||||
<link rel="canonical" href={canonical} />
|
||||
<meta name="generator" content="barta-india.in html generator" />
|
||||
<title>{title}</title>
|
||||
<meta name="title" content={metaTitle}>
|
||||
<meta name="description" content={description}>
|
||||
<meta name="twitter:card" content={tiwtterCard}>
|
||||
<meta name="twitter:image" itemprop="image" content={tiwtterImage}>
|
||||
<meta name="twitter:title" content={tiwtterTitle}>
|
||||
<meta name="twitter:description" content={tiwtterDesc}>
|
||||
<meta name="twitter:url" content={tiwtterURL}>
|
||||
<meta name="article:published_time" content={artPubTime}>
|
||||
<meta name="article:updated_time" content={artUpdtTime}>
|
||||
<link rel="shortcut icon" href="">
|
||||
<meta property="og:site_name" content={ogSiteName}>
|
||||
<meta property="og:type" content={ogType}>
|
||||
<meta property="og:image" itemprop="image" content={ogImg}>
|
||||
<meta property="og:title" content={ogTitle}>
|
||||
<meta property="og:description" content={ogDesc}>
|
||||
<meta property="og:url" content={ogURL}>
|
||||
<meta property="og:image:width" content="526" />
|
||||
<meta property="og:image:height" content="275" />
|
||||
<meta name="og:image:secure_url" content={ogImg} />
|
||||
<!-- <script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "News Portal",
|
||||
"name": "Barta India",
|
||||
"url": "https://barta-india.in/",
|
||||
"logo": "/img/barta_logo.png",
|
||||
"contactPoint": {
|
||||
"@type": "ContactPoint",
|
||||
"contactType": "Visitor Feedback",
|
||||
"url": "https://barta-india.in/contact/",
|
||||
},
|
||||
"sameAs": [
|
||||
"https://www.facebook.com/bartaindia?mibextid=eHce3h",
|
||||
]
|
||||
}
|
||||
</script> -->
|
||||
</head>
|
||||
<body>
|
||||
<slot />
|
||||
<div>
|
||||
<MainHeader />
|
||||
</div>
|
||||
<div class="mt-[100px]">
|
||||
<!-- <WeatherandTime /> -->
|
||||
<slot />
|
||||
</div>
|
||||
<Footer />
|
||||
</body>
|
||||
</html>
|
||||
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9252259454702469" crossorigin="anonymous"></script>
|
||||
<style is:global>
|
||||
/* :root {
|
||||
--accent: 124, 58, 237;
|
||||
|
||||
81
src/layouts/LayoutBN.astro
Normal file
@@ -0,0 +1,81 @@
|
||||
---
|
||||
import MainHeaderBN from '../components/MainHeaderBN.astro';
|
||||
import Footer from '../components/Footer.astro';
|
||||
export interface Props {
|
||||
title: string; metaTitle: string; description: string; ogImg: string; tiwtterCard: string; tiwtterImage: string; tiwtterTitle: string; tiwtterDesc: string; tiwtterURL: string; artPubTime: string; artUpdtTime: string; ogSiteName: string; ogType: string; ogTitle: string; ogDesc: string; ogURL: string; canonical: string;
|
||||
}
|
||||
|
||||
const { title, metaTitle, description, ogImg, tiwtterCard, tiwtterImage, tiwtterTitle, tiwtterDesc, tiwtterURL, artPubTime, artUpdtTime, ogSiteName, ogType, ogTitle, ogDesc, ogURL, canonical} = Astro.props;
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<link rel="icon" type="image/ico+xml" href="/favicon.ico" />
|
||||
<meta name="generator" content="barta-india.in html generator" />
|
||||
<link rel="canonical" href={canonical} />
|
||||
<title>{title}</title>
|
||||
<meta name="title" content={metaTitle}>
|
||||
<meta name="description" content={description}>
|
||||
<meta name="twitter:card" content={tiwtterCard}>
|
||||
<meta name="twitter:image" itemprop="image" content={tiwtterImage}>
|
||||
<meta name="twitter:title" content={tiwtterTitle}>
|
||||
<meta name="twitter:description" content={tiwtterDesc}>
|
||||
<meta name="twitter:url" content={tiwtterURL}>
|
||||
<meta name="article:published_time" content={artPubTime}>
|
||||
<meta name="article:updated_time" content={artUpdtTime}>
|
||||
<link rel="shortcut icon" href="">
|
||||
<meta property="og:site_name" content={ogSiteName}>
|
||||
<meta property="og:type" content={ogType}>
|
||||
<meta property="og:image" itemprop="image" content={ogImg}>
|
||||
<meta property="og:title" content={ogTitle}>
|
||||
<meta property="og:description" content={ogDesc}>
|
||||
<meta property="og:url" content={ogURL}>
|
||||
<meta property="og:image:width" content="526" />
|
||||
<meta property="og:image:height" content="275" />
|
||||
<meta name="og:image:secure_url" content={ogImg} />
|
||||
<!-- <script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "News Portal",
|
||||
"name": "Barta India",
|
||||
"url": "https://barta-india.in/bn",
|
||||
"logo": "/img/barta_logo.png",
|
||||
"contactPoint": {
|
||||
"@type": "ContactPoint",
|
||||
"contactType": "Visitor Feedback",
|
||||
"url": "https://barta-india.in/contact/",
|
||||
},
|
||||
"sameAs": [
|
||||
"https://www.facebook.com/bartaindia?mibextid=eHce3h",
|
||||
]
|
||||
}
|
||||
</script> -->
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<MainHeaderBN />
|
||||
</div>
|
||||
<div class="mt-[150px]">
|
||||
<slot />
|
||||
</div>
|
||||
<Footer />
|
||||
</body>
|
||||
</html>
|
||||
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9252259454702469" crossorigin="anonymous"></script>
|
||||
<style is:global>
|
||||
/* :root {
|
||||
--accent: 124, 58, 237;
|
||||
--accent-gradient: linear-gradient(45deg, rgb(var(--accent)), #da62c4 30%, white 60%);
|
||||
}
|
||||
html {
|
||||
font-family: system-ui, sans-serif;
|
||||
background-color: #F6F6F6;
|
||||
}
|
||||
code {
|
||||
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
|
||||
Bitstream Vera Sans Mono, Courier New, monospace;
|
||||
} */
|
||||
</style>
|
||||
22
src/pages/404.astro
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
import Layout from "../layouts/Layout.astro";
|
||||
// import EditNews from "../../components/EditNews.vue";
|
||||
---
|
||||
<Layout title="404 page not founf | Barta-India">
|
||||
<main>
|
||||
<div>
|
||||
<p class="text-center">404 | Page Not Found</p>
|
||||
<!-- <EditNews client:visible /> -->
|
||||
</div>
|
||||
</main>
|
||||
<!-- </Layout>
|
||||
<script is:inline>
|
||||
let pramsURL = document.location.href.split('/')[3].split('edit=')[1];
|
||||
document.getElementById('url').innerHTML = pramsURL;
|
||||
// console.log(pramsURL)
|
||||
|
||||
function getNewsData(){
|
||||
|
||||
}
|
||||
</script> -->
|
||||
|
||||
81
src/pages/4041.astro
Normal file
@@ -0,0 +1,81 @@
|
||||
---
|
||||
import Layout from "../layouts/Layout.astro";
|
||||
// import ImageUpload from "../components/ImageUpload.vue";
|
||||
---
|
||||
<Layout title="">
|
||||
<main>
|
||||
<div class="container mx-auto px-4 mt-40">
|
||||
<!-- <ImageUpload client:visible /> -->
|
||||
<h1 id="newsTitle"></h1>
|
||||
|
||||
<div id="my-container" style="position: relative; margin: 0 auto; width: 80%; height: 350px;"></div>
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline src="https://js.bytescale.com/upload-widget/v4"></script>
|
||||
<script is:inline>
|
||||
// Make the POST request using fetch
|
||||
let slug = window.location.href.split('slug=')[1];
|
||||
// console.log(fullURL)
|
||||
let formData = new FormData;
|
||||
formData.append('slug', slug)
|
||||
const apiUrl = 'https://apisp.dev2.cicdhosting.com/news/get-news/?action=getslug';
|
||||
fetch(apiUrl, {
|
||||
method: 'POST',
|
||||
body: formData, // Include the postData here
|
||||
})
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP error! Status: ${response.status}`);
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
console.log('POST request successful:', data);
|
||||
document.getElementById('newsTitle').innerHTML = data.title;
|
||||
// Handle the data from the server
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error during POST request:', error);
|
||||
// Handle errors
|
||||
});
|
||||
|
||||
// -----
|
||||
// Configuration:
|
||||
// https://www.bytescale.com/docs/upload-widget#configuration
|
||||
// -----
|
||||
const options = {
|
||||
apiKey: "public_W142iS49Lc7EEN1moVR4ekPmkG13", // Get API key: https://www.bytescale.com/get-started
|
||||
|
||||
maxFileCount: 10,
|
||||
|
||||
// Dropzone configuration:
|
||||
layout: "inline",
|
||||
container: "#my-container",
|
||||
showFinishButton: true,
|
||||
|
||||
|
||||
// To remove the 'finish' button:
|
||||
// showFinishButton: false,
|
||||
// onUpdate: ({ uploadedFiles, pendingFiles, failedFiles }) => {
|
||||
// const fileUrls = uploadedFiles.map(x => x.fileUrl).join("\n");
|
||||
// if (fileUrls.length > 0) {
|
||||
// alert(`File(s) uploaded:\n\n${fileUrls}`);
|
||||
// }
|
||||
// }
|
||||
};
|
||||
// console.log(options.container)
|
||||
// import * as Bytescale from "@bytescale/upload-widget";
|
||||
Bytescale.UploadWidget.open(options).then(
|
||||
files => {
|
||||
const fileUrls = files.map(x => x.fileUrl).join("\n");
|
||||
const success = fileUrls.length === 0
|
||||
? "No file selected."
|
||||
: `File uploaded:\n\n${fileUrls}`;
|
||||
alert(success);
|
||||
},
|
||||
error => {
|
||||
alert(error);
|
||||
}
|
||||
);
|
||||
</script>
|
||||
93
src/pages/[id].astro
Normal file
@@ -0,0 +1,93 @@
|
||||
---
|
||||
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]=english');
|
||||
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]=english');
|
||||
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(items.meta_title, items.meta_description)
|
||||
---
|
||||
<!-- title, metaTitle, description, ogImg, tiwtterCard, tiwtterImage, tiwtterTitle, tiwtterDesc, tiwtterURL, artPubTime, artUpdtTime, ogSiteName, ogType, ogTitle, ogDesc, ogURL -->
|
||||
<Layout title={items.meta_title}
|
||||
metaTitle={items.meta_title}
|
||||
description={items.meta_description}
|
||||
ogImg={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterTitle={items.meta_title}
|
||||
tiwtterDesc={items.meta_description}
|
||||
tiwtterURL=`https://barta-india.in/${items.slug}`
|
||||
artPubTime={items.date_created}
|
||||
ogSiteName=`https://barta-india.in/${items.slug}`
|
||||
ogType='News'
|
||||
ogTitle={items.meta_title}
|
||||
ogDesc={items.meta_description}
|
||||
ogURL=`https://barta-india.in/${items.slug}`
|
||||
>
|
||||
<main>
|
||||
<section class="container mx-auto px-4 mt-16">
|
||||
<div class="flex flex-col justify-center">
|
||||
<div class=""><button onclick="toggleSpeech();" id="listenButton" class="float-right text-white font-bold px-6 py-2 rounded-lg bg-[#780a0a]">Listen</button></div>
|
||||
<h1 id="message1" class="text-3xl font-bold border-b-4 border-[#780A0A]">{items.heading}</h1>
|
||||
<h2 id="message2" class="text-xl py-2">{items.title}</h2>
|
||||
<div class="flex flex-col place-items-center">
|
||||
<img src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} class="md:w-[40%]" />
|
||||
</div>
|
||||
<div class="flex flex-row justify-center md:justify-end mt-2">
|
||||
<div class="flex flex-row place-items-center p-2 shadow-lg shadow-[#780a0a] border-b-2 border-[#780a0a] rounded-b-2xl w-fit">
|
||||
<p class="text-xl font-bold text-[#780a0a]">Share on: </p>
|
||||
<a href=`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/${items.slug}` data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a href=`https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fbarta-india.in%2F${items.slug}` target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<!-- <a href=`https://www.facebook.com/share.php?u=https://barta-india.in/${items.slug}` target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a> -->
|
||||
<a href=`http://www.twitter.com/share?url=https://barta-india.in/${items.slug}&text=${items.title}` target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a href=`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}` onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
</div>
|
||||
<p id="message3" class="text-justify text-red-700 mt-4" set:html={items.content}></p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
let isListening = false;
|
||||
let speechSynthesisInstance = window.speechSynthesis;
|
||||
|
||||
function toggleSpeech() {
|
||||
if (isListening) {
|
||||
stopSpeech();
|
||||
} else {
|
||||
startSpeech();
|
||||
}
|
||||
}
|
||||
|
||||
function startSpeech() {
|
||||
let message1 = document.getElementById('message1').innerText;
|
||||
let message2 = document.getElementById('message2').innerText;
|
||||
let allSpeechText = message1 + ' ' + message2;
|
||||
let speechText = new SpeechSynthesisUtterance(allSpeechText);
|
||||
speechSynthesisInstance.speak(speechText);
|
||||
|
||||
document.getElementById('listenButton').innerText = 'Stop';
|
||||
isListening = true;
|
||||
}
|
||||
|
||||
function stopSpeech() {
|
||||
speechSynthesisInstance.cancel();
|
||||
document.getElementById('listenButton').innerText = 'Listen';
|
||||
isListening = false;
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
section > div > p > p {
|
||||
text-align: justify;
|
||||
}
|
||||
</style>
|
||||
94
src/pages/bn/[id].astro
Normal file
@@ -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_bn', 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_bn', 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)
|
||||
---
|
||||
<Layout title=""
|
||||
metaTitle={items.meta_title}
|
||||
description={items.meta_description}
|
||||
ogImg={items.img}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={items.img}
|
||||
tiwtterTitle={items.meta_title}
|
||||
tiwtterDesc={items.meta_description}
|
||||
tiwtterURL=`https://barta-india.in/bn/${items.slug}`
|
||||
artPubTime={items.date_created}
|
||||
ogSiteName=`https://barta-india.in/bn/${items.slug}`
|
||||
ogType='News'
|
||||
ogTitle={items.meta_title}
|
||||
ogDesc={items.meta_description}
|
||||
ogURL=`https://barta-india.in/bn/${items.slug}`>
|
||||
<main>
|
||||
<section class="container mx-auto px-4 mt-16">
|
||||
<div class="flex flex-col justify-center">
|
||||
<div class=""><button onclick="toggleSpeech();" id="listenButton" class="float-right text-white font-bold px-6 py-2 rounded-lg bg-[#780a0a]">Listen</button></div>
|
||||
<h1 id="message1" class="text-3xl font-bold border-b-4 border-[#780A0A]">{items.heading}</h1>
|
||||
<h2 id="message2" class="text-xl py-2">{items.title}</h2>
|
||||
<div class="flex flex-col place-items-center">
|
||||
<img src={items.img} alt={items.title} class="md:w-[40%]" />
|
||||
</div>
|
||||
<div class="flex flex-row justify-center md:justify-end mt-2">
|
||||
<div class="flex flex-row place-items-center p-2 shadow-lg shadow-[#780a0a] border-b-2 border-[#780a0a] rounded-b-2xl w-fit">
|
||||
<p class="text-xl font-bold text-[#780a0a]">Share on: </p>
|
||||
<a href=`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/bn/${items.slug}` data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a href=`https://www.facebook.com/share.php?u=https://barta-india.in/bn/${items.slug}` target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a href=`http://www.twitter.com/share?url=https://barta-india.in/bn/${items.slug}&text=%20${items.title}` target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a href=`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/bn/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}` onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-justify mt-4">{items.content}</p>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
let isListening = false;
|
||||
let speechSynthesisInstance = window.speechSynthesis;
|
||||
|
||||
function toggleSpeech() {
|
||||
if (isListening) {
|
||||
stopSpeech();
|
||||
} else {
|
||||
startSpeech();
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
// }
|
||||
</script>
|
||||
29
src/pages/bn/cat/index.astro
Normal file
@@ -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);
|
||||
---
|
||||
<Layout title="">
|
||||
<main>
|
||||
<div>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="text-[#780a0a] py-6 flex flex-row" id="">
|
||||
<a id="folder" href="/bn"></a> >
|
||||
<p id="cat"></p>
|
||||
</div>
|
||||
<BNCategory client:visible />
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
let fullURL = window.location.href.split('/');
|
||||
// console.log(fullURL);
|
||||
let folderName = document.getElementById('folder').innerHTML = fullURL[3];
|
||||
let catName = document.getElementById('cat').innerHTML = fullURL[5].split('?cat=')[1]
|
||||
</script>
|
||||
71
src/pages/bn/index.astro
Normal file
@@ -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_bn', options);
|
||||
const data = await response.json();
|
||||
const news = data;
|
||||
// console.log(news);
|
||||
---
|
||||
<Layout title="">
|
||||
<main>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="my-16">
|
||||
<span class="text-[#780a0a] font-bold" id="pageName"></span>
|
||||
<h1 class="text-4xl font-bold border-b-4 border-[#780A0A]">Latest News</h1>
|
||||
</div>
|
||||
<div class="flex flex-row md:justify-center my-10 overflow-x-scroll md:overflow-x-clip">
|
||||
<a href="/bn/cat/?cat=local" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">Local</a>
|
||||
<a href="/bn/cat/?cat=national" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">National</a>
|
||||
<a href="/bn/cat/?cat=world" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">World</a>
|
||||
<a href="/bn/cat/?cat=politics" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">Politics</a>
|
||||
<a href="/bn/cat/?cat=technology" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">Technology</a>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
|
||||
{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;}) =>
|
||||
<div class="flex flex-col border-2 border-[#780a0a] gap-6 p-4 place-content-between rounded-lg">
|
||||
<div class="flex flex-col">
|
||||
<div class="">
|
||||
<a class="flex flex-col" href={`/bn/${items.slug}`}>
|
||||
<img class="aspect-video rounded-t-lg" src={items.img} alt={items.title} />
|
||||
<h2 class="text-lg text-justify ">{items.title}</h2>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<dialog id={`d-${items.id}`} class="shadow-xl rounded-xl md:w-[50%] xl:w-[30%]">
|
||||
<form method="dialog">
|
||||
<div class="flex flex-col md:flex-col">
|
||||
<a href={`/bn/${items.slug}`} class="flex flex-col md:flex-col">
|
||||
<img class="rounded-t-xl" src={items.img} alt={items.title} />
|
||||
<h1 class="text-lg font-bold">{items.heading} </h1>
|
||||
<h2 class="text-justify ">{items.in_brief}</h2>
|
||||
</a>
|
||||
<div class="flex flex-row place-content-between place-items-center">
|
||||
<div class="flex flex-row place-content-between place-items-center p-2 space-x-6 shadow-lg shadow-gray-400 rounded-2xl">
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/bn/${items.slug}`} data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.facebook.com/share.php?u=https://barta-india.in/bn/${items.slug}`} target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`http://www.twitter.com/share?url=https://barta-india.in/bn/${items.slug}&text=${items.title}`} target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/bn/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}`} onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
<div class="flex border-b-4 border-gray-500 border-t rounded-full text-3xl hover:rotate-180 duration-[3s]">
|
||||
<button class="text-white font-bold py-2 px-4 bg-[#780a0a] rounded-full shadow-xl" onclick={`document.getElementById('d-${items.id}').close()`}>✘</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row place-content-between">
|
||||
<button onclick={`document.getElementById('d-${items.id}').showModal()`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">In Brief</button>
|
||||
<a href={`/bn/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">Details</a>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<!-- <a href={`/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold px-6 ">Read More>></a> -->
|
||||
<!-- <p class="">Publish at: <br/> {items.date_created.split(':')[0].split('T')[0]}</p> -->
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</Layout>
|
||||
97
src/pages/bn_old/[id].astro
Normal file
@@ -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])
|
||||
---
|
||||
<LayoutBN title={items.meta_title}
|
||||
metaTitle={items.meta_title}
|
||||
description={items.meta_description}
|
||||
ogImg={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterTitle={items.meta_title}
|
||||
tiwtterDesc={items.meta_description}
|
||||
tiwtterURL=`https://barta-india.in/bn/${items.slug}`
|
||||
artPubTime={items.date_created}
|
||||
ogSiteName=`https://barta-india.in/bn/${items.slug}`
|
||||
ogType='News'
|
||||
ogTitle={items.meta_title}
|
||||
ogDesc={items.meta_description}
|
||||
ogURL=`https://barta-india.in/bn/${items.slug}`
|
||||
>
|
||||
<main>
|
||||
<section class="container mx-auto px-4 mt-16">
|
||||
<div class="flex flex-col justify-center">
|
||||
<div class=""><button onclick="toggleSpeech();" id="listenButton" class="float-right text-white font-bold px-6 py-2 rounded-lg bg-[#780a0a]">Listen</button></div>
|
||||
<h1 id="message1" class="text-3xl font-bold border-b-4 border-[#780A0A]">{items.heading}</h1>
|
||||
<h2 id="message2" class="text-xl py-2">{items.title}</h2>
|
||||
<div class="flex flex-col place-items-center">
|
||||
<img src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} class="md:w-[40%]" />
|
||||
</div>
|
||||
<div class="flex flex-row justify-center md:justify-end mt-2">
|
||||
<div class="flex flex-row place-items-center p-2 shadow-lg shadow-[#780a0a] border-b-2 border-[#780a0a] rounded-b-2xl w-fit">
|
||||
<p class="text-xl font-bold text-[#780a0a]">Share on: </p>
|
||||
<a href=`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/bn/${items.slug}` data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a href=`https://www.facebook.com/share.php?u=https://barta-india.in/bn/${items.slug}` target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a href=`http://www.twitter.com/share?url=https://barta-india.in/bn/${items.slug}&text=%20${items.title}` target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a href=`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/bn/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}` onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-justify text-red-700 mt-4" set:html={items.content}></p>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</LayoutBN>
|
||||
<script is:inline>
|
||||
let isListening = false;
|
||||
let speechSynthesisInstance = window.speechSynthesis;
|
||||
|
||||
function toggleSpeech() {
|
||||
if (isListening) {
|
||||
stopSpeech();
|
||||
} else {
|
||||
startSpeech();
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
// }
|
||||
</script>
|
||||
|
||||
<style>
|
||||
section > div > p > p {
|
||||
text-align: justify;
|
||||
}
|
||||
</style>
|
||||
89
src/pages/bn_old/index.astro
Normal file
@@ -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()
|
||||
---
|
||||
|
||||
<LayoutBN title={items.title}
|
||||
metaTitle={items.meta_title}
|
||||
description={items.description}
|
||||
ogImg={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterTitle={items.title}
|
||||
tiwtterDesc={items.description}
|
||||
tiwtterURL=`https://barta-india.in/bn`
|
||||
ogSiteName=`https://barta-india.in/bn`
|
||||
ogType={items.og_type}
|
||||
ogTitle={items.title}
|
||||
ogDesc={items.description}
|
||||
ogURL=`https://barta-india.in/bn`
|
||||
>
|
||||
<main>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="my-16">
|
||||
<span class="text-[#780a0a] font-bold" id="pageName"></span>
|
||||
<h1 class="text-4xl font-bold border-b-4 border-[#780A0A]">Latest News</h1>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
|
||||
{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;}) =>
|
||||
<div class="flex flex-col border-2 border-[#780a0a] gap-6 p-4 place-content-between rounded-lg">
|
||||
<div class="flex flex-col">
|
||||
<div class="">
|
||||
<a class="flex flex-col" href={`/bn/${items.slug}`}>
|
||||
<img class="aspect-video rounded-t-lg" src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} />
|
||||
<h2 class="text-lg text-justify ">{items.title}</h2>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<dialog id={`d-${items.id}`} class="shadow-xl rounded-xl md:w-[50%] xl:w-[30%]">
|
||||
<form method="dialog">
|
||||
<div class="flex flex-col md:flex-col">
|
||||
<a href={`/bn/${items.slug}`} class="flex flex-col md:flex-col">
|
||||
<img class="rounded-t-xl" src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} />
|
||||
<h1 class="text-lg font-bold">{items.heading} </h1>
|
||||
<h2 class="text-justify ">{items.in_brief}</h2>
|
||||
</a>
|
||||
<div class="flex flex-row place-content-between place-items-center">
|
||||
<div class="flex flex-row place-content-between place-items-center p-2 space-x-6 shadow-lg shadow-gray-400 rounded-2xl">
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/${items.slug}`} data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fbarta-india.in%2F${items.slug}`} target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`http://www.twitter.com/share?url=https://barta-india.in/${items.slug}&text=${items.title}`} target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}`} onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
<div class="flex border-b-4 border-gray-500 border-t rounded-full text-3xl hover:rotate-180 duration-[3s]">
|
||||
<button class="text-white font-bold py-2 px-4 bg-[#780a0a] rounded-full shadow-xl" onclick={`document.getElementById('d-${items.id}').close()`}>✘</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row place-content-between">
|
||||
<button onclick={`document.getElementById('d-${items.id}').showModal()`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">In Brief</button>
|
||||
<p class="">Publish at: <br/> {items.date_created.split(':')[0].split('T')[0]}</p>
|
||||
<a href={`/bn/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">Details</a>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<!-- <a href={`/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold px-6 ">Read More>></a> -->
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</LayoutBN>
|
||||
<script is:inline>
|
||||
const pageName = window.location.href.split('/')[3];
|
||||
document.getElementById('pageName').innerHTML = '> ' + pageName;
|
||||
// console.log(pageName)
|
||||
</script>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
96
src/pages/bn_old/local/[id].astro
Normal file
@@ -0,0 +1,96 @@
|
||||
---
|
||||
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[category][_eq]=local&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[category][_eq]=local&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])
|
||||
---
|
||||
<LayoutBN title={items.meta_title}
|
||||
metaTitle={items.meta_title}
|
||||
description={items.meta_description}
|
||||
ogImg={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterTitle={items.meta_title}
|
||||
tiwtterDesc={items.meta_description}
|
||||
tiwtterURL=`https://barta-india.in/bn/local/${items.slug}`
|
||||
artPubTime={items.date_created}
|
||||
ogSiteName=`https://barta-india.in/bn/local/${items.slug}`
|
||||
ogType='News'
|
||||
ogTitle={items.meta_title}
|
||||
ogDesc={items.meta_description}
|
||||
ogURL=`https://barta-india.in/bn/local/${items.slug}`
|
||||
>
|
||||
<main>
|
||||
<section class="container mx-auto px-4 mt-16">
|
||||
<div class="flex flex-col justify-center">
|
||||
<div class=""><button onclick="toggleSpeech();" id="listenButton" class="float-right text-white font-bold px-6 py-2 rounded-lg bg-[#780a0a]">Listen</button></div>
|
||||
<h1 id="message1" class="text-3xl font-bold border-b-4 border-[#780A0A]">{items.heading}</h1>
|
||||
<h2 id="message2" class="text-xl py-2">{items.title}</h2>
|
||||
<div class="flex flex-col place-items-center">
|
||||
<img src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} class="md:w-[40%]" />
|
||||
</div>
|
||||
<div class="flex flex-row justify-center md:justify-end mt-2">
|
||||
<div class="flex flex-row place-items-center p-2 shadow-lg shadow-[#780a0a] border-b-2 border-[#780a0a] rounded-b-2xl w-fit">
|
||||
<p class="text-xl font-bold text-[#780a0a]">Share on: </p>
|
||||
<a href=`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/bn/local/${items.slug}` data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a href=`https://www.facebook.com/share.php?u=https://barta-india.in/bn/local/${items.slug}` target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a href=`http://www.twitter.com/share?url=https://barta-india.in/bn/local/${items.slug}&text=%20${items.title}` target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a href=`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/bn/local/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}` onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-justify text-red-700 mt-4" set:html={items.content}></p>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</LayoutBN>
|
||||
<script is:inline>
|
||||
let isListening = false;
|
||||
let speechSynthesisInstance = window.speechSynthesis;
|
||||
|
||||
function toggleSpeech() {
|
||||
if (isListening) {
|
||||
stopSpeech();
|
||||
} else {
|
||||
startSpeech();
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
// }
|
||||
</script>
|
||||
<style>
|
||||
section > div > p > p {
|
||||
text-align: justify;
|
||||
}
|
||||
</style>
|
||||
89
src/pages/bn_old/local/index.astro
Normal file
@@ -0,0 +1,89 @@
|
||||
---
|
||||
import LayoutBN from '../../../layouts/LayoutBN.astro';
|
||||
const fetchData = await fetch('https://api7.siliconpin.com/items/barta?filter[status][_eq]=published&filter[category][_eq]=local&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]=local_bn');
|
||||
const metaJSON = await fetchMeta.json();
|
||||
const items = metaJSON.data[0];
|
||||
// const imageData = data.image;
|
||||
// const data = fetchDataJSON.data;
|
||||
---
|
||||
|
||||
<LayoutBN title={items.title}
|
||||
metaTitle={items.title}
|
||||
description={items.description}
|
||||
ogImg={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterTitle={items.title}
|
||||
tiwtterDesc={items.description}
|
||||
tiwtterURL=`https://barta-india.in/bn/local/`
|
||||
ogSiteName=`https://barta-india.in/bn/local/`
|
||||
ogType={items.og_type}
|
||||
ogTitle={items.title}
|
||||
ogDesc={items.description}
|
||||
ogURL=`https://barta-india.in/bn/local/`
|
||||
>
|
||||
<main>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="my-16">
|
||||
<span class="text-[#780a0a] font-bold" id="pageName"></span>
|
||||
<h1 class="text-4xl font-bold border-b-4 border-[#780A0A]">Latest News</h1>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
|
||||
{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;}) =>
|
||||
<div class="flex flex-col border-2 border-[#780a0a] gap-6 p-4 place-content-between rounded-lg">
|
||||
<div class="flex flex-col">
|
||||
<div class="">
|
||||
<a class="flex flex-col" href={`/bn/local/${items.slug}`}>
|
||||
<img class="aspect-video rounded-t-lg" src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} />
|
||||
<h2 class="text-lg text-justify ">{items.title}</h2>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<dialog id={`d-${items.id}`} class="shadow-xl rounded-xl md:w-[50%] xl:w-[30%]">
|
||||
<form method="dialog">
|
||||
<div class="flex flex-col md:flex-col">
|
||||
<a href={`/bn/local/${items.slug}`} class="flex flex-col md:flex-col">
|
||||
<img class="rounded-t-xl" src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} />
|
||||
<h1 class="text-lg font-bold">{items.heading} </h1>
|
||||
<h2 class="text-justify ">{items.in_brief}</h2>
|
||||
</a>
|
||||
<div class="flex flex-row place-content-between place-items-center">
|
||||
<div class="flex flex-row place-content-between place-items-center p-2 space-x-6 shadow-lg shadow-gray-400 rounded-2xl">
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/${items.slug}`} data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fbarta-india.in%2F${items.slug}`} target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`http://www.twitter.com/share?url=https://barta-india.in/${items.slug}&text=${items.title}`} target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}`} onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
<div class="flex border-b-4 border-gray-500 border-t rounded-full text-3xl hover:rotate-180 duration-[3s]">
|
||||
<button class="text-white font-bold py-2 px-4 bg-[#780a0a] rounded-full shadow-xl" onclick={`document.getElementById('d-${items.id}').close()`}>✘</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row place-content-between">
|
||||
<button onclick={`document.getElementById('d-${items.id}').showModal()`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">In Brief</button>
|
||||
<p class="">Publish at: <br/> {items.date_created.split(':')[0].split('T')[0]}</p>
|
||||
<a href={`/bn/local/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">Details</a>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<!-- <a href={`/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold px-6 ">Read More>></a> -->
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</LayoutBN>
|
||||
<script is:inline>
|
||||
const pageName = window.location.href.split('/')[3];
|
||||
const pageName2 = window.location.href.split('/')[4];
|
||||
document.getElementById('pageName').innerHTML = '> ' + pageName + ' > ' + pageName2;
|
||||
// console.log(pageName)
|
||||
</script>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
96
src/pages/bn_old/national/[id].astro
Normal file
@@ -0,0 +1,96 @@
|
||||
---
|
||||
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[category][_eq]=national&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[category][_eq]=national&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])
|
||||
---
|
||||
<LayoutBN title={items.meta_title}
|
||||
metaTitle={items.meta_title}
|
||||
description={items.meta_description}
|
||||
ogImg={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterTitle={items.meta_title}
|
||||
tiwtterDesc={items.meta_description}
|
||||
tiwtterURL=`https://barta-india.in/bn/national/${items.slug}`
|
||||
artPubTime={items.date_created}
|
||||
ogSiteName=`https://barta-india.in/bn/national/${items.slug}`
|
||||
ogType='News'
|
||||
ogTitle={items.meta_title}
|
||||
ogDesc={items.meta_description}
|
||||
ogURL=`https://barta-india.in/bn/national/${items.slug}`
|
||||
>
|
||||
<main>
|
||||
<section class="container mx-auto px-4 mt-16">
|
||||
<div class="flex flex-col justify-center">
|
||||
<div class=""><button onclick="toggleSpeech();" id="listenButton" class="float-right text-white font-bold px-6 py-2 rounded-lg bg-[#780a0a]">Listen</button></div>
|
||||
<h1 id="message1" class="text-3xl font-bold border-b-4 border-[#780A0A]">{items.heading}</h1>
|
||||
<h2 id="message2" class="text-xl py-2">{items.title}</h2>
|
||||
<div class="flex flex-col place-items-center">
|
||||
<img src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} class="md:w-[40%]" />
|
||||
</div>
|
||||
<div class="flex flex-row justify-center md:justify-end mt-2">
|
||||
<div class="flex flex-row place-items-center p-2 shadow-lg shadow-[#780a0a] border-b-2 border-[#780a0a] rounded-b-2xl w-fit">
|
||||
<p class="text-xl font-bold text-[#780a0a]">Share on: </p>
|
||||
<a href=`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/bn/national/${items.slug}` data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a href=`https://www.facebook.com/share.php?u=https://barta-india.in/bn/national/${items.slug}` target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a href=`http://www.twitter.com/share?url=https://barta-india.in/bn/national/${items.slug}&text=%20${items.title}` target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a href=`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/bn/national/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}` onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-justify text-red-700 mt-4" set:html={items.content}></p>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</LayoutBN>
|
||||
<script is:inline>
|
||||
let isListening = false;
|
||||
let speechSynthesisInstance = window.speechSynthesis;
|
||||
|
||||
function toggleSpeech() {
|
||||
if (isListening) {
|
||||
stopSpeech();
|
||||
} else {
|
||||
startSpeech();
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
// }
|
||||
</script>
|
||||
<style>
|
||||
section > div > p > p {
|
||||
text-align: justify;
|
||||
}
|
||||
</style>
|
||||
89
src/pages/bn_old/national/index.astro
Normal file
@@ -0,0 +1,89 @@
|
||||
---
|
||||
import LayoutBN from '../../../layouts/LayoutBN.astro';
|
||||
const fetchData = await fetch('https://api7.siliconpin.com/items/barta?filter[status][_eq]=published&filter[category][_eq]=national&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]=national_bn');
|
||||
const metaJSON = await fetchMeta.json();
|
||||
const items = metaJSON.data[0];
|
||||
// const imageData = data.image;
|
||||
// const data = fetchDataJSON.data;
|
||||
// console.log()
|
||||
---
|
||||
<LayoutBN title={items.title}
|
||||
metaTitle={items.title}
|
||||
description={items.description}
|
||||
ogImg={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterTitle={items.title}
|
||||
tiwtterDesc={items.description}
|
||||
tiwtterURL=`https://barta-india.in/bn/national/`
|
||||
ogSiteName=`https://barta-india.in/bn/national/`
|
||||
ogType={items.og_type}
|
||||
ogTitle={items.title}
|
||||
ogDesc={items.description}
|
||||
ogURL=`https://barta-india.in/bn/national/`
|
||||
>
|
||||
<main>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="my-16">
|
||||
<span class="text-[#780a0a] font-bold" id="pageName"></span>
|
||||
<h1 class="text-4xl font-bold border-b-4 border-[#780A0A]">Latest News</h1>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
|
||||
{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;}) =>
|
||||
<div class="flex flex-col border-2 border-[#780a0a] gap-6 p-4 place-content-between rounded-lg">
|
||||
<div class="flex flex-col">
|
||||
<div class="">
|
||||
<a class="flex flex-col" href={`/bn/national/${items.slug}`}>
|
||||
<img class="aspect-video rounded-t-lg" src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} />
|
||||
<h2 class="text-lg text-justify ">{items.title}</h2>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<dialog id={`d-${items.id}`} class="shadow-xl rounded-xl md:w-[50%] xl:w-[30%]">
|
||||
<form method="dialog">
|
||||
<div class="flex flex-col md:flex-col">
|
||||
<a href={`/bn/national/${items.slug}`} class="flex flex-col md:flex-col">
|
||||
<img class="rounded-t-xl" src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} />
|
||||
<h1 class="text-lg font-bold">{items.heading} </h1>
|
||||
<h2 class="text-justify ">{items.in_brief}</h2>
|
||||
</a>
|
||||
<div class="flex flex-row place-content-between place-items-center">
|
||||
<div class="flex flex-row place-content-between place-items-center p-2 space-x-6 shadow-lg shadow-gray-400 rounded-2xl">
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/${items.slug}`} data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fbarta-india.in%2F${items.slug}`} target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`http://www.twitter.com/share?url=https://barta-india.in/${items.slug}&text=${items.title}`} target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}`} onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
<div class="flex border-b-4 border-gray-500 border-t rounded-full text-3xl hover:rotate-180 duration-[3s]">
|
||||
<button class="text-white font-bold py-2 px-4 bg-[#780a0a] rounded-full shadow-xl" onclick={`document.getElementById('d-${items.id}').close()`}>✘</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row place-content-between">
|
||||
<button onclick={`document.getElementById('d-${items.id}').showModal()`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">In Brief</button>
|
||||
<p class="">Publish at: <br/> {items.date_created.split(':')[0].split('T')[0]}</p>
|
||||
<a href={`/bn/national/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">Details</a>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<!-- <a href={`/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold px-6 ">Read More>></a> -->
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</LayoutBN>
|
||||
<script is:inline>
|
||||
const pageName = window.location.href.split('/')[3];
|
||||
const pageName2 = window.location.href.split('/')[4];
|
||||
document.getElementById('pageName').innerHTML = '> ' + pageName + ' > ' + pageName2;
|
||||
// console.log(pageName)
|
||||
</script>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
96
src/pages/bn_old/politics/[id].astro
Normal file
@@ -0,0 +1,96 @@
|
||||
---
|
||||
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[category][_eq]=politics&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[category][_eq]=politics&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])
|
||||
---
|
||||
<LayoutBN title={items.meta_title}
|
||||
metaTitle={items.meta_title}
|
||||
description={items.meta_description}
|
||||
ogImg={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterTitle={items.meta_title}
|
||||
tiwtterDesc={items.meta_description}
|
||||
tiwtterURL=`https://barta-india.in/bn/politics/${items.slug}`
|
||||
artPubTime={items.date_created}
|
||||
ogSiteName=`https://barta-india.in/bn/politics/${items.slug}`
|
||||
ogType='News'
|
||||
ogTitle={items.meta_title}
|
||||
ogDesc={items.meta_description}
|
||||
ogURL=`https://barta-india.in/bn/politics/${items.slug}`
|
||||
>
|
||||
<main>
|
||||
<section class="container mx-auto px-4 mt-16">
|
||||
<div class="flex flex-col justify-center">
|
||||
<div class=""><button onclick="toggleSpeech();" id="listenButton" class="float-right text-white font-bold px-6 py-2 rounded-lg bg-[#780a0a]">Listen</button></div>
|
||||
<h1 id="message1" class="text-3xl font-bold border-b-4 border-[#780A0A]">{items.heading}</h1>
|
||||
<h2 id="message2" class="text-xl py-2">{items.title}</h2>
|
||||
<div class="flex flex-col place-items-center">
|
||||
<img src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} class="md:w-[40%]" />
|
||||
</div>
|
||||
<div class="flex flex-row justify-center md:justify-end mt-2">
|
||||
<div class="flex flex-row place-items-center p-2 shadow-lg shadow-[#780a0a] border-b-2 border-[#780a0a] rounded-b-2xl w-fit">
|
||||
<p class="text-xl font-bold text-[#780a0a]">Share on: </p>
|
||||
<a href=`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/bn/politics/${items.slug}` data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a href=`https://www.facebook.com/share.php?u=https://barta-india.in/bn/politics/${items.slug}` target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a href=`http://www.twitter.com/share?url=https://barta-india.in/bn/politics/${items.slug}&text=%20${items.title}` target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a href=`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/bn/politics/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}` onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-justify text-red-700 mt-4" set:html={items.content}></p>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</LayoutBN>
|
||||
<script is:inline>
|
||||
let isListening = false;
|
||||
let speechSynthesisInstance = window.speechSynthesis;
|
||||
|
||||
function toggleSpeech() {
|
||||
if (isListening) {
|
||||
stopSpeech();
|
||||
} else {
|
||||
startSpeech();
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
// }
|
||||
</script>
|
||||
<style>
|
||||
/* section > div > p > p {
|
||||
text-align: justify;
|
||||
} */
|
||||
</style>
|
||||
90
src/pages/bn_old/politics/index.astro
Normal file
@@ -0,0 +1,90 @@
|
||||
---
|
||||
import LayoutBN from '../../../layouts/LayoutBN.astro';
|
||||
const fetchData = await fetch('https://api7.siliconpin.com/items/barta?filter[status][_eq]=published&filter[category][_eq]=politics&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]=politics_bn');
|
||||
const metaJSON = await fetchMeta.json();
|
||||
const items = metaJSON.data[0];
|
||||
// const imageData = data.image;
|
||||
// const data = fetchDataJSON.data;
|
||||
// console.log()
|
||||
---
|
||||
|
||||
<LayoutBN title={items.title}
|
||||
metaTitle={items.title}
|
||||
description={items.description}
|
||||
ogImg={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterTitle={items.title}
|
||||
tiwtterDesc={items.description}
|
||||
tiwtterURL=`https://barta-india.in/bn/politics/`
|
||||
ogSiteName=`https://barta-india.in/bn/politics/`
|
||||
ogType={items.og_type}
|
||||
ogTitle={items.title}
|
||||
ogDesc={items.description}
|
||||
ogURL=`https://barta-india.in/bn/politics/`
|
||||
>
|
||||
<main>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="my-16">
|
||||
<span class="text-[#780a0a] font-bold" id="pageName"></span>
|
||||
<h1 class="text-4xl font-bold border-b-4 border-[#780A0A]">Latest News</h1>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
|
||||
{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;}) =>
|
||||
<div class="flex flex-col border-2 border-[#780a0a] gap-6 p-4 place-content-between rounded-lg">
|
||||
<div class="flex flex-col">
|
||||
<div class="">
|
||||
<a class="flex flex-col" href={`/bn/politics/${items.slug}`}>
|
||||
<img class="aspect-video rounded-t-lg" src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} />
|
||||
<h2 class="text-lg text-justify ">{items.title}</h2>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<dialog id={`d-${items.id}`} class="shadow-xl rounded-xl md:w-[50%] xl:w-[30%]">
|
||||
<form method="dialog">
|
||||
<div class="flex flex-col md:flex-col">
|
||||
<a href={`/bn/politics/${items.slug}`} class="flex flex-col md:flex-col">
|
||||
<img class="rounded-t-xl" src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} />
|
||||
<h1 class="text-lg font-bold">{items.heading} </h1>
|
||||
<h2 class="text-justify ">{items.in_brief}</h2>
|
||||
</a>
|
||||
<div class="flex flex-row place-content-between place-items-center">
|
||||
<div class="flex flex-row place-content-between place-items-center p-2 space-x-6 shadow-lg shadow-gray-400 rounded-2xl">
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/${items.slug}`} data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fbarta-india.in%2F${items.slug}`} target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`http://www.twitter.com/share?url=https://barta-india.in/${items.slug}&text=${items.title}`} target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}`} onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
<div class="flex border-b-4 border-gray-500 border-t rounded-full text-3xl hover:rotate-180 duration-[3s]">
|
||||
<button class="text-white font-bold py-2 px-4 bg-[#780a0a] rounded-full shadow-xl" onclick={`document.getElementById('d-${items.id}').close()`}>✘</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row place-content-between">
|
||||
<button onclick={`document.getElementById('d-${items.id}').showModal()`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">In Brief</button>
|
||||
<p class="">Publish at: <br/> {items.date_created.split(':')[0].split('T')[0]}</p>
|
||||
<a href={`/bn/politics/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">Details</a>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<!-- <a href={`/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold px-6 ">Read More>></a> -->
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</LayoutBN>
|
||||
<script is:inline>
|
||||
const pageName = window.location.href.split('/')[3];
|
||||
const pageName2 = window.location.href.split('/')[4];
|
||||
document.getElementById('pageName').innerHTML = '> ' + pageName + ' > ' + pageName2;
|
||||
// console.log(pageName)
|
||||
</script>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
61
src/pages/bn_old/technology/[id].astro
Normal file
@@ -0,0 +1,61 @@
|
||||
---
|
||||
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[category][_eq]=technology&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[category][_eq]=technology&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])
|
||||
---
|
||||
<LayoutBN title={items.meta_title}
|
||||
metaTitle={items.meta_title}
|
||||
description={items.meta_description}
|
||||
ogImg={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterTitle={items.meta_title}
|
||||
tiwtterDesc={items.meta_description}
|
||||
tiwtterURL=`https://barta-india.in/bn/technology/${items.slug}`
|
||||
artPubTime={items.date_created}
|
||||
ogSiteName=`https://barta-india.in/bn/technology/${items.slug}`
|
||||
ogType='News'
|
||||
ogTitle={items.meta_title}
|
||||
ogDesc={items.meta_description}
|
||||
ogURL=`https://barta-india.in/bn/technology/${items.slug}`
|
||||
>
|
||||
<main>
|
||||
<section class="container mx-auto px-4 mt-16">
|
||||
<div class="flex flex-col justify-center">
|
||||
<div class=""><button onclick="toggleSpeech();" id="listenButton" class="float-right text-white font-bold px-6 py-2 rounded-lg bg-[#780a0a]">Listen</button></div>
|
||||
<h1 id="message1" class="text-3xl font-bold border-b-4 border-[#780A0A]">{items.heading}</h1>
|
||||
<h2 id="message2" class="text-xl py-2">{items.title}</h2>
|
||||
<div class="flex flex-col place-items-center">
|
||||
<img src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} class="md:w-[40%]" />
|
||||
</div>
|
||||
<div class="flex flex-row justify-center md:justify-end mt-2">
|
||||
<div class="flex flex-row place-items-center p-2 shadow-lg shadow-[#780a0a] border-b-2 border-[#780a0a] rounded-b-2xl w-fit">
|
||||
<p class="text-xl font-bold text-[#780a0a]">Share on: </p>
|
||||
<a href=`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/bn/technology/${items.slug}` data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a href=`https://www.facebook.com/share.php?u=https://barta-india.in/bn/technology/${items.slug}` target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a href=`http://www.twitter.com/share?url=https://barta-india.in/bn/technology/${items.slug}&text=%20${items.title}` target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a href=`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/bn/technology/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}` onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-justify text-red-700 mt-4" set:html={items.content}></p>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</LayoutBN>
|
||||
<style>
|
||||
section > div > p > p {
|
||||
text-align: justify;
|
||||
}
|
||||
</style>
|
||||
90
src/pages/bn_old/technology/index.astro
Normal file
@@ -0,0 +1,90 @@
|
||||
---
|
||||
import LayoutBN from '../../../layouts/LayoutBN.astro';
|
||||
const fetchData = await fetch('https://api7.siliconpin.com/items/barta?filter[status][_eq]=published&filter[category][_eq]=technology&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]=technology_bn');
|
||||
const metaJSON = await fetchMeta.json();
|
||||
const items = metaJSON.data[0];
|
||||
// const imageData = data.image;
|
||||
// const data = fetchDataJSON.data;
|
||||
// console.log()
|
||||
---
|
||||
|
||||
<LayoutBN title={items.title}
|
||||
metaTitle={items.title}
|
||||
description={items.description}
|
||||
ogImg={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterTitle={items.title}
|
||||
tiwtterDesc={items.description}
|
||||
tiwtterURL=`https://barta-india.in/bn/technology/`
|
||||
ogSiteName=`https://barta-india.in/bn/technology/`
|
||||
ogType={items.og_type}
|
||||
ogTitle={items.title}
|
||||
ogDesc={items.description}
|
||||
ogURL=`https://barta-india.in/bn/technology/`
|
||||
>
|
||||
<main>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="my-16">
|
||||
<span class="text-[#780a0a] font-bold" id="pageName"></span>
|
||||
<h1 class="text-4xl font-bold border-b-4 border-[#780A0A]">Latest News</h1>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
|
||||
{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;}) =>
|
||||
<div class="flex flex-col border-2 border-[#780a0a] gap-6 p-4 place-content-between rounded-lg">
|
||||
<div class="flex flex-col">
|
||||
<div class="">
|
||||
<a class="flex flex-col" href={`/bn/technology/${items.slug}`}>
|
||||
<img class="aspect-video rounded-t-lg" src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} />
|
||||
<h2 class="text-lg text-justify ">{items.title}</h2>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<dialog id={`d-${items.id}`} class="shadow-xl rounded-xl md:w-[50%] xl:w-[30%]">
|
||||
<form method="dialog">
|
||||
<div class="flex flex-col md:flex-col">
|
||||
<a href={`/bn/technology/${items.slug}`} class="flex flex-col md:flex-col">
|
||||
<img class="rounded-t-xl" src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} />
|
||||
<h1 class="text-lg font-bold">{items.heading} </h1>
|
||||
<h2 class="text-justify ">{items.in_brief}</h2>
|
||||
</a>
|
||||
<div class="flex flex-row place-content-between place-items-center">
|
||||
<div class="flex flex-row place-content-between place-items-center p-2 space-x-6 shadow-lg shadow-gray-400 rounded-2xl">
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/${items.slug}`} data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fbarta-india.in%2F${items.slug}`} target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`http://www.twitter.com/share?url=https://barta-india.in/${items.slug}&text=${items.title}`} target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}`} onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
<div class="flex border-b-4 border-gray-500 border-t rounded-full text-3xl hover:rotate-180 duration-[3s]">
|
||||
<button class="text-white font-bold py-2 px-4 bg-[#780a0a] rounded-full shadow-xl" onclick={`document.getElementById('d-${items.id}').close()`}>✘</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row place-content-between">
|
||||
<button onclick={`document.getElementById('d-${items.id}').showModal()`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">In Brief</button>
|
||||
<p class="">Publish at: <br/> {items.date_created.split(':')[0].split('T')[0]}</p>
|
||||
<a href={`/bn/technology/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">Details</a>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<!-- <a href={`/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold px-6 ">Read More>></a> -->
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</LayoutBN>
|
||||
<script is:inline>
|
||||
const pageName = window.location.href.split('/')[3];
|
||||
const pageName2 = window.location.href.split('/')[4];
|
||||
document.getElementById('pageName').innerHTML = '> ' + pageName + ' > ' + pageName2;
|
||||
// console.log(pageName)
|
||||
</script>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
110
src/pages/contact.astro
Normal file
@@ -0,0 +1,110 @@
|
||||
---
|
||||
import Layout from "../layouts/Layout.astro";
|
||||
---
|
||||
<Layout title="Get in Touch | Barta-India">
|
||||
<main>
|
||||
<div class="">
|
||||
<section class="">
|
||||
<div class="container mx-auto px-4 flex flex-col lg:flex-row place-content-between space-x-4">
|
||||
<div class="flex flex-col justify-center w-full">
|
||||
<div class="flex flex-col w-full md:mt-20">
|
||||
<h1 class="text-3xl lg:text-4xl font-bold">Get in Touch with Barta News Portal</h1>
|
||||
<!-- <h2 class="text-2xl md:text-3xl text-[#3084b5]">Connect with CICD Hosting: Let's Shape the Future of Your Web Presence Together</h2> -->
|
||||
<h3 class="text-xl text-justify pb-4">Feel free to drop us a line at Barta</h3>
|
||||
</div>
|
||||
</section>
|
||||
<!-- items-center max-w-xl -->
|
||||
<section class="container mx-auto px-8 md:mt-16 max-w-xl border-2 shadow-xl rounded-xl">
|
||||
<!-- <div class="p-6 text-xl"> -->
|
||||
<h3 class="border-b-4 border-[#780a0a] text-3xl mb-4 font-bold pt-10">Get In Touch</h3>
|
||||
<form method="post" id="contactForm" class="flex flex-col ">
|
||||
<div id="formSection" class="flex flex-col space-y-4 justify-center place-items-center">
|
||||
<div class="flex flex-col w-full">
|
||||
<label for="name">Name<span class="text-red-500">*</span></label>
|
||||
<input id="name" name="name" class="border-2 rounded-md py-2 border-gray-400 focus:outline-none focus:border-2 focus:border-[#780a0a]" type="text" required/>
|
||||
</div>
|
||||
<div class="flex flex-col w-full">
|
||||
<label for="phone">phone<span class="text-red-500">*</span></label>
|
||||
<input id="phone" name="phone" class="border-2 rounded-md py-2 border-gray-400 focus:outline-none focus:border-2 focus:border-[#780a0a]" type="text" required/>
|
||||
</div>
|
||||
<div class="flex flex-col w-full">
|
||||
<label for="email">email<span class="text-red-500">*</span></label>
|
||||
<input id="email" name="email" class="border-2 rounded-md py-2 border-gray-400 focus:outline-none focus:border-2 focus:border-[#780a0a]" type="email" required/>
|
||||
</div>
|
||||
<div class="flex flex-col w-full ">
|
||||
<label for="message">Write your message...</label>
|
||||
<textarea rows="8" id="message" name="message" class="border-2 rounded-md py-2 border-gray-400 focus:outline-none focus:border-2 focus:border-[#780a0a]"></textarea>
|
||||
</div>
|
||||
<div class="flex flex-col w-full pb-6">
|
||||
<input class="bg-[#780a0a] text-white py-2 px-6 rounded-lg cursor-pointer" type="submit" value="Submit" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="thankYouSection" style="display: none;">
|
||||
<p>Thank You!</p>
|
||||
</div>
|
||||
</form>
|
||||
<!-- </div> -->
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
|
||||
<script is:inline>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const contactForm = document.getElementById('contactForm');
|
||||
const formSection = document.getElementById('formSection');
|
||||
const thankYouSection = document.getElementById('thankYouSection');
|
||||
const nameInput = document.getElementById('name');
|
||||
const emailInput = document.getElementById('email');
|
||||
const phoneInput = document.getElementById('phone');
|
||||
const contentInput = document.getElementById('message');
|
||||
|
||||
contactForm.addEventListener('submit', async function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
let username = nameInput.value; let userPhone = phoneInput.value; let userEmail = emailInput.value; let userMsg = contentInput.value;
|
||||
let formData = {
|
||||
'name' : username,
|
||||
'phone': userPhone,
|
||||
'email' : userEmail,
|
||||
'message' : userMsg
|
||||
}
|
||||
// fetch('https://apisp.dev2.cicdhosting.com/api/v2/storeFormData/?action=save',{
|
||||
// method: 'POST',
|
||||
// body: formData,
|
||||
// })
|
||||
// .then(response =>{
|
||||
// if(response.ok){
|
||||
// console.log('Form Submitted')
|
||||
// formSection.style.display = 'none';
|
||||
// thankYouSection.style.display = 'block';
|
||||
// } else{
|
||||
// console.error('an error occoured')
|
||||
// }
|
||||
// })
|
||||
|
||||
// console.log("Form Data",formData, username, userPhone, userEmail, userMsg)
|
||||
|
||||
const url = 'https://api7.siliconpin.com/items/barta_contact';
|
||||
try {
|
||||
const response = await fetch(url, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body:JSON.stringify(formData),
|
||||
});
|
||||
if (response.ok) {
|
||||
// console.log('Form Submitted')
|
||||
formSection.style.display = 'none';
|
||||
thankYouSection.style.display = 'block';
|
||||
// console.log('Form data submitted successfully', response);
|
||||
} else {
|
||||
console.error('Failed to submit form data');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('An error occurred:', error);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
57
src/pages/editor/ad-file.astro
Normal file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
import Layout from "../../layouts/Layout.astro";
|
||||
---
|
||||
<Layout title="Upload File | Barta-India">
|
||||
<main>
|
||||
<div class="container mx-auto px-4 flex flex-col space-y-4">
|
||||
<h1>Upload File</h1>
|
||||
<form action="https://apisp.dev2.cicdhosting.com/news/add-file/" method="post" enctype="multipart/form-data">
|
||||
<label for="file">Choose a file:</label>
|
||||
<input type="file" name="file" id="file" required>
|
||||
<br>
|
||||
<input type="submit" value="Upload">
|
||||
</form>
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
// function uploadFile() {
|
||||
// var fileInput = document.getElementById('fileInput');
|
||||
// var file = fileInput.files[0];
|
||||
|
||||
// if (file) {
|
||||
// var formData = new FormData();
|
||||
// formData.append('fileInput', file);
|
||||
|
||||
// fetch('https://apisp.dev2.cicdhosting.com/news/add-file/?action=save', {
|
||||
// method: 'POST',
|
||||
// body: formData
|
||||
// })
|
||||
// .then(response => response.json())
|
||||
// .then(data => {
|
||||
// document.getElementById('status').innerText = data.message;
|
||||
// })
|
||||
// .catch(error => {
|
||||
// console.error('Error:', error);
|
||||
// });
|
||||
// } else {
|
||||
// document.getElementById('status').innerText = 'Please select a file.';
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// function fileUpload(){
|
||||
// let formData = new FormData(document.getElementById('uploadForm'));
|
||||
// fetch(`https://apisp.dev2.cicdhosting.com/news/add-file/?action=save`, {
|
||||
// method: 'POST',
|
||||
// body: formData
|
||||
// })
|
||||
// .then(response => response.json())
|
||||
// .then(data => {
|
||||
// console.log(data);
|
||||
// })
|
||||
// .catch(error => {
|
||||
// console.log('An error occurred', error);
|
||||
// });
|
||||
// }
|
||||
</script>
|
||||
112
src/pages/editor/add-file-list.astro
Normal file
@@ -0,0 +1,112 @@
|
||||
---
|
||||
import Layout from "../../layouts/Layout.astro";
|
||||
import AdminHeader from "../../components/AdminHeader.astro";
|
||||
---
|
||||
<Layout title="Upload File | Barta-India">
|
||||
<AdminHeader />
|
||||
<main>
|
||||
<div>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="mt-16">
|
||||
<table class="border-2">
|
||||
<thead>
|
||||
<tr class="text-center">
|
||||
<th class="border-[2px] border-[#dbdde1]">ID</th>
|
||||
<th class="border-[2px] border-[#dbdde1]">News Slug</th>
|
||||
<th class="border-[2px] border-[#dbdde1]">Image</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="border-2" id="statusTableBody"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div class="container mx-auto px-4 flex flex-col space-y-4">
|
||||
<!-- <form action="https://apisp.dev2.cicdhosting.com/upload_file/v2/" method="post" enctype="multipart/form-data">
|
||||
Select image to upload:
|
||||
<input type="file" name="fileToUploadToSpApi" id="fileToUpload">
|
||||
<input type="submit" value="Upload Image" name="submit">
|
||||
</form> -->
|
||||
<!-- <h1>Upload File</h1> -->
|
||||
<!-- <form action="https://apisp.dev2.cicdhosting.com/upload_file/v2/" method="post" enctype="multipart/form-data">
|
||||
<input type="file" name="file" id="file" /> <br>
|
||||
<input type="submit" value="Upload">
|
||||
</form> -->
|
||||
<!-- <form id="formID">
|
||||
<p class="text-red-500" style="display: none;" id="errorMessage"></p>
|
||||
<p class="text-red-500" style="display: none;" id="errorMessage2"></p>
|
||||
<label for="file">Choose a file:</label>
|
||||
<input type="file" name="fileToUploadToSpApi" id="fileToUpload" required>
|
||||
<br>
|
||||
<input onclick="noImageNews();" type="submit" value="Upload">
|
||||
</form> -->
|
||||
</div>
|
||||
<!-- <button onclick="noImageNews();">onclick="noImageNews();"</button> -->
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
window.onload = function noImageNews() {
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/_dedicated/dwd/no-file/`)
|
||||
.then(data => data.json())
|
||||
.then(data => {
|
||||
let tableBody = document.getElementById('statusTableBody');
|
||||
data.forEach(function(singleData) {
|
||||
let row = tableBody.insertRow();
|
||||
row.style.border = '2px solid #dbdde1';
|
||||
let cellId = row.insertCell(0);
|
||||
cellId.style.border = '2px solid #dbdde1';
|
||||
cellId.innerHTML = singleData.id;
|
||||
let cellStatus = row.insertCell(1);
|
||||
cellStatus.style.border = '2px solid #dbdde1';
|
||||
cellStatus.innerHTML = singleData.slug;
|
||||
let cellEdit = row.insertCell(2);
|
||||
cellEdit.style.border = '2px solid #dbdde1';
|
||||
let addButton = document.createElement('a');
|
||||
addButton.innerText = 'Add';
|
||||
addButton.style.color = 'blue';
|
||||
addButton.href = `/editor/add-file/?add=${singleData.slug}`
|
||||
addButton.addEventListener('click', function() {
|
||||
// Add your edit functionality here
|
||||
// console.log('Editing ID:', singleData.id);
|
||||
});
|
||||
cellEdit.appendChild(addButton);
|
||||
});
|
||||
console.log(data);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occurred', error); // Typo was here: 'console.erroe'
|
||||
});
|
||||
};
|
||||
|
||||
// noImageNews = window.onload;
|
||||
function saveFile(event){
|
||||
event.preventDefault();
|
||||
let formID = document.getElementById('formID');
|
||||
let formData = new FormData(formID);
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/upload_file/v2/`,{
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(data => data.json())
|
||||
.then(data => {
|
||||
if(data.error_code == 8050){
|
||||
document.getElementById('errorMessage').innerHTML = data.error;
|
||||
document.getElementById('errorMessage').style.display = 'block';
|
||||
document.getElementById('errorMessage2').style.display = 'none';
|
||||
}
|
||||
if(data.error_code == 8051){
|
||||
document.getElementById('errorMessage2').innerHTML = data.error;
|
||||
document.getElementById('errorMessage2').style.display = 'block';
|
||||
document.getElementById('errorMessage').style.display = 'none';
|
||||
}
|
||||
|
||||
console.log(data)
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
112
src/pages/editor/add-file.astro
Normal file
@@ -0,0 +1,112 @@
|
||||
---
|
||||
import Layout from "../../layouts/Layout.astro";
|
||||
import AdminHeader from "../../components/AdminHeader.astro";
|
||||
---
|
||||
<Layout title="">
|
||||
<main>
|
||||
<AdminHeader />
|
||||
<div>
|
||||
<!-- <AddFile client:visible /> -->
|
||||
<section class="container mx-auto px-4 max-w-2xl shadow-2xl rounded-2xl mt-16">
|
||||
<h3 class="text-2xl py-4">Add File</h3>
|
||||
<p id="uploadConfirm" class="text-green-500 font-bold py-2" style="display: none;">Image Uploaded successfully</p>
|
||||
<form id="imageChoose" class="flex flex-col">
|
||||
<p class="text-red-500" style="display: none;" id="errorMessage"></p>
|
||||
<p class="text-red-500" style="display: none;" id="errorMessage2"></p>
|
||||
<label for="file">Choose a file:</label>
|
||||
<input oninput="saveFile(event);" type="file" name="fileToUploadToSpApi" id="fileToUpload" />
|
||||
<br>
|
||||
<!-- <input oninput="saveFile(event);" type="submit" value="Upload"> -->
|
||||
</form>
|
||||
<form id="imageLink" style="display: none;" class="space-y-4">
|
||||
<div class="flex flex-col">
|
||||
<input type="text" name="slug" id="slug" class="p-2 border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl" required />
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<input type="text" name="fileLink" id="fileLink" class="p-2 border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl" required />
|
||||
</div>
|
||||
<div>
|
||||
<input onclick="submitNewsImage(event);" type="submit" value="Upload" class="bg-[#780a0a] px-4 py-2 rounded-lg text-white cursor-pointer" />
|
||||
</div>
|
||||
</form>
|
||||
<div class="flex flex-col justify-center place-items-center p-6">
|
||||
<img id="imgview" src="" alt="" class="rounded-xl" />
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
function imagePreview() {
|
||||
let fileInput = document.getElementById('fileToUpload');
|
||||
let file = fileInput.files[0];
|
||||
let imgView = document.getElementById('imgview');
|
||||
if (file) {
|
||||
document.getElementById('imgview').style.display = 'block';
|
||||
let imgUrl = URL.createObjectURL(file);
|
||||
imgView.src = imgUrl;
|
||||
} else {
|
||||
imgView.src = "";
|
||||
}
|
||||
}
|
||||
|
||||
let slug = window.location.href.split('/')[5].split('?add=')[1];
|
||||
// console.log(slug)
|
||||
document.getElementById('slug').value = slug;
|
||||
|
||||
function saveFile(event){
|
||||
event.preventDefault();
|
||||
let imageChoose = document.getElementById('imageChoose');
|
||||
let formData = new FormData(imageChoose);
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/upload_file/v2/`,{
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(data => data.json())
|
||||
.then(data => {
|
||||
if(data.error_code == 8050){
|
||||
document.getElementById('errorMessage').innerHTML = data.error;
|
||||
document.getElementById('errorMessage').style.display = 'block';
|
||||
document.getElementById('errorMessage2').style.display = 'none';
|
||||
}
|
||||
if(data.error_code == 8051){
|
||||
document.getElementById('errorMessage2').innerHTML = data.error;
|
||||
document.getElementById('errorMessage2').style.display = 'block';
|
||||
document.getElementById('errorMessage').style.display = 'none';
|
||||
}
|
||||
if(data.file_url){
|
||||
document.getElementById('fileLink').value = data.file_url;
|
||||
document.getElementById('imageChoose').style.display = 'none';
|
||||
document.getElementById('imageLink').style.display = 'block';
|
||||
}
|
||||
console.log(data)
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
})
|
||||
imagePreview();
|
||||
}
|
||||
|
||||
function submitNewsImage(event) {
|
||||
event.preventDefault();
|
||||
let formElement = document.getElementById('imageLink'); // Replace 'yourFormId' with the actual ID of your form
|
||||
let formData = new FormData(formElement); // Pass the form element
|
||||
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/_dedicated/dwd/no-file-add-file/`, {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(response => response.json()) // Convert response to text
|
||||
.then(data => {
|
||||
console.log(data);
|
||||
if(data.success === true){
|
||||
document.getElementById('uploadConfirm').style.display = 'block';
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error occurred:', error);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
222
src/pages/editor/add-news.astro
Normal file
@@ -0,0 +1,222 @@
|
||||
---
|
||||
import Layout from "../../layouts/Layout.astro";
|
||||
// import ImageUpload from "../components/ImageUpload.vue";
|
||||
import AdminHeader from "../../components/AdminHeader.astro";
|
||||
|
||||
---
|
||||
|
||||
<Layout title="Add News | Barta India">
|
||||
<AdminHeader />
|
||||
<main>
|
||||
<div>
|
||||
<section class="container mx-auto px-4 md:max-w-3xl mt-40 space-y-4 shadow-xl rounded-xl p-4">
|
||||
<h1 class="text-center text-2xl underline decoration-4 decoration-[#580a0a]">Genarate New News</h1>
|
||||
<p style="display: none;" id="genStatus" class="text-green-500 font-bold">News Genarate Succesfully</p>
|
||||
<form id="newsPara" class="flex flex-col space-y-4" enctype="multipart/form-data">
|
||||
<!-- <label for="language">Language<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<select required onchange="qryWithLang();" name="language" id="language" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2">
|
||||
<option value="0">-Select-</option>
|
||||
<option value="english">English</option>
|
||||
<option value="bengali">Bengali</option>
|
||||
</select> -->
|
||||
<div class="flex flex-col">
|
||||
<label for="category">Category<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<select name="category" id="category" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2">
|
||||
<option value="0">-Select-</option>
|
||||
<option value="national">National</option>
|
||||
<option value="politics">Politics</option>
|
||||
<option value="local">Local</option>
|
||||
<option value="technology">Technology</option>
|
||||
<option value="world">World</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex flex-col ">
|
||||
<label for="preText">News Paragraph</label>
|
||||
<textarea required name="preText" id="preText" cols="30" maxlength="1000000" rows="10" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl"></textarea>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<textarea required name="systemMessage" id="systemMessage" cols="30" rows="3" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl">provide meta_title within 60 characters, meta_description within 160 characters, short_description within 280 characters, heading within 170 characters in en, bn, hi, zh, es ar all in a json structure no use comma after line ending</textarea>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<input type="text" name="fileLink" id="fileLink" class="p-2 border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl"/>
|
||||
</div>
|
||||
<div>
|
||||
<button id="genButton" onclick="submitNewsPara(event);" class="bg-[#580a0a] text-white px-4 py-2 rounded-lg" >Genarate</button>
|
||||
</div>
|
||||
<!-- <input id="message" type="text" value="" class="border-2 border-[#580a0a] p-2 focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl"/> -->
|
||||
</form>
|
||||
<form id="formID">
|
||||
<p class="text-red-500" style="display: none;" id="errorMessage"></p>
|
||||
<p class="text-red-500" style="display: none;" id="errorMessage2"></p>
|
||||
<label for="file">Choose a file:</label>
|
||||
<input oninput="saveFile(event);" type="file" name="fileToUploadToSpApi" id="fileToUpload" required />
|
||||
<br>
|
||||
<!-- <input oninput="saveFile(event);" type="submit" value="Upload"> -->
|
||||
</form>
|
||||
</section>
|
||||
<!-- border-2 border-[#780a0a] rounded-xl -->
|
||||
<section class="bg-white rounded-full px-6 py-4" id="loadingSection" style="display: none;">
|
||||
<div class="flex flex-col justify-center place-items-center">
|
||||
<div class="load-aimate animate-spin "></div>
|
||||
<p>Processing...</p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
|
||||
<script is:inline>
|
||||
function saveFile(event){
|
||||
event.preventDefault();
|
||||
let formID = document.getElementById('formID');
|
||||
let formData = new FormData(formID);
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/upload_file/v2/`,{
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(data => data.json())
|
||||
.then(data => {
|
||||
if(data.error_code == 8050){
|
||||
document.getElementById('errorMessage').innerHTML = data.error;
|
||||
document.getElementById('errorMessage').style.display = 'block';
|
||||
document.getElementById('errorMessage2').style.display = 'none';
|
||||
}
|
||||
if(data.error_code == 8051){
|
||||
document.getElementById('errorMessage2').innerHTML = data.error;
|
||||
document.getElementById('errorMessage2').style.display = 'block';
|
||||
document.getElementById('errorMessage').style.display = 'none';
|
||||
}
|
||||
if(data.file_url){
|
||||
document.getElementById('fileLink').value = data.file_url;
|
||||
}
|
||||
console.log(data)
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
})
|
||||
}
|
||||
function qryWithLang(){
|
||||
let langValue = document.getElementById('language').value;
|
||||
document.getElementById('systemMessage').value = `provide meta_title within 60 characters, meta_description within 160 characters, short_description within 280 characters, heading within 170 characters in en, bn, hi, zh, es, pt, ru, fr, ur, ar all in a json structure no use comma after line ending`;
|
||||
// give me long description below 2000 characters, title, heading not more than 160 characters, short desciption not more than 280 characters, meta_title not more than 60 characters and try to use common words, meta_description not more than 160 characters and try to use common words, all text are convert to ${langValue} language, give me all in a json structure`
|
||||
// provide meta_title within 60 characters, meta_description within 160 characters, short_description within 280 characters in English, bengali and hindi all in a json structure
|
||||
// need title, heading not more than 160 characters, meta_title not more than 60 characters, meta_description not more than 160 characters, short_description not more than 280 characters, long_description below 2000 characters, all are ${langValue} language all in a json structure
|
||||
// provide meta_title within 60 characters, meta_description within 160 characters, short_description within 280 characters in English, bengali and hindi all in a json structure
|
||||
// provide meta_title within 60 characters, meta_description within 160 characters, short_description within 280 characters in English, bengali, hindi, Mandarin, Spanish, Portuguese, Russian, French, all in a json structure
|
||||
}
|
||||
|
||||
function submitNewsPara(event) {
|
||||
event.preventDefault();
|
||||
let loadSection = document.getElementById('loadingSection');
|
||||
let newsData = document.getElementById('newsPara');
|
||||
let formData = new FormData(newsData);
|
||||
loadSection.style.display = 'block';
|
||||
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/_dedicated/dwd/multi-lang/`, {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(data => data.json())
|
||||
.then(data => {
|
||||
console.log(data);
|
||||
let newsData = data.choices[0].message.content;
|
||||
if(newsData){
|
||||
document.getElementById('genStatus').style.display = 'block';
|
||||
loadSection.style.display = 'none';
|
||||
}
|
||||
let jsonObject = JSON.parse(newsData);
|
||||
// Sample array
|
||||
|
||||
// Using forEach to log each element
|
||||
// jsonObject.forEach(function(arrayData) {
|
||||
// console.log('Array Data', arrayData);
|
||||
// });
|
||||
|
||||
// console.log(jsonObject.en)
|
||||
// console.log(jsonObject.bn)
|
||||
|
||||
// document.getElementById('title').value = jsonObject.title;
|
||||
// document.getElementById('slug').value = jsonObject.title;
|
||||
// document.getElementById('heading').value = jsonObject.heading;
|
||||
// document.getElementById('meta_title').value = jsonObject.meta_title;
|
||||
// document.getElementById('meta_description').value = jsonObject.meta_description;
|
||||
// document.getElementById('in_brief').value = jsonObject.short_description;
|
||||
// document.getElementById('content').value = jsonObject.long_description;
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error occurred', error);
|
||||
});
|
||||
}
|
||||
function slugify(text) {
|
||||
return text.toString().toLowerCase()
|
||||
.replace(/\s+/g, '-') // Replace spaces with -
|
||||
.replace(/[^\w-]+/g, '') // Remove all non-word characters
|
||||
.replace(/--+/g, '-') // Replace multiple - with single -
|
||||
.replace(/^-+/, '') // Trim - from start of text
|
||||
.replace(/-+$/, ''); // Trim - from end of text
|
||||
}
|
||||
|
||||
function updateSlug() {
|
||||
const titleInput = document.getElementById('slug');
|
||||
const slugInput = document.getElementById('slug');
|
||||
const titleValue = titleInput.value;
|
||||
slugInput.value = slugify(titleValue);
|
||||
}
|
||||
|
||||
function callApi(event) {
|
||||
event.preventDefault();
|
||||
let slugValue = document.getElementById('slug').value;
|
||||
let newsData = document.getElementById('newsForm');
|
||||
let formData = new FormData(newsData);
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/news/add-news/?action=save`, {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(data => data.json())
|
||||
.then(data => {
|
||||
if (data.success === true) {
|
||||
window.location.href= `/add-file?slug=${slugValue}`
|
||||
// console.log(slugValue)
|
||||
console.log('Form Data Submitted Successfully');
|
||||
} else {
|
||||
console.log('Data Submit Failed');
|
||||
}
|
||||
console.log(data);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error occurred', error);
|
||||
});
|
||||
}
|
||||
// function imagePreview() {
|
||||
// let fileInput = document.getElementById('file');
|
||||
// let file = fileInput.files[0];
|
||||
// let imgView = document.getElementById('imgview');
|
||||
// if (file) {
|
||||
// document.getElementById('imgview').style.display = 'block';
|
||||
// let imgUrl = URL.createObjectURL(file);
|
||||
// imgView.src = imgUrl;
|
||||
// document.getElementById('imgDIV').classList.add('border-2', 'border-[#780a0a]', 'rounded-xl');
|
||||
// } else {
|
||||
// imgView.src = "";
|
||||
// }
|
||||
// }
|
||||
|
||||
</script>
|
||||
<style>
|
||||
#loadingSection{
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
.load-aimate{
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border-radius: 50%;
|
||||
border-left: 5px solid #580a0a;
|
||||
border-right: 5px solid #580a0a;
|
||||
border-bottom: 5px solid #580a0a;
|
||||
border-top: 5px solid #FFFFFF;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
</style>
|
||||
60
src/pages/editor/edit-news.astro
Normal file
@@ -0,0 +1,60 @@
|
||||
---
|
||||
import Layout from "../../layouts/Layout.astro";
|
||||
import AdminHeader from "../../components/AdminHeader.astro";
|
||||
---
|
||||
<Layout title="Edit News | Barta-India">
|
||||
<AdminHeader />
|
||||
<main>
|
||||
<div>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="flex flex-col">
|
||||
<p class="text-2xl">Edit News</p>
|
||||
<!-- <select name="lang" id="lang">Select Language
|
||||
<option value="en">English</option>
|
||||
<option value="bn">Bengali</option>
|
||||
<option value="hi">Hindi</option>
|
||||
<option value="zh">Mandarine</option>
|
||||
<option value="se">Spanish</option>
|
||||
</select> -->
|
||||
<table class="border-2">
|
||||
<thead>
|
||||
<tr class="text-center">
|
||||
<th>ID</th>
|
||||
<th>Status</th>
|
||||
<th>Edit</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="text-center border-2" id="statusTableBody"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/_dedicated/dwd/edit-news-list/`)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
console.log(data);
|
||||
let tableBody = document.getElementById('statusTableBody');
|
||||
data.forEach(function(singleData) {
|
||||
let row = tableBody.insertRow();
|
||||
let cellId = row.insertCell(0);
|
||||
cellId.innerHTML = singleData.id;
|
||||
let cellStatus = row.insertCell(1);
|
||||
cellStatus.innerHTML = singleData.status;
|
||||
let cellEdit = row.insertCell(2);
|
||||
let editButton = document.createElement('a');
|
||||
editButton.innerText = 'Edit';
|
||||
editButton.href = `/editor/?edit=${singleData.slug}&lang=en`
|
||||
editButton.addEventListener('click', function() {
|
||||
// Add your edit functionality here
|
||||
// console.log('Editing ID:', singleData.id);
|
||||
});
|
||||
cellEdit.appendChild(editButton);
|
||||
});
|
||||
})
|
||||
.catch(error => console.error('Error fetching data:', error));
|
||||
|
||||
|
||||
</script>
|
||||
77
src/pages/editor/gen-news.astro
Normal file
@@ -0,0 +1,77 @@
|
||||
---
|
||||
import Layout from "../../layouts/Layout.astro";
|
||||
---
|
||||
<Layout title="">
|
||||
<main>
|
||||
<div>
|
||||
<section class="container mx-auto px-4 md:max-w-3xl mt-40 space-y-4 shadow-xl rounded-xl p-4">
|
||||
<h1 class="text-center text-2xl underline decoration-4 decoration-[#580a0a]">Genarate New News</h1>
|
||||
<form id="newsPara" class="flex flex-col space-y-4" enctype="multipart/form-data">
|
||||
<label for="language">Language<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<select name="language" id="language" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2">
|
||||
<option value="null">-Select-</option>
|
||||
<option value="English">English</option>
|
||||
<option value="Bengali">Bengali</option>
|
||||
</select>
|
||||
<div class="flex flex-col">
|
||||
<label for="category">Category<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<select name="category" id="category" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2">
|
||||
<option value="null">-Select-</option>
|
||||
<option value="national">National</option>
|
||||
<option value="politics">Politics</option>
|
||||
<option value="local">Local</option>
|
||||
<option value="technology">Technology</option>
|
||||
<option value="world">World</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex flex-col ">
|
||||
<label for="content">Nes Paragraph</label>
|
||||
<textarea name="content" id="content" cols="30" maxlength="1000000" rows="10" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl"></textarea>
|
||||
</div>
|
||||
<div>
|
||||
<button onclick="submitNewsPara(event);" class="bg-[#580a0a] text-white px-4 py-2 rounded-lg" >Genarate</button>
|
||||
|
||||
<h1 id="message"></h1>
|
||||
</div>
|
||||
<!-- <input id="message" type="text" value="" class="border-2 border-[#580a0a] p-2 focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl"/> -->
|
||||
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
function submitNewsPara(event) {
|
||||
event.preventDefault();
|
||||
let newsData = document.getElementById('newsPara');
|
||||
let formData = new FormData(newsData);
|
||||
// formData.append('content', document.getElementById('content').value);
|
||||
// console.log('FormData entries:');
|
||||
// for (const entry of formData.entries()) {
|
||||
// console.log(typeof entry[0], entry[0]);
|
||||
// }
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/_dedicated/dwd/`, {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(data => data.json())
|
||||
.then(data => {
|
||||
// if (data === 200) {
|
||||
// counter++;
|
||||
// } else {
|
||||
console.log(data)
|
||||
// }
|
||||
let newsData = data.choices[0].message.content;
|
||||
|
||||
const jsonObject = JSON.parse(newsData);
|
||||
document.getElementById('message').innerHTML = jsonObject.title + "<br> Description: " + jsonObject.description; //jsonObject;
|
||||
// document.getElementById('message').value = jsonObject.title;
|
||||
// console.log(newsData);
|
||||
// return data.choices[0].message.content;
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error occurred', error);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
22
src/pages/editor/index.astro
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
import Layout from "../../layouts/Layout.astro";
|
||||
import EditNews from "../../components/EditNews.vue";
|
||||
import AdminHeader from "../../components/AdminHeader.astro";
|
||||
---
|
||||
<Layout title="Edit News | Barta-India">
|
||||
<AdminHeader />
|
||||
<main>
|
||||
<div>
|
||||
<EditNews client:visible />
|
||||
</div>
|
||||
</main>
|
||||
<!-- </Layout>
|
||||
<script is:inline>
|
||||
let pramsURL = document.location.href.split('/')[3].split('edit=')[1];
|
||||
document.getElementById('url').innerHTML = pramsURL;
|
||||
// console.log(pramsURL)
|
||||
|
||||
function getNewsData(){
|
||||
|
||||
}
|
||||
</script> -->
|
||||
158
src/pages/editor/multi-lang.astro
Normal file
@@ -0,0 +1,158 @@
|
||||
---
|
||||
import Layout from "../../layouts/Layout.astro";
|
||||
import ImageUpload from "../../components/ImageUpload.vue";
|
||||
---
|
||||
|
||||
<Layout title="Add News | Barta India">
|
||||
<main>
|
||||
<div>
|
||||
<section class="container mx-auto px-4 md:max-w-3xl mt-40 space-y-4 shadow-xl rounded-xl p-4">
|
||||
<h1 class="text-center text-2xl underline decoration-4 decoration-[#580a0a]">Genarate New News</h1>
|
||||
<form id="newsPara" class="flex flex-col space-y-4" enctype="multipart/form-data">
|
||||
<!-- <label for="language">Language<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<select required onchange="qryWithLang();" name="language" id="language" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2">
|
||||
<option value="0">-Select-</option>
|
||||
<option value="english">English</option>
|
||||
<option value="bengali">Bengali</option>
|
||||
</select> -->
|
||||
<div class="flex flex-col">
|
||||
<label for="category">Category<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<select name="category" id="category" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2">
|
||||
<option value="0">-Select-</option>
|
||||
<option value="national">National</option>
|
||||
<option value="politics">Politics</option>
|
||||
<option value="local">Local</option>
|
||||
<option value="technology">Technology</option>
|
||||
<option value="world">World</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex flex-col ">
|
||||
<label for="preText">News Paragraph</label>
|
||||
<textarea required name="preText" id="preText" cols="30" maxlength="1000000" rows="10" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl">white tiger</textarea>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<textarea required name="systemMessage" id="systemMessage" cols="30" rows="3" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl">provide meta_title within 60 characters, meta_description within 160 characters, short_description within 280 characters, heading within 170 characters in en, bn, hi, zh, es ar all in a json structure no use comma after line ending</textarea>
|
||||
</div>
|
||||
<div>
|
||||
<button id="genButton" onclick="submitNewsPara(event);" class="bg-[#580a0a] text-white px-4 py-2 rounded-lg" >Genarate</button>
|
||||
</div>
|
||||
<!-- <input id="message" type="text" value="" class="border-2 border-[#580a0a] p-2 focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl"/> -->
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
|
||||
<script is:inline>
|
||||
function qryWithLang(){
|
||||
let langValue = document.getElementById('language').value;
|
||||
document.getElementById('systemMessage').value = `provide meta_title within 60 characters, meta_description within 160 characters, short_description within 280 characters, heading within 170 characters in en, bn, hi, zh, es, pt, ru, fr, ur, ar all in a json structure no use comma after line ending`;
|
||||
// give me long description below 2000 characters, title, heading not more than 160 characters, short desciption not more than 280 characters, meta_title not more than 60 characters and try to use common words, meta_description not more than 160 characters and try to use common words, all text are convert to ${langValue} language, give me all in a json structure`
|
||||
// provide meta_title within 60 characters, meta_description within 160 characters, short_description within 280 characters in English, bengali and hindi all in a json structure
|
||||
// need title, heading not more than 160 characters, meta_title not more than 60 characters, meta_description not more than 160 characters, short_description not more than 280 characters, long_description below 2000 characters, all are ${langValue} language all in a json structure
|
||||
// provide meta_title within 60 characters, meta_description within 160 characters, short_description within 280 characters in English, bengali and hindi all in a json structure
|
||||
// provide meta_title within 60 characters, meta_description within 160 characters, short_description within 280 characters in English, bengali, hindi, Mandarin, Spanish, Portuguese, Russian, French, all in a json structure
|
||||
}
|
||||
|
||||
function submitNewsPara(event) {
|
||||
event.preventDefault();
|
||||
let genButton = document.getElementById('genButton');
|
||||
let langInput = document.getElementById('language');
|
||||
let loadSection = document.getElementById('loadingSection');
|
||||
let newsData = document.getElementById('newsPara');
|
||||
let formData = new FormData(newsData);
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/_dedicated/dwd/multi-lang/`, {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(data => data.json())
|
||||
.then(data => {
|
||||
// if (data === 200) {
|
||||
// counter++;
|
||||
// } else {
|
||||
// formSection genButton brightness-50
|
||||
console.log(data)
|
||||
// }
|
||||
let newsData = data.choices[0].message.content;
|
||||
let jsonObject = JSON.parse(newsData);
|
||||
// Sample array
|
||||
|
||||
// Using forEach to log each element
|
||||
// jsonObject.forEach(function(arrayData) {
|
||||
// console.log('Array Data', arrayData);
|
||||
// });
|
||||
|
||||
// console.log(jsonObject.en)
|
||||
// console.log(jsonObject.bn)
|
||||
|
||||
// document.getElementById('title').value = jsonObject.title;
|
||||
// document.getElementById('slug').value = jsonObject.title;
|
||||
// document.getElementById('heading').value = jsonObject.heading;
|
||||
// document.getElementById('meta_title').value = jsonObject.meta_title;
|
||||
// document.getElementById('meta_description').value = jsonObject.meta_description;
|
||||
// document.getElementById('in_brief').value = jsonObject.short_description;
|
||||
// document.getElementById('content').value = jsonObject.long_description;
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error occurred', error);
|
||||
});
|
||||
}
|
||||
function slugify(text) {
|
||||
return text.toString().toLowerCase()
|
||||
.replace(/\s+/g, '-') // Replace spaces with -
|
||||
.replace(/[^\w-]+/g, '') // Remove all non-word characters
|
||||
.replace(/--+/g, '-') // Replace multiple - with single -
|
||||
.replace(/^-+/, '') // Trim - from start of text
|
||||
.replace(/-+$/, ''); // Trim - from end of text
|
||||
}
|
||||
|
||||
function updateSlug() {
|
||||
const titleInput = document.getElementById('slug');
|
||||
const slugInput = document.getElementById('slug');
|
||||
const titleValue = titleInput.value;
|
||||
slugInput.value = slugify(titleValue);
|
||||
}
|
||||
|
||||
function callApi(event) {
|
||||
event.preventDefault();
|
||||
let slugValue = document.getElementById('slug').value;
|
||||
let newsData = document.getElementById('newsForm');
|
||||
let formData = new FormData(newsData);
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/news/add-news/?action=save`, {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(data => data.json())
|
||||
.then(data => {
|
||||
if (data.success === true) {
|
||||
window.location.href= `/add-file?slug=${slugValue}`
|
||||
// console.log(slugValue)
|
||||
console.log('Form Data Submitted Successfully');
|
||||
} else {
|
||||
console.log('Data Submit Failed');
|
||||
}
|
||||
console.log(data);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error occurred', error);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
#loadingSection{
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
.load-aimate{
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border-radius: 50%;
|
||||
border-left: 5px solid #580a0a;
|
||||
border-right: 5px solid #580a0a;
|
||||
border-bottom: 5px solid #580a0a;
|
||||
border-top: 5px solid #FFFFFF;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
</style>
|
||||
267
src/pages/editor/single-gen.astro
Normal file
@@ -0,0 +1,267 @@
|
||||
---
|
||||
import Layout from "../../layouts/Layout.astro";
|
||||
// import ImageUpload from "../../components/ImageUpload.vue";
|
||||
---
|
||||
|
||||
<Layout title="Add News | Barta India">
|
||||
<main>
|
||||
<div>
|
||||
<section class="container mx-auto px-4 md:max-w-3xl mt-40 space-y-4 shadow-xl rounded-xl p-4">
|
||||
<h1 class="text-center text-2xl underline decoration-4 decoration-[#580a0a]">Genarate New News</h1>
|
||||
<form id="newsPara" class="flex flex-col space-y-4" enctype="multipart/form-data">
|
||||
<label for="language">Language<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<select required onchange="qryWithLang();" name="language" id="language" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2">
|
||||
<option value="0">-Select-</option>
|
||||
<option value="english">English</option>
|
||||
<option value="bengali">Bengali</option>
|
||||
</select>
|
||||
<div class="flex flex-col">
|
||||
<label for="category">Category<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<select name="category" id="category" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2">
|
||||
<option value="0">-Select-</option>
|
||||
<option value="national">National</option>
|
||||
<option value="politics">Politics</option>
|
||||
<option value="local">Local</option>
|
||||
<option value="technology">Technology</option>
|
||||
<option value="world">World</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex flex-col ">
|
||||
<label for="preText">News Paragraph</label>
|
||||
<textarea onchange="buttonVisibility();" required name="preText" id="preText" cols="30" maxlength="1000000" rows="10" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl"></textarea>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<textarea required name="systemMessage" id="systemMessage" cols="30" rows="3" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl"></textarea>
|
||||
</div>
|
||||
<div>
|
||||
<button id="genButton" style="display: none;" onclick="submitNewsPara(event);" class="bg-[#580a0a] text-white px-4 py-2 rounded-lg" >Genarate</button>
|
||||
<button id="genButton2" style="display: block;" class="bg-[#580a0a] text-white px-4 py-2 rounded-lg opacity-50 cursor-not-allowed" >Genarate</button>
|
||||
</div>
|
||||
<!-- <input id="message" type="text" value="" class="border-2 border-[#580a0a] p-2 focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl"/> -->
|
||||
</form>
|
||||
</section>
|
||||
<section id="formSection" style="display: none;" class="container mx-auto md:max-w-3xl px-4 shadow-xl rounded-xl p-6">
|
||||
<div class="flex justify-center">
|
||||
<h1 class="text-xl my-6 p-2 border-2 bg-[#580a0a] text-white rounded-full">Add News to Barta-India's Page</h1>
|
||||
</div>
|
||||
<p>All(<span class="text-[#580a0a] font-bold">*</span>) are mandatory fields</p>
|
||||
<form id="newsForm" class="flex flex-col space-y-4">
|
||||
<div class="flex flex-col">
|
||||
<label for="status">Status<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<select name="status" id="status" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2" required>
|
||||
<option value="null">-Select-</option>
|
||||
<option value="published">Published</option>
|
||||
<option value="draft">Draft</option>
|
||||
<option value="archived">Archived</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<label for="language">Language<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<select name="language" id="language" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2" required>
|
||||
<option value="null">-Select-</option>
|
||||
<option value="bengali">Bengali</option>
|
||||
<option value="english">English</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<label for="category">Category<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<select name="category" id="category" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2">
|
||||
<option value="null">-Select-</option>
|
||||
<option value="national">National</option>
|
||||
<option value="politics">Politics</option>
|
||||
<option value="local">Local</option>
|
||||
<option value="technology">Technology</option>
|
||||
<option value="world">World</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<label for="title">Title<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<input name="title" id="title" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2" type="text" required>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<label for="slug">Slug<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<input oninput="updateSlug();" name="slug" id="slug" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2" type="text" required>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<label for="heading">Heading<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<input name="heading" id="heading" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2" type="text" required>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<label for="meta_title">Meta Title<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<input name="meta_title" id="meta_title" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2" type="text" placeholder="max: length 60 characters & try to use common words" required>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<label for="meta_description">Meta Description<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<input name="meta_description" id="meta_description" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2" type="text" placeholder="max: length 160 characters & try to use common words" required>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<label for="in_brief">In Brief<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<input name="in_brief" id="in_brief" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl p-2" type="text" placeholder="max: length 280 characters & try to descibe" required>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<label class="text-lg" for="content">News Description<span class="text-[#580a0a] font-bold">*</span></label>
|
||||
<textarea class="border-2 p-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl" name="content" id="content" cols="30" rows="10" required></textarea>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<label for="upldFile">Upload File</label>
|
||||
<input id="upldFile" class="border-2 border-[#580a0a] focus:outline-none focus:border-4 focus:border-[#580a0a] rounded-xl" type="file">
|
||||
</div>
|
||||
<div class="flex float-right">
|
||||
<button onclick="callApi(event);" class="bg-[#580a0a] text-white px-4 py-2 rounded-lg">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
<section class="bg-white rounded-full px-6 py-4" id="loadingSection" style="display: none;">
|
||||
<div class="flex flex-col justify-center place-items-center">
|
||||
<div class="load-aimate animate-spin "></div>
|
||||
<p>Processing...</p>
|
||||
</div>
|
||||
</section>
|
||||
<!-- <section class="container mx-auto">
|
||||
<div>
|
||||
<dialog id="d" class="w-[50%]">
|
||||
<form method="dialog">
|
||||
<p>Modal Content Modal Content Lorem ipsum dolor sit, amet consectetur adipisicing elit. Hic consequatur aspernatur, explicabo sequi perspiciatis quisquam voluptates tenetur placeat numquam consectetur! Tempore expedita facilis tempora labore at illo beatae eligendi magnam.</p>
|
||||
<button>ok</button>
|
||||
</form>
|
||||
</dialog>
|
||||
<button onclick="d.showModal()">Open</button>
|
||||
</div>
|
||||
</section> -->
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
|
||||
<script is:inline>
|
||||
function qryWithLang(){
|
||||
let langValue = document.getElementById('language').value;
|
||||
document.getElementById('systemMessage').value = `need title, heading not more than 160 characters, meta_title not more than 60 characters, meta_description not more than 160 characters, short_description not more than 280 characters, long_description below 2000 characters, all are ${langValue} language all in a json structure`;
|
||||
// give me long description below 2000 characters, title, heading not more than 160 characters, short desciption not more than 280 characters, meta_title not more than 60 characters and try to use common words, meta_description not more than 160 characters and try to use common words, all text are convert to ${langValue} language, give me all in a json structure`
|
||||
// provide meta_title within 60 characters, meta_description within 160 characters, short_description within 280 characters in English, bengali and hindi all in a json structure
|
||||
// provide meta_title within 60 characters, meta_description within 160 characters, short_description within 280 characters in English, bengali and hindi all in a json structure
|
||||
}
|
||||
function buttonVisibility() {
|
||||
var preTextValue = document.getElementById('preText').value.trim();
|
||||
var systemMessageValue = document.getElementById('systemMessage').value.trim();
|
||||
var languageValue = document.getElementById('language').value;
|
||||
var categoryValue = document.getElementById('category').value;
|
||||
var genButton = document.getElementById('genButton');
|
||||
var genButton2 = document.getElementById('genButton2');
|
||||
if (preTextValue.length > 0 && systemMessageValue.length > 0 && languageValue !== null) {
|
||||
genButton.style.display = 'block';
|
||||
genButton2.style.display = 'none';
|
||||
} else {
|
||||
genButton.style.display = 'none';
|
||||
genButton2.style.display = 'block';
|
||||
}
|
||||
}
|
||||
|
||||
function submitNewsPara(event) {
|
||||
event.preventDefault();
|
||||
let genButton = document.getElementById('genButton');
|
||||
let langInput = document.getElementById('language');
|
||||
let loadSection = document.getElementById('loadingSection');
|
||||
let newsData = document.getElementById('newsPara');
|
||||
loadSection.style.display = 'block';
|
||||
genButton.disabled = true;
|
||||
langInput.disabled = true;
|
||||
genButton.style.cursor = 'not-allowed';
|
||||
|
||||
let formData = new FormData(newsData);
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/_dedicated/dwd/`, {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(data => data.json())
|
||||
.then(data => {
|
||||
// if (data === 200) {
|
||||
// counter++;
|
||||
// } else {
|
||||
// formSection genButton brightness-50
|
||||
console.log(data)
|
||||
// }
|
||||
let newsData = data.choices[0].message.content;
|
||||
if(newsData){
|
||||
document.getElementById('formSection').style.display = 'block';
|
||||
loadSection.style.display = 'none';
|
||||
genButton.disabled = false;
|
||||
genButton.style.cursor = 'pointer';
|
||||
langInput.disabled = false;
|
||||
// document.getElementById('loadingSection').classList.remove = 'brightness-50';
|
||||
// document.getElementById('genButton').classList.remove = 'disabled';
|
||||
}
|
||||
let jsonObject = JSON.parse(newsData);
|
||||
document.getElementById('title').value = jsonObject.title;
|
||||
document.getElementById('slug').value = jsonObject.title;
|
||||
document.getElementById('heading').value = jsonObject.heading;
|
||||
document.getElementById('meta_title').value = jsonObject.meta_title;
|
||||
document.getElementById('meta_description').value = jsonObject.meta_description;
|
||||
document.getElementById('in_brief').value = jsonObject.short_description;
|
||||
document.getElementById('content').value = jsonObject.long_description;
|
||||
if(jsonObject.long_description){
|
||||
// document.getElementById('content').value = jsonObject.long_description;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error occurred', error);
|
||||
});
|
||||
}
|
||||
function slugify(text) {
|
||||
return text.toString().toLowerCase()
|
||||
.replace(/\s+/g, '-') // Replace spaces with -
|
||||
.replace(/[^\w-]+/g, '') // Remove all non-word characters
|
||||
.replace(/--+/g, '-') // Replace multiple - with single -
|
||||
.replace(/^-+/, '') // Trim - from start of text
|
||||
.replace(/-+$/, ''); // Trim - from end of text
|
||||
}
|
||||
|
||||
function updateSlug() {
|
||||
const titleInput = document.getElementById('slug');
|
||||
const slugInput = document.getElementById('slug');
|
||||
const titleValue = titleInput.value;
|
||||
slugInput.value = slugify(titleValue);
|
||||
}
|
||||
|
||||
function callApi(event) {
|
||||
event.preventDefault();
|
||||
let slugValue = document.getElementById('slug').value;
|
||||
let newsData = document.getElementById('newsForm');
|
||||
let formData = new FormData(newsData);
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/news/add-news/?action=save`, {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(data => data.json())
|
||||
.then(data => {
|
||||
if (data.success === true) {
|
||||
window.location.href= `/add-file?slug=${slugValue}`
|
||||
// console.log(slugValue)
|
||||
console.log('Form Data Submitted Successfully');
|
||||
} else {
|
||||
console.log('Data Submit Failed');
|
||||
}
|
||||
console.log(data);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error occurred', error);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
#loadingSection{
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
.load-aimate{
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border-radius: 50%;
|
||||
border-left: 5px solid #580a0a;
|
||||
border-right: 5px solid #580a0a;
|
||||
border-bottom: 5px solid #580a0a;
|
||||
border-top: 5px solid #FFFFFF;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
</style>
|
||||
94
src/pages/en/[id].astro
Normal file
@@ -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_en', 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_en', 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)
|
||||
---
|
||||
<Layout title=""
|
||||
metaTitle={items.meta_title}
|
||||
description={items.meta_description}
|
||||
ogImg={items.img}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={items.img}
|
||||
tiwtterTitle={items.meta_title}
|
||||
tiwtterDesc={items.meta_description}
|
||||
tiwtterURL=`https://barta-india.in/en/${items.slug}`
|
||||
artPubTime={items.date_created}
|
||||
ogSiteName=`https://barta-india.in/en/${items.slug}`
|
||||
ogType='News'
|
||||
ogTitle={items.meta_title}
|
||||
ogDesc={items.meta_description}
|
||||
ogURL=`https://barta-india.in/en/${items.slug}`>
|
||||
<main>
|
||||
<section class="container mx-auto px-4 mt-16">
|
||||
<div class="flex flex-col justify-center">
|
||||
<div class=""><button onclick="toggleSpeech();" id="listenButton" class="float-right text-white font-bold px-6 py-2 rounded-lg bg-[#780a0a]">Listen</button></div>
|
||||
<h1 id="message1" class="text-3xl font-bold border-b-4 border-[#780A0A]">{items.heading}</h1>
|
||||
<h2 id="message2" class="text-xl py-2">{items.title}</h2>
|
||||
<div class="flex flex-col place-items-center">
|
||||
<img src={items.img} alt={items.title} class="md:w-[40%]" />
|
||||
</div>
|
||||
<div class="flex flex-row justify-center md:justify-end mt-2">
|
||||
<div class="flex flex-row place-items-center p-2 shadow-lg shadow-[#780a0a] border-b-2 border-[#780a0a] rounded-b-2xl w-fit">
|
||||
<p class="text-xl font-bold text-[#780a0a]">Share on: </p>
|
||||
<a href=`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/en/${items.slug}` data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a href=`https://www.facebook.com/share.php?u=https://barta-india.in/en/${items.slug}` target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a href=`http://www.twitter.com/share?url=https://barta-india.in/en/${items.slug}&text=%20${items.title}` target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a href=`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/en/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}` onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-justify mt-4">{items.content}</p>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
let isListening = false;
|
||||
let speechSynthesisInstance = window.speechSynthesis;
|
||||
|
||||
function toggleSpeech() {
|
||||
if (isListening) {
|
||||
stopSpeech();
|
||||
} else {
|
||||
startSpeech();
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
// }
|
||||
</script>
|
||||
29
src/pages/en/cat/index.astro
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
import Layout from "../../../layouts/Layout.astro"
|
||||
import ENCategory from "../../../components/ENCategory.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);
|
||||
---
|
||||
<Layout title="">
|
||||
<main>
|
||||
<div>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="text-[#780a0a] py-6 flex flex-row" id="">
|
||||
<a id="folder" href="/en"></a> >
|
||||
<p id="cat"></p>
|
||||
</div>
|
||||
<ENCategory client:visible />
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
let fullURL = window.location.href.split('/');
|
||||
console.log(fullURL);
|
||||
let folderName = document.getElementById('folder').innerHTML = fullURL[3];
|
||||
let catName = document.getElementById('cat').innerHTML = fullURL[5].split('?cat=')[1]
|
||||
</script>
|
||||
71
src/pages/en/index.astro
Normal file
@@ -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_en', options);
|
||||
const data = await response.json();
|
||||
const news = data;
|
||||
// console.log(news);
|
||||
---
|
||||
<Layout title="">
|
||||
<main>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="my-16">
|
||||
<span class="text-[#780a0a] font-bold" id="pageName"></span>
|
||||
<h1 class="text-4xl font-bold border-b-4 border-[#780A0A]">Latest News</h1>
|
||||
</div>
|
||||
<div class="flex flex-row md:justify-center my-10 overflow-x-scroll md:overflow-x-clip">
|
||||
<a href="/en/cat/?cat=local" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">Local</a>
|
||||
<a href="/en/cat/?cat=national" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">National</a>
|
||||
<a href="/en/cat/?cat=world" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">World</a>
|
||||
<a href="/en/cat/?cat=politics" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">Politics</a>
|
||||
<a href="/en/cat/?cat=technology" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">Technology</a>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
|
||||
{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;}) =>
|
||||
<div class="flex flex-col border-2 border-[#780a0a] gap-6 p-4 place-content-between rounded-lg">
|
||||
<div class="flex flex-col">
|
||||
<div class="">
|
||||
<a class="flex flex-col" href={`/en/${items.slug}`}>
|
||||
<img class="aspect-video rounded-t-lg" src={items.img} alt={items.title} />
|
||||
<h2 class="text-lg text-justify ">{items.title}</h2>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<dialog id={`d-${items.id}`} class="shadow-xl rounded-xl md:w-[50%] xl:w-[30%]">
|
||||
<form method="dialog">
|
||||
<div class="flex flex-col md:flex-col">
|
||||
<a href={`/en/${items.slug}`} class="flex flex-col md:flex-col">
|
||||
<img class="rounded-t-xl" src={items.img} alt={items.title} />
|
||||
<h1 class="text-lg font-bold">{items.heading} </h1>
|
||||
<h2 class="text-justify ">{items.in_brief}</h2>
|
||||
</a>
|
||||
<div class="flex flex-row place-content-between place-items-center">
|
||||
<div class="flex flex-row place-content-between place-items-center p-2 space-x-6 shadow-lg shadow-gray-400 rounded-2xl">
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/${items.slug}`} data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.facebook.com/share.php?u=https://barta-india.in/en/${items.slug}`} target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`http://www.twitter.com/share?url=https://barta-india.in/${items.slug}&text=${items.title}`} target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}`} onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
<div class="flex border-b-4 border-gray-500 border-t rounded-full text-3xl hover:rotate-180 duration-[3s]">
|
||||
<button class="text-white font-bold py-2 px-4 bg-[#780a0a] rounded-full shadow-xl" onclick={`document.getElementById('d-${items.id}').close()`}>✘</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row place-content-between">
|
||||
<button onclick={`document.getElementById('d-${items.id}').showModal()`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">In Brief</button>
|
||||
<a href={`/en/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">Details</a>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<!-- <a href={`/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold px-6 ">Read More>></a> -->
|
||||
<!-- <p class="">Publish at: <br/> {items.date_created.split(':')[0].split('T')[0]}</p> -->
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</Layout>
|
||||
94
src/pages/es/[id].astro
Normal file
@@ -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)
|
||||
---
|
||||
<Layout title=""
|
||||
metaTitle={items.meta_title}
|
||||
description={items.meta_description}
|
||||
ogImg={items.img}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={items.img}
|
||||
tiwtterTitle={items.meta_title}
|
||||
tiwtterDesc={items.meta_description}
|
||||
tiwtterURL=`https://barta-india.in/zh/${items.slug}`
|
||||
artPubTime={items.date_created}
|
||||
ogSiteName=`https://barta-india.in/zh/${items.slug}`
|
||||
ogType='News'
|
||||
ogTitle={items.meta_title}
|
||||
ogDesc={items.meta_description}
|
||||
ogURL=`https://barta-india.in/zh/${items.slug}`>
|
||||
<main>
|
||||
<section class="container mx-auto px-4 mt-16">
|
||||
<div class="flex flex-col justify-center">
|
||||
<div class=""><button onclick="toggleSpeech();" id="listenButton" class="float-right text-white font-bold px-6 py-2 rounded-lg bg-[#780a0a]">Listen</button></div>
|
||||
<h1 id="message1" class="text-3xl font-bold border-b-4 border-[#780A0A]">{items.heading}</h1>
|
||||
<h2 id="message2" class="text-xl py-2">{items.title}</h2>
|
||||
<div class="flex flex-col place-items-center">
|
||||
<img src={items.img} alt={items.title} class="md:w-[40%]" />
|
||||
</div>
|
||||
<div class="flex flex-row justify-center md:justify-end mt-2">
|
||||
<div class="flex flex-row place-items-center p-2 shadow-lg shadow-[#780a0a] border-b-2 border-[#780a0a] rounded-b-2xl w-fit">
|
||||
<p class="text-xl font-bold text-[#780a0a]">Share on: </p>
|
||||
<a href=`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/zh/${items.slug}` data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a href=`https://www.facebook.com/share.php?u=https://barta-india.in/zh/${items.slug}` target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a href=`http://www.twitter.com/share?url=https://barta-india.in/zh/${items.slug}&text=%20${items.title}` target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a href=`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/zh/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}` onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-justify mt-4">{items.content}</p>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
let isListening = false;
|
||||
let speechSynthesisInstance = window.speechSynthesis;
|
||||
|
||||
function toggleSpeech() {
|
||||
if (isListening) {
|
||||
stopSpeech();
|
||||
} else {
|
||||
startSpeech();
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
// }
|
||||
</script>
|
||||
29
src/pages/es/cat/index.astro
Normal file
@@ -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);
|
||||
---
|
||||
<Layout title="">
|
||||
<main>
|
||||
<div>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="text-[#780a0a] py-6 flex flex-row" id="">
|
||||
<a id="folder" href="/es"></a> >
|
||||
<p id="cat"></p>
|
||||
</div>
|
||||
<ESCategory client:visible />
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
let fullURL = window.location.href.split('/');
|
||||
// console.log(fullURL);
|
||||
let folderName = document.getElementById('folder').innerHTML = fullURL[3];
|
||||
let catName = document.getElementById('cat').innerHTML = fullURL[5].split('?cat=')[1]
|
||||
</script>
|
||||
71
src/pages/es/index.astro
Normal file
@@ -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);
|
||||
---
|
||||
<Layout title="">
|
||||
<main>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="my-16">
|
||||
<span class="text-[#780a0a] font-bold" id="pageName"></span>
|
||||
<h1 class="text-4xl font-bold border-b-4 border-[#780A0A]">Latest News</h1>
|
||||
</div>
|
||||
<div class="flex flex-row md:justify-center my-10 overflow-x-scroll md:overflow-x-clip">
|
||||
<a href="/es/cat/?cat=local" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">Local</a>
|
||||
<a href="/es/cat/?cat=national" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">National</a>
|
||||
<a href="/es/cat/?cat=world" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">World</a>
|
||||
<a href="/es/cat/?cat=politics" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">Politics</a>
|
||||
<a href="/es/cat/?cat=technology" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">Technology</a>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
|
||||
{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;}) =>
|
||||
<div class="flex flex-col border-2 border-[#780a0a] gap-6 p-4 place-content-between rounded-lg">
|
||||
<div class="flex flex-col">
|
||||
<div class="">
|
||||
<a class="flex flex-col" href={`/es/${items.slug}`}>
|
||||
<img class="aspect-video rounded-t-lg" src={items.img} alt={items.title} />
|
||||
<h2 class="text-lg text-justify ">{items.title}</h2>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<dialog id={`d-${items.id}`} class="shadow-xl rounded-xl md:w-[50%] xl:w-[30%]">
|
||||
<form method="dialog">
|
||||
<div class="flex flex-col md:flex-col">
|
||||
<a href={`/es/${items.slug}`} class="flex flex-col md:flex-col">
|
||||
<img class="rounded-t-xl" src={items.img} alt={items.title} />
|
||||
<h1 class="text-lg font-bold">{items.heading} </h1>
|
||||
<h2 class="text-justify ">{items.in_brief}</h2>
|
||||
</a>
|
||||
<div class="flex flex-row place-content-between place-items-center">
|
||||
<div class="flex flex-row place-content-between place-items-center p-2 space-x-6 shadow-lg shadow-gray-400 rounded-2xl">
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/es/${items.slug}`} data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.facebook.com/share.php?u=https://barta-india.in/es/${items.slug}`} target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`http://www.twitter.com/share?url=https://barta-india.in/es/${items.slug}&text=${items.title}`} target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/es/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}`} onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
<div class="flex border-b-4 border-gray-500 border-t rounded-full text-3xl hover:rotate-180 duration-[3s]">
|
||||
<button class="text-white font-bold py-2 px-4 bg-[#780a0a] rounded-full shadow-xl" onclick={`document.getElementById('d-${items.id}').close()`}>✘</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row place-content-between">
|
||||
<button onclick={`document.getElementById('d-${items.id}').showModal()`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">In Brief</button>
|
||||
<a href={`/es/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">Details</a>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<!-- <a href={`/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold px-6 ">Read More>></a> -->
|
||||
<!-- <p class="">Publish at: <br/> {items.date_created.split(':')[0].split('T')[0]}</p> -->
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</Layout>
|
||||
11
src/pages/hash.astro
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
import Layout from "../layouts/Layout.astro";
|
||||
import HashRouting from "../components/HashRouting.vue";
|
||||
---
|
||||
<Layout title="Hash Routing">
|
||||
<main>
|
||||
<div>
|
||||
<HashRouting client:visible />
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
94
src/pages/hi/[id].astro
Normal file
@@ -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)
|
||||
---
|
||||
<Layout title=""
|
||||
metaTitle={items.meta_title}
|
||||
description={items.meta_description}
|
||||
ogImg={items.img}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={items.img}
|
||||
tiwtterTitle={items.meta_title}
|
||||
tiwtterDesc={items.meta_description}
|
||||
tiwtterURL=`https://barta-india.in/hi/${items.slug}`
|
||||
artPubTime={items.date_created}
|
||||
ogSiteName=`https://barta-india.in/hi/${items.slug}`
|
||||
ogType='News'
|
||||
ogTitle={items.meta_title}
|
||||
ogDesc={items.meta_description}
|
||||
ogURL=`https://barta-india.in/hi/${items.slug}`>
|
||||
<main>
|
||||
<section class="container mx-auto px-4 mt-16">
|
||||
<div class="flex flex-col justify-center">
|
||||
<div class=""><button onclick="toggleSpeech();" id="listenButton" class="float-right text-white font-bold px-6 py-2 rounded-lg bg-[#780a0a]">Listen</button></div>
|
||||
<h1 id="message1" class="text-3xl font-bold border-b-4 border-[#780A0A]">{items.heading}</h1>
|
||||
<h2 id="message2" class="text-xl py-2">{items.title}</h2>
|
||||
<div class="flex flex-col place-items-center">
|
||||
<img src={items.img} alt={items.title} class="md:w-[40%]" />
|
||||
</div>
|
||||
<div class="flex flex-row justify-center md:justify-end mt-2">
|
||||
<div class="flex flex-row place-items-center p-2 shadow-lg shadow-[#780a0a] border-b-2 border-[#780a0a] rounded-b-2xl w-fit">
|
||||
<p class="text-xl font-bold text-[#780a0a]">Share on: </p>
|
||||
<a href=`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/hi/${items.slug}` data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a href=`https://www.facebook.com/share.php?u=https://barta-india.in/hi/${items.slug}` target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a href=`http://www.twitter.com/share?url=https://barta-india.in/hi/${items.slug}&text=%20${items.title}` target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a href=`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/hi/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}` onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-justify mt-4">{items.content}</p>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
let isListening = false;
|
||||
let speechSynthesisInstance = window.speechSynthesis;
|
||||
|
||||
function toggleSpeech() {
|
||||
if (isListening) {
|
||||
stopSpeech();
|
||||
} else {
|
||||
startSpeech();
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
// }
|
||||
</script>
|
||||
29
src/pages/hi/cat/index.astro
Normal file
@@ -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);
|
||||
---
|
||||
<Layout title="">
|
||||
<main>
|
||||
<div>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="text-[#780a0a] py-6 flex flex-row" id="">
|
||||
<a id="folder" href="/hi"></a> >
|
||||
<p id="cat"></p>
|
||||
</div>
|
||||
<HICategory client:visible />
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
let fullURL = window.location.href.split('/');
|
||||
// console.log(fullURL);
|
||||
let folderName = document.getElementById('folder').innerHTML = fullURL[3];
|
||||
let catName = document.getElementById('cat').innerHTML = fullURL[5].split('?cat=')[1]
|
||||
</script>
|
||||
71
src/pages/hi/index.astro
Normal file
@@ -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);
|
||||
---
|
||||
<Layout title="">
|
||||
<main>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="my-16">
|
||||
<span class="text-[#780a0a] font-bold" id="pageName"></span>
|
||||
<h1 class="text-4xl font-bold border-b-4 border-[#780A0A]">Latest News</h1>
|
||||
</div>
|
||||
<div class="flex flex-row md:justify-center my-10 overflow-x-scroll md:overflow-x-clip">
|
||||
<a href="/hi/cat/?cat=local" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">Local</a>
|
||||
<a href="/hi/cat/?cat=national" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">National</a>
|
||||
<a href="/hi/cat/?cat=world" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">World</a>
|
||||
<a href="/hi/cat/?cat=politics" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">Politics</a>
|
||||
<a href="/hi/cat/?cat=technology" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">Technology</a>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
|
||||
{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;}) =>
|
||||
<div class="flex flex-col border-2 border-[#780a0a] gap-6 p-4 place-content-between rounded-lg">
|
||||
<div class="flex flex-col">
|
||||
<div class="">
|
||||
<a class="flex flex-col" href={`/hi/${items.slug}`}>
|
||||
<img class="aspect-video rounded-t-lg" src={items.img} alt={items.title} />
|
||||
<h2 class="text-lg text-justify ">{items.title}</h2>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<dialog id={`d-${items.id}`} class="shadow-xl rounded-xl md:w-[50%] xl:w-[30%]">
|
||||
<form method="dialog">
|
||||
<div class="flex flex-col md:flex-col">
|
||||
<a href={`/hi/${items.slug}`} class="flex flex-col md:flex-col">
|
||||
<img class="rounded-t-xl" src={items.img} alt={items.title} />
|
||||
<h1 class="text-lg font-bold">{items.heading} </h1>
|
||||
<h2 class="text-justify ">{items.in_brief}</h2>
|
||||
</a>
|
||||
<div class="flex flex-row place-content-between place-items-center">
|
||||
<div class="flex flex-row place-content-between place-items-center p-2 space-x-6 shadow-lg shadow-gray-400 rounded-2xl">
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/hi/${items.slug}`} data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.facebook.com/share.php?u=https://barta-india.in/hi/${items.slug}`} target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`http://www.twitter.com/share?url=https://barta-india.in/hi/${items.slug}&text=${items.title}`} target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/hi/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}`} onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
<div class="flex border-b-4 border-gray-500 border-t rounded-full text-3xl hover:rotate-180 duration-[3s]">
|
||||
<button class="text-white font-bold py-2 px-4 bg-[#780a0a] rounded-full shadow-xl" onclick={`document.getElementById('d-${items.id}').close()`}>✘</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row place-content-between">
|
||||
<button onclick={`document.getElementById('d-${items.id}').showModal()`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">In Brief</button>
|
||||
<a href={`/hi/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">Details</a>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<!-- <a href={`/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold px-6 ">Read More>></a> -->
|
||||
<!-- <p class="">Publish at: <br/> {items.date_created.split(':')[0].split('T')[0]}</p> -->
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</Layout>
|
||||
11
src/pages/image.astro
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
import Layout from "../layouts/Layout.astro";
|
||||
import ImageUpload from "../components/ImageUpload.vue";
|
||||
---
|
||||
<Layout title="">
|
||||
<main>
|
||||
<div class="container mx-auto px-4 mt-40">
|
||||
<ImageUpload client:visible />
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
@@ -1,85 +1,85 @@
|
||||
---
|
||||
import Layout from '../layouts/Layout.astro';
|
||||
import Card from '../components/Card.astro';
|
||||
import MainHeader from '../components/MainHeader.vue';
|
||||
import Footer from '../components/Footer.astro';
|
||||
const fetchData = await fetch('https://api7.siliconpin.com/items/barta?sort=-date_created&filter[lang][_eq]=english');
|
||||
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_en');
|
||||
const metaJSON = await fetchMeta.json();
|
||||
const items = metaJSON.data[0];
|
||||
// console.log(items.title)
|
||||
// const imageData = data.image;
|
||||
// const data = fetchDataJSON.data;
|
||||
// console.log() https://api7.siliconpin.com/items/meta_data?filter[status][_eq]=published&filter[domain][_eq]=barta&filter[pages][_eq]=home_en
|
||||
---
|
||||
|
||||
<Layout title="Welcome to Astro.">
|
||||
<MainHeader />
|
||||
<Layout title={items.title}
|
||||
metaTitle={items.title}
|
||||
description={items.description}
|
||||
ogImg={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterTitle={items.title}
|
||||
tiwtterDesc={items.description}
|
||||
tiwtterURL=`https://barta-india.in`
|
||||
ogSiteName=`https://barta-india.in/`
|
||||
ogType={items.og_type}
|
||||
ogTitle={items.title}
|
||||
ogDesc={items.description}
|
||||
ogURL=`https://barta-india.in`
|
||||
>
|
||||
<main>
|
||||
<h1>Welcome to <span class="text-gradient">Astro</span></h1>
|
||||
<p class="instructions">
|
||||
To get started, open the directory <code>src/pages</code> in your project.<br />
|
||||
<strong>Code Challenge:</strong> Tweak the "Welcome to Astro" message above.
|
||||
</p>
|
||||
<ul role="list" class="link-card-grid">
|
||||
<Card
|
||||
href="https://docs.astro.build/"
|
||||
title="Documentation"
|
||||
body="Learn how Astro works and explore the official API docs."
|
||||
/>
|
||||
<Card
|
||||
href="https://astro.build/integrations/"
|
||||
title="Integrations"
|
||||
body="Supercharge your project with new frameworks and libraries."
|
||||
/>
|
||||
<Card
|
||||
href="https://astro.build/themes/"
|
||||
title="Themes"
|
||||
body="Explore a galaxy of community-built starter themes."
|
||||
/>
|
||||
<Card
|
||||
href="https://astro.build/chat/"
|
||||
title="Community"
|
||||
body="Come say hi to our amazing Discord community. ❤️"
|
||||
/>
|
||||
</ul>
|
||||
<section class="container mx-auto px-4">
|
||||
<h1 class="text-4xl font-bold border-b-4 border-[#780A0A] my-16">Latest News</h1>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
|
||||
{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;}) =>
|
||||
<div class="flex flex-col border-2 border-[#780a0a] gap-6 p-4 place-content-between rounded-lg">
|
||||
<div class="flex flex-col">
|
||||
<div class="">
|
||||
<a class="flex flex-col" href={`/${items.slug}`}>
|
||||
<img class="aspect-video rounded-t-lg" src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} />
|
||||
<h2 class="text-lg text-justify">{items.title}</h2>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<dialog id={`d-${items.id}`} class="shadow-xl rounded-xl md:w-[50%] xl:w-[30%]">
|
||||
<form method="dialog">
|
||||
<div class="flex flex-col md:flex-col">
|
||||
<a href={`/${items.slug}`} class="flex flex-col md:flex-col">
|
||||
<img class="rounded-t-xl" src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} />
|
||||
<h1 class="text-lg font-bold">{items.heading} </h1>
|
||||
<h2 class="text-justify ">{items.in_brief}</h2>
|
||||
</a>
|
||||
<div class="flex flex-row place-content-between place-items-center">
|
||||
<div class="flex flex-row place-content-between place-items-center p-2 space-x-6 shadow-lg shadow-gray-400 rounded-2xl">
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/${items.slug}`} data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fbarta-india.in%2F${items.slug}`} target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`http://www.twitter.com/share?url=https://barta-india.in/${items.slug}&text=${items.title}`} target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}`} onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
<div class="flex border-b-4 border-gray-500 border-t rounded-full text-3xl hover:rotate-180 duration-[3s]">
|
||||
<button class="text-white font-bold py-2 px-4 bg-[#780a0a] rounded-full shadow-xl" onclick={`document.getElementById('d-${items.id}').close()`}>✘</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row place-content-between">
|
||||
<button onclick={`document.getElementById('d-${items.id}').showModal()`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">In Brief</button>
|
||||
<p class="">Publish at: <br/> {items.date_created.split(':')[0].split('T')[0]}</p>
|
||||
<a href={`/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">Details</a>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<!-- <a href={`/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold px-6 ">Read More>></a> -->
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
<Footer />
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
|
||||
</script>
|
||||
<style>
|
||||
main {
|
||||
margin: auto;
|
||||
padding: 1.5rem;
|
||||
max-width: 60ch;
|
||||
}
|
||||
h1 {
|
||||
font-size: 3rem;
|
||||
font-weight: 800;
|
||||
margin: 0;
|
||||
}
|
||||
.text-gradient {
|
||||
background-image: var(--accent-gradient);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-size: 400%;
|
||||
background-position: 0%;
|
||||
}
|
||||
.instructions {
|
||||
line-height: 1.6;
|
||||
margin: 1rem 0;
|
||||
border: 1px solid rgba(var(--accent), 25%);
|
||||
background-color: white;
|
||||
padding: 1rem;
|
||||
border-radius: 0.4rem;
|
||||
}
|
||||
.instructions code {
|
||||
font-size: 0.875em;
|
||||
font-weight: bold;
|
||||
background: rgba(var(--accent), 12%);
|
||||
color: rgb(var(--accent));
|
||||
border-radius: 4px;
|
||||
padding: 0.3em 0.45em;
|
||||
}
|
||||
.instructions strong {
|
||||
color: rgb(var(--accent));
|
||||
}
|
||||
.link-card-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(24ch, 1fr));
|
||||
gap: 1rem;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
90
src/pages/local/[id].astro
Normal file
@@ -0,0 +1,90 @@
|
||||
---
|
||||
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[category][_eq]=local&filter[lang][_eq]=english');
|
||||
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[category][_eq]=local&filter[lang][_eq]=english');
|
||||
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])
|
||||
---
|
||||
<Layout title={items.meta_title}
|
||||
metaTitle={items.meta_title}
|
||||
description={items.meta_description}
|
||||
ogImg={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterTitle={items.meta_title}
|
||||
tiwtterDesc={items.meta_description}
|
||||
tiwtterURL=`https://barta-india.in/local/${items.slug}`
|
||||
artPubTime={items.date_created}
|
||||
ogSiteName=`https://barta-india.in/local/${items.slug}`
|
||||
ogType='News'
|
||||
ogTitle={items.meta_title}
|
||||
ogDesc={items.meta_description}
|
||||
ogURL=`https://barta-india.in/local/${items.slug}`
|
||||
>
|
||||
<main>
|
||||
<section class="container mx-auto px-4 mt-16">
|
||||
<div class="flex flex-col justify-center">
|
||||
<div class=""><button onclick="toggleSpeech();" id="listenButton" class="float-right text-white font-bold px-6 py-2 rounded-lg bg-[#780a0a]">Listen</button></div>
|
||||
<h1 id="message1" class="text-3xl font-bold border-b-4 border-[#780A0A]">{items.heading}</h1>
|
||||
<h2 id="message2" class="text-xl py-2">{items.title}</h2>
|
||||
<div class="flex flex-col place-items-center">
|
||||
<img src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} class="md:w-[40%]" />
|
||||
</div>
|
||||
<div class="flex flex-row justify-center md:justify-end mt-2">
|
||||
<div class="flex flex-row place-items-center p-2 shadow-lg shadow-[#780a0a] border-b-2 border-[#780a0a] rounded-b-2xl w-fit">
|
||||
<p class="text-xl font-bold text-[#780a0a]">Share on: </p>
|
||||
<a href=`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/local/${items.slug}` data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a href={`https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fbarta-india.in%2Flocal%2F${items.slug}`} target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a href=`http://www.twitter.com/share?url=https://barta-india.in/local/${items.slug}&text=%20${items.title}` target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a href=`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/local/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}` onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-justify text-red-700 mt-4" set:html={items.content}></p>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
let isListening = false;
|
||||
let speechSynthesisInstance = window.speechSynthesis;
|
||||
|
||||
function toggleSpeech() {
|
||||
if (isListening) {
|
||||
stopSpeech();
|
||||
} else {
|
||||
startSpeech();
|
||||
}
|
||||
}
|
||||
|
||||
function startSpeech() {
|
||||
let message1 = document.getElementById('message1').innerText;
|
||||
let message2 = document.getElementById('message2').innerText;
|
||||
let allSpeechText = message1 + ' ' + message2;
|
||||
let speechText = new SpeechSynthesisUtterance(allSpeechText);
|
||||
speechSynthesisInstance.speak(speechText);
|
||||
|
||||
document.getElementById('listenButton').innerText = 'Stop';
|
||||
isListening = true;
|
||||
}
|
||||
|
||||
function stopSpeech() {
|
||||
speechSynthesisInstance.cancel();
|
||||
document.getElementById('listenButton').innerText = 'Listen';
|
||||
isListening = false;
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
section > div > p > p {
|
||||
text-align: justify;
|
||||
}
|
||||
</style>
|
||||
90
src/pages/local/index.astro
Normal file
@@ -0,0 +1,90 @@
|
||||
---
|
||||
import Layout from '../../layouts/Layout.astro';
|
||||
const fetchData = await fetch('https://api7.siliconpin.com/items/barta?filter[status][_eq]=published&filter[category][_eq]=local&sort=-date_created&filter[lang][_eq]=english');
|
||||
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]=local_en');
|
||||
const metaJSON = await fetchMeta.json();
|
||||
const items = metaJSON.data[0];
|
||||
// const imageData = data.image;
|
||||
// const data = fetchDataJSON.data;
|
||||
// console.log()
|
||||
---
|
||||
|
||||
<Layout title={items.title}
|
||||
metaTitle={items.title}
|
||||
description={items.description}
|
||||
ogImg={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterTitle={items.title}
|
||||
tiwtterDesc={items.description}
|
||||
tiwtterURL=`https://barta-india.in/local/`
|
||||
ogSiteName=`https://barta-india.in/local/`
|
||||
ogType={items.og_type}
|
||||
ogTitle={items.title}
|
||||
ogDesc={items.description}
|
||||
ogURL=`https://barta-india.in/local/`
|
||||
>
|
||||
<main>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="my-16">
|
||||
<span class="text-[#780a0a] font-bold" id="pageName"></span>
|
||||
<h1 class="text-4xl font-bold border-b-4 border-[#780A0A]">Latest News</h1>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
|
||||
{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;}) =>
|
||||
<div class="flex flex-col border-2 border-[#780a0a] gap-6 p-4 place-content-between rounded-lg">
|
||||
<div class="flex flex-col">
|
||||
<div class="">
|
||||
<a class="flex flex-col" href={`/local/${items.slug}`}>
|
||||
<a class="flex flex-col" href={`/${items.slug}`}>
|
||||
<img class="aspect-video rounded-t-lg" src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} />
|
||||
<h2 class="text-lg text-justify">{items.title}</h2>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<dialog id={`d-${items.id}`} class="shadow-xl rounded-xl md:w-[50%] xl:w-[30%]">
|
||||
<form method="dialog">
|
||||
<div class="flex flex-col md:flex-col">
|
||||
<a href={`/local/${items.slug}`} class="flex flex-col md:flex-col">
|
||||
<img class="rounded-t-xl" src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} />
|
||||
<h1 class="text-lg font-bold">{items.heading} </h1>
|
||||
<h2 class="text-justify ">{items.in_brief}</h2>
|
||||
</a>
|
||||
<div class="flex flex-row place-content-between place-items-center">
|
||||
<div class="flex flex-row place-content-between place-items-center p-2 space-x-6 shadow-lg shadow-gray-400 rounded-2xl">
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/${items.slug}`} data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fbarta-india.in%2F${items.slug}`} target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`http://www.twitter.com/share?url=https://barta-india.in/${items.slug}&text=${items.title}`} target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}`} onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
<div class="flex border-b-4 border-gray-500 border-t rounded-full text-3xl hover:rotate-180 duration-[3s]">
|
||||
<button class="text-white font-bold py-2 px-4 bg-[#780a0a] rounded-full shadow-xl" onclick={`document.getElementById('d-${items.id}').close()`}>✘</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row place-content-between">
|
||||
<button onclick={`document.getElementById('d-${items.id}').showModal()`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">In Brief</button>
|
||||
<p class="">Publish at: <br/> {items.date_created.split(':')[0].split('T')[0]}</p>
|
||||
<a href={`/local/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">Details</a>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<!-- <a href={`/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold px-6 ">Read More>></a> -->
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
const pageName = window.location.href.split('/')[3];
|
||||
document.getElementById('pageName').innerHTML = '> ' + pageName
|
||||
// console.log(pageName)
|
||||
</script>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
133
src/pages/login.astro
Normal file
@@ -0,0 +1,133 @@
|
||||
---
|
||||
import Layout from "../layouts/Layout.astro";
|
||||
---
|
||||
<Layout title="Login | Barta India">
|
||||
<main>
|
||||
<section class="">
|
||||
<div class="flex flex-col items-center justify-center px-6 py-8 mx-auto md:h-screen lg:py-0">
|
||||
<a href="/" class="flex flex-col items-center mb-6 text-2xl font-semibold">
|
||||
<img class="w-16 h-16 mr-2" src="/img/barta_logo.png" alt="logo">
|
||||
Barta-India
|
||||
</a>
|
||||
<div class="w-full bg-[#4b556350] rounded-xl md:mt-0 sm:max-w-md xl:p-0 hover:shadow-2xl hover:shadow-[#86198f] duration-[2s]">
|
||||
<div class="p-6 space-y-4 md:space-y-6 sm:p-8">
|
||||
<h1 class="text-xl font-bold leading-tight tracking-tight md:text-2xl ">Sign in to your account</h1>
|
||||
<form method="POST" id="loginForm" enctype="multipart/form-data" class="space-y-4 md:space-y-6">
|
||||
<div>
|
||||
<label for="siliconid" class="block mb-2 text-sm font-medium ">Siliconid</label>
|
||||
<input type="text" name="siliconid" id="siliconid" class="bg-gray-50 border border-gray-300 sm:text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="example@email.com" required="">
|
||||
</div>
|
||||
<div>
|
||||
<label for="password" class="block mb-2 text-sm font-medium ">Password</label>
|
||||
<input type="password" name="password" id="password" placeholder="Enter Password" class="bg-gray-50 border border-gray-300 sm:text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500" required="">
|
||||
</div>
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-start">
|
||||
<div class="flex items-center h-5">
|
||||
<input id="remember" aria-describedby="remember" type="checkbox" class="w-4 h-4 border border-gray-300 rounded bg-gray-50 focus:ring-3 focus:ring-primary-300 dark:bg-gray-700 dark:border-gray-600 dark:focus:ring-primary-600 dark:ring-offset-gray-800" >
|
||||
</div>
|
||||
<div class="ml-3 text-sm">
|
||||
<label for="remember" class="text-gray-500 ">Remember me</label>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="text-sm font-medium hover:underline">Forgot password?</a>
|
||||
</div>
|
||||
<button type="submit" class="w-full text-white bg-[#05b3a4] hover:bg-[#05b3a4] focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800">Sign in</button>
|
||||
<p class="text-sm font-light">
|
||||
Don't have an account yet? <a href="/sign-up" class="font-medium hover:underline">Sign up</a>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="https://accounts.google.com/gsi/client" async></script>
|
||||
<script>
|
||||
function handleCredentialResponse(response) {
|
||||
// console.log("Encoded JWT ID token: " + response.credential);
|
||||
var credential = {
|
||||
credential: response.credential
|
||||
};
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/sign/v2/?action=withGoogle`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(credential),
|
||||
})
|
||||
.then(response => {
|
||||
// console.log(response)
|
||||
if (!response.ok) {
|
||||
throw new Error('Authentication failed');
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
console.log(data);
|
||||
const access_token = data.access_token;
|
||||
const name = data.name;
|
||||
const ssid = data.ssid;
|
||||
const siliconid = data.siliconid;
|
||||
// console.log(data)
|
||||
document.cookie = `access_token=${access_token}; path=/`;
|
||||
document.cookie = `name=${name}; path=/`;
|
||||
document.cookie = `ssid=${ssid}; path=/`;
|
||||
document.cookie = `siliconid=${siliconid}; path=/`;
|
||||
// window.location.href = '/profile';
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Sign-Up failed:', error)
|
||||
// Handle authentication failure, e.g., show an error message
|
||||
});
|
||||
}
|
||||
window.onload = function () {
|
||||
google.accounts.id.initialize({
|
||||
client_id: "795913470645-lt5d04g6jkq05htq5nl5uab3p1otci63.apps.googleusercontent.com",
|
||||
callback: handleCredentialResponse
|
||||
});
|
||||
// google.accounts.id.renderButton(
|
||||
// document.getElementById("buttonDiv"),
|
||||
// { theme: "outline", size: "large" } // customization attributes
|
||||
// );
|
||||
google.accounts.id.prompt(); // also display the One Tap dialog
|
||||
}
|
||||
</script>
|
||||
<script is:inline>
|
||||
document.getElementById('loginForm').addEventListener('submit', function (event) {
|
||||
event.preventDefault();
|
||||
const password = document.getElementById('password').value;
|
||||
const siliconid = document.getElementById('siliconid').value;
|
||||
var loginData = {
|
||||
siliconid: siliconid,
|
||||
password: password
|
||||
};
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/sign/v2/?action=login`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(loginData),
|
||||
})
|
||||
.then(response => {
|
||||
// console.log(response)
|
||||
if (!response.ok) {
|
||||
throw new Error('Authentication failed');
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
console.log(data);
|
||||
const access_token = data.access_token;
|
||||
const name = data.name;
|
||||
const ssid = data.ssid;
|
||||
const siliconid = data.siliconid;
|
||||
// console.log(data)
|
||||
document.cookie = `access_token=${access_token}; path=/`;
|
||||
document.cookie = `name=${name}; path=/`;
|
||||
document.cookie = `ssid=${ssid}; path=/`;
|
||||
document.cookie = `siliconid=${siliconid}; path=/`;
|
||||
window.location.href = '/profile';
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Sign-Up failed:', error)
|
||||
// Handle authentication failure, e.g., show an error message
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
91
src/pages/national/[id].astro
Normal file
@@ -0,0 +1,91 @@
|
||||
---
|
||||
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[category][_eq]=national&filter[lang][_eq]=english');
|
||||
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[category][_eq]=national&filter[lang][_eq]=english');
|
||||
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])
|
||||
---
|
||||
|
||||
<Layout title={items.meta_title}
|
||||
metaTitle={items.meta_title}
|
||||
description={items.meta_description}
|
||||
ogImg={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterTitle={items.meta_title}
|
||||
tiwtterDesc={items.meta_description}
|
||||
tiwtterURL=`https://barta-india.in/national/${items.slug}`
|
||||
artPubTime={items.date_created}
|
||||
ogSiteName=`https://barta-india.in/national/${items.slug}`
|
||||
ogType='News'
|
||||
ogTitle={items.meta_title}
|
||||
ogDesc={items.meta_description}
|
||||
ogURL=`https://barta-india.in/national/${items.slug}`
|
||||
>
|
||||
<main>
|
||||
<section class="container mx-auto px-4 mt-16">
|
||||
<div class="flex flex-col justify-center">
|
||||
<div class=""><button onclick="toggleSpeech();" id="listenButton" class="float-right text-white font-bold px-6 py-2 rounded-lg bg-[#780a0a]">Listen</button></div>
|
||||
<h1 id="message1" class="text-3xl font-bold border-b-4 border-[#780A0A]">{items.heading}</h1>
|
||||
<h2 id="message2" class="text-xl py-2">{items.title}</h2>
|
||||
<div class="flex flex-col place-items-center">
|
||||
<img src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} class="md:w-[40%]" />
|
||||
</div>
|
||||
<div class="flex flex-row justify-center md:justify-end mt-2">
|
||||
<div class="flex flex-row place-items-center p-2 shadow-lg shadow-[#780a0a] border-b-2 border-[#780a0a] rounded-b-2xl w-fit">
|
||||
<p class="text-xl font-bold text-[#780a0a]">Share on: </p>
|
||||
<a href=`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/national/${items.slug}` data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a href=`https://www.facebook.com/share.php?u=https://barta-india.in/national/${items.slug}` target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a href=`http://www.twitter.com/share?url=https://barta-india.in/national/${items.slug}&text=%20${items.title}` target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a href=`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/national/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}` onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-justify text-red-700 mt-4" set:html={items.content}></p>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
let isListening = false;
|
||||
let speechSynthesisInstance = window.speechSynthesis;
|
||||
|
||||
function toggleSpeech() {
|
||||
if (isListening) {
|
||||
stopSpeech();
|
||||
} else {
|
||||
startSpeech();
|
||||
}
|
||||
}
|
||||
|
||||
function startSpeech() {
|
||||
let message1 = document.getElementById('message1').innerText;
|
||||
let message2 = document.getElementById('message2').innerText;
|
||||
let allSpeechText = message1 + ' ' + message2;
|
||||
let speechText = new SpeechSynthesisUtterance(allSpeechText);
|
||||
speechSynthesisInstance.speak(speechText);
|
||||
|
||||
document.getElementById('listenButton').innerText = 'Stop';
|
||||
isListening = true;
|
||||
}
|
||||
|
||||
function stopSpeech() {
|
||||
speechSynthesisInstance.cancel();
|
||||
document.getElementById('listenButton').innerText = 'Listen';
|
||||
isListening = false;
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
section > div > p > p {
|
||||
text-align: justify;
|
||||
}
|
||||
</style>
|
||||
90
src/pages/national/index.astro
Normal file
@@ -0,0 +1,90 @@
|
||||
---
|
||||
import Layout from '../../layouts/Layout.astro';
|
||||
const fetchData = await fetch('https://api7.siliconpin.com/items/barta?filter[status][_eq]=published&filter[category][_eq]=national&sort=-date_created&filter[lang][_eq]=english');
|
||||
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]=national_en');
|
||||
const metaJSON = await fetchMeta.json();
|
||||
const items = metaJSON.data[0];
|
||||
// const imageData = data.image;
|
||||
// const data = fetchDataJSON.data;
|
||||
// console.log()
|
||||
---
|
||||
|
||||
<Layout title={items.title}
|
||||
metaTitle={items.title}
|
||||
description={items.description}
|
||||
ogImg={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterTitle={items.title}
|
||||
tiwtterDesc={items.description}
|
||||
tiwtterURL=`https://barta-india.in/national/`
|
||||
ogSiteName=`https://barta-india.in/national/`
|
||||
ogType={items.og_type}
|
||||
ogTitle={items.title}
|
||||
ogDesc={items.description}
|
||||
ogURL=`https://barta-india.in/national/`
|
||||
>
|
||||
<main>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="my-16">
|
||||
<span class="text-[#780a0a] font-bold" id="pageName"></span>
|
||||
<h1 class="text-4xl font-bold border-b-4 border-[#780A0A]">Latest News</h1>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
|
||||
{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;}) =>
|
||||
<div class="flex flex-col border-2 border-[#780a0a] gap-6 p-4 place-content-between rounded-lg">
|
||||
<div class="flex flex-col">
|
||||
<div class="">
|
||||
<a class="flex flex-col" href={`/national/${items.slug}`}>
|
||||
<a class="flex flex-col" href={`/${items.slug}`}>
|
||||
<img class="aspect-video rounded-t-lg" src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} />
|
||||
<h2 class="text-lg text-justify">{items.title}</h2>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<dialog id={`d-${items.id}`} class="shadow-xl rounded-xl md:w-[50%] xl:w-[30%]">
|
||||
<form method="dialog">
|
||||
<div class="flex flex-col md:flex-col">
|
||||
<a href={`/national/${items.slug}`} class="flex flex-col md:flex-col">
|
||||
<img class="rounded-t-xl" src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} />
|
||||
<h1 class="text-lg font-bold">{items.heading} </h1>
|
||||
<h2 class="text-justify ">{items.in_brief}</h2>
|
||||
</a>
|
||||
<div class="flex flex-row place-content-between place-items-center">
|
||||
<div class="flex flex-row place-content-between place-items-center p-2 space-x-6 shadow-lg shadow-gray-400 rounded-2xl">
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/${items.slug}`} data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fbarta-india.in%2F${items.slug}`} target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`http://www.twitter.com/share?url=https://barta-india.in/${items.slug}&text=${items.title}`} target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}`} onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
<div class="flex border-b-4 border-gray-500 border-t rounded-full text-3xl hover:rotate-180 duration-[3s]">
|
||||
<button class="text-white font-bold py-2 px-4 bg-[#780a0a] rounded-full shadow-xl" onclick={`document.getElementById('d-${items.id}').close()`}>✘</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row place-content-between">
|
||||
<button onclick={`document.getElementById('d-${items.id}').showModal()`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">In Brief</button>
|
||||
<p class="">Publish at: <br/> {items.date_created.split(':')[0].split('T')[0]}</p>
|
||||
<a href={`/national/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">Details</a>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<!-- <a href={`/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold px-6 ">Read More>></a> -->
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
const pageName = window.location.href.split('/')[3];
|
||||
document.getElementById('pageName').innerHTML = '> ' + pageName
|
||||
// console.log(pageName)
|
||||
</script>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
49
src/pages/news.astro
Normal file
@@ -0,0 +1,49 @@
|
||||
---
|
||||
import Layout from "../layouts/Layout.astro";
|
||||
import GetData from "../components/GetData.vue"
|
||||
const fetchData = await fetch('https://apisp.dev2.cicdhosting.com/_dedicated/dwd/get-news/');
|
||||
const dataJSON = await fetchData.json();
|
||||
const data = dataJSON.data;
|
||||
console.log(data);
|
||||
---
|
||||
<Layout title="">
|
||||
<main>
|
||||
<div>
|
||||
<section class="container mx-auto px-4">
|
||||
<GetData client:visible />
|
||||
<p>News List</p>
|
||||
<div>
|
||||
<button onclick="getData();">Get Data</button>
|
||||
<p id="dataID"></p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
function getData(){
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/_dedicated/dwd/get-news/?action=news_en`)
|
||||
.then(data => data.json())
|
||||
.then(data => {
|
||||
console.log(data)
|
||||
})
|
||||
.catch(error => {
|
||||
console.error("an error occoured", error)
|
||||
})
|
||||
// fetch('https://apisp.dev2.cicdhosting.com/_dedicated/dwd/get-news/?action=news_en')
|
||||
// .then(response => {
|
||||
// if (!response.ok) {
|
||||
// throw new Error('Network response was not ok');
|
||||
// }
|
||||
// return response.json();
|
||||
// })
|
||||
// .then(data => {
|
||||
// // Handle the JSON response data
|
||||
// console.log(data);
|
||||
// })
|
||||
// .catch(error => {
|
||||
// // Handle any errors that occurred during the fetch
|
||||
// console.error('Fetch error:', error);
|
||||
// });
|
||||
}
|
||||
</script>
|
||||
91
src/pages/politics/[id].astro
Normal file
@@ -0,0 +1,91 @@
|
||||
---
|
||||
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[category][_eq]=politics&filter[lang][_eq]=english');
|
||||
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[category][_eq]=politics&filter[lang][_eq]=english');
|
||||
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])
|
||||
---
|
||||
<Layout title={items.meta_title}
|
||||
metaTitle={items.meta_title}
|
||||
description={items.meta_description}
|
||||
ogImg={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterTitle={items.meta_title}
|
||||
tiwtterDesc={items.meta_description}
|
||||
tiwtterURL=`https://barta-india.in/politics/${items.slug}`
|
||||
artPubTime={items.date_created}
|
||||
ogSiteName=`https://barta-india.in/politics/${items.slug}`
|
||||
ogType='News'
|
||||
ogTitle={items.meta_title}
|
||||
ogDesc={items.meta_description}
|
||||
ogURL=`https://barta-india.in/politics/${items.slug}`
|
||||
|
||||
>
|
||||
<main>
|
||||
<section class="container mx-auto px-4 mt-16">
|
||||
<div class="flex flex-col justify-center">
|
||||
<div class=""><button onclick="toggleSpeech();" id="listenButton" class="float-right text-white font-bold px-6 py-2 rounded-lg bg-[#780a0a]">Listen</button></div>
|
||||
<h1 id="message1" class="text-3xl font-bold border-b-4 border-[#780A0A]">{items.heading}</h1>
|
||||
<h2 id="message2" class="text-xl py-2">{items.title}</h2>
|
||||
<div class="flex flex-col place-items-center">
|
||||
<img src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} class="md:w-[40%]" />
|
||||
</div>
|
||||
<div class="flex flex-row justify-center md:justify-end mt-2">
|
||||
<div class="flex flex-row place-items-center p-2 shadow-lg shadow-[#780a0a] border-b-2 border-[#780a0a] rounded-b-2xl w-fit">
|
||||
<p class="text-xl font-bold text-[#780a0a]">Share on: </p>
|
||||
<a href=`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/politics/${items.slug}` data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a href=`https://www.facebook.com/share.php?u=https://barta-india.in/politics/${items.slug}` target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a href=`http://www.twitter.com/share?url=https://barta-india.in/politics/${items.slug}&text=%20${items.title}` target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a href=`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/politics/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}` onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-justify text-red-700 mt-4" set:html={items.content}></p>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
let isListening = false;
|
||||
let speechSynthesisInstance = window.speechSynthesis;
|
||||
|
||||
function toggleSpeech() {
|
||||
if (isListening) {
|
||||
stopSpeech();
|
||||
} else {
|
||||
startSpeech();
|
||||
}
|
||||
}
|
||||
|
||||
function startSpeech() {
|
||||
let message1 = document.getElementById('message1').innerText;
|
||||
let message2 = document.getElementById('message2').innerText;
|
||||
let allSpeechText = message1 + ' ' + message2;
|
||||
let speechText = new SpeechSynthesisUtterance(allSpeechText);
|
||||
speechSynthesisInstance.speak(speechText);
|
||||
|
||||
document.getElementById('listenButton').innerText = 'Stop';
|
||||
isListening = true;
|
||||
}
|
||||
|
||||
function stopSpeech() {
|
||||
speechSynthesisInstance.cancel();
|
||||
document.getElementById('listenButton').innerText = 'Listen';
|
||||
isListening = false;
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
/* section > div > p > p {
|
||||
text-align: justify;
|
||||
} */
|
||||
</style>
|
||||
90
src/pages/politics/index.astro
Normal file
@@ -0,0 +1,90 @@
|
||||
---
|
||||
import Layout from '../../layouts/Layout.astro';
|
||||
const fetchData = await fetch('https://api7.siliconpin.com/items/barta?filter[status][_eq]=published&filter[category][_eq]=politics&sort=-date_created&filter[lang][_eq]=english');
|
||||
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]=politics_en');
|
||||
const metaJSON = await fetchMeta.json();
|
||||
const items = metaJSON.data[0];
|
||||
// const imageData = data.image;
|
||||
// const data = fetchDataJSON.data;
|
||||
// console.log()
|
||||
---
|
||||
|
||||
<Layout title={items.title}
|
||||
metaTitle={items.title}
|
||||
description={items.description}
|
||||
ogImg={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterTitle={items.title}
|
||||
tiwtterDesc={items.description}
|
||||
tiwtterURL=`https://barta-india.in/politics/`
|
||||
ogSiteName=`https://barta-india.in/politics/`
|
||||
ogType={items.og_type}
|
||||
ogTitle={items.title}
|
||||
ogDesc={items.description}
|
||||
ogURL=`https://barta-india.in/politics/`
|
||||
>
|
||||
<main>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="my-16">
|
||||
<span class="text-[#780a0a] font-bold" id="pageName"></span>
|
||||
<h1 class="text-4xl font-bold border-b-4 border-[#780A0A]">Latest News</h1>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
|
||||
{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;}) =>
|
||||
<div class="flex flex-col border-2 border-[#780a0a] gap-6 p-4 place-content-between rounded-lg">
|
||||
<div class="flex flex-col">
|
||||
<div class="">
|
||||
<a class="flex flex-col" href={`/politics/${items.slug}`}>
|
||||
<a class="flex flex-col" href={`/${items.slug}`}>
|
||||
<img class="aspect-video rounded-t-lg" src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} />
|
||||
<h2 class="text-lg text-justify">{items.title}</h2>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<dialog id={`d-${items.id}`} class="shadow-xl rounded-xl md:w-[50%] xl:w-[30%]">
|
||||
<form method="dialog">
|
||||
<div class="flex flex-col md:flex-col">
|
||||
<a href={`/politics/${items.slug}`} class="flex flex-col md:flex-col">
|
||||
<img class="rounded-t-xl" src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} />
|
||||
<h1 class="text-lg font-bold">{items.heading} </h1>
|
||||
<h2 class="text-justify ">{items.in_brief}</h2>
|
||||
</a>
|
||||
<div class="flex flex-row place-content-between place-items-center">
|
||||
<div class="flex flex-row place-content-between place-items-center p-2 space-x-6 shadow-lg shadow-gray-400 rounded-2xl">
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/${items.slug}`} data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fbarta-india.in%2F${items.slug}`} target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`http://www.twitter.com/share?url=https://barta-india.in/${items.slug}&text=${items.title}`} target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}`} onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
<div class="flex border-b-4 border-gray-500 border-t rounded-full text-3xl hover:rotate-180 duration-[3s]">
|
||||
<button class="text-white font-bold py-2 px-4 bg-[#780a0a] rounded-full shadow-xl" onclick={`document.getElementById('d-${items.id}').close()`}>✘</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row place-content-between">
|
||||
<button onclick={`document.getElementById('d-${items.id}').showModal()`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">In Brief</button>
|
||||
<p class="">Publish at: <br/> {items.date_created.split(':')[0].split('T')[0]}</p>
|
||||
<a href={`/politics/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">Details</a>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<!-- <a href={`/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold px-6 ">Read More>></a> -->
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
const pageName = window.location.href.split('/')[3];
|
||||
document.getElementById('pageName').innerHTML = '> ' + pageName
|
||||
// console.log(pageName)
|
||||
</script>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
55
src/pages/privacy-policy.astro
Normal file
@@ -0,0 +1,55 @@
|
||||
---
|
||||
import Layout from "../layouts/Layout.astro";
|
||||
---
|
||||
<Layout title="Privacy Policy | Barta-India"
|
||||
>
|
||||
|
||||
<main>
|
||||
<div>
|
||||
<section class="container mx-auto px-4">
|
||||
<p class="float-right font-bold">Effective Date: 11-01-2024</p>
|
||||
<div class="space-y-2">
|
||||
<h1>Privacy Policy for Barta India</h1>
|
||||
<h2>1. Introduction</h2>
|
||||
<p>Welcome to Barta India ("we," "us," or "our"). This Privacy Policy is designed to inform you that we do not collect any personal information when you visit our website, <a class="text-blue-500 font-bold" href="https://www.barta-india.in" target="_blank">https://www.barta-india.in</a>.</p>
|
||||
<h3>2. Information Collection</h3>
|
||||
<p>We do not collect any personal information from our users. You can visit our website and enjoy our content without providing any identifiable information.</p>
|
||||
<h3>3. Cookies and Similar Technologies</h3>
|
||||
<p>While we may use cookies and similar technologies for technical purposes, we do not use these to collect or store any personal information.</p>
|
||||
<h3>4. Third-Party Links</h3>
|
||||
<p>Our website may contain links to third-party websites. We are not responsible for the privacy practices or content of these websites. Please review their privacy policies.</p>
|
||||
<h3>5. Data Security</h3>
|
||||
<p>Even though we do not collect personal information, we are committed to maintaining the security of our website and ensuring that any technical information collected is secured.</p>
|
||||
<h3>6. Children's Privacy</h3>
|
||||
<p>Our services are not intended for individuals under the age of 13. We do not knowingly collect personal information from children.</p>
|
||||
<h3>7. Changes to this Privacy Policy</h3>
|
||||
<p>We reserve the right to update or modify this Privacy Policy at any time. The revised version will be effective immediately upon posting on this page.</p>
|
||||
<h3>8. Contact Us</h3>
|
||||
<p>If you have any questions or concerns about this Privacy Policy, please contact us at <a class="text-blue-500 font-bold" href="https://www.barta-india.in/contact">Barta-Feedback</a>.</p>
|
||||
<p>By using our website, you acknowledge and agree that we do not collect any user information.</p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
<style>
|
||||
h1{
|
||||
font-size: 25px;
|
||||
font-weight: bold;
|
||||
color: #780a0a;
|
||||
}
|
||||
h2{
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: #780a0a;
|
||||
}
|
||||
h3{
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: #780a0a;
|
||||
}
|
||||
p{
|
||||
font-size: 16px;
|
||||
text-align: justify;
|
||||
}
|
||||
</style>
|
||||
25
src/pages/speech-text.astro
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
import Layout from "../layouts/Layout.astro";
|
||||
---
|
||||
<Layout title="Text to Speech | Barta">
|
||||
<main>
|
||||
<div>
|
||||
<section class="container mx-auto px-4 max-w-xl">
|
||||
<div class="flex flex-col justify-center space-y-4">
|
||||
<h1>Text to Speech</h1>
|
||||
<label for="message"></label>
|
||||
<textarea name="message" id="message" cols="30" rows="10" class="border-2 border-gray-400 focus:outline-none focus:border-[4px] focus:border-[#780a0a] rounded-2xl shadow-lg p-4"></textarea>
|
||||
<button onclick="textSpeech();" class="bg-[#780a0a] px-6b py-2 rounded-lg text-white font-bold ">Speech</button>
|
||||
<!-- <input name="message" id="message" type="text" class=""> -->
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
function textSpeech(){
|
||||
let message = document.getElementById('message').value;
|
||||
let speechText = new SpeechSynthesisUtterance(message);
|
||||
window.speechSynthesis.speak(speechText);
|
||||
}
|
||||
</script>
|
||||
90
src/pages/technology/[id].astro
Normal file
@@ -0,0 +1,90 @@
|
||||
---
|
||||
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[category][_eq]=technology&filter[lang][_eq]=english');
|
||||
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[category][_eq]=technology&filter[lang][_eq]=english');
|
||||
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])
|
||||
---
|
||||
<Layout title={items.meta_title}
|
||||
metaTitle={items.meta_title}
|
||||
description={items.meta_description}
|
||||
ogImg={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterTitle={items.meta_title}
|
||||
tiwtterDesc={items.meta_description}
|
||||
tiwtterURL=`https://barta-india.in/technology/${items.slug}`
|
||||
artPubTime={items.date_created}
|
||||
ogSiteName=`https://barta-india.in/technology/${items.slug}`
|
||||
ogType='News'
|
||||
ogTitle={items.meta_title}
|
||||
ogDesc={items.meta_description}
|
||||
ogURL=`https://barta-india.in/technology/${items.slug}`
|
||||
>
|
||||
<main>
|
||||
<section class="container mx-auto px-4 mt-16">
|
||||
<div class="flex flex-col justify-center">
|
||||
<div class=""><button onclick="toggleSpeech();" id="listenButton" class="float-right text-white font-bold px-6 py-2 rounded-lg bg-[#780a0a]">Listen</button></div>
|
||||
<h1 id="message1" class="text-3xl font-bold border-b-4 border-[#780A0A]">{items.heading}</h1>
|
||||
<h2 id="message2" class="text-xl py-2">{items.title}</h2>
|
||||
<div class="flex flex-col place-items-center">
|
||||
<img src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} class="md:w-[40%]" />
|
||||
</div>
|
||||
<div class="flex flex-row justify-center md:justify-end mt-2">
|
||||
<div class="flex flex-row place-items-center p-2 shadow-lg shadow-[#780a0a] border-b-2 border-[#780a0a] rounded-b-2xl w-fit">
|
||||
<p class="text-xl font-bold text-[#780a0a]">Share on: </p>
|
||||
<a href=`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/technology/${items.slug}` data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a href=`https://www.facebook.com/share.php?u=https://barta-india.in/technology/${items.slug}` target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a href=`http://www.twitter.com/share?url=https://barta-india.in/technology/${items.slug}&text=%20${items.title}` target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a href=`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/technology/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}` onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-justify text-red-700 mt-4" set:html={items.content}></p>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
let isListening = false;
|
||||
let speechSynthesisInstance = window.speechSynthesis;
|
||||
|
||||
function toggleSpeech() {
|
||||
if (isListening) {
|
||||
stopSpeech();
|
||||
} else {
|
||||
startSpeech();
|
||||
}
|
||||
}
|
||||
|
||||
function startSpeech() {
|
||||
let message1 = document.getElementById('message1').innerText;
|
||||
let message2 = document.getElementById('message2').innerText;
|
||||
let allSpeechText = message1 + ' ' + message2;
|
||||
let speechText = new SpeechSynthesisUtterance(allSpeechText);
|
||||
speechSynthesisInstance.speak(speechText);
|
||||
|
||||
document.getElementById('listenButton').innerText = 'Stop';
|
||||
isListening = true;
|
||||
}
|
||||
|
||||
function stopSpeech() {
|
||||
speechSynthesisInstance.cancel();
|
||||
document.getElementById('listenButton').innerText = 'Listen';
|
||||
isListening = false;
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
section > div > p > p {
|
||||
text-align: justify;
|
||||
}
|
||||
</style>
|
||||
90
src/pages/technology/index.astro
Normal file
@@ -0,0 +1,90 @@
|
||||
---
|
||||
import Layout from '../../layouts/Layout.astro';
|
||||
const fetchData = await fetch('https://api7.siliconpin.com/items/barta?filter[status][_eq]=published&filter[category][_eq]=technology&sort=-date_created&filter[lang][_eq]=english');
|
||||
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]=technology_en');
|
||||
const metaJSON = await fetchMeta.json();
|
||||
const items = metaJSON.data[0];
|
||||
// const imageData = data.image;
|
||||
// const data = fetchDataJSON.data;
|
||||
// console.log(items.img)
|
||||
---
|
||||
|
||||
<Layout title={items.title}
|
||||
metaTitle={items.title}
|
||||
description={items.description}
|
||||
ogImg={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={`https://api7.siliconpin.com/assets/${items.img}`}
|
||||
tiwtterTitle={items.title}
|
||||
tiwtterDesc={items.description}
|
||||
tiwtterURL=`https://barta-india.in/technology/`
|
||||
ogSiteName=`https://barta-india.in/technology/`
|
||||
ogType={items.og_type}
|
||||
ogTitle={items.title}
|
||||
ogDesc={items.description}
|
||||
ogURL=`https://barta-india.in/technology/`
|
||||
>
|
||||
<main>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="my-16">
|
||||
<span class="text-[#780a0a] font-bold" id="pageName"></span>
|
||||
<h1 class="text-4xl font-bold border-b-4 border-[#780A0A]">Latest News</h1>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
|
||||
{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;}) =>
|
||||
<div class="flex flex-col border-2 border-[#780a0a] gap-6 p-4 place-content-between rounded-lg">
|
||||
<div class="flex flex-col">
|
||||
<div class="">
|
||||
<a class="flex flex-col" href={`/technology/${items.slug}`}>
|
||||
<a class="flex flex-col" href={`/${items.slug}`}>
|
||||
<img class="aspect-video rounded-t-lg" src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} />
|
||||
<h2 class="text-lg text-justify">{items.title}</h2>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<dialog id={`d-${items.id}`} class="shadow-xl rounded-xl md:w-[50%] xl:w-[30%]">
|
||||
<form method="dialog">
|
||||
<div class="flex flex-col md:flex-col">
|
||||
<a href={`/technology/${items.slug}`} class="flex flex-col md:flex-col">
|
||||
<img class="rounded-t-xl" src={`https://api7.siliconpin.com/assets/${items.img}?quality=50&format=jpeg`} alt={items.title} />
|
||||
<h1 class="text-lg font-bold">{items.heading} </h1>
|
||||
<h2 class="text-justify ">{items.in_brief}</h2>
|
||||
</a>
|
||||
<div class="flex flex-row place-content-between place-items-center">
|
||||
<div class="flex flex-row place-content-between place-items-center p-2 space-x-6 shadow-lg shadow-gray-400 rounded-2xl">
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/${items.slug}`} data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fbarta-india.in%2F${items.slug}`} target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`http://www.twitter.com/share?url=https://barta-india.in/${items.slug}&text=${items.title}`} target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}`} onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
<div class="flex border-b-4 border-gray-500 border-t rounded-full text-3xl hover:rotate-180 duration-[3s]">
|
||||
<button class="text-white font-bold py-2 px-4 bg-[#780a0a] rounded-full shadow-xl" onclick={`document.getElementById('d-${items.id}').close()`}>✘</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row place-content-between">
|
||||
<button onclick={`document.getElementById('d-${items.id}').showModal()`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">In Brief</button>
|
||||
<p class="">Publish at: <br/> {items.date_created.split(':')[0].split('T')[0]}</p>
|
||||
<a href={`/technology/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">Details</a>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<!-- <a href={`/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold px-6 ">Read More>></a> -->
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
const pageName = window.location.href.split('/')[3];
|
||||
document.getElementById('pageName').innerHTML = '> ' + pageName
|
||||
// console.log(pageName)
|
||||
</script>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
54
src/pages/terms-and-conditions.astro
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
import Layout from "../layouts/Layout.astro"
|
||||
---
|
||||
<Layout title="Terms & Conditions | Barta-India">
|
||||
<main>
|
||||
<div class="mt-16">
|
||||
<section class="container mx-auto px-4 ">
|
||||
<!-- https://barta-india.in/ -->
|
||||
<div class="space-y-2">
|
||||
<h1>Terms and Conditions</h1>
|
||||
<h2>Welcome to <a class="text-blue-500 font-bol" href="https://barta-india.in" target="_blank">Barta-India.in</a>. By accessing or using our Website, you agree to comply with and be bound by the following terms and conditions of use. If you do not agree with these terms, please do not use our Website.</h2>
|
||||
<h3>1. Acceptance of Terms</h3>
|
||||
<p>By using Barta-India.in, you agree to comply with and be bound by these terms and conditions, our Privacy Policy, and any additional terms and conditions that may apply to specific sections of the Website or to products and services available through the Website.</p>
|
||||
<h3>2. Content Disclaimer</h3>
|
||||
<p>The content provided on Barta-India.in is for general informational purposes only. While we strive to provide accurate and up-to-date information, we make no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability, or availability of the information contained on the Website.</p>
|
||||
<h3>3. User Conduct</h3>
|
||||
<p>By using our Website, you agree not to engage in any conduct that may be considered unlawful, offensive, or otherwise objectionable. This includes but is not limited to:</p>
|
||||
<p>Violating any applicable laws or regulations.</p>
|
||||
<p>Infringing on the rights of others.</p>
|
||||
<p>Disrupting the normal flow of dialogue or interfering with the functioning of the Website.</p>
|
||||
<h3>4. Intellectual Property</h3>
|
||||
<p>All content on Barta-India.in, including text, graphics, logos, images, and software, is the property of Barta India or its content suppliers and is protected by applicable copyright and trademark laws. You may not reproduce, distribute, or otherwise use any of the content without the express written permission of Barta India.</p>
|
||||
<h3>5. Third-Party Links</h3>
|
||||
<p>Our Website may contain links to third-party websites or services. These links are provided for your convenience, and we do not endorse the content of any third-party website. We have no control over and assume no responsibility for the content, privacy policies, or practices of any third-party websites or services.</p>
|
||||
<h3>6. Changes to Terms</h3>
|
||||
<p>We reserve the right to modify these terms and conditions at any time without prior notice. Your continued use of the Website after any changes to these terms will signify your acceptance of those changes.</p>
|
||||
<p>If you have any questions or concerns about these terms and conditions, please contact us at <a class="text-blue-500 font-bold" href="https://barta-india.in/contact" target="_blank">Barta-Feedback</a>.</p>
|
||||
<p class="float-right font-bold">Last updated: 11-01-2024</p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
<style>
|
||||
h1{
|
||||
font-size: 25px;
|
||||
font-weight: bold;
|
||||
color: #780a0a;
|
||||
}
|
||||
h2{
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
/* color: #780a0a; */
|
||||
}
|
||||
h3{
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: #780a0a;
|
||||
}
|
||||
p{
|
||||
font-size: 16px;
|
||||
text-align: justify;
|
||||
}
|
||||
</style>
|
||||
23
src/pages/tmp/weather.astro
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
import Layout from "../../layouts/Layout.astro";
|
||||
---
|
||||
<Layout title="">
|
||||
<main>
|
||||
<div>
|
||||
<section class="container mx-auto px-4">
|
||||
<div>
|
||||
<button onclick="getWeather();">Get Data</button>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
function getWeather(){
|
||||
fetch(`https://apisp.dev2.cicdhosting.com/_dedicated/dwd/runner/weather/openweathermap/test/`)
|
||||
.then(data => data.json())
|
||||
.then(data => {
|
||||
console.log(data)
|
||||
})
|
||||
}
|
||||
</script>
|
||||
140
src/pages/weather.astro
Normal file
@@ -0,0 +1,140 @@
|
||||
<main>
|
||||
<div>
|
||||
<section class="container mx-auto px-4">
|
||||
<div id="swicthDIVBG">
|
||||
<p id="cityName"></p>
|
||||
<p id="temper"></p>
|
||||
<p id="description"></p>
|
||||
</div>
|
||||
</section>
|
||||
<div class="flex flex-col justify-center place-items-center fixed top-[50%] right-[50%] bg-white md:max-w-lg w-full p-6 rounded-2xl shadow-xl" style="display: none;" id="weatherPermission">
|
||||
<p>know weather information allow location Permission</p>
|
||||
<div class="flex flex-row gap-6">
|
||||
<button id="yesButton" class="border-2 border-[#580a0a] text-[#580a0a] px-4 py-2 rounded-xl">Allow</button>
|
||||
<button id="noButton" class="border-2 border-[#580a0a] text-[#580a0a] px-4 py-2 rounded-xl">Deny</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- <div class="bg-red-500 text-black" id="weatherInfo"></div> -->
|
||||
|
||||
</div>
|
||||
</main>
|
||||
<script is:inline>
|
||||
async function getCurrentLocation() {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (navigator.geolocation) {
|
||||
navigator.geolocation.getCurrentPosition(
|
||||
(position) => resolve(position.coords),
|
||||
(error) => reject(error)
|
||||
);
|
||||
} else {
|
||||
reject(new Error('Geolocation is not supported by this browser.'));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function getCityName(latitude, longitude) {
|
||||
const apiKey = '4d54049b61eb45c4b121ab2cff9808ba'; // Replace with your OpenCage API key
|
||||
const apiUrl = `https://api.opencagedata.com/geocode/v1/json?q=${latitude}+${longitude}&key=${apiKey}`;
|
||||
|
||||
try {
|
||||
const response = await fetch(apiUrl);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error('Error fetching data from the server.');
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
|
||||
if (data.results && data.results.length > 0) {
|
||||
const city = data.results[0].components.city;
|
||||
return city;
|
||||
} else {
|
||||
throw new Error('City not found.');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error:', error.message);
|
||||
throw new Error('Error fetching city name.');
|
||||
}
|
||||
}
|
||||
|
||||
async function getWeatherData(city) {
|
||||
const apiKey = 'aed8dd87581613e1d2bbbf63eeb618da';
|
||||
const apiUrl = `https://api.openweathermap.org/data/2.5/weather?q=Los%20Angeles&appid=${apiKey}`;
|
||||
|
||||
try {
|
||||
const response = await fetch(apiUrl);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error('Error fetching weather data from the server.');
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
return data;
|
||||
} catch (error) {
|
||||
console.error('Error:', error.message);
|
||||
throw new Error('Error fetching weather data.');
|
||||
}
|
||||
}
|
||||
|
||||
async function showCityName() {
|
||||
try {
|
||||
const location = await getCurrentLocation();
|
||||
const city = await getCityName(location.latitude, location.longitude);
|
||||
// document.getElementById('weatherInfo').innerText = 'Current City: ' + city;
|
||||
|
||||
const weatherData = await getWeatherData(city);
|
||||
displayWeather(weatherData);
|
||||
} catch (error) {
|
||||
console.error(error.message);
|
||||
// document.getElementById('weatherInfo').innerText = 'Error fetching data.';
|
||||
}
|
||||
}
|
||||
|
||||
function displayWeather(data) {
|
||||
// const weatherInfoDiv = document.getElementById('weatherInfo');
|
||||
|
||||
// Extract relevant information from the API response
|
||||
const cityName = data.name;
|
||||
const temperature = data.main.temp;
|
||||
const description = data.weather[0].description;
|
||||
document.getElementById('cityName').innerHTML= 'City: ' + cityName;
|
||||
document.getElementById('temper').innerHTML = 'Temperature: ' + temperature;
|
||||
document.getElementById('description').innerHTML = 'Description: ' + description;
|
||||
let switchBG = document.innerHTML = description;
|
||||
if (switchBG === 'clear sky') {
|
||||
let clearSkyBG = document.getElementById('swicthDIVBG').style.backgroundImage = 'url(/img/clear_sky.webp)';
|
||||
clearSkyBG.style.backgroundRepeat = 'no-repeat';
|
||||
clearSkyBG.style.backgroundSize = 'cover';
|
||||
}
|
||||
// Display the weather information switchDiv.style.backgroundImage = 'url("path/to/clear-sky-image.jpg")';
|
||||
|
||||
// weatherInfoDiv.innerHTML = `
|
||||
// <p>City: ${cityName}</p>
|
||||
// <p>Temperature: ${temperature} °C</p>
|
||||
// <p>Description: ${description}</p>
|
||||
// `;
|
||||
}
|
||||
function windowOnload() {
|
||||
document.getElementById('weatherPermission').style.display = 'block';
|
||||
|
||||
// Attach click event handlers to the buttons
|
||||
document.getElementById('yesButton').addEventListener('click', onYesButtonClick);
|
||||
document.getElementById('noButton').addEventListener('click', onNoButtonClick);
|
||||
}
|
||||
|
||||
function onYesButtonClick() {
|
||||
// Call the function to display the city name and weather information
|
||||
showCityName();
|
||||
|
||||
// Hide the weather permission div
|
||||
document.getElementById('weatherPermission').style.display = 'none';
|
||||
}
|
||||
|
||||
function onNoButtonClick() {
|
||||
// Hide the weather permission div without fetching weather information
|
||||
document.getElementById('weatherPermission').style.display = 'none';
|
||||
}
|
||||
|
||||
window.onload = windowOnload;
|
||||
</script>
|
||||
94
src/pages/zh/[id].astro
Normal file
@@ -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)
|
||||
---
|
||||
<Layout title=""
|
||||
metaTitle={items.meta_title}
|
||||
description={items.meta_description}
|
||||
ogImg={items.img}
|
||||
tiwtterCard="summary_large_image"
|
||||
tiwtterImage={items.img}
|
||||
tiwtterTitle={items.meta_title}
|
||||
tiwtterDesc={items.meta_description}
|
||||
tiwtterURL=`https://barta-india.in/zh/${items.slug}`
|
||||
artPubTime={items.date_created}
|
||||
ogSiteName=`https://barta-india.in/zh/${items.slug}`
|
||||
ogType='News'
|
||||
ogTitle={items.meta_title}
|
||||
ogDesc={items.meta_description}
|
||||
ogURL=`https://barta-india.in/zh/${items.slug}`>
|
||||
<main>
|
||||
<section class="container mx-auto px-4 mt-16">
|
||||
<div class="flex flex-col justify-center">
|
||||
<div class=""><button onclick="toggleSpeech();" id="listenButton" class="float-right text-white font-bold px-6 py-2 rounded-lg bg-[#780a0a]">Listen</button></div>
|
||||
<h1 id="message1" class="text-3xl font-bold border-b-4 border-[#780A0A]">{items.heading}</h1>
|
||||
<h2 id="message2" class="text-xl py-2">{items.title}</h2>
|
||||
<div class="flex flex-col place-items-center">
|
||||
<img src={items.img} alt={items.title} class="md:w-[40%]" />
|
||||
</div>
|
||||
<div class="flex flex-row justify-center md:justify-end mt-2">
|
||||
<div class="flex flex-row place-items-center p-2 shadow-lg shadow-[#780a0a] border-b-2 border-[#780a0a] rounded-b-2xl w-fit">
|
||||
<p class="text-xl font-bold text-[#780a0a]">Share on: </p>
|
||||
<a href=`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/zh/${items.slug}` data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a href=`https://www.facebook.com/share.php?u=https://barta-india.in/zh/${items.slug}` target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a href=`http://www.twitter.com/share?url=https://barta-india.in/zh/${items.slug}&text=%20${items.title}` target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a href=`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/zh/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}` onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-justify mt-4">{items.content}</p>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
let isListening = false;
|
||||
let speechSynthesisInstance = window.speechSynthesis;
|
||||
|
||||
function toggleSpeech() {
|
||||
if (isListening) {
|
||||
stopSpeech();
|
||||
} else {
|
||||
startSpeech();
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
// }
|
||||
</script>
|
||||
29
src/pages/zh/cat/index.astro
Normal file
@@ -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);
|
||||
---
|
||||
<Layout title="">
|
||||
<main>
|
||||
<div>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="text-[#780a0a] py-6 flex flex-row" id="">
|
||||
<a id="folder" href="/zh"></a> >
|
||||
<p id="cat"></p>
|
||||
</div>
|
||||
<ZHCategory client:visible />
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
let fullURL = window.location.href.split('/');
|
||||
// console.log(fullURL);
|
||||
let folderName = document.getElementById('folder').innerHTML = fullURL[3];
|
||||
let catName = document.getElementById('cat').innerHTML = fullURL[5].split('?cat=')[1]
|
||||
</script>
|
||||
71
src/pages/zh/index.astro
Normal file
@@ -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);
|
||||
---
|
||||
<Layout title="">
|
||||
<main>
|
||||
<section class="container mx-auto px-4">
|
||||
<div class="my-16">
|
||||
<span class="text-[#780a0a] font-bold" id="pageName"></span>
|
||||
<h1 class="text-4xl font-bold border-b-4 border-[#780A0A]">Latest News</h1>
|
||||
</div>
|
||||
<div class="flex flex-row md:justify-center my-10 overflow-x-scroll md:overflow-x-clip">
|
||||
<a href="/zh/cat/?cat=local" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">Local</a>
|
||||
<a href="/zh/cat/?cat=national" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">National</a>
|
||||
<a href="/zh/cat/?cat=world" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">World</a>
|
||||
<a href="/zh/cat/?cat=politics" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">Politics</a>
|
||||
<a href="/zh/cat/?cat=technology" class="border-2 border-[#780a0a] py-2.5 px-6 text-lg text-[#780a0a] hover:bg-[#780a0a50] duration-[1s]">Technology</a>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
|
||||
{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;}) =>
|
||||
<div class="flex flex-col border-2 border-[#780a0a] gap-6 p-4 place-content-between rounded-lg">
|
||||
<div class="flex flex-col">
|
||||
<div class="">
|
||||
<a class="flex flex-col" href={`/zh/${items.slug}`}>
|
||||
<img class="aspect-video rounded-t-lg" src={items.img} alt={items.title} />
|
||||
<h2 class="text-lg text-justify ">{items.title}</h2>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<dialog id={`d-${items.id}`} class="shadow-xl rounded-xl md:w-[50%] xl:w-[30%]">
|
||||
<form method="dialog">
|
||||
<div class="flex flex-col md:flex-col">
|
||||
<a href={`/zh/${items.slug}`} class="flex flex-col md:flex-col">
|
||||
<img class="rounded-t-xl" src={items.img} alt={items.title} />
|
||||
<h1 class="text-lg font-bold">{items.heading} </h1>
|
||||
<h2 class="text-justify ">{items.in_brief}</h2>
|
||||
</a>
|
||||
<div class="flex flex-row place-content-between place-items-center">
|
||||
<div class="flex flex-row place-content-between place-items-center p-2 space-x-6 shadow-lg shadow-gray-400 rounded-2xl">
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`whatsapp://send?text=${items.title}%20%0A%20https://barta-india.in/zh/${items.slug}`} data-action="share/whatsapp/share"><img src="/img/whatsapp.svg" alt="WhatsApp Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.facebook.com/share.php?u=https://barta-india.in/zh/${items.slug}`} target="_blank"><img src="/img/facebook.svg" alt="Facebook Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`http://www.twitter.com/share?url=https://barta-india.in/zh/${items.slug}&text=${items.title}`} target="_blank"><img src="/img/x.svg" alt="Twitter/X Logo"/></a>
|
||||
<a class="hover:-translate-y-2 duration-[1s]" href={`https://www.linkedin.com/shareArticle?mini=true&url=https://barta-india.in/zh/${items.slug}&title=${items.title}&summary=${items.title}&source=${items.title}`} onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"><img src="/img/link.svg" alt="Linkdin Logo"/></a>
|
||||
</div>
|
||||
<div class="flex border-b-4 border-gray-500 border-t rounded-full text-3xl hover:rotate-180 duration-[3s]">
|
||||
<button class="text-white font-bold py-2 px-4 bg-[#780a0a] rounded-full shadow-xl" onclick={`document.getElementById('d-${items.id}').close()`}>✘</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row place-content-between">
|
||||
<button onclick={`document.getElementById('d-${items.id}').showModal()`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">In Brief</button>
|
||||
<a href={`/zh/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold py-2 px-6">Details</a>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<!-- <a href={`/${items.slug}`} class="bg-[#780A0A] text-white rounded-md font-bold px-6 ">Read More>></a> -->
|
||||
<!-- <p class="">Publish at: <br/> {items.date_created.split(':')[0].split('T')[0]}</p> -->
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</Layout>
|
||||
65
yarn.lock
@@ -1126,6 +1126,27 @@
|
||||
"@babel/helper-validator-identifier" "^7.22.5"
|
||||
to-fast-properties "^2.0.0"
|
||||
|
||||
"@bytescale/sdk@^3.27.0":
|
||||
version "3.30.0"
|
||||
resolved "https://registry.yarnpkg.com/@bytescale/sdk/-/sdk-3.30.0.tgz#60ccc6313462c1e1806c49d7e4405944cce69da6"
|
||||
integrity sha512-VCV4MrK5Ig7tjeWc5RKwfd9Zg6ihDv0Y1buctEg/FfY8nly15/bpFMhFDw50PzR3FuCmg7RprMQ76rj8G3iWCw==
|
||||
|
||||
"@bytescale/upload-widget-vue@^4.13.0":
|
||||
version "4.13.0"
|
||||
resolved "https://registry.yarnpkg.com/@bytescale/upload-widget-vue/-/upload-widget-vue-4.13.0.tgz#ce733f2938cbaf27de1545c0aee0cedad65527d5"
|
||||
integrity sha512-CT/P72NahAnwVwzQi6gAuA5DlKmKV/+j4H4aypaoisdYI1ukH3OYrEKv4Vl52lHZ8PgfFDUqopXrC6PzrkDtNA==
|
||||
dependencies:
|
||||
"@bytescale/upload-widget" "^4.23.0"
|
||||
|
||||
"@bytescale/upload-widget@^4.23.0":
|
||||
version "4.23.0"
|
||||
resolved "https://registry.yarnpkg.com/@bytescale/upload-widget/-/upload-widget-4.23.0.tgz#b662bba1fb21f39b0a6f927a263ad41dab6c629d"
|
||||
integrity sha512-gG1JPGcAynn6y0XEbeFNk+7qYcMwQ7qmSvxwp+NEEpf9W12hkSGfoRulKtSKVf38oSmSag2Dks30PfEKiUnW7w==
|
||||
dependencies:
|
||||
"@bytescale/sdk" "^3.27.0"
|
||||
classnames "^2.2.6"
|
||||
preact "^10.6.5"
|
||||
|
||||
"@emmetio/abbreviation@^2.3.3":
|
||||
version "2.3.3"
|
||||
resolved "https://registry.yarnpkg.com/@emmetio/abbreviation/-/abbreviation-2.3.3.tgz#ed2b88fe37b972292d6026c7c540aaf887cecb6e"
|
||||
@@ -1536,6 +1557,18 @@
|
||||
"@typescript-eslint/types" "5.61.0"
|
||||
eslint-visitor-keys "^3.3.0"
|
||||
|
||||
"@upload-io/upload-api-client-upload-js@^2.18.0":
|
||||
version "2.18.0"
|
||||
resolved "https://registry.yarnpkg.com/@upload-io/upload-api-client-upload-js/-/upload-api-client-upload-js-2.18.0.tgz#948cf288ace5ef22a152b37096335fda2ef7cc5c"
|
||||
integrity sha512-yPwsRCecXSilYn4q5ZDD4fyI2PVyUcLimv2LQcfpV3hRyzc8t82NuWHYEYpRZa5K68zxw2RljDf30geT1vJN9g==
|
||||
|
||||
"@upload-io/vue-uploader@^3.37.1":
|
||||
version "3.37.1"
|
||||
resolved "https://registry.yarnpkg.com/@upload-io/vue-uploader/-/vue-uploader-3.37.1.tgz#ba3cca104b89c71bbf9ea45e421eb2293554633f"
|
||||
integrity sha512-iY6tUGCoOxHsKg5myeXB38rLKpIU5F1awW4gw9ze6p6ne4GHI5M77AhHShjPEa2zylQh6wzny7F0AU4cfiRA+w==
|
||||
dependencies:
|
||||
uploader "^3.47.0"
|
||||
|
||||
"@vitejs/plugin-vue-jsx@^2.0.1":
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue-jsx/-/plugin-vue-jsx-2.1.1.tgz#7c13aa4e54f5ee8c9f37937b3d8c706c14369478"
|
||||
@@ -2150,6 +2183,11 @@ ci-info@^3.3.1:
|
||||
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91"
|
||||
integrity sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==
|
||||
|
||||
classnames@^2.2.6:
|
||||
version "2.5.1"
|
||||
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.5.1.tgz#ba774c614be0f016da105c858e7159eae8e7687b"
|
||||
integrity sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==
|
||||
|
||||
cli-boxes@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-3.0.0.tgz#71a10c716feeba005e4504f36329ef0b17cf3145"
|
||||
@@ -4762,6 +4800,11 @@ postcss@^8.1.10, postcss@^8.4.14, postcss@^8.4.18, postcss@^8.4.23:
|
||||
picocolors "^1.0.0"
|
||||
source-map-js "^1.0.2"
|
||||
|
||||
preact@^10.6.5:
|
||||
version "10.19.3"
|
||||
resolved "https://registry.yarnpkg.com/preact/-/preact-10.19.3.tgz#7a7107ed2598a60676c943709ea3efb8aaafa899"
|
||||
integrity sha512-nHHTeFVBTHRGxJXKkKu5hT8C/YWBkPso4/Gad6xuj5dbptt9iF9NZr9pHbPhBrnT2klheu7mHTxTZ/LjwJiEiQ==
|
||||
|
||||
preferred-pm@^3.0.3:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/preferred-pm/-/preferred-pm-3.0.3.tgz#1b6338000371e3edbce52ef2e4f65eb2e73586d6"
|
||||
@@ -4807,6 +4850,11 @@ prismjs@^1.28.0:
|
||||
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.29.0.tgz#f113555a8fa9b57c35e637bba27509dcf802dd12"
|
||||
integrity sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==
|
||||
|
||||
progress-smoother@^1.7.0:
|
||||
version "1.7.0"
|
||||
resolved "https://registry.yarnpkg.com/progress-smoother/-/progress-smoother-1.7.0.tgz#77a5d77b19ce55ef81fdf02007ba6213df08ee5e"
|
||||
integrity sha512-ZIbSbPQ8SnEf5Sa0If9lfvn5URyrZfgTTh5DM+04j1GafiLIaWDWW+1AkYXzGl7JQvzAvCy5E1ZPOgx8XORyew==
|
||||
|
||||
prompts@^2.4.2:
|
||||
version "2.4.2"
|
||||
resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069"
|
||||
@@ -5846,6 +5894,23 @@ update-browserslist-db@^1.0.11:
|
||||
escalade "^3.1.1"
|
||||
picocolors "^1.0.0"
|
||||
|
||||
upload-js@^2.22.0:
|
||||
version "2.24.3"
|
||||
resolved "https://registry.yarnpkg.com/upload-js/-/upload-js-2.24.3.tgz#cf18a2d4f726d247380d5b89b336a0c8b28f3e92"
|
||||
integrity sha512-iiTowtr2uRw2coGXlqiN1ff/wfMPVMv2MqaZYqEYBSNGmxD1pLl9R9wU8BT/mK+Yn8fDx7utlPovXziS8PVaIA==
|
||||
dependencies:
|
||||
"@upload-io/upload-api-client-upload-js" "^2.18.0"
|
||||
progress-smoother "^1.7.0"
|
||||
|
||||
uploader@^3.47.0:
|
||||
version "3.48.3"
|
||||
resolved "https://registry.yarnpkg.com/uploader/-/uploader-3.48.3.tgz#5b7f8c57ff115e42ab66d9aed68b1c7f2a544f1a"
|
||||
integrity sha512-BGXSS9O54m81TL5Ogn4OHISD/WPuIS3kvNCYomDl8cltPGzUMrHseU1sXHKGrFg65L28qJL6LnGA2fXUxpQVBQ==
|
||||
dependencies:
|
||||
classnames "^2.2.6"
|
||||
preact "^10.6.5"
|
||||
upload-js "^2.22.0"
|
||||
|
||||
uri-js@^4.2.2:
|
||||
version "4.4.1"
|
||||
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e"
|
||||
|
||||