BLACKSITE
:
216.73.216.140
:
199.188.200.160 / jeddahhousingltd.com
:
Linux server383.web-hosting.com 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64
:
/
home
/
jeddveug
/
www
/
Upload File:
files >> /home/jeddveug/www/blog.php
<?php $page_title = 'Blog | Latest News & Updates'; $meta_description = 'Read the latest news, updates, and insights from Jeddah Housing Ltd. about real estate, investment tips, and Jeddah City project developments.'; require_once 'includes/header.php'; $blogs = $pdo->query("SELECT * FROM blogs WHERE status = 'publish' ORDER BY publish_date DESC")->fetchAll(); ?> <!-- Page Header --> <div class="hero-gradient pt-24 pb-16"> <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center"> <p class="text-gold-400 font-semibold text-sm tracking-widest uppercase mb-3">Our News</p> <h1 class="text-3xl md:text-4xl font-bold text-white mb-4">Latest News & Updates</h1> <p class="text-primary-200 max-w-xl mx-auto">Stay updated with the latest news, insights, and developments from Jeddah Housing Ltd.</p> </div> </div> <section class="py-16 bg-gray-50"> <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> <?php if (empty($blogs)): ?> <div class="text-center py-20"> <i class="fas fa-newspaper text-gray-300 text-5xl mb-4 block"></i> <h3 class="text-xl font-semibold text-gray-400 mb-2">No blog posts yet</h3> <p class="text-gray-400 text-sm">Check back soon for updates!</p> </div> <?php else: ?> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"> <?php foreach ($blogs as $blog): ?> <a href="<?= baseUrl('blog_details.php?slug=' . htmlspecialchars($blog['slug'])) ?>" class="card-hover bg-white rounded-2xl overflow-hidden shadow-sm group"> <?php if ($blog['image']): ?> <div class="overflow-hidden"> <img src="<?= baseUrl('uploads/blogs/' . htmlspecialchars($blog['image'])) ?>" class="w-full h-52 object-cover group-hover:scale-110 transition-transform duration-500" alt="<?= htmlspecialchars($blog['title']) ?>"> </div> <?php else: ?> <div class="w-full h-52 bg-gradient-to-br from-primary-600 to-primary-800 flex items-center justify-center"> <i class="fas fa-newspaper text-white/30 text-5xl"></i> </div> <?php endif; ?> <div class="p-6"> <div class="flex items-center text-xs text-gray-400 mb-3 space-x-3"> <span><i class="fas fa-calendar mr-1"></i><?= $blog['publish_date'] ? date('M j, Y', strtotime($blog['publish_date'])) : 'N/A' ?></span> <span><i class="fas fa-user mr-1"></i><?= htmlspecialchars($blog['author']) ?></span> </div> <h3 class="font-bold text-lg text-gray-800 mb-3 group-hover:text-primary-700 transition-colors line-clamp-2"><?= htmlspecialchars($blog['title']) ?></h3> <p class="text-gray-500 text-sm line-clamp-3"><?= htmlspecialchars(substr(strip_tags($blog['content']), 0, 150)) ?>...</p> <span class="inline-block mt-4 text-gold-400 font-semibold text-sm group-hover:translate-x-1 transition-transform">Read More →</span> </div> </a> <?php endforeach; ?> </div> <?php endif; ?> </div> </section> <?php require_once 'includes/footer.php'; ?>