<% const pathForArchive=typeof archivePath!=='undefined'&&archivePath?archivePath:'/category/'+encodeURIComponent(category.slug||''); %>
<%- include('partials/header',{site,pageTitle:category.name+' | KhaberHindi',pageDescription:category.description||category.name+' की ताज़ा हिंदी खबरें',canonical:(base||'https://khaberhindi.com')+pathForArchive+((typeof pagination!=='undefined'&&pagination.page>1)?'?page='+pagination.page:''),base}) %>
<section class="shell archive-head"><span>KhaberHindi</span><h1><%= category.name %></h1><p><%= category.description||'' %></p></section>
<section class="shell news-grid archive-grid"><% articles.forEach(a=>{ %><article class="news-card reveal"><a href="/news/<%= encodeURIComponent(a.slug) %>"><div class="thumb"><% if(a.image_url){%><img src="<%= a.image_url %>" alt="<%= a.image_alt||a.title %>" loading="lazy"><%}%></div><h3><%= a.title %></h3><time><%= a.published_at?dateIST(a.published_at).toLocaleDateString('hi-IN',{day:'numeric',month:'short',year:'numeric',timeZone:'Asia/Kolkata'}):'' %></time><p><%= a.excerpt||'' %></p></a></article><% }) %></section>
<% if(!articles.length){ %><section class="shell empty"><h2>इस विषय पर अभी कोई प्रकाशित खबर नहीं मिली।</h2><p>नई खबरें प्रकाशित होते ही वे यहां अपने-आप दिखाई देंगी।</p><a class="btn" href="/">होम पर जाएँ</a></section><% } %>
<% if(typeof pagination!=='undefined'&&pagination.total>1){ %><nav class="shell pagination" aria-label="खबरों के पन्ने"><% if(pagination.page>1){ %><a href="<%= pagination.path %>?page=<%= pagination.page-1 %>">← पिछला पन्ना</a><% } %><span><%= pagination.page %> / <%= pagination.total %></span><% if(pagination.page<pagination.total){ %><a href="<%= pagination.path %>?page=<%= pagination.page+1 %>">अगला पन्ना →</a><% } %></nav><% } %>
<%- include('partials/footer' ,{site}) %>
