bludit/bl-themes/alternative/php/home.php

73 lines
2.1 KiB
PHP
Raw Normal View History

2018-01-28 20:06:07 +01:00
<!-- Welcome message -->
<header class="welcome bg-light">
<div class="container text-center">
<!-- Site title -->
2018-03-05 23:46:52 +01:00
<h1><?php echo $site->slogan(); ?></h1>
<!-- Site description -->
<?php if ($site->description()): ?>
2018-03-05 23:46:52 +01:00
<p class="lead"><?php echo $site->description(); ?></p>
<?php endif ?>
</div>
</header>
<!-- Print all the content -->
<?php foreach ($content as $page): ?>
2018-01-28 20:06:07 +01:00
<section class="home-page">
<div class="container">
<div class="row">
<div class="col-lg-8 mx-auto">
2018-01-28 23:33:50 +01:00
<!-- Load Bludit Plugins: Page Begin -->
<?php Theme::plugins('pageBegin'); ?>
<!-- Page title -->
2018-03-05 23:46:52 +01:00
<a class="text-dark" href="<?php echo $page->permalink(); ?>">
<h2 class="title"><?php echo $page->title(); ?></h2>
2018-01-27 20:34:26 +01:00
</a>
2018-01-28 20:06:07 +01:00
<!-- Page content until the pagebreak -->
<div>
2018-03-05 23:46:52 +01:00
<?php echo $page->contentBreak(); ?>
</div>
<!-- Shows "read more" button if necessary -->
<?php if ($page->readMore()): ?>
2018-08-01 22:04:28 +02:00
<div class="text-right pt-3">
<a class="btn btn-primary btn-sm" href="<?php echo $page->permalink(); ?>" role="button"><?php echo $language->get('Read more'); ?></a>
2018-08-01 22:04:28 +02:00
</div>
<?php endif ?>
2018-01-28 23:33:50 +01:00
<!-- Load Bludit Plugins: Page End -->
<?php Theme::plugins('pageEnd'); ?>
</div>
</div>
</div>
</section>
<?php endforeach ?>
<!-- Pagination -->
2018-01-27 20:34:26 +01:00
<?php if (Paginator::amountOfPages()>1): ?>
2018-07-18 23:16:30 +02:00
<nav class="paginator">
<ul class="pagination flex-wrap justify-content-center">
2018-01-27 20:34:26 +01:00
<!-- Previous button -->
<li class="page-item mr-2 <?php if (!Paginator::showPrev()) echo 'disabled' ?>">
<a class="page-link" href="<?php echo Paginator::previousPageUrl() ?>" tabindex="-1">&#9664; <?php echo $language->get('Previous'); ?></a>
</li>
2018-01-27 20:34:26 +01:00
<!-- Home button -->
<?php if (Paginator::currentPage() > 1): ?>
<li class="page-item">
<a class="page-link" href="<?php echo $site->url() ?>">Home</a>
</li>
<?php endif ?>
2018-01-27 20:34:26 +01:00
<!-- Next button -->
<li class="page-item ml-2 <?php if (!Paginator::showNext()) echo 'disabled' ?>">
<a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>"><?php echo $language->get('Next'); ?> &#9658;</a>
</li>
2018-01-27 20:34:26 +01:00
</ul>
</nav>
2018-02-24 22:39:39 +01:00
<?php endif ?>