

<?php include('include/head.php'); ?>



<body>
    <!-- Spinner Start -->
    <div id="spinner" class="show bg-white position-fixed translate-middle w-100 vh-100 top-50 start-50 d-flex align-items-center justify-content-center">
        <div class="spinner-border text-primary" style="width: 3rem; height: 3rem;" role="status">
            <span class="sr-only">Loading...</span>
        </div>
    </div>
    <!-- Spinner End -->


    <?php include('include/header.php'); ?> 


    <!-- Header Start -->
     <div class="container-fluid bg-primary page-header">
        <div class="container-fluid">
            <div class="row justify-content-center">
                <div class="col-lg-10">
                    <h1 class=" text-white animated slideInDown">Our Blog</h1>
                    <!--<nav aria-label="breadcrumb">-->
                    <!--    <ol class="breadcrumb justify-content-center">-->
                    <!--        <li class="breadcrumb-item"><a class="text-white" href="#">Home</a></li>-->
                    <!--        <li class="breadcrumb-item"><a class="text-white" href="#">Pages</a></li>-->
                    <!--        <li class="breadcrumb-item text-white active" aria-current="page">About</li>-->
                    <!--    </ol>-->
                    <!--</nav>-->
                </div>
            </div>
        </div>
    </div>
    <!-- Header End -->


    <!-- ===== blog section start ==== -->
    <section class="final-blog">
        <div class="text-center">
            <!-- <h6 class="section-title bg-white text-center text-primary px-3">Blogs</h6> -->
            <h1 class=" new-font mb-5">  Our <span style="color: #78c043;">  Blog  </span></h1>
        </div>
        <div class="wrapper">
            <?php   
$statement = $pdo->prepare("SELECT id,name,banner,created_at,short_description,slug FROM blogs");
$statement->execute();
$result = $statement->fetchAll(PDO::FETCH_ASSOC);
foreach ($result as $row) {
?>
            <div class="card">
                <a href="<?php path(); ?>blogs/<?php echo $row['slug']  ?>">
                <div class="card-banner">
                    <p class="category-tag popular"><?php echo $row['name']; ?></p>
                    <img class="banner-img" src="<?php path(); ?>admin//img/blogs/<?php echo $row['banner']; ?>" alt=''>
                </div>
                <div class="card-body">
                    <p class="blog-hashtag"><?php echo $row['created_at']; ?></p>
                    <!--<h5 class="blog-title">Lorem ipsum dolor sit amet</h5>-->
                    <p class="blog-description para"><?php echo $row['short_description']; ?></p>

                    <div class="btn-box text-center">
                        <a class="btn btn-primary py-3 px-5 mt-2" href="<?php path(); ?>blogs/<?php echo $row['slug']  ?>">Read More</a>
                    </div>
                </div>
                </a>
            </div>
<?php } ?>
            <!--<div class="card">-->
            <!--    <div class="card-banner">-->
            <!--        <p class="category-tag technology">Coworking</p>-->
            <!--        <img class="banner-img" src='img/icon/meeting-rooms-1.jpg' alt=''>-->
            <!--    </div>-->
            <!--    <div class="card-body">-->
            <!--        <p class="blog-hashtag">06-06-2024</p>-->
            <!--        <h5 class="blog-title">Lorem ipsum dolor sit amet</h5>-->
            <!--        <p class="blog-description">Looking to upgrade your gear? Here is the list of the best photography-->
            <!--            tools-->
            <!--        </p>-->
            <!--        <div class="btn-box text-center">-->
            <!--            <a class="btn btn-primary py-3 px-5 mt-2" href="">Read More</a>-->
            <!--        </div>-->

            <!--    </div>-->
            <!--</div>-->

            <!--<div class="card">-->
            <!--    <div class="card-banner">-->
            <!--        <p class="category-tag psychology">Coworking</p>-->
            <!--        <img class="banner-img" src='img/icon/private-cabin.jpg' alt=''>-->
            <!--    </div>-->
            <!--    <div class="card-body">-->
            <!--        <p class="blog-hashtag">06-06-2024</p>-->
            <!--        <h5 class="blog-title">Lorem ipsum dolor sit amet </h5>-->
            <!--        <p class="blog-description">Mediation has transformed my life. These are the best practices to get-->
            <!--            into-->
            <!--            the habit</p>-->
            <!--        <div class="btn-box text-center">-->
            <!--            <a class="btn btn-primary py-3 px-5 mt-2" href="">Read More</a>-->
            <!--        </div>-->

            <!--    </div>-->
            <!--</div>-->

        </div>
    </section>
    <!-- ==== blog section end ==== -->


    
    <?php include('include/footer.php'); ?> 


</body>

</html>