<?php

include('include/main.inc.php');

$res_web = $dbconn->query("Select * from admin_details where slno = '1'");
$web_details = $res_web->fetch_assoc();

$page_metatitle = $web_details['companyName'].' - Blogs';
$page_metadesc = $web_details['companyName'].' - Blogs';
$page_metakey = $web_details['companyName'].' - Blogs';

?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title><?= $page_metatitle; ?></title>
    <meta name="description" content="<?= $page_metadesc; ?>">
    <meta name="keywords" content="<?= $page_metakey; ?>">
    <?php include "app_top.php"; ?>
</head>

<body>

    <?php include "app_header.php"; ?>

    <section class="heading_banner" style="background-image: url(<?= site_url; ?>/designer/images/blog-banner.webp)">
        <div class="container">
            <div class="row">
                <div class="col-xxl-12 col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 text-center">
                    <h1 class="cat_title">Our Blogs</h1>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
    </section>

    <div class="inner_breadcrumb hidden_xs">
        <div class="container">
            <div class="row">
                <div class="col-xxl-12 col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                    <ul class="breadcrumb">
                        <li><a href="<?= site_url; ?>" title="Home">Home</a></li>
                        <li class="active">Our Blogs</li>
                    </ul>
                </div>
            </div>
        </div>
    </div>


    <section class="blog_page">
        <div class="container">
            <div class="title">Our Blogs</div>
            <p class="text-center mx-auto mb-3 w-75">
            Stay updated with the latest trends and tips in the world of jewelry. Explore insightful articles on choosing the perfect engagement ring, caring for your precious pieces, and styling statement accessories. From the significance of birthstones to the art of layering necklaces, these blogs offer inspiration and guidance for every jewelry lover's journey.
            </p>
            <div class="clearfix"></div>
            <div class="row">
                <?php
                    $res_blog = $dbconn->query("select catImage,blogDname,catName,blogDate,catDesc from blog_tbl order by catID desc");
                    if($res_blog->num_rows > 0){
                        $sno = 0;
                        while($blogs = $res_blog->fetch_assoc()){
                        $blog_href = str_ireplace(" ", "-", $blogs['catName']);
                        $sno++;
                ?>
                <div class="col-xxl-4 col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
                    <div class="home_blog">
                        <div class="image">
                            <a href="<?= site_url; ?>/blog/<?= strtolower($blog_href); ?>.htm"
                                title="<?= $blogs['blogDname']; ?>">
                                <img src="<?= site_url; ?>/uploaded-files/blog/images/<?= $blogs['catImage']; ?>"
                                    alt="<?= $blogs['blogDname']; ?>" title="<?= $blogs['blogDname']; ?>">
                            </a>
                        </div>

                        <h2 class="mb-1"><a href="<?= site_url; ?>/blog/<?= strtolower($blog_href); ?>.htm"
                                title="<?= $blogs['blogDname']; ?>"><?= $blogs['blogDname']; ?></a></h2>
                        <p><?= substr_replace($blogs['catDesc'], '...', '150'); ?></p>
                    </div>
                </div>
                <?php } } ?>

            </div>


        </div>
    </section>

    <?php include "app_footer.php"; ?>
    <?php include "app_bottom.php"; ?>
</body>

</html>