<?php if ($page->coverImage()): ?>
    <div class="bg-dark text-secondary px-3 py-5 border-start border-info border-5" style="background-image: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%,rgba(0,0,0,0.8) 100%), url(<?php echo $page->coverImage(); ?>);background-size: cover;background-repeat:none;background-position: center;">
<?php endif ?>
    <div class="py-5">
        <div class="container">
          <div class="row">
            <div class="col-md-7 align-self-bottom">
            <h2 class="display-3 text-white py-2 fw-bold"><?php echo $page->title(); ?></h2>
             <p><span class="text-white"><?php echo $page->date(); ?>&nbsp;&nbsp;&#183;&nbsp;&nbsp;<?php echo $L->get('Reading time') . ': ' . $page->readingTime(); ?>&nbsp;&nbsp;&#183;&nbsp;&nbsp;<a class="btn rounded-pill btn-info text-white" href="" role="button" style="font-size: 13px;"><?php echo $page->category() ?></a></span></p>
             <p class="text-light pt-2"><i class="fa-solid fa-image text-warning"></i>&nbsp; <small>Image source by <?php echo $page->custom('figure'); ?></small></p>
          </div>
          </div>
        </div>
    </div>
</div>
<div class="container-fluid">
  <div class="row justify-content-md-center">
    <div class="col-md-8 mt-5 p-3 text-dark" style="font-size:20px;">
      <?php Theme::plugins('pageBegin'); ?>
      <?php echo $page->content(); ?>
      <p class="pt-4">
          <!-- Addthis -->
      </p>
    </div>
  </div>
</div>
<div class="container-fluid mb-4">
  <div class="row justify-content-md-center">
    <div class="col-md-8 mt-2 p-3 text-secondary">
      <div class="row">
      <div class="col-md-6">
        <p class="fw-light">
          <span class="text-dark fw-bold ms-2">Related Topic</span><br>
          <p>
            <?php if (!empty($page->tags(true))): ?>
                <?php foreach ($page->tags(true) as $tagKey=>$tagName): ?>
                    <a class="bbtn btn-light rounded-pill btn-sm mt-2 mb-2 me-2 text-decoration-none" href="<?php echo DOMAIN_TAGS.$tagKey ?>" role="button"><i class="fa-solid fa-hashtag text-info"></i> <?php echo $tagName; ?></a>
                <?php endforeach ?>
            <?php endif; ?>
        </p>
      </div>
      <div class="col-md-6">
        <div class="d-flex align-items-center ">
          <div class="flex-shrink-0">
            <img src="<?php echo ($page->user('profilePicture')?$page->user('profilePicture'):Theme::src('img/noimage.png')) ?>" alt="..." width="80">
          </div>
          <div class="flex-grow-1 ms-3">
            <small><span class="text-info fw-bold"><?php echo $page->user('nickname'); ?></span><br>
            <span class="fw-light text-secondary"><?php echo $page->user('firstname'); ?></span></small>
          </div>
          </div>
        </div>
      </div>
    </div>
    </div>
  </div>
</div>

