
PK 
<?php
include './includes/db.php';
$query = "
SELECT blogs.id, blogs.title, blogs.short_description, blogs.image, blogs.read_time, blogs.created_at
FROM blogs
WHERE status='active'
ORDER BY id DESC
";
$result = mysqli_query($conn, $query);
?>
<?php include './includes/header.php' ?>
<style>
.blog-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 30px;
}
.blog-card {
background: #fff;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
transition: 0.3s;
}
.blog-card:hover {
transform: translateY(-8px);
}
.blog-img {
width: 100%;
height: 200px;
object-fit: cover;
}
.card-content {
padding: 20px;
}
.card-content h3 {
margin-bottom: 10px;
font-size: 20px;
}
.card-content p {
color: #555;
font-size: 14px;
margin-bottom: 15px;
}
.btn-secondary {
display: inline-block;
padding: 8px 16px;
background: #ff7a00;
color: #fff;
border-radius: 6px;
text-decoration: none;
font-size: 14px;
}
.btn-secondary:hover {
background: #e66a00;
}
</style>
<div class="container" style="padding: 60px 20px;">
<h1 style="text-align: center; margin-bottom: 40px;">Culture & Blog</h1>
<!-- <div class="blog-grid">
<div class="blog-card">
<img src="https://images.unsplash.com/photo-1609948543911-37f3d2b2c4a4?w=800" class="blog-img" alt="Rath Yatra">
<div class="card-content">
<h3>Rath Yatra: The Chariot Festival</h3>
<p>📅 July 2025 • 5 min read</p>
<p>The grand festival of Lord Jagannath attracts millions of devotees worldwide to Puri every year.</p>
<a href="blog-details.php?id=1" class="btn-secondary">Read More →</a>
</div>
</div>
<div class="blog-card">
<img src="https://images.unsplash.com/photo-1604908554007-0c7d61c98d63?w=800" class="blog-img" alt="Odia Food">
<div class="card-content">
<h3>Odia Cuisine: Must-Try Dishes</h3>
<p>🍛 Food Guide • 4 min read</p>
<p>Explore delicious dishes like Dalma, Pakhala, Chhena Poda and authentic flavors of Odisha.</p>
<a href="blog-details.php?id=2" class="btn-secondary">Read More →</a>
</div>
</div>
<div class="blog-card">
<img src="https://images.unsplash.com/photo-1594737625785-c9bfcf39e48d?w=800" class="blog-img" alt="Gotipua Dance">
<div class="card-content">
<h3>Gotipua Dance: Tradition Preserved</h3>
<p>💃 Culture • 3 min read</p>
<p>The ancient dance form that inspired Odissi, performed by young boys in Odisha.</p>
<a href="blog-details.php?id=3" class="btn-secondary">Read More →</a>
</div>
</div>
</div> -->
<div class="blog-grid">
<?php while($row = mysqli_fetch_assoc($result)) { ?>
<div class="blog-card">
<img src="uploads/<?= $row['image'] ?>" class="blog-img">
<div class="card-content">
<h3><?= $row['title'] ?></h3>
<p>📅 <?= date("F Y", strtotime($row['created_at'])) ?> • <?= $row['read_time'] ?></p>
<p><?= $row['short_description'] ?></p>
<a href="blog-details.php?id=<?= $row['id'] ?>" class="btn-secondary">Read More →</a>
</div>
</div>
<?php } ?>
</div>
</div>
<?php include './includes/footer.php' ?>


PK 99