<div class="container-fluid pt-2 pb-2">
    <div class="row">
        <div class="col-md-12">
            <p class="lead text-secondary pt-3"><span class="fw-bold text-success"><?php echo $page->category() ?></span> &nbsp;<?php echo $page->date(); ?></p>
            <h1 class="fw-bold display-3 fw-bold"><?php echo $page->title(); ?></h1>
            <p class="lead text-secondary pt-2"><?php echo (empty($page->description())?'Complete the description of the article for a correct work of the theme':$page->description()) ?></p>
        </div>
    </div>
</div>
<div class="container-fluid pt-3 pb-4">
    <div class="row">
        <div class="col-md-9 pb-5">
            <?php if ($page->coverImage()): ?>
            <img src="<?php echo $page->coverImage(); ?>" class="img-fluid rounded mb-2" alt="<?php echo $page->title(); ?>">
            <?php endif ?>
            <p class="text-muted"><small><?php echo $page->custom('figure'); ?></small></p>
            <div class="row justify-content-md-center pt-3">
            <div class="col-md-10 text-dark">
            <?php echo $page->content(); ?>
            <?php if (!empty($page->tags(true))): ?>
            <div class="pt-3">
                <h5 class="fw-bold pb-2">Related Topic</h5>
                <?php foreach ($page->tags(true) as $tagKey=>$tagName): ?>
                <a class="btn btn-outline-dark mb-2" href="<?php echo DOMAIN_TAGS.$tagKey ?>" role="button"><?php echo $tagName; ?></a> 
                <?php endforeach ?> 
            </div>
            <?php endif; ?>
            <div class="pt-3">
                <!-- Load Bludit Plugins: Page End -->
                <?php Theme::plugins('pageEnd'); ?>
            </div>
        </div>
    </div>
</div>
<!-- Sidebar -->
<div class="col-md-3">
    <h4 class="fw-bold pb-3">MOST READ</h4>
        <!-- post side -->
            <?php
            $listOfKeys = $pages->getList(1, 8);
            if ($listOfKeys) :
            foreach ($listOfKeys as $key) :
            $lPage = new Page($key);
            ?>
            <p class="border-bottom pb-3">
            <a class="fw-bold text-decoration-none text-dark" href="<?php echo $lPage->permalink() ?>"><?php echo $lPage->title() ?></a>
            </p>
            <?php endforeach ?>
            <?php endif ?>
        <!-- post side -->
    </div>
<!--/ Sidebar -->
    </div>
</div>