Merge pull request #455 from acrox999/bluditv2
Paginator and Lingonberry.
This commit is contained in:
commit
06cc081a59
|
@ -104,14 +104,14 @@ class Paginator {
|
||||||
$html = '<div id="paginator">';
|
$html = '<div id="paginator">';
|
||||||
$html .= '<ul>';
|
$html .= '<ul>';
|
||||||
|
|
||||||
if(self::get('showNewer'))
|
if(self::get('showNext'))
|
||||||
{
|
{
|
||||||
if($textPrevPage===false) {
|
if($textPrevPage===false) {
|
||||||
$textPrevPage = '« '.$Language->g('Prev page');
|
$textPrevPage = '« '.$Language->g('Prev page');
|
||||||
}
|
}
|
||||||
|
|
||||||
$html .= '<li class="left">';
|
$html .= '<li class="left">';
|
||||||
$html .= '<a href="'.self::urlPrevPage().'">'.$textPrevPage.'</a>';
|
$html .= '<a href="'.self::nextPageUrl().'">'.$textPrevPage.'</a>';
|
||||||
$html .= '</li>';
|
$html .= '</li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,14 +119,14 @@ class Paginator {
|
||||||
$html .= '<li class="list">'.(self::get('currentPage')+1).' / '.(self::get('numberOfPages')+1).'</li>';
|
$html .= '<li class="list">'.(self::get('currentPage')+1).' / '.(self::get('numberOfPages')+1).'</li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(self::get('showOlder'))
|
if(self::get('showPrev'))
|
||||||
{
|
{
|
||||||
if($textNextPage===false) {
|
if($textNextPage===false) {
|
||||||
$textNextPage = $Language->g('Next page').' »';
|
$textNextPage = $Language->g('Next page').' »';
|
||||||
}
|
}
|
||||||
|
|
||||||
$html .= '<li class="right">';
|
$html .= '<li class="right">';
|
||||||
$html .= '<a href="'.self::urlNextPage().'">'.$textNextPage.'</a>';
|
$html .= '<a href="'.self::prevPageUrl().'">'.$textNextPage.'</a>';
|
||||||
$html .= '</li>';
|
$html .= '</li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,19 +2,15 @@
|
||||||
<html class="js" lang="<?php echo $Site->language() ?>">
|
<html class="js" lang="<?php echo $Site->language() ?>">
|
||||||
|
|
||||||
<head profile="http://gmpg.org/xfn/11">
|
<head profile="http://gmpg.org/xfn/11">
|
||||||
<?php include(PATH_THEME_PHP.'head.php') ?>
|
<?php include(THEME_DIR_PHP.'head.php') ?>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if( ($Url->whereAmI()=='home') || ($Url->whereAmI()=='tag') || ($Url->whereAmI()=='blog') )
|
if( $WHERE_AM_I=='home' )
|
||||||
{
|
{
|
||||||
echo '<body class="header-image fullwidth">';
|
echo '<body class="header-image fullwidth">';
|
||||||
}
|
}
|
||||||
elseif($Url->whereAmI()=='post')
|
else
|
||||||
{
|
|
||||||
echo '<body class="single single-post">';
|
|
||||||
}
|
|
||||||
elseif($Url->whereAmI()=='page')
|
|
||||||
{
|
{
|
||||||
echo '<body class="page page-template-default">';
|
echo '<body class="page page-template-default">';
|
||||||
}
|
}
|
||||||
|
@ -24,19 +20,19 @@
|
||||||
<!-- Plugins Site Body Begin -->
|
<!-- Plugins Site Body Begin -->
|
||||||
<?php Theme::plugins('siteBodyBegin') ?>
|
<?php Theme::plugins('siteBodyBegin') ?>
|
||||||
|
|
||||||
<div class="navigation" >
|
<!-- <div class="navigation" >
|
||||||
<div class="navigation-inner section-inner">
|
<div class="navigation-inner section-inner">
|
||||||
<ul class="blog-menu">
|
<ul class="blog-menu">
|
||||||
<?php
|
<?php
|
||||||
$parents = $pagesParents[NO_PARENT_CHAR];
|
/** $parents = $pagesParents[NO_PARENT_CHAR];
|
||||||
foreach($parents as $Parent) {
|
foreach($parents as $Parent) {
|
||||||
echo '<li class="menu-item menu-item-type-custom menu-item-object-custom"><a href="'.$Parent->permalink().'">'.$Parent->title().'</a></li> ';
|
echo '<li class="menu-item menu-item-type-custom menu-item-object-custom"><a href="'.$Parent->permalink().'">'.$Parent->title().'</a></li> ';
|
||||||
}
|
} */
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div> <!-- /navigation-inner -->
|
</div> <!-- /navigation-inner -->
|
||||||
</div> <!-- /navigation -->
|
<!-- </div> <!-- /navigation -->
|
||||||
|
|
||||||
<div class="header section">
|
<div class="header section">
|
||||||
<div class="header-inner section-inner">
|
<div class="header-inner section-inner">
|
||||||
|
@ -47,35 +43,31 @@
|
||||||
<a href="<?php echo $Site->url() ?>" rel="home"><?php echo $Site->title() ?></a>
|
<a href="<?php echo $Site->url() ?>" rel="home"><?php echo $Site->title() ?></a>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<div class="nav-toggle">
|
<!-- <div class="nav-toggle">
|
||||||
<div class="bar"></div>
|
<div class="bar"></div>
|
||||||
<div class="bar"></div>
|
<div class="bar"></div>
|
||||||
<div class="bar"></div>
|
<div class="bar"></div>
|
||||||
|
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div> <!-- /header section -->
|
</div> <!-- /header section -->
|
||||||
</div> <!-- /header-inner section-inner -->
|
</div> <!-- /header-inner section-inner -->
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if( ($Url->whereAmI()=='home') || ($Url->whereAmI()=='tag') || ($Url->whereAmI()=='blog') )
|
if( $WHERE_AM_I=='home' )
|
||||||
{
|
{
|
||||||
include(PATH_THEME_PHP.'home.php');
|
include(THEME_DIR_PHP.'home.php');
|
||||||
}
|
}
|
||||||
elseif($Url->whereAmI()=='post')
|
else
|
||||||
{
|
{
|
||||||
include(PATH_THEME_PHP.'post.php');
|
include(THEME_DIR_PHP.'page.php');
|
||||||
}
|
|
||||||
elseif($Url->whereAmI()=='page')
|
|
||||||
{
|
|
||||||
include(PATH_THEME_PHP.'page.php');
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
<?php include(PATH_THEME_PHP.'sidebar.php') ?>
|
<?php include(THEME_DIR_PHP.'sidebar.php') ?>
|
||||||
|
|
||||||
<div class="credits section">
|
<div class="credits section">
|
||||||
<div class="credits-inner section-inner">
|
<div class="credits-inner section-inner">
|
||||||
|
|
|
@ -1,30 +1,25 @@
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" >
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" >
|
||||||
|
<meta name="keywords" content="HTML,CSS,XML,JavaScript">
|
||||||
<title><?php echo $Site->title() ?></title>
|
<title><?php echo $Site->title() ?></title>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// CSS
|
// CSS
|
||||||
Theme::css(array(
|
echo Theme::css(array(
|
||||||
'style.css',
|
'css/style.css',
|
||||||
'bludit.css'
|
'css/bludit.css'
|
||||||
));
|
));
|
||||||
|
|
||||||
// Javascript
|
// Javascript
|
||||||
Theme::javascript(array(
|
echo Theme::javascript(array(
|
||||||
'jquery-1.12.0.min.js',
|
'jquery-1.12.0.min.js',
|
||||||
'jquery-migrate-1.2.1.min.js'
|
'jquery-migrate-1.2.1.min.js'
|
||||||
));
|
));
|
||||||
|
|
||||||
// <meta name="keywords" content="HTML,CSS,XML,JavaScript">
|
if($WHERE_AM_I == 'page') {
|
||||||
if($Url->whereAmI() == 'post') {
|
|
||||||
Theme::keywords($Post->tags());
|
|
||||||
Theme::description($Post->description());
|
|
||||||
} elseif($Url->whereAmI() == 'page') {
|
|
||||||
Theme::keywords($Page->tags());
|
Theme::keywords($Page->tags());
|
||||||
Theme::description($Page->description());
|
Theme::description($Page->description());
|
||||||
} else {
|
|
||||||
Theme::description($Site->description());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="content section-inner">
|
<div class="content section-inner">
|
||||||
<div class="posts">
|
<div class="posts">
|
||||||
<?php foreach($posts as $Post): ?>
|
<?php foreach($pages as $Post): ?>
|
||||||
<div class="post format-standard">
|
<div class="post format-standard">
|
||||||
<div class="post-bubbles">
|
<div class="post-bubbles">
|
||||||
<a href="<?php echo $Post->permalink() ?>" class="format-bubble" title="<?php echo $Post->title() ?>"></a>
|
<a href="<?php echo $Post->permalink() ?>" class="format-bubble" title="<?php echo $Post->title() ?>"></a>
|
||||||
|
|
|
@ -21,10 +21,36 @@
|
||||||
|
|
||||||
<h2 class="post-title"><a href="<?php echo $Page->permalink() ?>" rel="bookmark" title="<?php echo $Page->title() ?>"><?php echo $Page->title() ?></a></h2>
|
<h2 class="post-title"><a href="<?php echo $Page->permalink() ?>" rel="bookmark" title="<?php echo $Page->title() ?>"><?php echo $Page->title() ?></a></h2>
|
||||||
|
|
||||||
|
<div class="post-meta">
|
||||||
|
|
||||||
|
<span class="post-date"><a href="<?php echo $Page->permalink() ?>" title="<?php echo $Page->date() ?>"><?php echo $Page->date() ?></a></span>
|
||||||
|
<span class="date-sep"> / </span>
|
||||||
|
<span class="post-author"><?php
|
||||||
|
if( Text::isNotEmpty($Page->user('firstName')) || Text::isNotEmpty($Page->user('lastName')) ) {
|
||||||
|
echo $Page->user('firstName').' '.$Page->user('lastName');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo $Page->user('username');
|
||||||
|
}
|
||||||
|
?></span>
|
||||||
|
|
||||||
|
</div> <!-- /post-meta -->
|
||||||
</div> <!-- /post-header -->
|
</div> <!-- /post-header -->
|
||||||
|
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
<?php echo $Page->content() ?>
|
<?php echo $Page->content() ?>
|
||||||
|
|
||||||
|
<div class="post-cat-tags">
|
||||||
|
<p class="post-tags">Tags:
|
||||||
|
<?php
|
||||||
|
$tags = $Page->tags(true);
|
||||||
|
|
||||||
|
foreach($tags as $tagKey=>$tagName) {
|
||||||
|
echo '<a class="post-category" href="'.HTML_PATH_ROOT.$Url->filters('tag').'/'.$tagKey.'">'.$tagName.'</a>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div> <!-- /post-content -->
|
</div> <!-- /post-content -->
|
||||||
</div> <!-- /post content-inner -->
|
</div> <!-- /post content-inner -->
|
||||||
|
|
||||||
|
|
|
@ -1,67 +0,0 @@
|
||||||
<div class="content section-inner">
|
|
||||||
<div class="posts">
|
|
||||||
<div class="post">
|
|
||||||
|
|
||||||
<!-- Plugins Post Begin -->
|
|
||||||
<?php Theme::plugins('postBegin') ?>
|
|
||||||
|
|
||||||
<div class="content-inner comments-allowed">
|
|
||||||
<div class="post-header">
|
|
||||||
|
|
||||||
<?php if($Post->coverImage()) {
|
|
||||||
echo '<div class="featured-media">';
|
|
||||||
echo '<a href="'.$Post->permalink().'" rel="bookmark" title="'.$Post->title().'">';
|
|
||||||
echo '<img class="attachment-post-image wp-post-image cover-image" src="'.$Post->coverImage().'" alt="Cover Image">';
|
|
||||||
//echo '<div class="media-caption-container">';
|
|
||||||
//echo '<p class="media-caption"></p>';
|
|
||||||
//echo '</div>';
|
|
||||||
echo '</a>';
|
|
||||||
echo '</div> <!-- /featured-media -->';
|
|
||||||
} ?>
|
|
||||||
|
|
||||||
<h2 class="post-title"><a href="<?php echo $Post->permalink() ?>" rel="bookmark" title="<?php echo $Post->title() ?>"><?php echo $Post->title() ?></a></h2>
|
|
||||||
|
|
||||||
<div class="post-meta">
|
|
||||||
|
|
||||||
<span class="post-date"><a href="<?php echo $Post->permalink() ?>" title="<?php echo $Post->date() ?>"><?php echo $Post->date() ?></a></span>
|
|
||||||
<span class="date-sep"> / </span>
|
|
||||||
<span class="post-author"><?php
|
|
||||||
if( Text::isNotEmpty($Post->user('firstName')) || Text::isNotEmpty($Post->user('lastName')) ) {
|
|
||||||
echo $Post->user('firstName').' '.$Post->user('lastName');
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
echo $Post->user('username');
|
|
||||||
}
|
|
||||||
?></span>
|
|
||||||
|
|
||||||
</div> <!-- /post-meta -->
|
|
||||||
</div> <!-- /post-header -->
|
|
||||||
|
|
||||||
<div class="post-content">
|
|
||||||
<?php echo $Post->content() ?>
|
|
||||||
|
|
||||||
<div class="post-cat-tags">
|
|
||||||
<p class="post-tags">Tags:
|
|
||||||
<?php
|
|
||||||
$tags = $Post->tags(true);
|
|
||||||
|
|
||||||
foreach($tags as $tagKey=>$tagName) {
|
|
||||||
echo '<a class="post-category" href="'.HTML_PATH_ROOT.$Url->filters('tag').'/'.$tagKey.'">'.$tagName.'</a>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div> <!-- /post-content -->
|
|
||||||
</div> <!-- /post content-inner -->
|
|
||||||
|
|
||||||
<div class="comments">
|
|
||||||
<!-- Post plugins -->
|
|
||||||
<?php Theme::plugins('postEnd') ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div> <!-- /post -->
|
|
||||||
|
|
||||||
<div class="clear"></div>
|
|
||||||
|
|
||||||
</div> <!-- /posts -->
|
|
||||||
</div> <!-- /content section-inner -->
|
|
|
@ -6,10 +6,12 @@
|
||||||
<h3 class="widget-title">Recent Posts</h3>
|
<h3 class="widget-title">Recent Posts</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<?php
|
<?php
|
||||||
$posts = buildPostsForPage(0, 5, true, false);
|
$pages = $dbPages->getList(1, 5, true, false);
|
||||||
|
$keys = array_keys($pages);
|
||||||
|
|
||||||
foreach($posts as $Post) {
|
foreach($keys as $pageKey) {
|
||||||
echo '<li><a href="'.$Post->permalink().'">'.$Post->title().'</a></li>';
|
$page = buildPage($pageKey);
|
||||||
|
echo '<li><a href="'.$page->permalink().'">'.$page->title().'</a></li>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -29,7 +31,7 @@
|
||||||
global $dbTags;
|
global $dbTags;
|
||||||
global $Url;
|
global $Url;
|
||||||
|
|
||||||
$db = $dbTags->db['postsIndex'];
|
$db = $dbTags->db;
|
||||||
$filter = $Url->filters('tag');
|
$filter = $Url->filters('tag');
|
||||||
|
|
||||||
$tagArray = array();
|
$tagArray = array();
|
||||||
|
|
Loading…
Reference in New Issue