refactor to remove Theme helper
This commit is contained in:
parent
ae1c99c813
commit
1c5992477f
19 changed files with 235 additions and 56 deletions
|
@ -22,8 +22,8 @@
|
||||||
|
|
||||||
<!-- Javascript -->
|
<!-- Javascript -->
|
||||||
<?php
|
<?php
|
||||||
echo Theme::jquery();
|
echo HTML::jquery();
|
||||||
echo Theme::jsBootstrap();
|
echo HTML::jsBootstrap();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- Execute plugins for the login page inside the HTML <head> tag -->
|
<!-- Execute plugins for the login page inside the HTML <head> tag -->
|
||||||
|
|
|
@ -38,7 +38,7 @@ $staticContent = $staticPages = buildStaticPages();
|
||||||
// Execute the scheduler
|
// Execute the scheduler
|
||||||
if ($pages->scheduler()) {
|
if ($pages->scheduler()) {
|
||||||
// Execute plugins with the hook afterPageCreate
|
// Execute plugins with the hook afterPageCreate
|
||||||
Theme::plugins('afterPageCreate');
|
execPluginsByHook('afterPageCreate');
|
||||||
|
|
||||||
reindexTags();
|
reindexTags();
|
||||||
reindexCategories();
|
reindexCategories();
|
||||||
|
|
|
@ -21,7 +21,7 @@ if ($url->whereAmI()=='admin') {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Execute hook from plugins
|
// Execute hook from plugins
|
||||||
Theme::plugins('paginator');
|
execPluginsByHook('paginator');
|
||||||
|
|
||||||
// Items per page
|
// Items per page
|
||||||
Paginator::set('itemsPerPage', $itemsPerPage);
|
Paginator::set('itemsPerPage', $itemsPerPage);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
include(PATH_RULES.'60.plugins.php');
|
include(PATH_RULES.'60.plugins.php');
|
||||||
|
|
||||||
// Plugins before all
|
// Plugins before all
|
||||||
Theme::plugins('beforeAll');
|
execPluginsByHook('beforeAll');
|
||||||
|
|
||||||
// Load rules
|
// Load rules
|
||||||
include(PATH_RULES.'60.router.php');
|
include(PATH_RULES.'60.router.php');
|
||||||
|
@ -14,7 +14,7 @@ include(PATH_RULES.'99.paginator.php');
|
||||||
include(PATH_RULES.'99.themes.php');
|
include(PATH_RULES.'99.themes.php');
|
||||||
|
|
||||||
// Plugins before site loaded
|
// Plugins before site loaded
|
||||||
Theme::plugins('beforeSiteLoad');
|
execPluginsByHook('beforeSiteLoad');
|
||||||
|
|
||||||
// Theme init.php
|
// Theme init.php
|
||||||
if (Sanitize::pathFile(PATH_THEMES.$site->theme().DS.'init.php')) {
|
if (Sanitize::pathFile(PATH_THEMES.$site->theme().DS.'init.php')) {
|
||||||
|
@ -29,7 +29,7 @@ if (Sanitize::pathFile(PATH_THEMES.$site->theme().DS.'index.php')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Plugins after site loaded
|
// Plugins after site loaded
|
||||||
Theme::plugins('afterSiteLoad');
|
execPluginsByHook('afterSiteLoad');
|
||||||
|
|
||||||
// Plugins after all
|
// Plugins after all
|
||||||
Theme::plugins('afterAll');
|
execPluginsByHook('afterAll');
|
||||||
|
|
|
@ -82,6 +82,185 @@ class HTML {
|
||||||
return '<script '.$attributes.' src="'.DOMAIN_CORE_VENDORS.'bootstrap-html5sortable/jquery.sortable.min.js?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
|
return '<script '.$attributes.' src="'.DOMAIN_CORE_VENDORS.'bootstrap-html5sortable/jquery.sortable.min.js?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --- CHECK OLD
|
||||||
|
|
||||||
|
public static function charset($charset)
|
||||||
|
{
|
||||||
|
return '<meta charset="'.$charset.'">'.PHP_EOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function viewport($content)
|
||||||
|
{
|
||||||
|
return '<meta name="viewport" content="'.$content.'">'.PHP_EOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function src($file, $base=DOMAIN_THEME)
|
||||||
|
{
|
||||||
|
return $base.$file;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function socialNetworks()
|
||||||
|
{
|
||||||
|
global $site;
|
||||||
|
$socialNetworks = array(
|
||||||
|
'github'=>'Github',
|
||||||
|
'gitlab'=>'GitLab',
|
||||||
|
'twitter'=>'Twitter',
|
||||||
|
'facebook'=>'Facebook',
|
||||||
|
'instagram'=>'Instagram',
|
||||||
|
'codepen'=>'Codepen',
|
||||||
|
'linkedin'=>'Linkedin',
|
||||||
|
'xing'=>'Xing',
|
||||||
|
'mastodon'=>'Mastodon',
|
||||||
|
'vk'=>'VK'
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($socialNetworks as $key=>$label) {
|
||||||
|
if (!$site->{$key}()) {
|
||||||
|
unset($socialNetworks[$key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $socialNetworks;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function title()
|
||||||
|
{
|
||||||
|
global $site;
|
||||||
|
return $site->title();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function description()
|
||||||
|
{
|
||||||
|
global $site;
|
||||||
|
return $site->description();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function slogan()
|
||||||
|
{
|
||||||
|
global $site;
|
||||||
|
return $site->slogan();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function footer()
|
||||||
|
{
|
||||||
|
global $site;
|
||||||
|
return $site->footer();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function lang()
|
||||||
|
{
|
||||||
|
global $language;
|
||||||
|
return $language->currentLanguageShortVersion();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function rssUrl()
|
||||||
|
{
|
||||||
|
if (pluginActivated('pluginRSS')) {
|
||||||
|
return DOMAIN_BASE.'rss.xml';
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function sitemapUrl()
|
||||||
|
{
|
||||||
|
if (pluginActivated('pluginSitemap')) {
|
||||||
|
return DOMAIN_BASE.'sitemap.xml';
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns the absolute URL of the site
|
||||||
|
// Ex. https://example.com the method returns https://example.com/
|
||||||
|
// Ex. https://example.com/bludit/ the method returns https://example.com/bludit/
|
||||||
|
public static function siteUrl()
|
||||||
|
{
|
||||||
|
return DOMAIN_BASE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns the absolute URL of admin panel
|
||||||
|
// Ex. https://example.com/admin/ the method returns https://example.com/admin/
|
||||||
|
// Ex. https://example.com/bludit/admin/ the method returns https://example.com/bludit/admin/
|
||||||
|
public static function adminUrl()
|
||||||
|
{
|
||||||
|
return DOMAIN_ADMIN;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function metaTags($tag)
|
||||||
|
{
|
||||||
|
if ($tag=='title') {
|
||||||
|
return self::metaTagTitle();
|
||||||
|
} elseif ($tag=='description') {
|
||||||
|
return self::metaTagDescription();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function metaTagTitle()
|
||||||
|
{
|
||||||
|
global $url;
|
||||||
|
global $site;
|
||||||
|
global $tags;
|
||||||
|
global $categories;
|
||||||
|
global $WHERE_AM_I;
|
||||||
|
global $page;
|
||||||
|
|
||||||
|
if ($WHERE_AM_I=='page') {
|
||||||
|
$format = $site->titleFormatPages();
|
||||||
|
$format = Text::replace('{{page-title}}', $page->title(), $format);
|
||||||
|
$format = Text::replace('{{page-description}}', $page->description(), $format);
|
||||||
|
} elseif ($WHERE_AM_I=='tag') {
|
||||||
|
try {
|
||||||
|
$tagKey = $url->slug();
|
||||||
|
$tag = new Tag($tagKey);
|
||||||
|
$format = $site->titleFormatTag();
|
||||||
|
$format = Text::replace('{{tag-name}}', $tag->name(), $format);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
// Tag doesn't exist
|
||||||
|
}
|
||||||
|
|
||||||
|
} elseif ($WHERE_AM_I=='category') {
|
||||||
|
try {
|
||||||
|
$categoryKey = $url->slug();
|
||||||
|
$category = new Category($categoryKey);
|
||||||
|
$format = $site->titleFormatCategory();
|
||||||
|
$format = Text::replace('{{category-name}}', $category->name(), $format);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
// Category doesn't exist
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$format = $site->titleFormatHomepage();
|
||||||
|
}
|
||||||
|
|
||||||
|
$format = Text::replace('{{site-title}}', $site->title(), $format);
|
||||||
|
$format = Text::replace('{{site-slogan}}', $site->slogan(), $format);
|
||||||
|
$format = Text::replace('{{site-description}}', $site->description(), $format);
|
||||||
|
|
||||||
|
return '<title>'.$format.'</title>'.PHP_EOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function metaTagDescription()
|
||||||
|
{
|
||||||
|
global $site;
|
||||||
|
global $WHERE_AM_I;
|
||||||
|
global $page;
|
||||||
|
global $url;
|
||||||
|
|
||||||
|
$description = $site->description();
|
||||||
|
|
||||||
|
if ($WHERE_AM_I=='page') {
|
||||||
|
$description = $page->description();
|
||||||
|
} elseif ($WHERE_AM_I=='category') {
|
||||||
|
try {
|
||||||
|
$categoryKey = $url->slug();
|
||||||
|
$category = new Category($categoryKey);
|
||||||
|
$description = $category->description();
|
||||||
|
} catch (Exception $e) {
|
||||||
|
// description from the site
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return '<meta name="description" content="'.$description.'">'.PHP_EOL;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -109,13 +109,13 @@ class Site extends dbJSON {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// DEPRECATED in v3.0, use Theme::rssUrl()
|
// DEPRECATED in v3.0, use HTML::rssUrl()
|
||||||
public function rss()
|
public function rss()
|
||||||
{
|
{
|
||||||
return DOMAIN_BASE.'rss.xml';
|
return DOMAIN_BASE.'rss.xml';
|
||||||
}
|
}
|
||||||
|
|
||||||
// DEPRECATED in v3.0, use Theme::sitemapUrl()
|
// DEPRECATED in v3.0, use HTML::sitemapUrl()
|
||||||
public function sitemap()
|
public function sitemap()
|
||||||
{
|
{
|
||||||
return DOMAIN_BASE.'sitemap.xml';
|
return DOMAIN_BASE.'sitemap.xml';
|
||||||
|
|
|
@ -154,7 +154,7 @@ EOF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Theme::plugins('afterPageCreate');
|
execPluginsByHook('afterPageCreate');
|
||||||
reindexCategories();
|
reindexCategories();
|
||||||
reindexTags();
|
reindexTags();
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ class pluginRSS extends Plugin {
|
||||||
|
|
||||||
$html .= '<div>';
|
$html .= '<div>';
|
||||||
$html .= '<label>'.$L->get('RSS URL').'</label>';
|
$html .= '<label>'.$L->get('RSS URL').'</label>';
|
||||||
$html .= '<a href="'.Theme::rssUrl().'">'.Theme::rssUrl().'</a>';
|
$html .= '<a href="'.HTML::rssUrl().'">'.HTML::rssUrl().'</a>';
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
|
|
||||||
$html .= '<div>';
|
$html .= '<div>';
|
||||||
|
@ -32,7 +32,7 @@ class pluginRSS extends Plugin {
|
||||||
|
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function encodeURL($url)
|
private function encodeURL($url)
|
||||||
{
|
{
|
||||||
return preg_replace_callback('/[^\x20-\x7f]/', function($match) { return urlencode($match[0]); }, $url);
|
return preg_replace_callback('/[^\x20-\x7f]/', function($match) { return urlencode($match[0]); }, $url);
|
||||||
|
|
|
@ -21,7 +21,7 @@ class pluginSitemap extends Plugin {
|
||||||
|
|
||||||
$html .= '<div>';
|
$html .= '<div>';
|
||||||
$html .= '<label>'.$L->get('Sitemap URL').'</label>';
|
$html .= '<label>'.$L->get('Sitemap URL').'</label>';
|
||||||
$html .= '<a href="'.Theme::sitemapUrl().'">'.Theme::sitemapUrl().'</a>';
|
$html .= '<a href="'.HTML::sitemapUrl().'">'.HTML::sitemapUrl().'</a>';
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
|
|
||||||
$html .= '<div>';
|
$html .= '<div>';
|
||||||
|
@ -85,12 +85,12 @@ class pluginSitemap extends Plugin {
|
||||||
private function ping()
|
private function ping()
|
||||||
{
|
{
|
||||||
if ($this->getValue('pingGoogle')) {
|
if ($this->getValue('pingGoogle')) {
|
||||||
$url = 'https://www.google.com/ping?sitemap='.Theme::sitemapUrl();
|
$url = 'https://www.google.com/ping?sitemap='.HTML::sitemapUrl();
|
||||||
TCP::http($url, 'GET', true, 3);
|
TCP::http($url, 'GET', true, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->getValue('pingBing')) {
|
if ($this->getValue('pingBing')) {
|
||||||
$url = 'https://www.bing.com/ping?sitemap='.Theme::sitemapUrl();
|
$url = 'https://www.bing.com/ping?sitemap='.HTML::sitemapUrl();
|
||||||
TCP::http($url, 'GET', true, 3);
|
TCP::http($url, 'GET', true, 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,32 +1,32 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="<?php echo Theme::lang() ?>">
|
<html lang="<?php echo HTML::lang() ?>">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<meta name="generator" content="Bludit">
|
<meta name="generator" content="Bludit">
|
||||||
|
|
||||||
<!-- Dynamic title tag -->
|
<!-- Dynamic title tag -->
|
||||||
<?php echo Theme::metaTagTitle(); ?>
|
<?php echo HTML::metaTagTitle(); ?>
|
||||||
|
|
||||||
<!-- Dynamic description tag -->
|
<!-- Dynamic description tag -->
|
||||||
<?php echo Theme::metaTagDescription(); ?>
|
<?php echo HTML::metaTagDescription(); ?>
|
||||||
|
|
||||||
<!-- Include Favicon -->
|
<!-- Include Favicon -->
|
||||||
<?php echo Theme::favicon('img/favicon.png'); ?>
|
<?php echo HTML::favicon('img/favicon.png'); ?>
|
||||||
|
|
||||||
<!-- Include CSS Bootstrap file from Bludit Core -->
|
<!-- Include CSS Bootstrap file from Bludit Core -->
|
||||||
<?php echo Theme::cssBootstrap(); ?>
|
<?php echo HTML::cssBootstrap(); ?>
|
||||||
|
|
||||||
<!-- Include CSS Styles from this theme -->
|
<!-- Include CSS Styles from this theme -->
|
||||||
<?php echo Theme::css('css/style.css'); ?>
|
<?php echo HTML::css('css/style.css'); ?>
|
||||||
|
|
||||||
<!-- Load Bludit Plugins: Site head -->
|
<!-- Load Bludit Plugins: Site head -->
|
||||||
<?php Theme::plugins('siteHead'); ?>
|
<?php execPluginsByHook('siteHead'); ?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<!-- Load Bludit Plugins: Site Body Begin -->
|
<!-- Load Bludit Plugins: Site Body Begin -->
|
||||||
<?php Theme::plugins('siteBodyBegin'); ?>
|
<?php execPluginsByHook('siteBodyBegin'); ?>
|
||||||
|
|
||||||
<!-- Navbar -->
|
<!-- Navbar -->
|
||||||
<?php include(THEME_DIR_PHP.'navbar.php'); ?>
|
<?php include(THEME_DIR_PHP.'navbar.php'); ?>
|
||||||
|
@ -47,13 +47,13 @@
|
||||||
<?php include(THEME_DIR_PHP.'footer.php'); ?>
|
<?php include(THEME_DIR_PHP.'footer.php'); ?>
|
||||||
|
|
||||||
<!-- Include Jquery file from Bludit Core -->
|
<!-- Include Jquery file from Bludit Core -->
|
||||||
<?php echo Theme::jquery(); ?>
|
<?php echo HTML::jquery(); ?>
|
||||||
|
|
||||||
<!-- Include javascript Bootstrap file from Bludit Core -->
|
<!-- Include javascript Bootstrap file from Bludit Core -->
|
||||||
<?php echo Theme::jsBootstrap(); ?>
|
<?php echo HTML::jsBootstrap(); ?>
|
||||||
|
|
||||||
<!-- Load Bludit Plugins: Site Body End -->
|
<!-- Load Bludit Plugins: Site Body End -->
|
||||||
<?php Theme::plugins('siteBodyEnd'); ?>
|
<?php execPluginsByHook('siteBodyEnd'); ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -16,7 +16,7 @@
|
||||||
<button class="btn btn-outline-primary my-2 my-sm-0" type="button" onClick="searchNow()"><?php $language->p('Search') ?></button>
|
<button class="btn btn-outline-primary my-2 my-sm-0" type="button" onClick="searchNow()"><?php $language->p('Search') ?></button>
|
||||||
<script>
|
<script>
|
||||||
function searchNow() {
|
function searchNow() {
|
||||||
var searchURL = "<?php echo Theme::siteUrl(); ?>search/";
|
var searchURL = "<?php echo HTML::siteUrl(); ?>search/";
|
||||||
window.open(searchURL + document.getElementById("search-input").value, "_self");
|
window.open(searchURL + document.getElementById("search-input").value, "_self");
|
||||||
}
|
}
|
||||||
document.getElementById("search-input").onkeypress = function(e) {
|
document.getElementById("search-input").onkeypress = function(e) {
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-8 mx-auto">
|
<div class="col-lg-8 mx-auto">
|
||||||
<!-- Load Bludit Plugins: Page Begin -->
|
<!-- Load Bludit Plugins: Page Begin -->
|
||||||
<?php Theme::plugins('pageBegin'); ?>
|
<?php execPluginsByHook('pageBegin'); ?>
|
||||||
|
|
||||||
<!-- Page title -->
|
<!-- Page title -->
|
||||||
<a class="text-dark" href="<?php echo $page->permalink(); ?>">
|
<a class="text-dark" href="<?php echo $page->permalink(); ?>">
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
<!-- Load Bludit Plugins: Page End -->
|
<!-- Load Bludit Plugins: Page End -->
|
||||||
<?php Theme::plugins('pageEnd'); ?>
|
<?php execPluginsByHook('pageEnd'); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
|
|
||||||
<!-- Home button -->
|
<!-- Home button -->
|
||||||
<li class="page-item <?php if (Paginator::currentPage()==1) echo 'disabled' ?>">
|
<li class="page-item <?php if (Paginator::currentPage()==1) echo 'disabled' ?>">
|
||||||
<a class="page-link" href="<?php echo Theme::siteUrl() ?>"><?php echo $L->get('Home'); ?></a>
|
<a class="page-link" href="<?php echo HTML::siteUrl() ?>"><?php echo $L->get('Home'); ?></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<!-- Next button -->
|
<!-- Next button -->
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark text-uppercase">
|
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark text-uppercase">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<a class="navbar-brand" href="<?php echo Theme::siteUrl(); ?>">
|
<a class="navbar-brand" href="<?php echo HTML::siteUrl(); ?>">
|
||||||
<span class="text-white"><?php echo $site->title(); ?></span>
|
<span class="text-white"><?php echo $site->title(); ?></span>
|
||||||
</a>
|
</a>
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
|
|
||||||
<!-- Social Networks -->
|
<!-- Social Networks -->
|
||||||
<?php foreach (Theme::socialNetworks() as $key=>$label): ?>
|
<?php foreach (HTML::socialNetworks() as $key=>$label): ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="<?php echo $site->{$key}(); ?>" target="_blank">
|
<a class="nav-link" href="<?php echo $site->{$key}(); ?>" target="_blank">
|
||||||
<img class="d-none d-sm-block nav-svg-icon" src="<?php echo DOMAIN_THEME.'img/'.$key.'.svg' ?>" alt="<?php echo $label ?>" />
|
<img class="d-none d-sm-block nav-svg-icon" src="<?php echo DOMAIN_THEME.'img/'.$key.'.svg' ?>" alt="<?php echo $label ?>" />
|
||||||
|
@ -28,9 +28,9 @@
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
||||||
<!-- RSS -->
|
<!-- RSS -->
|
||||||
<?php if (Theme::rssUrl()): ?>
|
<?php if (HTML::rssUrl()): ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="<?php echo Theme::rssUrl() ?>" target="_blank">
|
<a class="nav-link" href="<?php echo HTML::rssUrl() ?>" target="_blank">
|
||||||
<img class="d-none d-sm-block nav-svg-icon text-primary" src="<?php echo DOMAIN_THEME.'img/rss.svg' ?>" alt="RSS" />
|
<img class="d-none d-sm-block nav-svg-icon text-primary" src="<?php echo DOMAIN_THEME.'img/rss.svg' ?>" alt="RSS" />
|
||||||
<span class="d-inline d-sm-none">RSS</span>
|
<span class="d-inline d-sm-none">RSS</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-8 mx-auto">
|
<div class="col-lg-8 mx-auto">
|
||||||
<!-- Load Bludit Plugins: Page Begin -->
|
<!-- Load Bludit Plugins: Page Begin -->
|
||||||
<?php Theme::plugins('pageBegin'); ?>
|
<?php execPluginsByHook('pageBegin'); ?>
|
||||||
|
|
||||||
<!-- Page title -->
|
<!-- Page title -->
|
||||||
<h1 class="title"><?php echo $page->title(); ?></h1>
|
<h1 class="title"><?php echo $page->title(); ?></h1>
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Load Bludit Plugins: Page End -->
|
<!-- Load Bludit Plugins: Page End -->
|
||||||
<?php Theme::plugins('pageEnd'); ?>
|
<?php execPluginsByHook('pageEnd'); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="<?php echo Theme::lang() ?>">
|
<html lang="<?php echo HTML::lang() ?>">
|
||||||
<head>
|
<head>
|
||||||
<?php include(THEME_DIR_PHP.'head.php'); ?>
|
<?php include(THEME_DIR_PHP.'head.php'); ?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<!-- Load Bludit Plugins: Site Body Begin -->
|
<!-- Load Bludit Plugins: Site Body Begin -->
|
||||||
<?php Theme::plugins('siteBodyBegin'); ?>
|
<?php execPluginsByHook('siteBodyBegin'); ?>
|
||||||
|
|
||||||
<!-- Navbar -->
|
<!-- Navbar -->
|
||||||
<?php include(THEME_DIR_PHP.'navbar.php'); ?>
|
<?php include(THEME_DIR_PHP.'navbar.php'); ?>
|
||||||
|
@ -52,14 +52,14 @@
|
||||||
<!-- Javascript -->
|
<!-- Javascript -->
|
||||||
<?php
|
<?php
|
||||||
// Include Jquery file from Bludit Core
|
// Include Jquery file from Bludit Core
|
||||||
echo Theme::jquery();
|
echo HTML::jquery();
|
||||||
|
|
||||||
// Include javascript Bootstrap file from Bludit Core
|
// Include javascript Bootstrap file from Bludit Core
|
||||||
echo Theme::jsBootstrap();
|
echo HTML::jsBootstrap();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- Load Bludit Plugins: Site Body End -->
|
<!-- Load Bludit Plugins: Site Body End -->
|
||||||
<?php Theme::plugins('siteBodyEnd'); ?>
|
<?php execPluginsByHook('siteBodyEnd'); ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -3,19 +3,19 @@
|
||||||
<meta name="generator" content="Bludit">
|
<meta name="generator" content="Bludit">
|
||||||
|
|
||||||
<!-- Dynamic title tag -->
|
<!-- Dynamic title tag -->
|
||||||
<?php echo Theme::metaTags('title'); ?>
|
<?php echo HTML::metaTags('title'); ?>
|
||||||
|
|
||||||
<!-- Dynamic description tag -->
|
<!-- Dynamic description tag -->
|
||||||
<?php echo Theme::metaTags('description'); ?>
|
<?php echo HTML::metaTags('description'); ?>
|
||||||
|
|
||||||
<!-- Include Favicon -->
|
<!-- Include Favicon -->
|
||||||
<?php echo Theme::favicon('img/favicon.png'); ?>
|
<?php echo HTML::favicon('img/favicon.png'); ?>
|
||||||
|
|
||||||
<!-- Include Bootstrap CSS file bootstrap.css -->
|
<!-- Include Bootstrap CSS file bootstrap.css -->
|
||||||
<?php echo Theme::cssBootstrap(); ?>
|
<?php echo HTML::cssBootstrap(); ?>
|
||||||
|
|
||||||
<!-- Include CSS Styles from this theme -->
|
<!-- Include CSS Styles from this theme -->
|
||||||
<?php echo Theme::css('css/style.css'); ?>
|
<?php echo HTML::css('css/style.css'); ?>
|
||||||
|
|
||||||
<!-- Load Bludit Plugins: Site head -->
|
<!-- Load Bludit Plugins: Site head -->
|
||||||
<?php Theme::plugins('siteHead'); ?>
|
<?php execPluginsByHook('siteHead'); ?>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<div class="card my-5 border-0">
|
<div class="card my-5 border-0">
|
||||||
|
|
||||||
<!-- Load Bludit Plugins: Page Begin -->
|
<!-- Load Bludit Plugins: Page Begin -->
|
||||||
<?php Theme::plugins('pageBegin'); ?>
|
<?php execPluginsByHook('pageBegin'); ?>
|
||||||
|
|
||||||
<!-- Cover image -->
|
<!-- Cover image -->
|
||||||
<?php if ($page->coverImage()): ?>
|
<?php if ($page->coverImage()): ?>
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Load Bludit Plugins: Page End -->
|
<!-- Load Bludit Plugins: Page End -->
|
||||||
<?php Theme::plugins('pageEnd'); ?>
|
<?php execPluginsByHook('pageEnd'); ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
|
|
||||||
<!-- Home button -->
|
<!-- Home button -->
|
||||||
<li class="page-item <?php if (Paginator::currentPage()==1) echo 'disabled' ?>">
|
<li class="page-item <?php if (Paginator::currentPage()==1) echo 'disabled' ?>">
|
||||||
<a class="page-link" href="<?php echo Theme::siteUrl() ?>">Home</a>
|
<a class="page-link" href="<?php echo HTML::siteUrl() ?>">Home</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<!-- Next button -->
|
<!-- Next button -->
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark text-uppercase">
|
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark text-uppercase">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<a class="navbar-brand" href="<?php echo Theme::siteUrl() ?>">
|
<a class="navbar-brand" href="<?php echo HTML::siteUrl() ?>">
|
||||||
<span class="text-white"><?php echo $site->title() ?></span>
|
<span class="text-white"><?php echo $site->title() ?></span>
|
||||||
</a>
|
</a>
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
|
|
||||||
<!-- Social Networks -->
|
<!-- Social Networks -->
|
||||||
<?php foreach (Theme::socialNetworks() as $key=>$label): ?>
|
<?php foreach (HTML::socialNetworks() as $key=>$label): ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="<?php echo $site->{$key}(); ?>" target="_blank">
|
<a class="nav-link" href="<?php echo $site->{$key}(); ?>" target="_blank">
|
||||||
<img class="d-none d-sm-block nav-svg-icon" src="<?php echo DOMAIN_THEME.'img/'.$key.'.svg' ?>" alt="<?php echo $label ?>" />
|
<img class="d-none d-sm-block nav-svg-icon" src="<?php echo DOMAIN_THEME.'img/'.$key.'.svg' ?>" alt="<?php echo $label ?>" />
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="card my-5 border-0">
|
<div class="card my-5 border-0">
|
||||||
|
|
||||||
<!-- Load Bludit Plugins: Page Begin -->
|
<!-- Load Bludit Plugins: Page Begin -->
|
||||||
<?php Theme::plugins('pageBegin'); ?>
|
<?php execPluginsByHook('pageBegin'); ?>
|
||||||
|
|
||||||
<!-- Cover image -->
|
<!-- Cover image -->
|
||||||
<?php if ($page->coverImage()): ?>
|
<?php if ($page->coverImage()): ?>
|
||||||
|
@ -26,6 +26,6 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Load Bludit Plugins: Page End -->
|
<!-- Load Bludit Plugins: Page End -->
|
||||||
<?php Theme::plugins('pageEnd'); ?>
|
<?php execPluginsByHook('pageEnd'); ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
<?php Theme::plugins('siteSidebar') ?>
|
<?php execPluginsByHook('siteSidebar') ?>
|
Loading…
Add table
Reference in a new issue