Alternative theme and object variables lowercase

This commit is contained in:
Diego Najar 2018-01-25 23:58:42 +01:00
parent b99ecd6128
commit 6b827a7c8e
11 changed files with 236 additions and 35 deletions

View File

@ -127,15 +127,15 @@ if (Session::started()===false) {
} }
// Objects // Objects
$dbPages = new dbPages(); $dbPages = new dbPages();
$dbUsers = new dbUsers(); $dbUsers = new dbUsers();
$dbTags = new dbTags(); $dbTags = new dbTags();
$dbCategories = new dbCategories(); $dbCategories = new dbCategories();
$Site = new dbSite(); $site = $Site = new dbSite();
$Url = new Url(); $url = $Url = new Url();
$Parsedown = new Parsedown(); $parsedown = $Parsedown = new Parsedown();
$Security = new Security(); $security = $Security = new Security();
$Syslog = new dbSyslog(); $syslog = $Syslog = new dbSyslog();
// --- Relative paths --- // --- Relative paths ---
// This paths are relative for the user / web browsing. // This paths are relative for the user / web browsing.
@ -183,8 +183,8 @@ define('HTML_PATH_UPLOADS_THUMBNAILS', HTML_PATH_UPLOADS.'thumbnails/');
define('HTML_PATH_PLUGINS', HTML_PATH_ROOT.'bl-plugins/'); define('HTML_PATH_PLUGINS', HTML_PATH_ROOT.'bl-plugins/');
// --- Objects with dependency --- // --- Objects with dependency ---
$Language = new dbLanguage( $Site->language() ); $language = $Language = new dbLanguage( $Site->language() );
$Login = new Login( $dbUsers ); $login = $Login = new Login( $dbUsers );
$Url->checkFilters( $Site->uriFilters() ); $Url->checkFilters( $Site->uriFilters() );
// --- CONSTANTS with dependency --- // --- CONSTANTS with dependency ---
@ -242,7 +242,7 @@ $ID_EXECUTION = uniqid(); // string 13 characters long
$WHERE_AM_I = $Url->whereAmI(); $WHERE_AM_I = $Url->whereAmI();
// --- Objects shortcuts --- // --- Objects shortcuts ---
$L = $Language; $L = $language;
// DEBUG: Print constants // DEBUG: Print constants
// $arr = array_filter(get_defined_constants(), 'is_string'); // $arr = array_filter(get_defined_constants(), 'is_string');

7
bl-themes/alternative/css/bootstrap.min.css vendored Executable file

File diff suppressed because one or more lines are too long

View File

@ -26,3 +26,17 @@ section {
background: #eee; background: #eee;
color: #444; color: #444;
} }
/* Alternate the background color */
section.page:nth-child(even) {
background: #FAFAFA;
}
.page-description {
font-size: 1.25rem;
font-weight: 300;
}
.page-cover-image {
background-size: cover;
background-position: center;
}

View File

@ -81,12 +81,27 @@
<div class="row"> <div class="row">
<div class="col-lg-8 mx-auto"> <div class="col-lg-8 mx-auto">
<h2>Contact us</h2> <h2>Contact us</h2>
<p class="lead">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vero odio fugiat voluptatem dolor, provident officiis, id iusto! Obcaecati incidunt, qui nihil beatae magnam et repudiandae ipsa exercitationem, in, quo totam.</p> <p class="lead">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vero odio fugiat voluptatem dolor, provident officiis, id iusto! Obcaecati incidunt, qui nihil beatae magnam et repudiandae ipsa exercitationem, in, quo totam.</p>
<a class="btn btn-primary btn-sm" href="#" role="button">Read more</a>
</div> </div>
</div> </div>
</div> </div>
</section> </section>
<nav aria-label="Page navigation example">
<ul class="pagination justify-content-center">
<li class="page-item disabled">
<a class="page-link" href="#" 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>
</li>
</ul>
</nav>
<!-- Footer --> <!-- Footer -->
<footer class="py-5 bg-dark"> <footer class="py-5 bg-dark">
<div class="container"> <div class="container">

60
bl-themes/alternative/index.php Executable file
View File

@ -0,0 +1,60 @@
<!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>
<!-- Content -->
<?php
if ($WHERE_AM_I=='page') {
include(THEME_DIR_PHP.'page.php');
} else {
include(THEME_DIR_PHP.'home.php');
}
?>
<!-- Footer -->
<footer class="py-5 bg-dark">
<div class="container">
<p class="m-0 text-center text-white">Copyright &copy; Your Website 2017</p>
</div>
<!-- /.container -->
</footer>
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Plugin JavaScript -->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Custom JavaScript for this theme -->
<script src="js/scrolling-nav.js"></script>
</body>
</html>

View File

@ -0,0 +1,7 @@
{
"theme-data":
{
"name": "Alternative",
"description": ""
}
}

View File

@ -0,0 +1,10 @@
{
"author": "Bludit",
"email": "",
"website": "https://themes.bludit.com",
"version": "2.2",
"releaseDate": "2018-01-23",
"license": "MIT",
"compatible": "2.2",
"notes": ""
}

View File

@ -41,29 +41,22 @@
</div> </div>
</nav> </nav>
<header class="bg-light-gray"> <section class="page">
<div class="container text-center"> <div class="container">
<h1>About this page</h1> <h1 class="page-title">Section Heading</h1>
<p class="lead">A landing page template freshly redesigned for Bootstrap 4</p>
</div> <p class="page-description">Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
</header>
<div class="page-cover-image py-6 mb-4" style="background-image: url('https://unsplash.it/1900/1080?image=1081');">
<div style="height: 300px;"></div>
</div>
<div class="page-content">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquid, suscipit, rerum quos facilis repellat architecto commodi officia atque nemo facere eum non illo voluptatem quae delectus odit vel itaque amet.</p>
</div>
</div>
</section>
<section id="about">
<div class="container">
<div class="row">
<div class="col-lg-8 mx-auto">
<img src="screenshot.png" class="img-fluid" alt="Responsive image">
<p>This is a great place to talk about your webpage. This template is purposefully unstyled so you can use it as a boilerplate or starting point for you own landing page designs! This template features:</p>
<ul>
<li>Clickable nav links that smooth scroll to page sections</li>
<li>Responsive behavior when clicking nav links perfect for a one page website</li>
<li>Bootstrap's scrollspy feature which highlights which section of the page you're on in the navbar</li>
<li>Minimal custom CSS so you are free to explore your own unique design options</li>
</ul>
</div>
</div>
</div>
</section>
<!-- Footer --> <!-- Footer -->
<footer class="py-5 bg-dark"> <footer class="py-5 bg-dark">

View File

@ -0,0 +1,21 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="author" content="Bludit CMS">
<!-- Dynamic title tag -->
<?php echo Theme::headTitle() ?>
<!-- Dynamic description tag -->
<?php echo Theme::headDescription() ?>
<!-- Favicon -->
<?php echo Theme::favicon('img/favicon.png') ?>
<!-- Load CSS: Bootstrap core -->
<?php echo Theme::css('css/bootstrap.min.css') ?>
<!-- Load CSS: Styles for this theme -->
<?php echo Theme::css('css/style.css') ?>
<!-- Load plugins for the site head -->
<?php Theme::plugins('siteHead') ?>

View File

@ -0,0 +1,51 @@
<!-- Header -->
<header class="bg-light-gray">
<div class="container text-center">
<!-- Site title -->
<h1><?php echo $site->slogan() ?></h1>
<!-- Site description -->
<?php if ($site->description()): ?>
<p class="lead"><?php echo $site->description() ?></p>
<?php endif ?>
</div>
</header>
<!-- Print all the content -->
<?php foreach ($content as $page): ?>
<section class="page">
<div class="container">
<div class="row">
<div class="col-lg-8 mx-auto">
<!-- Page title -->
<h2 class="page-title"><?php echo $page->title() ?></h2>
<!-- Page content, until the pagebreak -->
<div class="page-content">
<?php echo $page->contentBreak() ?>
</div>
<!-- Shows "read more" button if necessary -->
<?php if ($page->readMore()): ?>
<a class="btn btn-primary btn-sm" href="<?php echo $page->permalink() ?>" role="button">Read more</a>
<?php endif ?>
</div>
</div>
</div>
</section>
<?php endforeach ?>
<!-- Pagination -->
<nav aria-label="Page navigation example">
<ul class="pagination justify-content-center">
<li class="page-item disabled">
<a class="page-link" href="#" 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>
</li>
</ul>
</nav>

View File

@ -0,0 +1,23 @@
<section class="page">
<div class="container">
<!-- 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 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() ?>
</div>
</div>
</section>