alternative theme improves
This commit is contained in:
parent
6b827a7c8e
commit
05d916e333
|
@ -216,7 +216,7 @@ function buildStaticPages() {
|
|||
global $dbPages;
|
||||
|
||||
$tmp = array();
|
||||
$staticPages = $dbPages->getStaticDB($onlyKeys=true);
|
||||
$staticPages = $dbPages->getStaticDB();
|
||||
foreach ($staticPages as $pageKey) {
|
||||
$staticPage = buildPage($pageKey);
|
||||
array_push($tmp, $staticPage);
|
||||
|
|
|
@ -30,6 +30,11 @@ class Paginator {
|
|||
return self::get('amountOfPages');
|
||||
}
|
||||
|
||||
public static function currentPage()
|
||||
{
|
||||
return self::get('currentPage');
|
||||
}
|
||||
|
||||
public static function nextPage()
|
||||
{
|
||||
return self::get('nextPage');
|
||||
|
|
|
@ -32,6 +32,10 @@ section.page:nth-child(even) {
|
|||
background: #FAFAFA;
|
||||
}
|
||||
|
||||
a.page-title {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.page-description {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 300;
|
||||
|
@ -40,3 +44,8 @@ section.page:nth-child(even) {
|
|||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
font-size: 0.8em;
|
||||
text-transform: uppercase;
|
||||
}
|
|
@ -1,32 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<?php include(THEME_DIR_PHP.'head.php') ?>
|
||||
</head>
|
||||
|
||||
<body id="page-top">
|
||||
|
||||
<!-- Navigation -->
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="#">
|
||||
<span class="text-white">BLUDIT</span>
|
||||
<span class="ml-1 text-muted">Surprise</span>
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarResponsive">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item"><a class="nav-link" href="#">About</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#">Contact</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#">Impressum</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#">BLUDIT PRO</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<!-- Navbar -->
|
||||
<?php
|
||||
include(THEME_DIR_PHP.'navbar.php');
|
||||
?>
|
||||
|
||||
<!-- Content -->
|
||||
<?php
|
||||
|
|
|
@ -18,7 +18,9 @@
|
|||
<div class="row">
|
||||
<div class="col-lg-8 mx-auto">
|
||||
<!-- Page title -->
|
||||
<h2 class="page-title"><?php echo $page->title() ?></h2>
|
||||
<a class="page-title" href="<?php echo $page->permalink() ?>">
|
||||
<h2 class="page-title"><?php echo $page->title() ?></h2>
|
||||
</a>
|
||||
|
||||
<!-- Page content, until the pagebreak -->
|
||||
<div class="page-content">
|
||||
|
@ -36,16 +38,27 @@
|
|||
<?php endforeach ?>
|
||||
|
||||
<!-- Pagination -->
|
||||
<nav aria-label="Page navigation example">
|
||||
<?php if (Paginator::amountOfPages()>1): ?>
|
||||
<nav class="my-4" aria-label="Page navigation">
|
||||
<ul class="pagination justify-content-center">
|
||||
<li class="page-item disabled">
|
||||
<a class="page-link" href="#" tabindex="-1">Previous</a>
|
||||
|
||||
<!-- Previuos button -->
|
||||
<li class="page-item <?php if (Paginator::showNext()) echo 'disabled' ?>">
|
||||
<a class="page-link" href="<?php echo Paginator::prevPageUrl() ?>" tabindex="-1">Previous</a>
|
||||
</li>
|
||||
<li class="page-item"><a class="page-link" href="#">1</a></li>
|
||||
<li class="page-item"><a class="page-link" href="#">2</a></li>
|
||||
<li class="page-item"><a class="page-link" href="#">3</a></li>
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="#">Next</a>
|
||||
|
||||
<!-- List of pages -->
|
||||
<?php for ($i = 1; $i <= Paginator::amountOfPages(); $i++): ?>
|
||||
<li class="page-item <?php if ($i==Paginator::currentPage()) echo 'active' ?>">
|
||||
<a class="page-link" href="<?php echo Paginator::numberUrl($i) ?>"><?php echo $i ?></a>
|
||||
</li>
|
||||
<?php endfor ?>
|
||||
|
||||
<!-- Next button -->
|
||||
<li class="page-item <?php if (Paginator::showPrev()) echo 'disabled' ?>">
|
||||
<a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>">Next</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif ?>
|
|
@ -0,0 +1,20 @@
|
|||
<!-- Navigation -->
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="#">
|
||||
<span class="text-white"><?php echo $site->title() ?></span>
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarResponsive">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<?php foreach ($staticContent as $staticPage): ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo $staticPage->permalink() ?>"><?php echo $staticPage->title() ?></a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
|
@ -1,23 +1,27 @@
|
|||
<section class="page">
|
||||
<div class="container">
|
||||
<!-- Page title -->
|
||||
<h1 class="page-title"><?php echo $page->title() ?></h1>
|
||||
<div class="row">
|
||||
<div class="col-lg-8 mx-auto">
|
||||
<!-- Page title -->
|
||||
<h1 class="page-title"><?php echo $page->title() ?></h1>
|
||||
|
||||
<!-- Page description -->
|
||||
<?php if ($page->description()): ?>
|
||||
<p class="page-description"><?php echo $page->description() ?></p>
|
||||
<?php endif ?>
|
||||
<!-- Page description -->
|
||||
<?php if ($page->description()): ?>
|
||||
<p class="page-description"><?php echo $page->description() ?></p>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Page cover image -->
|
||||
<?php if ($page->coverImage()): ?>
|
||||
<div class="page-cover-image py-6 mb-4" style="background-image: url('<?php echo $page->coverImage() ?>');">
|
||||
<div style="height: 300px;"></div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<!-- Page cover image -->
|
||||
<?php if ($page->coverImage()): ?>
|
||||
<div class="page-cover-image py-6 mb-4" style="background-image: url('<?php echo $page->coverImage() ?>');">
|
||||
<div style="height: 300px;"></div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Page content -->
|
||||
<div class="page-content">
|
||||
<?php echo $page->content() ?>
|
||||
<!-- Page content -->
|
||||
<div class="page-content">
|
||||
<?php echo $page->content() ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
Loading…
Reference in New Issue