koblog/bl-themes/bootstrapTheme/php/home.php

118 lines
3.5 KiB
PHP

<header class="p-3">
<div class="container mt-4">
<!-- Site logo -->
<?php if ($site->logo()) : ?>
<div class="site-logo">
<img class="mx-auto d-block" src="<?php $site->logo() ?>" alt="">
</div>
<?php endif ?>
<!-- End Site logo -->
<!-- Site description -->
<?php if ($site->description()) : ?>
<div class="site-description mt-2 text-center font-bold">
<p><strong><?php echo $site->description(); ?></strong></p>
</div>
<?php endif ?>
<!-- End Site description -->
<!-- Site homepage presentation -->
<?php if ($site->homepagePresentation() && ($WHERE_AM_I == 'home')) : ?>
<div class="site-description mt-2 col-lg-8 mx-auto">
<p><?php echo Theme::getHomepagePresentation(); ?></p>
</div>
<?php endif ?>
<!-- End Site homepage presentation -->
</div>
</header>
<!-- Print all the content -->
<section class="mt-4 mb-4">
<div class="container">
<div class="row">
<div class="col-lg-8 mx-auto">
<?php if (Theme::locationTitle()): ?>
<h2><?php echo Theme::locationTitle(); ?></h2>
<?php endif; ?>
<!-- Content not available -->
<?php if (empty($content)) : ?>
<div class="text-center p-4">
<h3><?php $language->p('No pages found') ?></h3>
</div>
<?php endif ?>
<!-- End Content not available -->
<!-- Pages -->
<div class="list-group">
<?php foreach ($content as $pageTmp) : ?>
<div class="list-group-item pt-4 pb-4" aria-current="true">
<div class="d-flex w-100 justify-content-between">
<!-- Page title -->
<a href="<?php echo $pageTmp->permalink() ?>">
<h5 class="mb-1"><?php echo $pageTmp->title() ?></h5>
</a>
<!-- End Page title -->
<!-- Page date -->
<!-- This block is not visible on small devices -->
<div class="d-none d-sm-block">
<?php if ($themePlugin->dateFormat() == 'relative') : ?>
<small class="color-blue"><?php echo $pageTmp->relativeTime() ?></small>
<?php else : ?>
<small class="color-blue"><?php echo $pageTmp->date() ?></small>
<?php endif ?>
</div>
<!-- End Page date -->
</div>
<!-- Page date -->
<!-- This block is only visible on small devices -->
<div class="d-block d-sm-none">
<?php if ($themePlugin->dateFormat() == 'relative') : ?>
<small class="color-blue"><?php echo $pageTmp->relativeTime() ?></small>
<?php else : ?>
<small class="color-blue"><?php echo $pageTmp->date() ?></small>
<?php endif ?>
</div>
<!-- End Page date -->
<!-- Page description -->
<?php if ($pageTmp->description()) : ?>
<p class="mb-1 form-text"><?php echo $pageTmp->description(); ?></p>
<?php endif ?>
<!-- End Page description -->
<!-- Page tags -->
<?php
if ($themePlugin->showTags()) {
$tagsList = $pageTmp->tags(true);
if (!empty($tagsList)) {
foreach ($tagsList as $tagKey => $tagName) {
echo '<a class="badge btn btn-primary rounded-pill me-2" href="' . DOMAIN_TAGS . $tagKey . '">' . $tagName . '</a>';
}
}
}
?>
<!-- End Page tags -->
</div>
<?php endforeach ?>
</div>
<!-- End Pages -->
<!-- Pagination -->
<div class="mt-2">
<?php echo Paginator::bootstrap_numberedPageHTML("justify-content-end"); ?>
</div>
<!-- End Pagination -->
</div>
</div>
</div>
</section>
<!-- End Print all the content -->