Lingonberry updated for Bludit V2.

Still very messy. I wanted to figure things out especially with the new pages system.
This commit is contained in:
Hakim Zulkufli 2017-08-07 03:50:01 +08:00
parent f675259fe9
commit 1832eca791
6 changed files with 55 additions and 107 deletions

View File

@ -2,19 +2,15 @@
<html class="js" lang="<?php echo $Site->language() ?>">
<head profile="http://gmpg.org/xfn/11">
<?php include(PATH_THEME_PHP.'head.php') ?>
<?php include(THEME_DIR_PHP.'head.php') ?>
</head>
<?php
if( ($Url->whereAmI()=='home') || ($Url->whereAmI()=='tag') || ($Url->whereAmI()=='blog') )
if( $WHERE_AM_I=='home' )
{
echo '<body class="header-image fullwidth">';
}
elseif($Url->whereAmI()=='post')
{
echo '<body class="single single-post">';
}
elseif($Url->whereAmI()=='page')
else
{
echo '<body class="page page-template-default">';
}
@ -24,19 +20,19 @@
<!-- Plugins Site Body Begin -->
<?php Theme::plugins('siteBodyBegin') ?>
<div class="navigation" >
<!-- <div class="navigation" >
<div class="navigation-inner section-inner">
<ul class="blog-menu">
<?php
$parents = $pagesParents[NO_PARENT_CHAR];
/** $parents = $pagesParents[NO_PARENT_CHAR];
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> ';
}
} */
?>
</ul>
<div class="clear"></div>
</div> <!-- /navigation-inner -->
</div> <!-- /navigation -->
<!-- </div> <!-- /navigation -->
<div class="header section">
<div class="header-inner section-inner">
@ -47,35 +43,31 @@
<a href="<?php echo $Site->url() ?>" rel="home"><?php echo $Site->title() ?></a>
</h1>
<div class="nav-toggle">
<!-- <div class="nav-toggle">
<div class="bar"></div>
<div class="bar"></div>
<div class="bar"></div>
<div class="clear"></div>
</div>
</div> -->
<div class="clear"></div>
</div> <!-- /header section -->
</div> <!-- /header-inner section-inner -->
<?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');
}
elseif($Url->whereAmI()=='page')
{
include(PATH_THEME_PHP.'page.php');
include(THEME_DIR_PHP.'page.php');
}
?>
<!-- Footer -->
<?php include(PATH_THEME_PHP.'sidebar.php') ?>
<?php include(THEME_DIR_PHP.'sidebar.php') ?>
<div class="credits section">
<div class="credits-inner section-inner">

View File

@ -1,31 +1,26 @@
<meta charset="utf-8">
<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>
<?php
// CSS
Theme::css(array(
'style.css',
'bludit.css'
echo Theme::css(array(
'css/style.css',
'css/bludit.css'
));
// Javascript
Theme::javascript(array(
echo Theme::javascript(array(
'jquery-1.12.0.min.js',
'jquery-migrate-1.2.1.min.js'
));
// <meta name="keywords" content="HTML,CSS,XML,JavaScript">
if($Url->whereAmI() == 'post') {
Theme::keywords($Post->tags());
Theme::description($Post->description());
} elseif($Url->whereAmI() == 'page') {
if($WHERE_AM_I == 'page') {
Theme::keywords($Page->tags());
Theme::description($Page->description());
} else {
Theme::description($Site->description());
}
}
?>

View File

@ -1,6 +1,6 @@
<div class="content section-inner">
<div class="posts">
<?php foreach($posts as $Post): ?>
<?php foreach($pages as $Post): ?>
<div class="post format-standard">
<div class="post-bubbles">
<a href="<?php echo $Post->permalink() ?>" class="format-bubble" title="<?php echo $Post->title() ?>"></a>

View File

@ -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>
<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 class="post-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-inner -->

View File

@ -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 -->

View File

@ -6,10 +6,12 @@
<h3 class="widget-title">Recent Posts</h3>
<ul>
<?php
$posts = buildPostsForPage(0, 5, true, false);
$pages = $dbPages->getList(1, 5, true, false);
$keys = array_keys($pages);
foreach($posts as $Post) {
echo '<li><a href="'.$Post->permalink().'">'.$Post->title().'</a></li>';
foreach($keys as $pageKey) {
$page = buildPage($pageKey);
echo '<li><a href="'.$page->permalink().'">'.$page->title().'</a></li>';
}
?>
</ul>
@ -29,7 +31,7 @@
global $dbTags;
global $Url;
$db = $dbTags->db['postsIndex'];
$db = $dbTags->db;
$filter = $Url->filters('tag');
$tagArray = array();