


<main class="main">
    <div class="page-header text-center" style="background-image: url('/public/front/assets/images/page-header-bg.jpg')">
        <div class="container">
            <h1 class="page-title"><?php if(isset($blog[0]->theTitle)){ if($blog[0]->theTitle) { echo $blog[0]->theTitle; } } ?><span><?= $this->Get_Lang->gl("blog", $langId) ?></span></h1>
        </div><!-- End .container -->
    </div><!-- End .page-header -->
    <nav aria-label="breadcrumb" class="breadcrumb-nav mb-3">
        <div class="container">
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="/"><?= $this->Get_Lang->gl("home_Page", $langId) ?></a></li>
                <li class="breadcrumb-item"><a href="/blog"><?= $this->Get_Lang->gl("blog", $langId) ?></a></li>
                <li class="breadcrumb-item active" aria-current="page"><?php if(isset($blog[0]->theTitle)){ if($blog[0]->theTitle) { echo $blog[0]->theTitle; } } ?></li>
            </ol>
        </div><!-- End .container -->
    </nav><!-- End .breadcrumb-nav -->

    <div class="page-content">
        <div class="container">
            <div class="row">
                <div class="col-lg-9">
                    <article class="entry single-entry">
                        <figure class="entry-media">
                            <img src="/public/front/assets/images/blog/single/1.jpg" alt="image desc">
                        </figure><!-- End .entry-media -->

                        <div class="entry-body">
                            <div class="entry-meta">    
                                <span class="meta-separator">|</span>                                
                                <a href="javascript:;"><?php if(isset($blog[0]->dateTime)){ if($blog[0]->dateTime) { echo Date("d/m/Y", strtotime($blog[0]->dateTime)); } } ?></a>
                            </div>

                            <h2 class="entry-title">
                               <?php if(isset($blog[0]->theTitle)){ if($blog[0]->theTitle) { echo $blog[0]->theTitle; } } ?>
                            </h2>

                            <div class="entry-cats">
                                #_<a href="javascript:;"><?php if(isset($blogCategories[0]->theTitle)){ if($blogCategories[0]->theTitle) { echo $blogCategories[0]->theTitle; } } ?></a>
                            </div>

                            <div class="entry-content editor-content">
                                <p><?php if(isset($blog[0]->theText)){ if($blog[0]->theText) { echo $blog[0]->theText; } } ?></p>

                                
                            </div><!-- End .entry-content -->

                            <div class="entry-footer row no-gutters flex-column flex-md-row">
<!--                                <div class="col-md">
                                    <div class="entry-tags">
                                        <span><?= $this->Get_Lang->gl("tags", $langId) ?>:</span> <a href="#">photography</a> <a href="#">style</a>
                                    </div>
                                </div>-->

                                <div class="col-md-auto mt-2 mt-md-0">
                                    <div class="social-icons social-icons-color">
                                        <span class="social-label"><?= $this->Get_Lang->gl("Share_this_post", $langId) ?>:</span>
                                        <a href="javascript:;" class="social-icon social-facebook" title="Facebook" target="_blank"><i class="icon-facebook-f"></i></a>
                                        <a href="javascript:;" class="social-icon social-twitter" title="Twitter" target="_blank"><i class="icon-twitter"></i></a>
                                        <a href="javascript:;" class="social-icon social-pinterest" title="Pinterest" target="_blank"><i class="icon-pinterest"></i></a>
                                        <a href="javascript:;" class="social-icon social-linkedin" title="Linkedin" target="_blank"><i class="icon-linkedin"></i></a>
                                    </div>
                                </div>
                            </div>
                        </div><!-- End .entry-body -->

<!--                        <div class="entry-author-details">
                            <figure class="author-media">
                                <a href="#">
                                    <img src="/public/front/assets/images/blog/single/author.jpg" alt="User name">
                                </a>
                            </figure> End .author-media 

                            <div class="author-body">
                                <div class="author-header row no-gutters flex-column flex-md-row">
                                    <div class="col">
                                        <h4><a href="#">John Doe</a></h4>
                                    </div> End .col 
                                    <div class="col-auto mt-1 mt-md-0">
                                        <a href="#" class="author-link">View all posts by John Doe <i class="icon-long-arrow-right"></i></a>
                                    </div> End .col 
                                </div> End .row 

                                <div class="author-content">
                                    <p>Praesent dapibus, neque id cursus faucibus, tortor neque egestas auguae, eu vulputate magna eros eu erat. Aliquam erat volutpat. </p>
                                </div>
                            </div>
                        </div>-->
                    </article><!-- End .entry -->

<!--                    <nav class="pager-nav" aria-label="Page navigation">
                        <a class="pager-link pager-link-prev" href="#" aria-label="Previous" tabindex="-1">
                            <?= $this->Get_Lang->gl("Previous_Post", $langId) ?>
                            <span class="pager-link-title">Cras iaculis ultricies nulla</span>
                        </a>

                        <a class="pager-link pager-link-next" href="#" aria-label="Next" tabindex="-1">
                            <?= $this->Get_Lang->gl("Next_Post", $langId) ?>
                            <span class="pager-link-title">Praesent placerat risus</span>
                        </a>
                    </nav>-->
                    <?php if($otherBlog) { ?>
                    <div class="related-posts">
                        <h3 class="title"><?= $this->Get_Lang->gl("Latest_articles", $langId) ?></h3>

                        <div class="owl-carousel owl-simple" data-toggle="owl" 
                             data-owl-options='{
                             "nav": false, 
                             "dots": true,
                             "margin": 20,
                             "loop": false,
                             "responsive": {
                             "0": {
                             "items":1
                             },
                             "480": {
                             "items":2
                             },
                             "768": {
                             "items":3
                             }
                             }
                             }'>
                            <?php foreach ($otherBlog as $key => $value) { 
                                $links = $this->db->query("SELECT url FROM links WHERE page = 'blog' AND content_id = '$value->blId'")->result_object();
                                if($links){$link = '/'.$links[0]->url;}else{$link = "javascript:;";} ?>  
                            <article class="entry entry-grid">
                                <figure class="entry-media">
                                    <a href="<?=$link?>">
                                        <img src="<?=$value->thePhoto?>" alt="<?=$value->theTitle?>">
                                    </a>
                                </figure>

                                <div class="entry-body">
                                    <div class="entry-meta">
                                        <span class="meta-separator">|</span>                                        
                                        <a href="<?=$link?>"><?php if(isset($value->dateTime)){ if($value->dateTime) { echo Date("d/m/Y", strtotime($value->dateTime)); } } ?></a>
                                    </div>

                                    <h2 class="entry-title">
                                        <a href="<?=$link?>"><?=$value->theTitle?></a>
                                    </h2>
                                    
                                    <div class="entry-cats">
                                        #_<a href="<?=$link?>"><?=$value->theTitles?></a>
                                    </div>
                                </div>
                            </article>

                            <?php } ?>
                        </div>
                    </div>
                    <?php } ?>

<!--                    <div class="comments">
                        <h3 class="title">3 <?= $this->Get_Lang->gl("Comments", $langId) ?></h3> End .title 

                        <ul>
                            <li>
                                <div class="comment">
                                    <figure class="comment-media">
                                        <a href="#">
                                            <img src="/public/front/assets/images/blog/comments/1.jpg" alt="User name">
                                        </a>
                                    </figure>

                                    <div class="comment-body">
                                        <a href="#" class="comment-reply"><?= $this->Get_Lang->gl("Reply", $langId) ?></a>
                                        <div class="comment-user">
                                            <h4><a href="#">Jimmy Pearson</a></h4>
                                            <span class="comment-date">November 9, 2018 at 2:19 pm</span>
                                        </div> End .comment-user 

                                        <div class="comment-content">
                                            <p>Sed pretium, ligula sollicitudin laoreet viverra, tortor libero sodales leo, eget blandit nunc tortor eu nibh. Nullam mollis. Ut justo. Suspendisse potenti. </p>
                                        </div> End .comment-content 
                                    </div> End .comment-body 
                                </div> End .comment 

                                <ul>
                                    <li>
                                        <div class="comment">
                                            <figure class="comment-media">
                                                <a href="#">
                                                    <img src="/public/front/assets/images/blog/comments/2.jpg" alt="User name">
                                                </a>
                                            </figure>

                                            <div class="comment-body">
                                                <a href="#" class="comment-reply"><?= $this->Get_Lang->gl("Reply", $langId) ?></a>
                                                <div class="comment-user">
                                                    <h4><a href="#">Lena  Knight</a></h4>
                                                    <span class="comment-date">November 9, 2018 at 2:19 pm</span>
                                                </div> End .comment-user 

                                                <div class="comment-content">
                                                    <p>Morbi interdum mollis sapien. Sed ac risus.</p>
                                                </div> End .comment-content 
                                            </div> End .comment-body 
                                        </div> End .comment 
                                    </li>
                                </ul>
                            </li>

                            <li>
                                <div class="comment">
                                    <figure class="comment-media">
                                        <a href="#">
                                            <img src="/public/front/assets/images/blog/comments/3.jpg" alt="User name">
                                        </a>
                                    </figure>

                                    <div class="comment-body">
                                        <a href="#" class="comment-reply"><?= $this->Get_Lang->gl("Reply", $langId) ?></a>
                                        <div class="comment-user">
                                            <h4><a href="#">Johnathan Castillo</a></h4>
                                            <span class="comment-date">November 9, 2018 at 2:19 pm</span>
                                        </div> End .comment-user 

                                        <div class="comment-content">
                                            <p>Vestibulum volutpat, lacus a ultrices sagittis, mi neque euismod dui, eu pulvinar nunc sapien ornare nisl. Phasellus pede arcu, dapibus eu, fermentum et, dapibus sed, urna.</p>
                                        </div> End .comment-content 
                                    </div> End .comment-body 
                                </div> End .comment 
                            </li>
                        </ul>
                    </div>
                    <div class="reply">
                        <div class="heading">
                            <h3 class="title"><?= $this->Get_Lang->gl("Leave_A_Reply", $langId) ?></h3> End .title 
                            <p class="title-desc"><?= $this->Get_Lang->gl("Your_email_address_will_not_be_published", $langId) ?> *</p>
                        </div> End .heading 

                        <form action="#">
                            <label for="reply-message" class="sr-only"><?= $this->Get_Lang->gl("Comment", $langId) ?></label>
                            <textarea name="reply-message" id="reply-message" cols="30" rows="4" class="form-control" required placeholder="<?= $this->Get_Lang->gl("Comment", $langId) ?> *"></textarea>

                            <div class="row">
                                <div class="col-md-6">
                                    <label for="reply-name" class="sr-only"><?= $this->Get_Lang->gl("name", $langId) ?></label>
                                    <input type="text" class="form-control" id="reply-name" name="reply-name" required placeholder="<?= $this->Get_Lang->gl("name", $langId) ?> *">
                                </div> End .col-md-6 

                                <div class="col-md-6">
                                    <label for="reply-email" class="sr-only"><?= $this->Get_Lang->gl("email_address", $langId) ?></label>
                                    <input type="email" class="form-control" id="reply-email" name="reply-email" required placeholder="<?= $this->Get_Lang->gl("email_address", $langId) ?> *">
                                </div> End .col-md-6 
                            </div> End .row 

                            <button type="submit" class="btn btn-outline-primary-2">
                                <span><?= $this->Get_Lang->gl("POST_COMMENT", $langId) ?></span>
                                <i class="icon-long-arrow-right"></i>
                            </button>
                        </form>
                    </div>-->
                </div>

                <aside class="col-lg-3">
                    <div class="sidebar">
<!--                        <div class="widget widget-search">
                            <h3 class="widget-title"><?= $this->Get_Lang->gl("search", $langId) ?></h3> End .widget-title 

                            <form action="#">
                                <label for="ws" class="sr-only"><?= $this->Get_Lang->gl("Search_in_blog", $langId) ?></label>
                                <input type="search" class="form-control" name="ws" id="ws" placeholder="<?= $this->Get_Lang->gl("Search_in_blog", $langId) ?>" required>
                                <button type="submit" class="btn"><i class="icon-search"></i><span class="sr-only"><?= $this->Get_Lang->gl("search", $langId) ?></span></button>
                            </form>
                        </div>

                        <div class="widget widget-cats">
                            <h3 class="widget-title"><?= $this->Get_Lang->gl("categories", $langId) ?></h3> End .widget-title 

                            <ul>
                                <li><a href="#">Lifestyle<span>3</span></a></li>
                                <li><a href="#">Shopping<span>3</span></a></li>
                                <li><a href="#">Fashion<span>1</span></a></li>
                                <li><a href="#">Travel<span>3</span></a></li>
                                <li><a href="#">Hobbies<span>2</span></a></li>
                            </ul>
                        </div>-->

                        <div class="widget">
                            <?php if($sameBlog) { ?>
                            <h3 class="widget-title"><?= $this->Get_Lang->gl("Related_Posts", $langId) ?> : </h3><!-- End .widget-title -->

                            <ul class="posts-list">
                                <?php foreach ($sameBlog as $key => $value) { 
                                    $links = $this->db->query("SELECT url FROM links WHERE page = 'blog' AND content_id = '$value->blId'")->result_object();
                                if($links){$link = '/'.$links[0]->url;}else{$link = "javascript:;";} ?>  
                                <li>
                                    <figure>
                                        <a href="<?=$link?>">
                                            <img src="<?=$value->thePhoto?>" alt="<?=$value->theTitle?>">
                                        </a>
                                    </figure>

                                    <div>
                                        <span><?php if(isset($value->dateTime)){ if($value->dateTime) { echo Date("d/m/Y", strtotime($value->dateTime)); } } ?></span>
                                        <h4><a href="<?=$link?>"><?=$value->theTitle?></a></h4>
                                    </div>
                                </li>
                                <?php } ?>
                            </ul>
                            <?php } ?>
                        </div>

<!--                        <div class="widget widget-banner-sidebar">
                            <div class="banner-sidebar-title">ad box 280 x 280</div> End .ad-title 

                            <div class="banner-sidebar">
                                <a href="#">
                                    <img src="/public/front/assets/images/blog/sidebar/banner.jpg" alt="banner">
                                </a>
                            </div> End .banner-ad 
                        </div>

                        <div class="widget">
                            <h3 class="widget-title"><?= $this->Get_Lang->gl("Browse_Tags", $langId) ?></h3> End .widget-title 

                            <div class="tagcloud">
                                <a href="#">fashion</a>
                                <a href="#">style</a>
                                <a href="#">women</a>
                                <a href="#">photography</a>
                                <a href="#">travel</a>
                                <a href="#">shopping</a>
                                <a href="#">hobbies</a>
                            </div> End .tagcloud 
                        </div>

                        <div class="widget widget-text">
                            <h3 class="widget-title"><?= $this->Get_Lang->gl("About_Blog", $langId) ?></h3> End .widget-title 

                            <div class="widget-text-content">
                                <p>Vestibulum volutpat, lacus a ultrices sagittis, mi neque euismod dui, pulvinar nunc sapien ornare nisl.</p>
                            </div> End .widget-text-content 
                        </div>-->
                    </div>
                </aside><!-- End .col-lg-3 -->
            </div><!-- End .row -->
        </div><!-- End .container -->
    </div><!-- End .page-content -->
</main><!-- End .main -->