alternative theme improves
This commit is contained in:
parent
6b827a7c8e
commit
05d916e333
|
@ -216,7 +216,7 @@ function buildStaticPages() {
|
||||||
global $dbPages;
|
global $dbPages;
|
||||||
|
|
||||||
$tmp = array();
|
$tmp = array();
|
||||||
$staticPages = $dbPages->getStaticDB($onlyKeys=true);
|
$staticPages = $dbPages->getStaticDB();
|
||||||
foreach ($staticPages as $pageKey) {
|
foreach ($staticPages as $pageKey) {
|
||||||
$staticPage = buildPage($pageKey);
|
$staticPage = buildPage($pageKey);
|
||||||
array_push($tmp, $staticPage);
|
array_push($tmp, $staticPage);
|
||||||
|
|
|
@ -30,6 +30,11 @@ class Paginator {
|
||||||
return self::get('amountOfPages');
|
return self::get('amountOfPages');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function currentPage()
|
||||||
|
{
|
||||||
|
return self::get('currentPage');
|
||||||
|
}
|
||||||
|
|
||||||
public static function nextPage()
|
public static function nextPage()
|
||||||
{
|
{
|
||||||
return self::get('nextPage');
|
return self::get('nextPage');
|
||||||
|
|
|
@ -32,6 +32,10 @@ section.page:nth-child(even) {
|
||||||
background: #FAFAFA;
|
background: #FAFAFA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a.page-title {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
.page-description {
|
.page-description {
|
||||||
font-size: 1.25rem;
|
font-size: 1.25rem;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
|
@ -40,3 +44,8 @@ section.page:nth-child(even) {
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav-link {
|
||||||
|
font-size: 0.8em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
|
@ -1,32 +1,14 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<?php include(THEME_DIR_PHP.'head.php') ?>
|
<?php include(THEME_DIR_PHP.'head.php') ?>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body id="page-top">
|
<body id="page-top">
|
||||||
|
|
||||||
<!-- Navigation -->
|
<!-- Navbar -->
|
||||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
|
<?php
|
||||||
<div class="container">
|
include(THEME_DIR_PHP.'navbar.php');
|
||||||
<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>
|
|
||||||
|
|
||||||
<!-- Content -->
|
<!-- Content -->
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -18,7 +18,9 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-8 mx-auto">
|
<div class="col-lg-8 mx-auto">
|
||||||
<!-- Page title -->
|
<!-- Page title -->
|
||||||
|
<a class="page-title" href="<?php echo $page->permalink() ?>">
|
||||||
<h2 class="page-title"><?php echo $page->title() ?></h2>
|
<h2 class="page-title"><?php echo $page->title() ?></h2>
|
||||||
|
</a>
|
||||||
|
|
||||||
<!-- Page content, until the pagebreak -->
|
<!-- Page content, until the pagebreak -->
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
|
@ -36,16 +38,27 @@
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
|
|
||||||
<!-- Pagination -->
|
<!-- 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">
|
<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>
|
||||||
<li class="page-item"><a class="page-link" href="#">1</a></li>
|
|
||||||
<li class="page-item"><a class="page-link" href="#">2</a></li>
|
<!-- List of pages -->
|
||||||
<li class="page-item"><a class="page-link" href="#">3</a></li>
|
<?php for ($i = 1; $i <= Paginator::amountOfPages(); $i++): ?>
|
||||||
<li class="page-item">
|
<li class="page-item <?php if ($i==Paginator::currentPage()) echo 'active' ?>">
|
||||||
<a class="page-link" href="#">Next</a>
|
<a class="page-link" href="<?php echo Paginator::numberUrl($i) ?>"><?php echo $i ?></a>
|
||||||
</li>
|
</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>
|
</ul>
|
||||||
</nav>
|
</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,5 +1,7 @@
|
||||||
<section class="page">
|
<section class="page">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-8 mx-auto">
|
||||||
<!-- Page title -->
|
<!-- Page title -->
|
||||||
<h1 class="page-title"><?php echo $page->title() ?></h1>
|
<h1 class="page-title"><?php echo $page->title() ?></h1>
|
||||||
|
|
||||||
|
@ -20,4 +22,6 @@
|
||||||
<?php echo $page->content() ?>
|
<?php echo $page->content() ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
Loading…
Reference in New Issue