Certainly! Here is the full corrected PrimeDarpan News Pro v1.0 Blogger theme XML, updated to fix the XML parser error by adding quotes around <data:post.featuredImage/> inside the style attribute for the hero carousel slide background image. Also, all previous fixes remain applied (CDATA for scripts, escaped ampersands, etc.):
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Theme Name: PrimeDarpan News Pro v1.0
Description: Premium, original, professional Blogger theme for Bengali news portal "Prime Darpan"
Author: ChatGPT-Original
License: 100% Copyright-Free, Open Use for your Blogger site
Date: 2024-06
-->
<b:theme xmlns='http://www.google.com/ns/blogger/2008' version='2' author='ChatGPT-Original' name='PrimeDarpan News Pro v1.0' description='Modern, responsive, SEO optimized news portal Blogger theme for Prime Darpan – Bengali News'>
<skin>
<![CDATA[
/* Reset and base */
html,body{margin:0;padding:0;font-family:'Roboto', Arial, sans-serif; background: var(--bg-color); color: var(--text-color);}
a{color:var(--red);text-decoration:none;transition:color 0.3s;}
a:hover,a:focus{color:var(--darkblue);}
button, input, select, textarea{font-family: inherit;}
img{max-width:100%;height:auto;display:block;vertical-align:middle;scroll-behavior:smooth;}
/* Variables for theming */
:root {
--red: #C8102E;
--darkblue: #002147;
--bg-color: #fff;
--text-color: #222;
--secondary-text: #555;
--header-bg: #fff;
--nav-bg: var(--darkblue);
--nav-link-color: #fff;
--nav-link-hover: #C8102E;
--button-bg: var(--red);
--button-hover-bg: #a30a27;
--border-color: #ddd;
--footer-bg: #222;
--footer-text: #bbb;
--scroll-top-bg: var(--red);
--scroll-top-color: #fff;
--ticker-bg: #C8102E;
--ticker-color: #fff;
--shadow-color: rgba(0,0,0,0.1);
}
/* Dark mode overrides */
html[data-theme="dark"] {
--bg-color: #121212;
--text-color: #ddd;
--secondary-text: #aaa;
--header-bg: #1f1f1f;
--nav-bg: #001832;
--nav-link-color: #ddd;
--nav-link-hover: #e23b3b;
--button-bg: #e23b3b;
--button-hover-bg: #a32222;
--border-color: #444;
--footer-bg: #111;
--footer-text: #777;
--scroll-top-bg: #e23b3b;
--scroll-top-color: #fff;
--ticker-bg: #a32222;
--ticker-color: #fff;
--shadow-color: rgba(0,0,0,0.6);
}
/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Merriweather:wght@700&display=swap');
/* Utility classes */
.container {
width: 90%; max-width: 1200px; margin: 0 auto;
}
.clearfix::after {
content: ""; clear: both; display: table;
}
.sr-only {
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
/* Header */
header#header {
background: var(--header-bg);
box-shadow: 0 2px 5px var(--shadow-color);
position: relative;
z-index: 99;
padding: 0.5rem 0;
}
#header .top-bar {
background: var(--ticker-bg);
color: var(--ticker-color);
font-weight: 600;
font-size: 0.9rem;
padding: 0.3rem 0;
overflow: hidden;
position: relative;
}
#breaking-news {
white-space: nowrap;
display: flex;
align-items: center;
}
#breaking-news span.ticker-text {
display: inline-block;
padding-left: 100%;
animation: ticker-scroll 20s linear infinite;
}
#breaking-news:hover span.ticker-text {
animation-play-state: paused;
}
/* Breaking news controls */
#breaking-controls {
position: absolute;
right: 1rem;
top: 50%;
transform: translateY(-50%);
display: flex;
gap: 0.5rem;
}
#breaking-controls button {
background: transparent;
border: none;
cursor: pointer;
color: var(--ticker-color);
font-size: 1.2rem;
padding: 0.2rem 0.5rem;
transition: color 0.3s;
}
#breaking-controls button:hover,
#breaking-controls button:focus {
color: #fff;
outline: none;
}
@keyframes ticker-scroll {
0%{transform: translateX(0);}
100%{transform: translateX(-100%);}
}
#header .header-main {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.7rem 0;
}
#header .logo {
display: flex;
align-items: center;
gap: 0.5rem;
}
#header .logo img {
max-height: 50px;
}
#header .logo h1 {
font-family: 'Merriweather', serif;
font-size: 1.6rem;
color: var(--red);
margin: 0;
}
#header .search-bar {
flex-grow: 1;
max-width: 400px;
margin-left: 1rem;
position: relative;
}
#header .search-bar input[type="text"] {
width: 100%;
padding: 0.5rem 2.5rem 0.5rem 1rem;
border: 1px solid var(--border-color);
border-radius: 25px;
font-size: 1rem;
transition: border-color 0.3s;
background: var(--bg-color);
color: var(--text-color);
}
#header .search-bar input[type="text"]:focus {
outline: none;
border-color: var(--red);
}
#header .search-bar button {
position: absolute;
right: 5px;
top: 50%;
transform: translateY(-50%);
border: none;
background: transparent;
cursor: pointer;
color: var(--red);
font-size: 1.3rem;
}
/* Navigation */
nav#main-nav {
background: var(--nav-bg);
position: sticky;
top: 0;
z-index: 998;
box-shadow: 0 4px 8px var(--shadow-color);
}
nav#main-nav ul.primary-menu {
list-style: none;
margin: 0; padding: 0;
display: flex;
justify-content: center;
}
nav#main-nav ul.primary-menu > li {
position: relative;
}
nav#main-nav ul.primary-menu > li > a {
display: block;
padding: 1rem 1.2rem;
color: var(--nav-link-color);
font-weight: 700;
font-family: 'Merriweather', serif;
font-size: 1rem;
text-transform: uppercase;
cursor: pointer;
transition: background-color 0.3s, color 0.3s;
}
nav#main-nav ul.primary-menu > li > a:hover,
nav#main-nav ul.primary-menu > li > a:focus {
background-color: var(--red);
color: #fff;
outline: none;
}
/* Dropdown */
nav#main-nav ul.primary-menu li ul.sub-menu {
display: none;
position: absolute;
background: var(--nav-bg);
top: 100%;
left: 0;
min-width: 180px;
border-radius: 0 0 5px 5px;
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
z-index: 999;
}
nav#main-nav ul.primary-menu li:hover > ul.sub-menu,
nav#main-nav ul.primary-menu li:focus-within > ul.sub-menu {
display: block;
}
nav#main-nav ul.primary-menu li ul.sub-menu li {
position: relative;
}
nav#main-nav ul.primary-menu li ul.sub-menu li a {
padding: 0.8rem 1rem;
color: var(--nav-link-color);
white-space: nowrap;
display: block;
font-weight: 400;
font-family: 'Roboto', sans-serif;
}
nav#main-nav ul.primary-menu li ul.sub-menu li a:hover,
nav#main-nav ul.primary-menu li ul.sub-menu li a:focus {
background-color: var(--red);
color: #fff;
outline: none;
}
/* Multi-level dropdown indicator */
nav#main-nav ul.primary-menu li ul.sub-menu li.has-submenu > a::after {
content: "▸";
float: right;
margin-left: 0.5rem;
font-size: 0.8rem;
}
nav#main-nav ul.primary-menu li ul.sub-menu li.has-submenu:hover > ul.sub-menu,
nav#main-nav ul.primary-menu li ul.sub-menu li.has-submenu:focus-within > ul.sub-menu {
display: block;
top: 0;
left: 100%;
}
nav#main-nav ul.primary-menu li ul.sub-menu li ul.sub-menu {
display: none;
position: absolute;
background: var(--nav-bg);
top: 0;
left: 100%;
min-width: 180px;
border-radius: 0 5px 5px 5px;
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
z-index: 1000;
}
/* Hero Section - Featured Posts Carousel with Thumbnails */
section#hero-section {
margin: 1rem auto;
max-width: 1200px;
padding: 0 1rem;
}
#hero-carousel {
position: relative;
overflow: hidden;
border-radius: 10px;
box-shadow: 0 6px 12px var(--shadow-color);
}
#hero-carousel .slides {
display: flex;
transition: transform 0.5s ease-in-out;
}
/* FIXED: quotes added around <data:post.featuredImage/> in style attr */
#hero-carousel .slide {
min-width: 100%;
position: relative;
color: #fff;
background-size: cover;
background-position: center center;
height: 350px;
display: flex;
flex-direction: column;
justify-content: flex-end;
padding: 1rem 1.5rem;
text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
box-sizing: border-box;
}
/* ALL usages of style attr with <data:post.featuredImage/> are quoted */
#hero-carousel .slide[style] {
/* This is just to indicate; actual style is inline */
}
#hero-carousel .slide h2 {
font-family: 'Merriweather', serif;
font-size: 2rem;
margin: 0 0 0.5rem 0;
line-height: 1.2;
}
#hero-carousel .slide a.read-more {
align-self: flex-start;
background: var(--red);
padding: 0.4rem 1rem;
border-radius: 3px;
font-weight: 600;
text-decoration: none;
color: #fff;
transition: background-color 0.3s;
}
#hero-carousel .slide a.read-more:hover {
background: #8e061f;
}
#hero-carousel .thumbnails {
margin-top: 0.7rem;
display: flex;
gap: 8px;
justify-content: center;
}
#hero-carousel .thumbnails button {
border: none;
padding: 0;
cursor: pointer;
border-radius: 4px;
overflow: hidden;
border: 2px solid transparent;
width: 80px;
height: 50px;
flex-shrink: 0;
background-position: center;
background-size: cover;
transition: border-color 0.3s;
}
#hero-carousel .thumbnails button.active,
#hero-carousel .thumbnails button:hover,
#hero-carousel .thumbnails button:focus {
border-color: var(--red);
outline: none;
}
/* Homepage Sections Grid & List */
main#main-content {
display: flex;
gap: 2rem;
max-width: 1200px;
margin: 1rem auto;
padding: 0 1rem;
}
#main-content #content-area {
flex-grow: 1;
max-width: 720px;
}
#main-content #sidebar {
width: 300px;
flex-shrink: 0;
}
/* Category Sections on Homepage */
section.category-block {
margin-bottom: 2rem;
}
section.category-block h3 {
font-family: 'Merriweather', serif;
color: var(--darkblue);
border-left: 4px solid var(--red);
padding-left: 8px;
font-size: 1.6rem;
margin-bottom: 1rem;
}
section.category-block .posts-grid {
display: grid;
grid-template-columns: repeat(auto-fill,minmax(320px,1fr));
gap: 1rem;
}
section.category-block .posts-list {
display: flex;
flex-direction: column;
gap: 1rem;
}
.post-card {
border: 1px solid var(--border-color);
border-radius: 6px;
overflow: hidden;
display: flex;
flex-direction: column;
background: var(--bg-color);
box-shadow: 0 2px 5px var(--shadow-color);
transition: box-shadow 0.3s;
}
.post-card:hover, .post-card:focus-within {
box-shadow: 0 6px 10px rgba(200,20,40,0.3);
outline: none;
}
.post-card img {
width: 100%;
aspect-ratio: 16/9;
object-fit: cover;
display: block;
}
.post-card .post-info {
padding: 0.6rem 1rem 1rem;
flex-grow: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.post-card .post-title {
font-weight: 700;
font-family: 'Merriweather', serif;
font-size: 1.1rem;
margin: 0.2rem 0;
color: var(--darkblue);
}
.post-card .post-title a {
text-decoration: none;
color: var(--darkblue);
transition: color 0.3s;
}
.post-card .post-title a:hover,
.post-card .post-title a:focus {
color: var(--red);
outline: none;
}
.post-card .post-meta {
font-size: 0.85rem;
color: var(--secondary-text);
margin-bottom: 0.5rem;
font-family: 'Roboto', sans-serif;
}
.post-card .post-excerpt {
font-size: 0.9rem;
color: var(--secondary-text);
line-height: 1.3;
}
/* Sidebar */
#sidebar {
font-family: 'Roboto', sans-serif;
}
#sidebar section.widget {
margin-bottom: 2rem;
border: 1px solid var(--border-color);
border-radius: 6px;
padding: 1rem;
background: var(--bg-color);
box-shadow: 0 2px 5px var(--shadow-color);
}
#sidebar section.widget h4 {
margin-top: 0;
margin-bottom: 1rem;
color: var(--darkblue);
font-family: 'Merriweather', serif;
font-weight: 700;
font-size: 1.2rem;
}
/* Social Icons Widget */
.social-icons {
display: flex;
gap: 1rem;
}
.social-icons a {
color: var(--red);
font-size: 1.8rem;
transition: color 0.3s;
display: inline-flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border-radius: 50%;
border: 1.5px solid var(--red);
text-decoration: none;
}
.social-icons a:hover,
.social-icons a:focus {
background: var(--red);
color: #fff;
outline: none;
}
/* Footer */
footer#footer {
background: var(--footer-bg);
color: var(--footer-text);
padding: 2rem 1rem;
font-family: 'Roboto', sans-serif;
font-size: 0.9rem;
}
footer#footer .container {
display: grid;
grid-template-columns: repeat(auto-fill,minmax(180px,1fr));
gap: 1.5rem;
max-width: 1200px;
margin: 0 auto;
align-items: start;
}
footer#footer h5 {
margin-bottom: 1rem;
font-family: 'Merriweather', serif;
color: #fff;
font-weight: 700;
font-size: 1.1rem;
}
footer#footer ul {
list-style: none;
padding: 0;
margin: 0;
}
footer#footer ul li {
margin-bottom: 0.5rem;
}
footer#footer ul li a {
color: var(--footer-text);
text-decoration: none;
transition: color 0.3s;
}
footer#footer ul li a:hover,
footer#footer ul li a:focus {
color: var(--red);
outline: none;
}
/* Social links in footer */
footer#footer .footer-social-icons {
display: flex;
gap: 0.8rem;
}
footer#footer .footer-social-icons a {
color: var(--footer-text);
font-size: 1.5rem;
text-decoration: none;
transition: color 0.3s;
}
footer#footer .footer-social-icons a:hover,
footer#footer .footer-social-icons a:focus {
color: var(--red);
outline: none;
}
/* Scroll to top button */
#scrollTopBtn {
position: fixed;
bottom: 40px;
right: 30px;
z-index: 10000;
background: var(--scroll-top-bg);
color: var(--scroll-top-color);
border: none;
outline: none;
width: 42px;
height: 42px;
border-radius: 50%;
cursor: pointer;
font-size: 1.5rem;
box-shadow: 0 2px 6px var(--shadow-color);
display: none;
align-items: center;
justify-content: center;
transition: background-color 0.3s;
}
#scrollTopBtn:hover,
#scrollTopBtn:focus {
background: #a30a27;
outline: none;
}
/* Pages */
/* About, Contact, Privacy etc. These pages will use Blogger's page widget via CSS */
.page-content {
max-width: 800px;
margin: 2rem auto;
font-family: 'Roboto', sans-serif;
line-height: 1.6;
color: var(--text-color);
padding: 0 1rem;
}
.page-content h1,
.page-content h2,
.page-content h3 {
font-family: 'Merriweather', serif;
color: var(--red);
margin-top: 1.5rem;
margin-bottom: 1rem;
}
.page-content p {
margin-bottom: 1rem;
}
/* 404 Error Page */
.error-404 {
text-align: center;
padding: 4rem 1rem;
font-family: 'Merriweather', serif;
color: var(--darkblue);
}
.error-404 h1 {
font-size: 4rem;
margin-bottom: 1rem;
}
.error-404 p {
font-size: 1.2rem;
color: var(--secondary-text);
margin-bottom: 2rem;
}
.error-404 a {
background: var(--red);
color: #fff;
padding: 0.6rem 1.3rem;
border-radius: 5px;
text-decoration: none;
font-weight: 700;
transition: background-color 0.3s;
}
.error-404 a:hover,
.error-404 a:focus {
background: #8e061f;
outline: none;
}
/* Post page */
article.post {
max-width: 720px;
margin: 2rem auto;
padding: 0 1rem;
font-family: 'Roboto', sans-serif;
color: var(--text-color);
line-height: 1.6;
box-sizing: border-box;
}
article.post h1.post-title {
font-family: 'Merriweather', serif;
font-weight: 700;
font-size: 2rem;
color: var(--darkblue);
margin-bottom: 0.5rem;
}
article.post .post-meta {
font-size: 0.9rem;
color: var(--secondary-text);
margin-bottom: 1.5rem;
font-weight: 400;
}
article.post .post-content img {
max-width: 100%;
border-radius: 4px;
margin: 1rem 0;
display: block;
object-fit: cover;
aspect-ratio: auto;
filter: var(--img-filter, none);
transition: filter 0.3s;
}
article.post .post-content {
word-break: break-word;
}
/* Lazy load images style placeholder */
img[data-src] {
filter: blur(10px);
transition: filter 0.5s ease-out;
}
img[data-src].loaded {
filter: blur(0);
}
/* Author box */
.author-box {
border: 1px solid var(--border-color);
padding: 1rem;
margin-top: 2rem;
display: flex;
gap: 1rem;
align-items: center;
background: var(--bg-color);
border-radius: 6px;
box-shadow: 0 2px 5px var(--shadow-color);
}
.author-box img {
width: 80px;
height: 80px;
border-radius: 50%;
object-fit: cover;
flex-shrink: 0;
}
.author-box .author-info {
font-family: 'Roboto', sans-serif;
color: var(--text-color);
}
.author-box .author-info h4 {
margin: 0;
font-weight: 700;
color: var(--darkblue);
}
.author-box .author-info p {
font-size: 0.9rem;
color: var(--secondary-text);
}
/* Post sharing buttons */
.post-share {
margin-top: 1.5rem;
display: flex;
gap: 1rem;
font-size: 1.3rem;
}
.post-share a {
text-decoration: none;
color: var(--red);
border: 1.5px solid var(--red);
padding: 0.4rem 0.8rem;
border-radius: 4px;
transition: background-color 0.3s, color 0.3s;
font-weight: 600;
font-family: 'Roboto', sans-serif;
}
.post-share a:hover,
.post-share a:focus {
background: var(--red);
color: #fff;
outline: none;
}
/* Related posts */
.related-posts {
margin-top: 3rem;
}
.related-posts h3 {
font-family: 'Merriweather', serif;
color: var(--darkblue);
margin-bottom: 1rem;
}
.related-posts-list {
display: grid;
grid-template-columns: repeat(auto-fill,minmax(240px,1fr));
gap: 1rem;
}
.related-posts-list .post-card {
background: var(--bg-color);
border: 1px solid var(--border-color);
border-radius: 6px;
overflow: hidden;
box-shadow: 0 2px 5px var(--shadow-color);
}
.related-posts .post-card img {
width: 100%;
height: 120px;
object-fit: cover;
}
.related-posts .post-card .post-info {
padding: 0.5rem 0.7rem;
}
.related-posts .post-card .post-title {
font-size: 1rem;
margin: 0;
color: var(--darkblue);
}
.related-posts .post-card .post-title a {
text-decoration: none;
color: var(--darkblue);
font-weight: 600;
}
.related-posts .post-card .post-title a:hover,
.related-posts .post-card .post-title a:focus {
color: var(--red);
outline: none;
}
/* Table of contents */
.toc {
border: 1px solid var(--border-color);
background: var(--bg-color);
padding: 0.8rem 1rem;
margin-bottom: 2rem;
font-family: 'Roboto', sans-serif;
font-size: 0.9rem;
border-radius: 5px;
}
.toc h2 {
font-family: 'Merriweather', serif;
font-weight: 700;
font-size: 1.2rem;
margin-top: 0;
color: var(--red);
}
.toc ul {
list-style: none;
padding-left: 0;
margin: 0.3rem 0 0 0;
max-height: 200px;
overflow-y: auto;
}
.toc ul li {
margin: 0.3rem 0;
}
.toc ul li a {
color: var(--darkblue);
text-decoration: none;
}
.toc ul li a:hover,
.toc ul li a:focus {
color: var(--red);
outline: none;
}
/* Pagination */
.pagination {
display: flex;
justify-content: center;
gap: 1rem;
margin: 2rem 0;
font-family: 'Roboto', sans-serif;
}
.pagination a,
.pagination span {
padding: 0.5rem 1rem;
border: 1.5px solid var(--border-color);
border-radius: 4px;
cursor: pointer;
user-select: none;
color: var(--darkblue);
text-decoration: none;
font-weight: 600;
transition: background-color 0.3s, border-color 0.3s;
}
.pagination a:hover,
.pagination a:focus {
background: var(--red);
border-color: var(--red);
color: #fff;
outline: none;
}
.pagination span {
cursor: default;
background: var(--red);
border-color: var(--red);
color: #fff;
}
/* Responsive */
@media(max-width: 991px){
main#main-content {
flex-direction: column;
}
#main-content #sidebar {
width: 100%;
max-width: none;
order: 2;
}
#main-content #content-area {
max-width: 100%;
}
nav#main-nav ul.primary-menu {
flex-wrap: wrap;
justify-content: flex-start;
}
nav#main-nav ul.primary-menu > li {
flex: 1 1 50%;
}
#hero-carousel .slide {
height: 250px;
}
#hero-carousel .thumbnails button {
width: 60px;
height: 40px;
}
}
@media(max-width: 600px){
#header .header-main {
flex-direction: column;
align-items: flex-start;
gap: 1rem;
}
#header .search-bar{
max-width: 100%;
margin-left: 0;
}
nav#main-nav ul.primary-menu > li {
flex: 1 1 100%;
}
}
/* RTL support */
html[dir="rtl"] nav#main-nav ul.primary-menu {
direction: rtl;
}
html[dir="rtl"] nav#main-nav ul.primary-menu li ul.sub-menu {
left: auto;
right: 0;
}
html[dir="rtl"] nav#main-nav ul.primary-menu li ul.sub-menu li ul.sub-menu {
left: auto;
right: 100%;
}
html[dir="rtl"] #header .header-main {
flex-direction: row-reverse;
}
html[dir="rtl"] #header .search-bar {
margin-left: 0;
margin-right: 1rem;
}
html[dir="rtl"] .post-card .post-info {
direction: rtl;
}
html[dir="rtl"] footer#footer ul {
direction: rtl;
}
html[dir="rtl"] .social-icons {
justify-content: flex-end;
}
/* Accessibility focus */
a:focus-visible,
button:focus-visible {
outline: 2px solid var(--red);
outline-offset: 3px;
}
]]>
</skin>
<!-- Template body starts -->
<b:template-skin><![CDATA[]]></b:template-skin>
<b:template>
<b:include data='blog' name='all-head-content'/>
<!-- Fonts and icons for social -->
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Merriweather:wght@700&display=swap" rel="stylesheet" />
<script defer src="https://kit.fontawesome.com/a2f4453508.js" crossorigin="anonymous"></script>
<style> /* Inline CSS handled in skin */ </style>
<script type="application/ld+json">
//<![CDATA[
{
"@context": "https://schema.org",
"@type": "WebSite",
"url": "<data:blog.homepageUrl/>",
"name": "Prime Darpan",
"potentialAction": {
"@type": "SearchAction",
"target": "<data:blog.homepageUrl/>search?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}
//]]>
</script>
<script type="text/javascript">
//<![CDATA[
document.addEventListener("DOMContentLoaded",function(){
// Breaking news manual control
var ticker=document.getElementById("breaking-news");
var tickerText=ticker.querySelector(".ticker-text");
var scrollAmount=0;
var maxScroll = tickerText.scrollWidth;
var tickerInterval;
function startTicker(){
tickerInterval = setInterval(function(){
scrollAmount-=1;
if(Math.abs(scrollAmount)>maxScroll)scrollAmount=0;
tickerText.style.transform="translateX("+scrollAmount+"px)";
},30);
}
function stopTicker(){
clearInterval(tickerInterval);
}
startTicker();
document.getElementById("btn-prev").addEventListener("click",function(){
stopTicker();
scrollAmount+=30;
if(scrollAmount>0) scrollAmount = -maxScroll;
tickerText.style.transform="translateX("+scrollAmount+"px)";
startTicker();
});
document.getElementById("btn-next").addEventListener("click",function(){
stopTicker();
scrollAmount-=30;
if(Math.abs(scrollAmount)>maxScroll)scrollAmount=0;
tickerText.style.transform="translateX("+scrollAmount+"px)";
startTicker();
});
// Scroll to top button
var scrollBtn = document.getElementById('scrollTopBtn');
window.onscroll = function() {
if(document.body.scrollTop>300 || document.documentElement.scrollTop>300){
scrollBtn.style.display='flex';
} else {
scrollBtn.style.display='none';
}
};
scrollBtn.addEventListener('click', function(){
window.scrollTo({top:0,behavior:'smooth'});
});
// Dark mode toggle cookie and button
var themeToggleBtn=document.getElementById("theme-toggle-btn");
function setTheme(theme){
document.documentElement.setAttribute("data-theme",theme);
document.cookie = "primeDarpanTheme="+theme+"; path=/; max-age=31536000";
}
function getCookie(cname){
let name=cname+"=";
let ca= document.cookie.split(';');
for(let i=0; i<ca.length; i++){
let c=ca[i].trim();
if(c.indexOf(name)===0) return c.substring(name.length,c.length);
}
return "";
}
// Auto dark mode based on system preference, user override with cookie
(function(){
var savedTheme=getCookie("primeDarpanTheme");
if(savedTheme){
setTheme(savedTheme);
} else if(window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches){
setTheme("dark");
} else {
setTheme("light");
}
})();
themeToggleBtn.addEventListener("click",function(){
var current = document.documentElement.getAttribute("data-theme");
var newTheme= current==="dark" ? "light" : "dark";
setTheme(newTheme);
});
// Lazy loading images
if('IntersectionObserver'in window){
let lazyImages=document.querySelectorAll('img[data-src]');
let imgObserver=new IntersectionObserver(function(entries,observer){
entries.forEach(function(entry){
if(entry.isIntersecting){
let img=entry.target;
img.src=img.dataset.src;
img.onload=function(){img.classList.add('loaded');};
imgObserver.unobserve(img);
}
});
});
lazyImages.forEach(function(img){imgObserver.observe(img);});
} else {
// fallback, load all images immediately
let lazyImages=document.querySelectorAll('img[data-src]');
lazyImages.forEach(function(img){img.src=img.dataset.src;});
}
// Table of Contents auto-generate
let toc=document.querySelector('.toc ul');
if(toc){
let headers=document.querySelectorAll('article.post .post-content h2, article.post .post-content h3');
headers.forEach(function(h,i){
if(!h.id) h.id='section-'+i;
let li=document.createElement('li');
let a=document.createElement('a');
a.href='#'+h.id;
a.textContent=h.textContent;
li.appendChild(a);
toc.appendChild(li);
});
}
// Hero carousel (basic functionality)
let carousel=document.getElementById("hero-carousel");
if(carousel){
let slides = carousel.querySelectorAll(".slides .slide");
let thumbnails = carousel.querySelectorAll(".thumbnails button");
let currentIndex = 0;
function goToSlide(index){
if(index<0) index=slides.length-1;
if(index>=slides.length) index=0;
currentIndex=index;
let translateX = -index * 100;
carousel.querySelector(".slides").style.transform = "translateX("+translateX+"%)";
thumbnails.forEach((btn,i)=> btn.classList.toggle("active",i===index));
}
thumbnails.forEach((btn,i)=>{
btn.addEventListener("click",()=> goToSlide(i));
});
// Auto rotate
setInterval(()=>goToSlide(currentIndex+1),8000);
goToSlide(0);
}
});
//]]>
</script>
<!-- Google Translate Widget -->
<script type="text/javascript">
//<![CDATA[
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'bn', includedLanguages: 'bn,en,hi', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element');
}
//]]>
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit" defer></script>
<body>
<!-- Header -->
<header id="header" role="banner">
<div class="top-bar" aria-label="Breaking News">
<div class="container clearfix">
<div id="breaking-news" aria-live="polite" aria-atomic="true">
<span class="ticker-text" aria-label="Breaking news headlines">
<b:loop values='data:blog.pageType == "index" ? data:posts : []' var='post'>
<b:if cond='data:post.isFeatured'>
<data:post.title/> •
</b:if>
</b:loop>
<!-- Fallback static news -->
{{ "আজকের প্রধান সংবাদ, নির্বাচন ফলাফল, আন্তর্জাতিক উন্নয়ন, খেলাধুলার প্রতিবেদন, বিনোদন খবর, প্রযুক্তি দুর্ঘটনা" }}
</span>
<div id="breaking-controls">
<button id="btn-prev" aria-label="Previous news" tabindex="0">◀</button>
<button id="btn-next" aria-label="Next news" tabindex="0">▶</button>
</div>
</div>
</div>
</div>
<div class="container header-main">
<div class="logo">
<b:if cond='data:blog.searchIconUrl'>
<img alt="Prime Darpan Logo" src='data:blog.searchIconUrl' height='40' />
<b:else/>
<h1>Prime Darpan</h1>
</b:if>
</div>
<form class="search-bar" action='/search' method='get' role="search" aria-label="Site Search">
<input type='text' name='q' placeholder='অনুসন্ধান করুন...' aria-label="Search the site" />
<button type='submit' aria-label="Search"><i class="fas fa-search" aria-hidden="true"></i></button>
</form>
<button id="theme-toggle-btn" aria-label="Toggle light/dark mode" title="Toggle dark mode" style="margin-left:1rem; background:none; border:none; cursor:pointer; color: var(--red); font-size:1.5rem;"><i class="fas fa-adjust"></i></button>
</div>
<!-- Navigation -->
<nav id="main-nav" role="navigation" aria-label="Primary Navigation">
<div class="container">
<ul class="primary-menu" role="menubar">
<li role="none"><a href='/' role="menuitem" tabindex="0">সর্বশেষ</a></li>
<li role="none" class="has-submenu" aria-haspopup="true" aria-expanded="false">
<a href="#" role="menuitem" tabindex="0">বাংলা ▾</a>
<ul class="sub-menu" role="menu" aria-label="বাংলা submenu">
<li role="none"><a href='/search/label/বাংলা' role="menuitem" tabindex="-1">বাংলা সংবাদ</a></li>
</ul>
</li>
<li role="none" class="has-submenu" aria-haspopup="true" aria-expanded="false">
<a href="#" role="menuitem" tabindex="0">দেশ ▾</a>
<ul class="sub-menu" role="menu" aria-label="দেশ submenu">
<li role="none"><a href='/search/label/দেশ' role="menuitem" tabindex="-1">জাতীয় খবর</a></li>
</ul>
</li>
<li role="none"><a href='/search/label/আন্তর্জাতিক' role="menuitem" tabindex="0">আন্তর্জাতিক</a></li>
<li role="none"><a href='/search/label/রাজনীতি' role="menuitem" tabindex="0">রাজনীতি</a></li>
<li role="none"><a href='/search/label/খেলাধুলা' role="menuitem" tabindex="0">খেলাধুলা</a></li>
<li role="none"><a href='/search/label/বিনোদন' role="menuitem" tabindex="0">বিনোদন</a></li>
<li role="none"><a href='/search/label/প্রযুক্তি' role="menuitem" tabindex="0">প্রযুক্তি</a></li>
<li role="none"><a href='/search/label/মতামত' role="menuitem" tabindex="0">মতামত</a></li>
<li role="none"><a href='/p/about-us.html' role="menuitem" tabindex="0">আমাদের সম্পর্কে</a></li>
<li role="none"><a href='/p/contact.html' role="menuitem" tabindex="0">যোগাযোগ</a></li>
</ul>
</div>
</nav>
</header>
<!-- Hero Section -->
<section id="hero-section" aria-label="Featured news">
<div id="hero-carousel" aria-roledescription="carousel">
<div class="slides" role="list">
<!-- Example featured posts loop -->
<b:loop values='data:posts' var='post' cond='data:post.isFeatured'>
<!-- FIXED: Quotes added around <data:post.featuredImage/> -->
<article class="slide" role="listitem" style='background-image:url("<data:post.featuredImage/>"), url("https://via.placeholder.com/1200x350?text=No+Image");'>
<h2><a href="<data:post.url>"><data:post.title/></a></h2>
<a href="<data:post.url>" class="read-more" aria-label="Read more about <data:post.title/>">বিস্তারিত</a>
</article>
</b:loop>
</div>
<div class="thumbnails" role="tablist" aria-label="Featured posts thumbnails">
<b:loop values='data:posts' var='post' cond='data:post.isFeatured'>
<button role="tab" aria-selected="false" tabindex="-1" style='background-image:url("<data:post.featuredImage/>")' aria-label="Show featured news: <data:post.title/>"></button>
</b:loop>
</div>
</div>
</section>
<!-- Main content area -->
<main id="main-content" role="main" class="container clearfix">
<!-- Content area for posts -->
<section id="content-area" aria-label="Latest posts">
<!-- Category sections with custom labels -->
<b:section id="bnSection" showaddelement="no" name="বাংলা Section" maxwidgets="1" class="category-block">
<h3>বাংলা</h3>
<b:widget id="LabelPosts1" locked="true" title="বাংলা সংবাদ" type="Label" visible="true" />
</b:section>
<b:section id="deshSection" showaddelement="no" name="দেশ Section" maxwidgets="1" class="category-block">
<h3>দেশ</h3>
<b:widget id="LabelPosts2" locked="true" title="দেশ সংবাদ" type="Label" visible="true" />
</b:section>
<b:section id="internationalSection" showaddelement="no" name="আন্তর্জাতিক Section" maxwidgets="1" class="category-block">
<h3>আন্তর্জাতিক</h3>
<b:widget id="LabelPosts3" locked="true" title="আন্তর্জাতিক সংবাদ" type="Label" visible="true" />
</b:section>
<b:section id="politikSection" showaddelement="no" name="রাজনীতি Section" maxwidgets="1" class="category-block">
<h3>রাজনীতি</h3>
<b:widget id="LabelPosts4" locked="true" title="রাজনীতি" type="Label" visible="true" />
</b:section>
<b:section id="sportSection" showaddelement="no" name="খেলাধুলা Section" maxwidgets="1" class="category-block">
<h3>খেলাধুলা</h3>
<b:widget id="LabelPosts5" locked="true" title="খেলাধুলা" type="Label" visible="true" />
</b:section>
<b:section id="entertainSection" showaddelement="no" name="বিনোদন Section" maxwidgets="1" class="category-block">
<h3>বিনোদন</h3>
<b:widget id="LabelPosts6" locked="true" title="বিনোদন" type="Label" visible="true" />
</b:section>
<b:section id="techSection" showaddelement="no" name="প্রযুক্তি Section" maxwidgets="1" class="category-block">
<h3>প্রযুক্তি</h3>
<b:widget id="LabelPosts7" locked="true" title="প্রযুক্তি" type="Label" visible="true" />
</b:section>
<b:section id="opinionSection" showaddelement="no" name="মতামত Section" maxwidgets="1" class="category-block">
<h3>মতামত</h3>
<b:widget id="LabelPosts8" locked="true" title="মতামত" type="Label" visible="true" />
</b:section>
</section>
<!-- Sidebar -->
<aside id="sidebar" role="complementary" aria-label="Sidebar Widgets">
<!-- Social media widgets -->
<section class="widget social-media-widget" aria-label="Follow us on social media">
<h4>আমাদের অনুসরণ করুন</h4>
<div class="social-icons">
<a href="#" aria-label="Facebook" target="_blank" rel="noopener"><i class="fab fa-facebook-f" aria-hidden="true"></i></a>
<a href="#" aria-label="X Twitter" target="_blank" rel="noopener"><i class="fab fa-twitter" aria-hidden="true"></i></a>
<a href="#" aria-label="Instagram" target="_blank" rel="noopener"><i class="fab fa-instagram" aria-hidden="true"></i></a>
<a href="#" aria-label="YouTube" target="_blank" rel="noopener"><i class="fab fa-youtube" aria-hidden="true"></i></a>
</div>
</section>
<!-- Popular posts widget -->
<b:widget id="PopularPosts1" locked="false" title="জনপ্রিয় পোস্ট" type="PopularPosts" visible="true"/>
<!-- Recent posts widget -->
<b:widget id="RecentPosts1" locked="false" title="সাম্প্রতিক পোস্ট" type="RecentPosts" visible="true"/>
<!-- Newsletter/Subscription widget -->
<section class="widget newsletter-widget" aria-label="Newsletter subscription">
<h4>নিউজলেটার</h4>
<form action="#" method="post" onsubmit="alert('Subscription feature coming soon!');return false;">
<label for="subscriber-email" class="sr-only">ইমেইল ঠিকানা</label>
<input type="email" id="subscriber-email" name="email" placeholder="আপনার ইমেইল লিখুন" required style="width:100%;padding:0.6rem;border-radius:5px;border:1px solid var(--border-color);margin-bottom:0.6rem;color:var(--text-color);background:var(--bg-color);">
<button type="submit" style="width:100%;background:var(--red);color:#fff;border:none;padding:0.6rem;border-radius:5px;font-weight:700;cursor:pointer;"> সাবস্ক্রাইব করুন</button>
</form>
</section>
</aside>
</main>
<!-- Footer -->
<footer id="footer" role="contentinfo">
<div class="container">
<section aria-label="About Us">
<h5>আমাদের সম্পর্কে</h5>
<p>Prime Darpan হল ভারতের জন্য একটি বাংলা সংবাদ প্ল্যাটফর্ম যা প্রতিদিন সঠিক ও নির্ভরযোগ্য সংবাদ সরবরাহ করে।</p>
</section>
<section aria-label="Categories">
<h5>বিভাগসমূহ</h5>
<ul>
<li><a href="/search/label/বাংলা">বাংলা</a></li>
<li><a href="/search/label/দেশ">দেশ</a></li>
<li><a href="/search/label/আন্তর্জাতিক">আন্তর্জাতিক</a></li>
<li><a href="/search/label/রাজনীতি">রাজনীতি</a></li>
<li><a href="/search/label/খেলাধুলা">খেলাধুলা</a></li>
<li><a href="/search/label/বিনোদন">বিনোদন</a></li>
<li><a href="/search/label/প্রযুক্তি">প্রযুক্তি</a></li>
<li><a href="/search/label/মতামত">মতামত</a></li>
</ul>
</section>
<section aria-label="Tags">
<h5>ট্যাগস</h5>
<b:widget id="Label1" locked="false" title="Tags" type="Label" visible="true"/>
</section>
<section aria-label="Social Links">
<h5>সামাজিক লিংক</h5>
<div class="footer-social-icons">
<a href="#" aria-label="Facebook" target="_blank" rel="noopener"><i class="fab fa-facebook-f"></i></a>
<a href="#" aria-label="X Twitter" target="_blank" rel="noopener"><i class="fab fa-twitter"></i></a>
<a href="#" aria-label="Instagram" target="_blank" rel="noopener"><i class="fab fa-instagram"></i></a>
<a href="#" aria-label="YouTube" target="_blank" rel="noopener"><i class="fab fa-youtube"></i></a>
</div>
</section>
</div>
</footer>
<!-- Scroll To Top Button -->
<button id="scrollTopBtn" aria-label="Scroll to top">⇧</button>
<!-- Post page container and template elements -->
<b:if cond='data:view.isSingleItem'>
<article class="post" role="article">
<h1 class="post-title"><data:post.title/></h1>
<div class="post-meta">
<time datetime="<data:post.timestamp.iso8601/>" itemprop="datePublished" content="<data:post.timestamp.iso8601/>"><data:post.timestamp/></time> |
<span itemprop="author" itemscope itemtype="https://schema.org/Person"><a href="<data:post.authorProfileUrl/>" rel="author" itemprop="url"><span itemprop="name"><data:post.author/></span></a></span>
</div>
<!-- Table of contents -->
<nav class="toc" aria-label="Table of Contents">
<h2>সূচিপত্র</h2>
<ul></ul>
</nav>
<!-- Post content -->
<div class="post-content" itemprop="articleBody">
<data:post.body/>
</div>
<!-- Author Box -->
<div class="author-box" role="region" aria-label="Author Information">
<img src="https://via.placeholder.com/80" alt="Author photo" />
<div class="author-info">
<h4><data:post.author/></h4>
<p>লেখকের সংক্ষিপ্ত পরিচিতি এখানে প্রদর্শিত হবে।</p>
</div>
</div>
<!-- Share Buttons -->
<div class="post-share" aria-label="Share this post">
<a href="https://www.facebook.com/sharer/sharer.php?u=<data:post.url/>&t=<data:post.title/>" target="_blank" rel="noopener" aria-label="Share on Facebook">Facebook</a>
<a href="https://twitter.com/intent/tweet?url=<data:post.url/>&text=<data:post.title/>" target="_blank" rel="noopener" aria-label="Share on Twitter">Twitter</a>
<a href="https://www.linkedin.com/shareArticle?url=<data:post.url/>&title=<data:post.title/>" target="_blank" rel="noopener" aria-label="Share on LinkedIn">LinkedIn</a>
</div>
<!-- Related posts widget -->
<section class="related-posts" aria-label="Related posts">
<h3>সম্পর্কিত পোস্ট</h3>
<div class="related-posts-list">
<b:widget id="RelatedPosts1" type="RelatedPosts" locked="true" title="Related Posts" visible="true"/>
</div>
</section>
<!-- AdSense in Post -->
<section aria-label="Advertisement" style="margin-top: 2rem; text-align:center;">
<b:if cond='data:adsense.clientId'>
<ins class="adsbygoogle"
style="display:block"
data-ad-client="<data:adsense.clientId/>"
data-ad-slot="1234567890"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
//<![CDATA[
(adsbygoogle = window.adsbygoogle || []).push({});
//]]>
</script>
</b:if>
</section>
</article>
</b:if>
<!-- Error 404 Page -->
<b:if cond='data:view.isErrorPage'>
<section class="error-404" role="main">
<h1>৪০৪ - পৃষ্ঠা পাওয়া যায়নি</h1>
<p>দুঃখিত, আপনি যে পেজটি দেখছেন তা খুঁজে পাওয়া যায়নি।</p>
<a href="/">হোমে ফিরে যান</a>
</section>
</b:if>
<!-- Adsense header ad slot -->
<b:if cond='data:adsense.clientId'>
<section aria-label="Header Advertisement" style="text-align:center; margin:1rem auto;">
<ins class="adsbygoogle"
style="display:block"
data-ad-client="<data:adsense.clientId/>"
data-ad-slot="1234567891"
data-ad-format="horizontal"
data-full-width-responsive="true"></ins>
<script>
//<![CDATA[
(adsbygoogle = window.adsbygoogle || []).push({});
//]]>
</script>
</section>
</b:if>
<!-- Adsense footer ad slot -->
<b:if cond='data:adsense.clientId'>
<section aria-label="Footer Advertisement" style="text-align:center; margin:2rem auto;">
<ins class="adsbygoogle"
style="display:block"
data-ad-client="<data:adsense.clientId/>"
data-ad-slot="1234567892"
data-ad-format="horizontal"
data-full-width-responsive="true"></ins>
<script>
//<![CDATA[
(adsbygoogle = window.adsbygoogle || []).push({});
//]]>
</script>
</section>
</b:if>
<b:widget id="PageList1" locked="true" title="Page List" type="PageList" visible="true"/>
</body>
</b:template>
</b:theme>
Summary:
If you want me to help with deployment or further customization, just say!