 
<?php
use Source\Helpers\Check;
use Source\System\systen;

if ($seo->getData()):
    extract($seo->getData());
    $cover_capa = Check::CheckPhoto($post_cover, DIR_UPLOADS, true, 300, 300);
    ?>
    <div class="offcanvas-overlay"></div>
    <!-- Breadcrumb Area Start -->
    <div class="breadcrumb-area">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <div class="breadcrumb-content">
                        <ul class="nav">
                            <li><a href="<?=SITE?>"><i class="icon-home"></i></a></li>
                            <li><a href="<?=SITE?><?=$page_name?>"><?=$page_title?></a></li>
                            <li><?= $post_title ?></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Breadcrumb Area End-->
    <!-- Shop Category Area End -->
    <div class="shop-category-area single-blog-page mtb-60px">
        <div class="container">
            <div class="row justify-content-center">
                <div class="col-lg-9 col-md-12">
                    <div class="blog-posts ">
                        <div class="single-blog-post blog-grid-post">
                            <div class="blog-post-media">
                                <div class="blog-image single-blog">
                                    <img src="<?= $cover_capa ?>" alt="<?= $post_title ?>" />
                                </div>
                            </div>
                            <div class="blog-post-content-inner mt-30px">
                                <h4 class="blog-title"><?= $post_title ?></h4>
                                <ul class="blog-page-meta">
<!--                                    <li>
                                        <a href="#"><i class="ion-person"></i> Admin</a>
                                    </li>-->
                                    <li>
                                        <a href="#"><i class="ion-calendar"></i> <?= systen::getData($post_date, "l d,F  Y", true) ?></a>
                                    </li>
                                </ul>                               
                            </div>
                            <div class="single-post-content">
                                <?= $post_content ?>
                            </div>
                        </div>
                        <!-- single blog post -->
                    </div>
                    <div class="blog-single-tags-share d-sm-flex justify-content-between">

                        <div class="blog-single-share d-flex">
                            <span class="title">Compartilhe: </span> 
                               <?php require_once 'plugins/shared/socialshared.php'; ?>
                        </div>
                    </div>
                    <div class="blog-related-post">
                        <div class="row">
                            <div class="col-md-12 text-center">
                                <!-- Section Title -->
                                <div class="section-title underline-shape">
                                    <h2>Outras publicações</h2>
                                </div>
                                <!-- Section Title -->
                            </div>
                        </div>
                        <div class="row">
                               <?php
                        $Read->ExeRead(DB_POST, "WHERE POST_TYPE='blog' AND POST_STATUS=1 ORDER BY POST_DATE DESC LIMIT 3");
                        if ($Read->getResult()):
                            foreach ($Read->getResult() as $mais):
                                extract($mais);
                                $cover_capa = Check::CheckPhoto($post_cover, DIR_UPLOADS, true, 420, 280);
                                $categoria = systen::ReadFlash(DB_CATEGORY, "WHERE category_id='{$post_category}'", 'category_title');
                                $post_link = SITE . "posts/" . $post_name;
                                ?>

                                <div class="col-md-4 mb-res-sm-30px">
                                    <div class="single-blog-post mb-30px blog-grid-post">
                                        <div class="blog-post-media">
                                            <div class="blog-image">
                                                <a href="<?= $post_link ?>"><img src="<?= $cover_capa ?>" alt="<?= $post_title ?>" class="img-responsive" /></a>
                                            </div>
                                        </div>
                                        <div class="blog-post-content-inner mt-30px">
                                            <h4 class="blog-title"><a href="<?= $post_link ?>"><?= $post_title ?></a></h4>
                                            <ul class="blog-page-meta">

                                                <li>
                                                    <a href="#"><i class="ion-calendar"></i> <?= systen::getData($post_date, "l d,F  Y", true) ?></a>
                                                </li>
                                            </ul>
                                            <p>
                                                <?= Check::Words($post_content, 25, '') ?>
                                            </p>
                                            <a class="read-more-btn" href="<?= $post_link ?>"> Mais... <i class="ion-android-arrow-dropright-circle"></i></a>
                                        </div>
                                    </div>
                                    <!-- single blog post -->
                                </div>
                                <?php
                            endforeach;
                        endif;
                        ?> 
                        
                        </div>
                    </div>
                    <div class="comment-area">
                        <h2 class="comment-heading">Comentários</h2>
                        <div class="review-wrapper">
                            <div class="fb-comment-embed" data-href="<?= SITE ?>posts/<?= $post_name ?>" data-include-parent="false" data-width=""></div>
                        </div>
                    </div>

                </div>
               
            </div>
        </div>
    </div>
    <!-- Shop Category Area End -->
    <?php
//    require_once ('_cdn/widget/Analytic/ShareBox.widget.php');

endif;
?>


