This commit is contained in:
Hristo Dipchikov 2016-08-05 11:19:05 +03:00
parent 05838e31a6
commit efdd2d1845
3 changed files with 13 additions and 12 deletions

View File

@ -45,7 +45,7 @@ class pluginLatestPosts extends Plugin {
foreach($posts as $Post) foreach($posts as $Post)
{ {
$html .= '<li>'; $html .= '<li class="plugin-title">';
$html .= '<a href="'.$Post->permalink().'">'.$Post->title().'</a>'; $html .= '<a href="'.$Post->permalink().'">'.$Post->title().'</a>';
$html .= '</li>'; $html .= '</li>';
} }

View File

@ -5,7 +5,7 @@ class pluginPages extends Plugin {
public function init() public function init()
{ {
$this->dbFields = array( $this->dbFields = array(
'homeLink'=>true, 'homeLink'=>1,
'label'=>'Pages' 'label'=>'Pages'
); );
} }
@ -20,7 +20,8 @@ class pluginPages extends Plugin {
$html .= '</div>'; $html .= '</div>';
$html .= '<div>'; $html .= '<div>';
$html .= '<input name="homeLink" id="jshomeLink" type="checkbox" value="true" '.($this->getDbField('homeLink')?'checked':'').'>'; $html .= '<input type="hidden" name="homeLink" value="0">';
$html .= '<input name="homeLink" id="jshomeLink" type="checkbox" value="1" '.($this->getDbField('homeLink')?'checked':'').'>';
$html .= '<label class="forCheckbox" for="jshomeLink">'.$Language->get('Show home link').'</label>'; $html .= '<label class="forCheckbox" for="jshomeLink">'.$Language->get('Show home link').'</label>';
$html .= '</div>'; $html .= '</div>';
@ -38,15 +39,15 @@ class pluginPages extends Plugin {
// Print the label if not empty. // Print the label if not empty.
$label = $this->getDbField('label'); $label = $this->getDbField('label');
if( !empty($label) ) { if( !empty($label) ) {
$html .= '<h2>'.$label.'</h2>'; $html .= '<h2 class="plugin-title">'.$label.'</h2>';
} }
$html .= '<div class="plugin-content">'; $html .= '<div class="plugin-content">';
$html .= '<ul>'; $html .= '<ul class="parents">';
// Show home link ? // Show home link ?
if($this->getDbField('homeLink')) { if($this->getDbField('homeLink')) {
$html .= '<li>'; $html .= '<li class="plugin-title">';
$html .= '<a class="parent'.( ($Url->whereAmI()=='home')?' active':'').'" href="'.$Site->homeLink().'">'.$Language->get('Home').'</a>'; $html .= '<a class="parent'.( ($Url->whereAmI()=='home')?' active':'').'" href="'.$Site->homeLink().'">'.$Language->get('Home').'</a>';
$html .= '</li>'; $html .= '</li>';
} }
@ -58,8 +59,8 @@ class pluginPages extends Plugin {
if( $parent->published() ) if( $parent->published() )
{ {
// Print the parent // Print the parent
$html .= '<li>'; $html .= '<li class="plugin-title">';
$html .= '<a class="parent '.( ($parent->key()==$Url->slug())?' active':'').'" href="'.$parent->permalink().'">'.$parent->title().'</a>'; $html .= '<a class="parent'.( ($parent->key()==$Url->slug())?' active':'').'" href="'.$parent->permalink().'">'.$parent->title().'</a>';
// Check if the parent has children // Check if the parent has children
if(isset($pagesParents[$parent->key()])) if(isset($pagesParents[$parent->key()]))

View File

@ -1,10 +1,10 @@
{ {
"author": "Bludit", "author": "Bludit",
"email": "", "email": "",
"website": "https://github.com/dignajar/bludit-plugins", "website": "https://plugins.bludit.com",
"version": "1.1", "version": "1.4",
"releaseDate": "2016-02-13", "releaseDate": "2016-05-28",
"license": "MIT", "license": "MIT",
"requires": "Bludit v1.1", "compatible": "1.5beta",
"notes": "" "notes": ""
} }