Merge pull request #3 from dignajar/master

Merge update from dignajar
This commit is contained in:
Ethan Chen 2015-09-23 16:28:30 +08:00
commit 5ca93b6d15
58 changed files with 700 additions and 295 deletions

2
.gitignore vendored
View File

@ -1,4 +1,6 @@
.DS_Store .DS_Store
!themes/pure
themes/*
content/databases content/databases
content/pages content/pages
content/posts content/posts

View File

@ -10,6 +10,6 @@ RewriteRule ^content/(.*)\.txt$ - [R=404,L]
# All URL process by index.php # All URL process by index.php
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*) index.php [L] RewriteRule ^(.*) index.php [PT,L]
</IfModule> </IfModule>

View File

@ -13,7 +13,7 @@ Social
------ ------
- [Twitter](https://twitter.com/bludit) - [Twitter](https://twitter.com/bludit)
- [Facebook](https://www.facebook.com/pages/Bludit/239255789455913) - [Facebook](https://www.facebook.com/bluditcms)
- [Google+](https://plus.google.com/+Bluditcms) - [Google+](https://plus.google.com/+Bluditcms)
Requirements Requirements

View File

@ -20,11 +20,16 @@ function setSettings($args)
// Add slash at the begin and end. // Add slash at the begin and end.
// This fields are in the settings->advanced mode // This fields are in the settings->advanced mode
if(isset($args['advanced'])) { if(isset($args['form-advanced'])) {
$args['url'] = Text::addSlashes($args['url'],false,true); $args['url'] = Text::addSlashes($args['url'],false,true);
$args['uriPost'] = Text::addSlashes($args['uriPost']); $args['uriPost'] = Text::addSlashes($args['uriPost']);
$args['uriPage'] = Text::addSlashes($args['uriPage']); $args['uriPage'] = Text::addSlashes($args['uriPage']);
$args['uriTag'] = Text::addSlashes($args['uriTag']); $args['uriTag'] = Text::addSlashes($args['uriTag']);
if(($args['uriPost']==$args['uriPage']) || ($args['uriPost']==$args['uriTag']) || ($args['uriPage']==$args['uriTag']) )
{
$args = array();
}
} }
if( $Site->set($args) ) { if( $Site->set($args) ) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 1005 B

View File

@ -1,20 +1,23 @@
<!doctype html> <!DOCTYPE HTML>
<html> <html>
<head> <head>
<base href="<?php echo HTML_PATH_ADMIN_THEME ?>"> <base href="<?php echo HTML_PATH_ADMIN_THEME ?>">
<meta charset="<?php echo CHARSET ?>"> <meta charset="<?php echo CHARSET ?>">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex,nofollow">
<title><?php echo $layout['title'] ?></title> <title><?php echo $layout['title'] ?></title>
<link rel="stylesheet" href="./css/kube.min.css?version=<?php echo BLUDIT_VERSION ?>"> <link rel="shortcut icon" type="image/x-icon" href="./css/favicon.png">
<link rel="stylesheet" href="./css/default.css?version=<?php echo BLUDIT_VERSION ?>">
<link rel="stylesheet" href="./css/jquery.datetimepicker.css?version=<?php echo BLUDIT_VERSION ?>">
<link rel="stylesheet" href="./css/css/font-awesome.css?version=<?php echo BLUDIT_VERSION ?>">
<script src="./js/jquery.min.js?version=<?php echo BLUDIT_VERSION ?>"></script> <link rel="stylesheet" type="text/css" href="./css/kube.min.css?version=<?php echo BLUDIT_VERSION ?>">
<script src="./js/kube.min.js?version=<?php echo BLUDIT_VERSION ?>"></script> <link rel="stylesheet" type="text/css" href="./css/default.css?version=<?php echo BLUDIT_VERSION ?>">
<script src="./js/jquery.datetimepicker.js?version=<?php echo BLUDIT_VERSION ?>"></script> <link rel="stylesheet" type="text/css" href="./css/jquery.datetimepicker.css?version=<?php echo BLUDIT_VERSION ?>">
<link rel="stylesheet" type="text/css" href="./css/css/font-awesome.css?version=<?php echo BLUDIT_VERSION ?>">
<script charset="utf-8" src="./js/jquery.min.js?version=<?php echo BLUDIT_VERSION ?>"></script>
<script charset="utf-8" src="./js/kube.min.js?version=<?php echo BLUDIT_VERSION ?>"></script>
<script charset="utf-8" src="./js/jquery.datetimepicker.js?version=<?php echo BLUDIT_VERSION ?>"></script>
<!-- Plugins --> <!-- Plugins -->
<?php Theme::plugins('adminHead') ?> <?php Theme::plugins('adminHead') ?>
@ -96,7 +99,7 @@ $(document).ready(function() {
<!-- Plugins --> <!-- Plugins -->
<?php Theme::plugins('adminBodyEnd') ?> <?php Theme::plugins('adminBodyEnd') ?>
<div id="footer">Bludit <?php echo BLUDIT_VERSION ?> | Load time <?php echo (microtime(true) - $loadTime) ?></div> <div id="footer">Bludit <?php echo BLUDIT_VERSION ?> | Load time <?php echo round((microtime(true) - $loadTime), 5) ?></div>
</body> </body>
</html> </html>

View File

@ -31,7 +31,7 @@
</label> </label>
<label> <label>
Email <?php $Language->p('Email') ?>
<input type="text" name="email" class="width-50" value="<?php echo (isset($_POST['email'])?$_POST['email']:'') ?>"> <input type="text" name="email" class="width-50" value="<?php echo (isset($_POST['email'])?$_POST['email']:'') ?>">
<div class="forms-desc"><?php $Language->p('email-will-not-be-publicly-displayed') ?></div> <div class="forms-desc"><?php $Language->p('email-will-not-be-publicly-displayed') ?></div>
</label> </label>

View File

@ -7,6 +7,8 @@
<tr> <tr>
<th><?php $Language->p('Title') ?></th> <th><?php $Language->p('Title') ?></th>
<th><?php $Language->p('Parent') ?></th> <th><?php $Language->p('Parent') ?></th>
<th><?php $Language->p('Friendly URL') ?></th>
<th class="text-centered"><?php $Language->p('Position') ?></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -26,6 +28,8 @@
echo '<tr>'; echo '<tr>';
echo '<td>'.($Page->parentKey()?NO_PARENT_CHAR:'').'<a href="'.HTML_PATH_ADMIN_ROOT.'edit-page/'.$Page->key().'">'.($Page->published()?'':'<span class="label label-outline label-red smaller">'.$Language->g('Draft').'</span> ').($Page->title()?$Page->title():'<span class="label label-outline label-blue smaller">'.$Language->g('Empty title').'</span> ').'</a></td>'; echo '<td>'.($Page->parentKey()?NO_PARENT_CHAR:'').'<a href="'.HTML_PATH_ADMIN_ROOT.'edit-page/'.$Page->key().'">'.($Page->published()?'':'<span class="label label-outline label-red smaller">'.$Language->g('Draft').'</span> ').($Page->title()?$Page->title():'<span class="label label-outline label-blue smaller">'.$Language->g('Empty title').'</span> ').'</a></td>';
echo '<td>'.$parentTitle.'</td>'; echo '<td>'.$parentTitle.'</td>';
echo '<td><a target="_blank" href="'.$Page->permalink().'">'.$Url->filters('page').'/'.$Page->key().'</a></td>';
echo '<td class="text-centered">'.$Page->position().'</td>';
echo '</tr>'; echo '</tr>';
} }
} }

6
admin/views/manage-posts.php Executable file → Normal file
View File

@ -6,7 +6,8 @@
<thead> <thead>
<tr> <tr>
<th><?php $Language->p('Title') ?></th> <th><?php $Language->p('Title') ?></th>
<th><?php $Language->p('Published date') ?></th> <th class="text-centered"><?php $Language->p('Published date') ?></th>
<th><?php $Language->p('Friendly URL') ?></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -24,7 +25,8 @@
echo '<tr>'; echo '<tr>';
echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'edit-post/'.$Post->key().'">'.($status?'<span class="label label-outline label-red smaller">'.$status.'</span>':'').($Post->title()?$Post->title():'<span class="label label-outline label-blue smaller">'.$Language->g('Empty title').'</span> ').'</a></td>'; echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'edit-post/'.$Post->key().'">'.($status?'<span class="label label-outline label-red smaller">'.$status.'</span>':'').($Post->title()?$Post->title():'<span class="label label-outline label-blue smaller">'.$Language->g('Empty title').'</span> ').'</a></td>';
echo '<td>'.$Post->date().'</td>'; echo '<td class="text-centered">'.$Post->date().'</td>';
echo '<td><a target="_blank" href="'.$Post->permalink().'">'.$Url->filters('post').'/'.$Post->key().'</a></td>';
echo '</tr>'; echo '</tr>';
} }

10
install.php Executable file → Normal file
View File

@ -226,7 +226,7 @@ function install($adminPassword, $email)
'error'=>array( 'error'=>array(
'description'=>'Error page', 'description'=>'Error page',
'username'=>'admin', 'username'=>'admin',
'tags'=>'', 'tags'=>array(),
'status'=>'published', 'status'=>'published',
'date'=>$currentDate, 'date'=>$currentDate,
'position'=>0 'position'=>0
@ -241,7 +241,7 @@ function install($adminPassword, $email)
'description'=>'Welcome to Bludit', 'description'=>'Welcome to Bludit',
'username'=>'admin', 'username'=>'admin',
'status'=>'published', 'status'=>'published',
'tags'=>'bludit, cms, flat-file', 'tags'=>array('bludit'=>'Bludit','cms'=>'CMS','flat-files'=>'Flat files'),
'allowComments'=>false, 'allowComments'=>false,
'date'=>$currentDate 'date'=>$currentDate
) )
@ -264,7 +264,8 @@ function install($adminPassword, $email)
'uriPost'=>'/post/', 'uriPost'=>'/post/',
'uriPage'=>'/', 'uriPage'=>'/',
'uriTag'=>'/tag/', 'uriTag'=>'/tag/',
'url'=>'http://'.DOMAIN.HTML_PATH_ROOT 'url'=>'http://'.DOMAIN.HTML_PATH_ROOT,
'cliMode'=>true
); );
file_put_contents(PATH_DATABASES.'site.php', $dataHead.json_encode($data, JSON_PRETTY_PRINT), LOCK_EX); file_put_contents(PATH_DATABASES.'site.php', $dataHead.json_encode($data, JSON_PRETTY_PRINT), LOCK_EX);
@ -304,7 +305,8 @@ function install($adminPassword, $email)
array( array(
'postsIndex'=>array( 'postsIndex'=>array(
'bludit'=>array('name'=>'Bludit', 'posts'=>array('first-post')), 'bludit'=>array('name'=>'Bludit', 'posts'=>array('first-post')),
'cms'=>array('name'=>'cms', 'posts'=>array('first-post')) 'cms'=>array('name'=>'CMS', 'posts'=>array('first-post')),
'flat-files'=>array('name'=>'Flat files', 'posts'=>array('first-post'))
), ),
'pagesIndex'=>array() 'pagesIndex'=>array()
), ),

View File

@ -134,20 +134,34 @@ $Parsedown = new Parsedown();
$Security = new Security(); $Security = new Security();
// HTML PATHs // HTML PATHs
$base = (dirname(getenv('SCRIPT_NAME'))==DS)?'/':dirname(getenv('SCRIPT_NAME')).'/'; //$base = (dirname(getenv('SCRIPT_NAME'))==DS)?'/':dirname(getenv('SCRIPT_NAME')).'/';
$base = empty( $_SERVER['SCRIPT_NAME'] ) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
$base = dirname($base);
if($base!=DS) {
$base = $base.'/';
}
define('HTML_PATH_ROOT', $base); define('HTML_PATH_ROOT', $base);
// Paths for themes
define('HTML_PATH_THEMES', HTML_PATH_ROOT.'themes/'); define('HTML_PATH_THEMES', HTML_PATH_ROOT.'themes/');
define('HTML_PATH_THEME', HTML_PATH_ROOT.'themes/'.$Site->theme().'/'); define('HTML_PATH_THEME', HTML_PATH_ROOT.'themes/'.$Site->theme().'/');
define('HTML_PATH_THEME_CSS', HTML_PATH_THEME.'css/'); define('HTML_PATH_THEME_CSS', HTML_PATH_THEME.'css/');
define('HTML_PATH_THEME_JS', HTML_PATH_THEME.'js/'); define('HTML_PATH_THEME_JS', HTML_PATH_THEME.'js/');
define('HTML_PATH_THEME_IMG', HTML_PATH_THEME.'img/');
define('HTML_PATH_ADMIN_THEME', HTML_PATH_ROOT.'admin/themes/'.$Site->adminTheme().'/'); define('HTML_PATH_ADMIN_THEME', HTML_PATH_ROOT.'admin/themes/'.$Site->adminTheme().'/');
define('HTML_PATH_ADMIN_THEME_JS', HTML_PATH_ADMIN_THEME.'js/');
define('HTML_PATH_ADMIN_ROOT', HTML_PATH_ROOT.'admin/'); define('HTML_PATH_ADMIN_ROOT', HTML_PATH_ROOT.'admin/');
define('HTML_PATH_UPLOADS', HTML_PATH_ROOT.'content/uploads/'); define('HTML_PATH_UPLOADS', HTML_PATH_ROOT.'content/uploads/');
define('HTML_PATH_PLUGINS', HTML_PATH_ROOT.'plugins/'); define('HTML_PATH_PLUGINS', HTML_PATH_ROOT.'plugins/');
define('JQUERY', HTML_PATH_ADMIN_THEME_JS.'jquery.min.js');
// PHP paths with dependency // PHP paths with dependency
define('PATH_THEME', PATH_ROOT.'themes/'.$Site->theme().'/'); define('PATH_THEME', PATH_ROOT.'themes/'.$Site->theme().'/');
define('PATH_THEME_PHP', PATH_THEME.'php'.DS);
// Objects with dependency // Objects with dependency
$Language = new dbLanguage( $Site->locale() ); $Language = new dbLanguage( $Site->locale() );

View File

@ -30,26 +30,21 @@ function build_page($key)
global $dbUsers; global $dbUsers;
global $Parsedown; global $Parsedown;
// Page object. // Page object, content from FILE.
$Page = new Page($key); $Page = new Page($key);
if( !$Page->isValid() ) { if( !$Page->isValid() ) {
return false; return false;
} }
// Page database. // Page database, content from DATABASE JSON.
$db = $dbPages->getDb($key); $db = $dbPages->getDb($key);
if( !$db ) { if( !$db ) {
return false; return false;
} }
// Foreach field from database. // Foreach field from DATABASE.
foreach($db as $field=>$value) foreach($db as $field=>$value) {
{ $Page->setField($field, $value);
// Not overwrite the value from file.
$Page->setField($field, $value, false);
// Overwrite the value on the db.
//$dbPages->setDb($key, $field, $value);
} }
// Content in raw format // Content in raw format
@ -141,6 +136,11 @@ function build_all_pages()
// Main // Main
// ============================================================================ // ============================================================================
// Search for changes on pages by the user.
if( $Site->cliMode() ) {
$dbPages->regenerateCli();
}
// Filter by page, then build it // Filter by page, then build it
if( ($Url->whereAmI()==='page') && ($Url->notFound()===false) ) if( ($Url->whereAmI()==='page') && ($Url->notFound()===false) )
{ {

View File

@ -34,25 +34,23 @@ function buildPost($key)
global $Parsedown; global $Parsedown;
global $Site; global $Site;
// Post object, this get the content from the file. // Post object, content from FILE.
$Post = new Post($key); $Post = new Post($key);
if( !$Post->isValid() ) { if( !$Post->isValid() ) {
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying build the post from file with key: '.$key); Log::set(__METHOD__.LOG_SEP.'Error occurred when trying build the post from file with key: '.$key);
return false; return false;
} }
// Page database, this get the contente from the database json. // Post database, content from DATABASE JSON.
$db = $dbPosts->getDb($key); $db = $dbPosts->getDb($key);
if( !$db ) { if( !$db ) {
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying build the post from database with key: '.$key); Log::set(__METHOD__.LOG_SEP.'Error occurred when trying build the post from database with key: '.$key);
return false; return false;
} }
// Foreach field from database. // Foreach field from DATABASE.
foreach($db as $field=>$value) foreach($db as $field=>$value) {
{ $Post->setField($field, $value);
// Not overwrite the value from file.
$Post->setField($field, $value, false);
} }
// Content in raw format // Content in raw format
@ -117,6 +115,13 @@ function buildPostsForPage($pageNumber=0, $amount=POSTS_PER_PAGE_ADMIN, $removeU
// Main // Main
// ============================================================================ // ============================================================================
// Search for changes on posts by the user.
if( $Site->cliMode() ) {
if($dbPosts->regenerateCli()) {
reIndexTagsPosts();
}
}
// Execute the scheduler. // Execute the scheduler.
if( $dbPosts->scheduler() ) { if( $dbPosts->scheduler() ) {
// Reindex dbTags. // Reindex dbTags.

View File

@ -87,7 +87,7 @@ class dbLanguage extends dbJSON
// Returns an array with all dictionaries. // Returns an array with all dictionaries.
public function getLanguageList() public function getLanguageList()
{ {
$files = glob(PATH_LANGUAGES.'*.json'); $files = Filesystem::listFiles(PATH_LANGUAGES, '*', 'json');
$tmp = array(); $tmp = array();

View File

@ -9,7 +9,7 @@ class dbPages extends dbJSON
'content'=> array('inFile'=>true, 'value'=>''), 'content'=> array('inFile'=>true, 'value'=>''),
'description'=> array('inFile'=>false, 'value'=>''), 'description'=> array('inFile'=>false, 'value'=>''),
'username'=> array('inFile'=>false, 'value'=>''), 'username'=> array('inFile'=>false, 'value'=>''),
'tags'=> array('inFile'=>false, 'value'=>''), 'tags'=> array('inFile'=>false, 'value'=>array()),
'status'=> array('inFile'=>false, 'value'=>'draft'), 'status'=> array('inFile'=>false, 'value'=>'draft'),
'date'=> array('inFile'=>false, 'value'=>0), 'date'=> array('inFile'=>false, 'value'=>0),
'position'=> array('inFile'=>false, 'value'=>0) 'position'=> array('inFile'=>false, 'value'=>0)
@ -43,6 +43,10 @@ class dbPages extends dbJSON
{ {
if( isset($args[$field]) ) if( isset($args[$field]) )
{ {
if($field=='tags') {
$tmpValue = $this->generateTags($args['tags']);
}
else {
// Sanitize if will be saved on database. // Sanitize if will be saved on database.
if( !$options['inFile'] ) { if( !$options['inFile'] ) {
$tmpValue = Sanitize::html($args[$field]); $tmpValue = Sanitize::html($args[$field]);
@ -51,6 +55,7 @@ class dbPages extends dbJSON
$tmpValue = $args[$field]; $tmpValue = $args[$field];
} }
} }
}
// Default value for the field. // Default value for the field.
else else
{ {
@ -120,6 +125,10 @@ class dbPages extends dbJSON
{ {
if( isset($args[$field]) ) if( isset($args[$field]) )
{ {
if($field=='tags') {
$tmpValue = $this->generateTags($args['tags']);
}
else {
// Sanitize if will be saved on database. // Sanitize if will be saved on database.
if( !$options['inFile'] ) { if( !$options['inFile'] ) {
$tmpValue = Sanitize::html($args[$field]); $tmpValue = Sanitize::html($args[$field]);
@ -128,6 +137,7 @@ class dbPages extends dbJSON
$tmpValue = $args[$field]; $tmpValue = $args[$field];
} }
} }
}
// Default value for the field. // Default value for the field.
else else
{ {
@ -285,6 +295,31 @@ class dbPages extends dbJSON
return $this->db; return $this->db;
} }
// Returns an Array, array('tagSlug'=>'tagName')
// (string) $tags, tag list separeted by comma.
public function generateTags($tags)
{
$tmp = array();
$tags = trim($tags);
if(empty($tags)) {
return $tmp;
}
// Make array
$tags = explode(',', $tags);
foreach($tags as $tag)
{
$tag = trim($tag);
$tagKey = Text::cleanUrl($tag);
$tmp[$tagKey] = $tag;
}
return $tmp;
}
public function regenerateCli() public function regenerateCli()
{ {
$db = $this->db; $db = $this->db;
@ -300,8 +335,10 @@ class dbPages extends dbJSON
$fields['status'] = CLI_STATUS; $fields['status'] = CLI_STATUS;
$fields['date'] = Date::current(DB_DATE_FORMAT); $fields['date'] = Date::current(DB_DATE_FORMAT);
$fields['username'] = 'admin';
$tmpPaths = glob(PATH_PAGES.'*', GLOB_ONLYDIR); //$tmpPaths = glob(PATH_PAGES.'*', GLOB_ONLYDIR);
$tmpPaths = Filesystem::listDirectories(PATH_PAGES);
foreach($tmpPaths as $directory) foreach($tmpPaths as $directory)
{ {
$key = basename($directory); $key = basename($directory);
@ -312,7 +349,8 @@ class dbPages extends dbJSON
} }
// Recovery pages from subdirectories // Recovery pages from subdirectories
$subPaths = glob($directory.DS.'*', GLOB_ONLYDIR); //$subPaths = glob($directory.DS.'*', GLOB_ONLYDIR);
$subPaths = Filesystem::listDirectories($directory.DS);
foreach($subPaths as $subDirectory) foreach($subPaths as $subDirectory)
{ {
$subKey = basename($subDirectory); $subKey = basename($subDirectory);
@ -335,13 +373,27 @@ class dbPages extends dbJSON
// Update all fields from FILE to DATABASE. // Update all fields from FILE to DATABASE.
foreach($fields as $f=>$v) foreach($fields as $f=>$v)
{ {
if($Page->getField($f)) { // If the field exists on the FILE, update it.
// DEBUG: Validar/Sanitizar valores, ej: validar formato fecha if($Page->getField($f))
$this->db[$key][$f] = $Page->getField($f); {
} $valueFromFile = $Page->getField($f);
}
// DEBUG: Update tags if($f=='tags') {
// Generate tags array.
$this->db[$key]['tags'] = $this->generateTags($valueFromFile);
}
elseif($f=='date') {
// Validate Date from file
if(Valid::date($valueFromFile, DB_DATE_FORMAT)) {
$this->db[$key]['date'] = $valueFromFile;
}
}
else {
// Sanitize the values from file.
$this->db[$key][$f] = Sanitize::html($valueFromFile);
}
}
}
} }
// Remove old pages from db // Remove old pages from db

View File

@ -8,7 +8,7 @@ class dbPosts extends dbJSON
'description'=> array('inFile'=>false, 'value'=>''), 'description'=> array('inFile'=>false, 'value'=>''),
'username'=> array('inFile'=>false, 'value'=>''), 'username'=> array('inFile'=>false, 'value'=>''),
'status'=> array('inFile'=>false, 'value'=>'draft'), // published, draft, scheduled 'status'=> array('inFile'=>false, 'value'=>'draft'), // published, draft, scheduled
'tags'=> array('inFile'=>false, 'value'=>''), 'tags'=> array('inFile'=>false, 'value'=>array()),
'allowComments'=> array('inFile'=>false, 'value'=>false), 'allowComments'=> array('inFile'=>false, 'value'=>false),
'date'=> array('inFile'=>false, 'value'=>'') 'date'=> array('inFile'=>false, 'value'=>'')
); );
@ -112,17 +112,16 @@ class dbPosts extends dbJSON
$args['status'] = 'scheduled'; $args['status'] = 'scheduled';
} }
// Tags
if(Text::isNotEmpty($args['tags'])) {
$cleanTags = array_map('trim', explode(',', $args['tags']));
$args['tags'] = implode(',', $cleanTags);
}
// Verify arguments with the database fields. // Verify arguments with the database fields.
foreach($this->dbFields as $field=>$options) foreach($this->dbFields as $field=>$options)
{ {
// If the field is in the arguments.
if( isset($args[$field]) ) if( isset($args[$field]) )
{ {
if($field=='tags') {
$tmpValue = $this->generateTags($args['tags']);
}
else {
// Sanitize if will be saved on database. // Sanitize if will be saved on database.
if( !$options['inFile'] ) { if( !$options['inFile'] ) {
$tmpValue = Sanitize::html($args[$field]); $tmpValue = Sanitize::html($args[$field]);
@ -131,7 +130,8 @@ class dbPosts extends dbJSON
$tmpValue = $args[$field]; $tmpValue = $args[$field];
} }
} }
// Default value for the field. }
// Default value if not in the arguments.
else else
{ {
$tmpValue = $options['value']; $tmpValue = $options['value'];
@ -332,6 +332,31 @@ class dbPosts extends dbJSON
return false; return false;
} }
// Returns an Array, array('tagSlug'=>'tagName')
// (string) $tags, tag list separeted by comma.
public function generateTags($tags)
{
$tmp = array();
$tags = trim($tags);
if(empty($tags)) {
return $tmp;
}
// Make array
$tags = explode(',', $tags);
foreach($tags as $tag)
{
$tag = trim($tag);
$tagKey = Text::cleanUrl($tag);
$tmp[$tagKey] = $tag;
}
return $tmp;
}
// Sort posts by date. // Sort posts by date.
public function sortByDate($HighToLow=true) public function sortByDate($HighToLow=true)
{ {
@ -353,13 +378,15 @@ class dbPosts extends dbJSON
return $a['date']<$b['date']; return $a['date']<$b['date'];
} }
// Return TRUE if there are new posts, FALSE otherwise.
public function regenerateCli() public function regenerateCli()
{ {
$db = $this->db; $db = $this->db;
$newPaths = array(); $allPosts = array();
$fields = array(); $fields = array();
$currentDate = Date::current(DB_DATE_FORMAT);
// Default fields and value // Generate default fields and values.
foreach($this->dbFields as $field=>$options) { foreach($this->dbFields as $field=>$options) {
if(!$options['inFile']) { if(!$options['inFile']) {
$fields[$field] = $options['value']; $fields[$field] = $options['value'];
@ -367,45 +394,69 @@ class dbPosts extends dbJSON
} }
$fields['status'] = CLI_STATUS; $fields['status'] = CLI_STATUS;
$fields['date'] = Date::current(DB_DATE_FORMAT); $fields['date'] = $currentDate;
$fields['username'] = 'admin';
// Recovery pages from the first level of directories // Recovery posts from the first level of directories
$tmpPaths = glob(PATH_POSTS.'*', GLOB_ONLYDIR); $tmpPaths = Filesystem::listDirectories(PATH_POSTS);
foreach($tmpPaths as $directory) foreach($tmpPaths as $directory)
{ {
if(file_exists($directory.DS.'index.txt'))
{
// The key is the directory name.
$key = basename($directory); $key = basename($directory);
if(file_exists($directory.DS.'index.txt')) { // All keys posts
// The key is the directory name $allPosts[$key] = true;
$newPaths[$key] = true;
}
}
foreach($newPaths as $key=>$value) // Create the new entry if not exists on DATABASE.
{
if(!isset($this->db[$key])) { if(!isset($this->db[$key])) {
// New entry on database
$this->db[$key] = $fields; $this->db[$key] = $fields;
} }
// Create the post from FILE.
$Post = new Post($key); $Post = new Post($key);
// Update all fields from FILE to DATABASE. // Update all fields from FILE to DATABASE.
foreach($fields as $f=>$v) foreach($fields as $f=>$v)
{ {
if($Post->getField($f)) { // If the field exists on the FILE, update it.
// DEBUG: Validar/Sanitizar valores, ej: validar formato fecha if($Post->getField($f))
$this->db[$key][$f] = $Post->getField($f); {
$valueFromFile = $Post->getField($f);
if($f=='tags') {
// Generate tags array.
$this->db[$key]['tags'] = $this->generateTags($valueFromFile);
}
elseif($f=='date') {
// Validate Date from file
if(Valid::date($valueFromFile, DB_DATE_FORMAT)) {
$this->db[$key]['date'] = $valueFromFile;
if( $valueFromFile>$currentDate ) {
$this->db[$key]['status'] = 'scheduled';
}
}
}
else {
// Sanitize the values from file.
$this->db[$key][$f] = Sanitize::html($valueFromFile);
}
}
}
} }
} }
// DEBUG: Update tags // Remove orphan posts from db, the orphan posts are posts deleted by hand (directory deleted).
} foreach( array_diff_key($db, $allPosts) as $key=>$data ) {
// Remove old posts from db
foreach( array_diff_key($db, $newPaths) as $key=>$data ) {
unset($this->db[$key]); unset($this->db[$key]);
} }
// Sort posts before save.
$this->sortByDate();
// Save the database. // Save the database.
if( $this->save() === false ) { if( $this->save() === false ) {
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to save the database file.'); Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to save the database file.');

View File

@ -17,7 +17,8 @@ class dbSite extends dbJSON
'uriPage'=> array('inFile'=>false, 'value'=>'/'), 'uriPage'=> array('inFile'=>false, 'value'=>'/'),
'uriPost'=> array('inFile'=>false, 'value'=>'/post/'), 'uriPost'=> array('inFile'=>false, 'value'=>'/post/'),
'uriTag'=> array('inFile'=>false, 'value'=>'/tag/'), 'uriTag'=> array('inFile'=>false, 'value'=>'/tag/'),
'url'=> array('inFile'=>false, 'value'=>'') 'url'=> array('inFile'=>false, 'value'=>''),
'cliMode'=> array('inFile'=>false, 'value'=>true)
); );
function __construct() function __construct()
@ -63,8 +64,9 @@ class dbSite extends dbJSON
$filters['page'] = $this->db['uriPage']; $filters['page'] = $this->db['uriPage'];
$filters['tag'] = $this->db['uriTag']; $filters['tag'] = $this->db['uriTag'];
if(empty($filter)) if(empty($filter)) {
return $filters; return $filters;
}
return $filters[$filter]; return $filters[$filter];
} }
@ -96,15 +98,6 @@ class dbSite extends dbJSON
return $this->db['slogan']; return $this->db['slogan'];
} }
public function advancedOptions()
{
if($this->db['advancedOptions']==='true') {
return true;
}
return false;
}
// Returns the site description. // Returns the site description.
public function description() public function description()
{ {
@ -135,6 +128,12 @@ class dbSite extends dbJSON
return $this->db['url']; return $this->db['url'];
} }
// Returns TRUE if the cli mode is enabled, otherwise FALSE.
public function cliMode()
{
return $this->db['cliMode'];
}
// Returns the relative home link // Returns the relative home link
public function homeLink() public function homeLink()
{ {

View File

@ -59,17 +59,10 @@ class dbTags extends dbJSON
// Foreach post // Foreach post
foreach($db as $postKey=>$values) foreach($db as $postKey=>$values)
{ {
$explode = explode(',', $values['tags']); $tags = $values['tags'];
// Foreach tag from post // Foreach tag from post
foreach($explode as $tagName) foreach($tags as $tagKey=>$tagName)
{
$tagName = trim($tagName);
$tagKey = $tagName;
//$tagKey = Text::cleanUrl($tagName);
// If the tag is not empty.
if(Text::isNotEmpty($tagName))
{ {
if( isset($tagsIndex[$tagKey]) ) { if( isset($tagsIndex[$tagKey]) ) {
array_push($tagsIndex[$tagKey]['posts'], $postKey); array_push($tagsIndex[$tagKey]['posts'], $postKey);
@ -80,7 +73,6 @@ class dbTags extends dbJSON
} }
} }
} }
}
$this->db['postsIndex'] = $tagsIndex; $this->db['postsIndex'] = $tagsIndex;

View File

@ -3,9 +3,28 @@
class Filesystem { class Filesystem {
// NEW // NEW
// Returns an array with the absolutes directories.
public static function listDirectories($path, $regex='*') public static function listDirectories($path, $regex='*')
{ {
return glob($path.$regex, GLOB_ONLYDIR); $directories = glob($path.$regex, GLOB_ONLYDIR);
if(empty($directories)) {
return array();
}
return $directories;
}
public static function listFiles($path, $regex='*', $extension)
{
$files = glob($path.$regex.'.'.$extension);
if(empty($files)) {
return array();
}
return $files;
} }
public static function mkdir($pathname, $recursive=false) public static function mkdir($pathname, $recursive=false)

View File

@ -4,6 +4,17 @@ class Theme {
// NEW // NEW
public static function favicon($file='favicon.png', $path=HTML_PATH_THEME_IMG, $echo=true)
{
$tmp = '<link rel="shortcut icon" href="'.$path.$file.'" type="image/x-icon">'.PHP_EOL;
if($echo) {
echo $tmp;
}
return $tmp;
}
public static function css($files, $path=HTML_PATH_THEME_CSS, $echo=true) public static function css($files, $path=HTML_PATH_THEME_CSS, $echo=true)
{ {
if(!is_array($files)) { if(!is_array($files)) {
@ -109,6 +120,16 @@ class Theme {
} }
} }
public static function jquery($echo=true)
{
$tmp = '<script src="'.JQUERY.'"></script>'.PHP_EOL;
if($echo) {
echo $tmp;
}
return $tmp;
}
// OLD // OLD
@ -120,17 +141,8 @@ class Theme {
return BLOG_URL; return BLOG_URL;
} }
public static function jquery($path=JS_JQUERY)
{
$tmp = '<script src="'.$path.'"></script>'.PHP_EOL;
return $tmp;
}
public static function favicon()
{
return '<link rel="shortcut icon" href="'.HTML_THEME_CSS.'img/favicon.ico" type="image/x-icon">'.PHP_EOL;
}
public static function name() public static function name()
{ {

View File

@ -28,7 +28,8 @@ class Valid {
public static function date($date, $format='Y-m-d H:i:s') public static function date($date, $format='Y-m-d H:i:s')
{ {
$tmp = DateTime::createFromFormat($format, $date); $tmp = DateTime::createFromFormat($format, $date);
return $tmp && $tmp->format($format) == $date;
return $tmp && $tmp->format($format)==$date;
} }
} }

View File

@ -49,15 +49,28 @@ class Page extends fileContent
return $this->getField('description'); return $this->getField('description');
} }
public function tags() public function tags($returnsArray=false)
{ {
return $this->getField('tags'); global $Url;
$tags = $this->getField('tags');
if($returnsArray) {
if($tags==false) {
return array();
} }
public function tagsArray() return $tags;
{ }
$tags = $this->getField('tags'); else {
return explode(',', $tags); if($tags==false) {
return false;
}
// Return string with tags separeted by comma.
return implode(', ', $tags);
}
} }
public function position() public function position()
@ -141,7 +154,8 @@ class Page extends fileContent
public function children() public function children()
{ {
$tmp = array(); $tmp = array();
$paths = glob(PATH_PAGES.$this->getField('key').DS.'*', GLOB_ONLYDIR); //$paths = glob(PATH_PAGES.$this->getField('key').DS.'*', GLOB_ONLYDIR);
$paths = Filesystem::listDirectories(PATH_PAGES.$this->getField('key').DS);
foreach($paths as $path) { foreach($paths as $path) {
array_push($tmp, basename($path)); array_push($tmp, basename($path));
} }

View File

@ -118,10 +118,20 @@ class Post extends fileContent
$tags = $this->getField('tags'); $tags = $this->getField('tags');
if($returnsArray) { if($returnsArray) {
return explode(',', $tags);
if($tags==false) {
return array();
}
return $tags;
} }
else { else {
return $tags; if($tags==false) {
return false;
}
// Return string with tags separeted by comma.
return implode(', ', $tags);
} }
} }

0
languages/cs_CZ.json Executable file → Normal file
View File

125
languages/de_DE.json Executable file → Normal file
View File

@ -3,7 +3,7 @@
{ {
"native": "Deutsch (Deutschland)", "native": "Deutsch (Deutschland)",
"english-name": "German", "english-name": "German",
"last-update": "2015-08-09", "last-update": "2015-09-22",
"author": "Edi", "author": "Edi",
"email": "egoetschel@clickwork.ch", "email": "egoetschel@clickwork.ch",
"website": "http://www.clickwork.ch" "website": "http://www.clickwork.ch"
@ -16,27 +16,27 @@
"dashboard": "Dashboard", "dashboard": "Dashboard",
"role": "Rolle", "role": "Rolle",
"post": "Beitrag", "post": "Beitrag",
"posts": "Beitr&auml;ge", "posts": "Beiträge",
"users": "Benutzer", "users": "Benutzer",
"administrator": "Administrator", "administrator": "Administrator",
"add": "Hinzuf&uuml;gen", "add": "Hinzufügen",
"cancel": "Abbrechen", "cancel": "Abbrechen",
"content": "Inhalt", "content": "Inhalt",
"title": "Titel", "title": "Titel",
"no-parent": "Keine &uuml;bergeordnete Seite", "no-parent": "Keine übergeordnete Seite",
"edit-page": "Seite bearbeiten", "edit-page": "Seite bearbeiten",
"edit-post": "Beitrag bearbeiten", "edit-post": "Beitrag bearbeiten",
"add-a-new-user": "Neuer Benutzer", "add-a-new-user": "Neuer Benutzer",
"parent": "&Uuml;bergeordnete Seite", "parent": "Übergeordnete Seite",
"friendly-url": "Pretty URL", "friendly-url": "Pretty URL",
"description": "Beschreibung", "description": "Beschreibung",
"posted-by": "Ver&ouml;ffentlicht von", "posted-by": "Veröffentlicht von",
"tags": "Schlagw&ouml;rter", "tags": "Schlagwörter",
"position": "Position", "position": "Position",
"save": "Speichern", "save": "Speichern",
"draft": "Entwurf", "draft": "Entwurf",
"delete": "L&ouml;schen", "delete": "Löschen",
"registered": "Hinzugef&uuml;gt", "registered": "Hinzugefügt",
"Notifications": "Benachrichtigungen", "Notifications": "Benachrichtigungen",
"profile": "Profil", "profile": "Profil",
"email": "E-Mail", "email": "E-Mail",
@ -50,14 +50,14 @@
"manage": "Verwaltung", "manage": "Verwaltung",
"themes": "Themes", "themes": "Themes",
"prev-page": "Vorhergehende Seite", "prev-page": "Vorhergehende Seite",
"next-page": "N&auml;chste Seite", "next-page": "Nächste Seite",
"configure-plugin": "Plugin konfigurieren", "configure-plugin": "Plugin konfigurieren",
"confirm-delete-this-action-cannot-be-undone": "Bestaetige das Loeschen, dieser Vorgang kann nicht rueckgaengig gemacht werden.", "confirm-delete-this-action-cannot-be-undone": "Bestätige das Löschen, dieser Vorgang kann nicht rückgängig gemacht werden.",
"site-title": "Titel der Webseite", "site-title": "Titel der Webseite",
"site-slogan": "Untertitel", "site-slogan": "Untertitel",
"site-description": "Informationen zur Website", "site-description": "Informationen zur Website",
"footer-text": "Footer-Text", "footer-text": "Footer-Text",
"posts-per-page": "Beitr&auml;ge pro Seite", "posts-per-page": "Beiträge pro Seite",
"site-url": "URL der Website", "site-url": "URL der Website",
"writting-settings": "Beitrags- und Seiteneinstellungen", "writting-settings": "Beitrags- und Seiteneinstellungen",
"url-filters": "URL-Erweiterungen", "url-filters": "URL-Erweiterungen",
@ -70,80 +70,97 @@
"timezone": "Zeitzone", "timezone": "Zeitzone",
"locale": "Locale", "locale": "Locale",
"new-post": "Neuer Beitrag", "new-post": "Neuer Beitrag",
"html-and-markdown-code-supported": "HTML und Markdown werden unterst&uuml;tzt", "html-and-markdown-code-supported": "HTML und Markdown werden unterstützt",
"new-page": "Neue Seite", "new-page": "Neue Seite",
"manage-posts": "Beitr&auml;ge verwalten", "manage-posts": "Beiträge verwalten",
"published-date": "Ver&ouml;ffentlicht", "published-date": "Veröffentlicht",
"modified-date": "Letzte &Auml;nderung", "modified-date": "Letzte Änderung",
"empty-title": "Kein Titel", "empty-title": "Kein Titel",
"plugins": "Plugins", "plugins": "Plugins",
"install-plugin": "Plugin installieren", "install-plugin": "Plugin installieren",
"uninstall-plugin": "Plugin deinstallieren", "uninstall-plugin": "Plugin deinstallieren",
"new-password": "Neues Passwort", "new-password": "Neues Passwort",
"edit-user": "Benutzer bearbeiten", "edit-user": "Benutzer bearbeiten",
"publish-now": "Ver&ouml;ffentlichen", "publish-now": "Veröffentlichen",
"first-name": "Vorname", "first-name": "Vorname",
"last-name": "Nachname", "last-name": "Nachname",
"bludit-version": "Bludit Version", "bludit-version": "Bludit Version",
"powered-by": "Diese Website wurde eingerichtet mit", "powered-by": "Diese Website wurde eingerichtet mit",
"recent-posts": "Neueste Beitr&auml;ge", "recent-posts": "Neueste Beiträge",
"manage-pages": "Seiten verwalten", "manage-pages": "Seiten verwalten",
"advanced-options": "Erweiterte Einstellungen", "advanced-options": "Erweiterte Einstellungen",
"user-deleted": "Der Benutzer wurde gel&ouml;scht.", "user-deleted": "Der Benutzer wurde gelöscht.",
"page-added-successfully": "Die Seite wurde ver&ouml;ffentlicht.", "page-added-successfully": "Die Seite wurde veröffentlicht.",
"post-added-successfully": "Die Seite wurde ver&ouml;ffentlicht.", "post-added-successfully": "Der Veitrag wurde veröffentlicht.",
"the-post-has-been-deleted-successfully": "Der Beitrag wurde gel&ouml;scht.", "the-post-has-been-deleted-successfully": "Der Beitrag wurde gelöscht.",
"the-page-has-been-deleted-successfully": "Die Seite wurde gel&ouml;scht.", "the-page-has-been-deleted-successfully": "Die Seite wurde gelöscht.",
"username-or-password-incorrect": "Der Benutzername oder das Passwort ist falsch.", "username-or-password-incorrect": "Der Benutzername oder das Passwort ist falsch.",
"database-regenerated": "Die Datenbank wurde neu aufgebaut.", "database-regenerated": "Die Datenbank wurde neu aufgebaut.",
"the-changes-have-been-saved": "Die &Auml;nderungen wurden gespeichert.", "the-changes-have-been-saved": "Die Änderungen wurden gespeichert.",
"enable-more-features-at": "Zus&auml;tzlich Felder k&ouml;nnen aktiviert werden unter", "enable-more-features-at": "Zusätzlich Felder können aktiviert werden unter",
"username-already-exists": "Diesen Benutzernamen gibt es bereits.", "username-already-exists": "Diesen Benutzernamen gibt es bereits.",
"username-field-is-empty": "Es muss ein Benutzername eingegeben werden.", "username-field-is-empty": "Es muss ein Benutzername eingegeben werden.",
"the-password-and-confirmation-password-do-not-match":"Die eingegebenen Passw&ouml;rter stimmen nicht &uuml;berein.", "the-password-and-confirmation-password-do-not-match":"Die eingegebenen Passwörter stimmen nicht überein.",
"user-has-been-added-successfully": "Der Benutzer wurde hinzugef&uuml;gt.", "user-has-been-added-successfully": "Der Benutzer wurde hinzugefügt.",
"you-do-not-have-sufficient-permissions": "Du bist nicht berechtigt, die Seite aufzurufen.", "you-do-not-have-sufficient-permissions": "Du bist nicht berechtigt, die Seite aufzurufen.",
"settings-advanced-writting-settings": "Einstellungen->Erweitert->Beitrags- und Seiteneinstellungen", "settings-advanced-writting-settings": "Einstellungen > Erweitert > Beitrags- und Seiteneinstellungen",
"new-posts-and-pages-synchronized": "Neue Beitr&atilde;ge und Seitenwurden synchronisiert.", "new-posts-and-pages-synchronized": "Neue Beiträge und Seiten wurden synchronisiert.",
"you-can-choose-the-users-privilege": "Rechte des Benutzers. Ein Editor kann nur Seiten anlegen und Beitr&auml;ge schreiben.", "you-can-choose-the-users-privilege": "Rechte des Benutzers. Ein Editor kann nur Seiten anlegen und Beiträge schreiben.",
"email-will-not-be-publicly-displayed": "Die E-Mail wird nicht &ouml;ffentlich gezeigt. Sie wird f&uuml;r die Wiederherstellung des Passworts und Benachrichtigungen verwendet.", "email-will-not-be-publicly-displayed": "Die E-Mail wird nicht öffentlich gezeigt. Sie wird für die Wiederherstellung des Passworts und Benachrichtigungen verwendet.",
"use-this-field-to-name-your-site": "Name der Website, wie er auf jeder Seite angezeigt wird.", "use-this-field-to-name-your-site": "Name der Website, wie er auf jeder Seite angezeigt wird.",
"use-this-field-to-add-a-catchy-prhase": "Untertitel oder Slogan der Website.", "use-this-field-to-add-a-catchy-phrase": "Untertitel oder Slogan der Website.",
"you-can-add-a-site-description-to-provide": "Kurze Beschreibung der Website f&uacute;r Suchmaschinen.", "you-can-add-a-site-description-to-provide": "Kurze Beschreibung der Website für Suchmaschinen.",
"you-can-add-a-small-text-on-the-bottom": "Text im Fussbereich jeder Seite. Beispielsweise: Copyright-Hinweis, Eigent&uuml;mer der Website usw.", "you-can-add-a-small-text-on-the-bottom": "Text im Fussbereich jeder Seite. Beispielsweise: Copyright-Hinweis, Eigentümer der Website usw.",
"number-of-posts-to-show-per-page": "Anzahl der Beitr&auml;ge, die auf einer Seite gezeigt werden..", "number-of-posts-to-show-per-page": "Anzahl der Beiträge, die auf einer Seite gezeigt werden.",
"the-url-of-your-site": "URL der Website.", "the-url-of-your-site": "URL der Website.",
"add-or-edit-description-tags-or": "Beschreibungen, Schlagw&ouml;rter und Pretty URL hinzuf&uuml;gen oder &auml;ndern.", "add-or-edit-description-tags-or": "Beschreibungen, Schlagwörter und Pretty URL hinzufügen oder ändern.",
"select-your-sites-language": "Sprache der Website.", "select-your-sites-language": "Sprache der Website.",
"select-a-timezone-for-a-correct": "Zeitzone f&uuml;r die richtige Anzeige des Datums und der Zeit auf der Website.", "select-a-timezone-for-a-correct": "Zeitzone für die richtige Anzeige des Datums und der Zeit auf der Website.",
"you-can-use-this-field-to-define-a-set-of": "Parameter mit Bezug auf die verwendete Sprache und das Land. Beispielsweise: de_DE, de_CH usw.", "you-can-use-this-field-to-define-a-set-of": "Parameter mit Bezug auf die verwendete Sprache und das Land. Beispielsweise: de_DE, de_CH usw.",
"you-can-modify-the-url-which-identifies":"Der URL kann selbst angepasst werden. M&ouml;glich sind h&ouml;chstens 150 Zeichen.", "you-can-modify-the-url-which-identifies":"Der URL kann selbst angepasst werden. Möglich sind höchstens 150 Zeichen.",
"this-field-can-help-describe-the-content": "Kurze Inhaltsbeschreibung. M&ouml;glich sind h&ouml;chstens 150 Zeichen.", "this-field-can-help-describe-the-content": "Kurze Inhaltsbeschreibung. Möglich sind höchstens 150 Zeichen.",
"write-the-tags-separeted-by-comma": "Schlagw&ouml;rter getrennt durch Kommas. Beispielsweise: Schlagwort1, Schlagwort2, Schlagwort3", "write-the-tags-separeted-by-comma": "Schlagwörter getrennt durch Kommas. Beispielsweise: Schlagwort1, Schlagwort2, Schlagwort3",
"delete-the-user-and-all-its-posts":"Benutzer und alle seine Beitr&auml;ge l&ouml;schen", "delete-the-user-and-all-its-posts":"Benutzer und alle seine Beiträge löschen",
"delete-the-user-and-associate-its-posts-to-admin-user": "Benutzer l&ouml;schen und seine Beitr&auml;ge dem Administrator zuordnen", "delete-the-user-and-associate-its-posts-to-admin-user": "Benutzer löschen und seine Beiträge dem Administrator zuordnen",
"read-more": "Weiterlesen", "read-more": "Weiterlesen",
"show-blog": "Blog zeigen", "show-blog": "Blog zeigen",
"default-home-page": "Hauptseite", "default-home-page": "Hauptseite",
"version": "Version", "version": "Version",
"there-are-no-drafts": "Es sind keine Entw&uuml;rfe vorhanden.", "there-are-no-drafts": "Es sind keine Entwürfe vorhanden.",
"create-a-new-article-for-your-blog":"Einen neuen Beitrag schreiben.", "create-a-new-article-for-your-blog": "Einen neuen Beitrag schreiben.",
"create-a-new-page-for-your-website":"Eine neue Seite anlegen.", "create-a-new-page-for-your-website": "Eine neue Seite anlegen.",
"invite-a-friend-to-collaborate-on-your-website":"Einen neuen Benutzer hinzuf&uuml;gen.", "invite-a-friend-to-collaborate-on-your-website": "Einen neuen Benutzer hinzufügen.",
"change-your-language-and-region-settings":"Sprache &auml;ndern und Lokalisierung.", "change-your-language-and-region-settings": "Sprache ändern und Lokalisierung.",
"language-and-timezone":"Sprache und Zeitzone", "language-and-timezone": "Sprache und Zeitzone",
"author": "Autor", "author": "Autor",
"start-here": "Direktzugriff", "start-here": "Direktzugriff",
"install-theme": "Theme installieren", "install-theme": "Theme installieren",
"first-post": "Erster Beitrag", "first-post": "Erster Beitrag",
"congratulations-you-have-successfully-installed-your-bludit": "Gratulation, Du hast erfolgreich **Bludit** installiert!", "congratulations-you-have-successfully-installed-your-bludit": "Gratulation, Du hast **Bludit** erfolgreich installiert!",
"whats-next": "Und so geht es weiter;", "whats-next": "Und so geht es weiter:",
"manage-your-bludit-from-the-admin-panel": "Verwalte Bludit im [Administrationsbereich](./admin/).", "manage-your-bludit-from-the-admin-panel": "Verwalte Bludit im [Administrationsbereich](./admin/).",
"follow-bludit-on": "Folge Bludit bei", "follow-bludit-on": "Folge Bludit bei",
"visit-the-support-forum": "Besuche das [Forum](http://forum.bludit.com), um Hilfe zu erhalten.", "visit-the-support-forum": "Besuche das [Forum](http://forum.bludit.com), um Hilfe zu erhalten.",
"read-the-documentation-for-more-information": "Lies die [Dokumentation](http://docs.bludit.com) f&uuml;r weitere Informationen.", "read-the-documentation-for-more-information": "Lies die [Dokumentation](http://docs.bludit.com) für weitere Informationen.",
"share-with-your-friends-and-enjoy": "Teile Bludit mit Deinen Freunden und geniesse es.", "share-with-your-friends-and-enjoy": "Erzähle Deinen Freunden Bludit und habe Spass daran.",
"the-page-has-not-been-found": "Die Seite wurde nicht gefunden.", "the-page-has-not-been-found": "Die Seite wurde nicht gefunden.",
"error": "Fehler" "error": "Fehler",
"bludit-installer": "Bludit-Installer",
"welcome-to-the-bludit-installer": "Willkommen beim Bludit-Installer!",
"complete-the-form-choose-a-password-for-the-username-admin": "Bitte ein Passwort für den Benutzer « admin » wählen<br>und eine E-Mail-Adresse eingeben.",
"password-visible-field": "Das Passwort wird in Klartext angezeigt!",
"install": "Installieren",
"choose-your-language": "Sprache wählen",
"next": "Weiter",
"the-password-field-is-empty": "Das Passwort-Feld ist leer.",
"your-email-address-is-invalid": "Die E-Mail-Adresse scheint ungültig zu sein.",
"proceed-anyway": "Trotzdem fortfahren...",
"drafts": "Entwürfe",
"ip-address-has-been-blocked": "Die IP-Adresse wurde blockiert.",
"try-again-in-a-few-minutes": "Bitte es nach einigen Minuten noch einmal versuchen.",
"date": "Datum",
"you-can-schedule-the-post-just-select-the-date-and-time": "Um den Beitrag zu einem bestimmten Zeitpunkt zu veröffentlichen, Datum und Zeit wählen.",
"scheduled": "Zeitpunkt bestimmt.",
"publish": "Veröffentlichen",
"please-check-your-theme-configuration": "Bitte die Einstellungen des Themes prüfen."
} }

3
languages/en_US.json Executable file → Normal file
View File

@ -162,5 +162,6 @@
"you-can-schedule-the-post-just-select-the-date-and-time": "You can schedule the post, just select the date and time.", "you-can-schedule-the-post-just-select-the-date-and-time": "You can schedule the post, just select the date and time.",
"scheduled": "Scheduled", "scheduled": "Scheduled",
"publish": "Publish", "publish": "Publish",
"please-check-your-theme-configuration": "Please check your theme configuration." "please-check-your-theme-configuration": "Please check your theme configuration.",
"plugin-label": "Plugin label"
} }

0
languages/es_AR.json Executable file → Normal file
View File

0
languages/es_ES.json Executable file → Normal file
View File

0
languages/es_VE.json Executable file → Normal file
View File

0
languages/fr_FR.json Executable file → Normal file
View File

0
languages/ja_JP.json Executable file → Normal file
View File

159
languages/pt_BR.json Normal file
View File

@ -0,0 +1,159 @@
{
"language-data":
{
"native": "Português (Brasil)",
"english-name": "Portuguese",
"last-update": "2015-09-21",
"author": "Hackdorte",
"email": "hackdorte@sapo.pt",
"website": "https://twitter.com/hackdorte"
},
"username": "Nome de usuário",
"password": "Senha",
"confirm-password": "Confirmar senha",
"editor": "Editor",
"dashboard": "Painel",
"role": "Cargo",
"post": "Postagem",
"posts": "Postagens",
"users": "Usuários",
"administrator": "Administrador",
"add": "Adicionar",
"cancel": "Cancelar",
"content": "Conteúdo",
"title": "Título",
"no-parent": "Sem parente",
"edit-page": "Editar página",
"edit-post": "Editar postagem",
"add-a-new-user": "Adicionar novo usuário",
"parent": "Parente",
"friendly-url": "URL amigável",
"description": "Descrição",
"posted-by": "Publicado por",
"tags": "Tags",
"position": "Posição",
"save": "Salvar",
"draft": "Rascunho",
"delete": "Deletar",
"registered": "Registrado",
"Notifications": "Notificações",
"profile": "Perfil",
"email": "Email",
"settings": "Configurações",
"general": "Geral",
"advanced": "Avançado",
"regional": "Regional",
"about": "Sobre",
"login": "Entrar",
"logout": "Sair",
"manage": "Administrar",
"themes": "Temas",
"prev-page": "Pág. anterior",
"next-page": "Pág. seguinte",
"configure-plugin": "Configurar plugin",
"confirm-delete-this-action-cannot-be-undone": "Confirmar exclusão. Esta operação não poderá ser desfeita.",
"site-title": "Título do site",
"site-slogan": "Slogan do site",
"site-description": "Descrição do site",
"footer-text": "Texto do rodapé",
"posts-per-page": "Postagens por páginas",
"site-url": "URL do site",
"writting-settings": "Configurações de escrita",
"url-filters": "Filtros para URL",
"page": "página",
"pages": "páginas",
"home": "Início",
"welcome-back": "Bem vindo(a)",
"language": "Idioma",
"website": "Website",
"timezone": "Zona horária",
"locale": "Codificação",
"new-post": "Nova postagem",
"new-page": "Nova página",
"html-and-markdown-code-supported": "Códigos HTML e Markdown são aceitos",
"manage-posts": "Gerenciar postagens",
"published-date": "Data de publicação",
"modified-date": "Data de modificação",
"empty-title": "Título vazio",
"plugins": "Plugins",
"install-plugin": "Instalar plugin",
"uninstall-plugin": "Desinstalar plugin",
"new-password": "Nova senha",
"edit-user": "Editar usuário",
"publish-now": "Publicar",
"first-name": "Nome",
"last-name": "Sobrenome",
"bludit-version": "Bludit versão",
"powered-by": "Feito com",
"recent-posts": "Postagens recentes",
"manage-pages": "Gerenciar páginas",
"advanced-options": "Opções avançadas",
"user-deleted": "Usuário Deletado",
"page-added-successfully": "Página criada com sucesso",
"post-added-successfully": "Postagem criada com sucesso ",
"the-post-has-been-deleted-successfully": "Postagem eliminada com sucesso",
"the-page-has-been-deleted-successfully": "Página deletada com sucesso",
"username-or-password-incorrect": "Nome ou senha incorretos",
"database-regenerated": "Base de dados regenerada",
"the-changes-have-been-saved": "As alterações foram salvas!",
"enable-more-features-at": "Habilitar mais funções em",
"username-already-exists": "Usuário não existe",
"username-field-is-empty": "O campo **Nome** não pode ficar vazio.",
"the-password-and-confirmation-password-do-not-match": "Ops! As senhas são diferentes.",
"user-has-been-added-successfully": "Usuário criado com sucesso",
"you-do-not-have-sufficient-permissions": "Você não tem permissão. Por favor entre em contato com o administrador do site",
"settings-advanced-writting-settings": "Configurações->Avançado->Configurações de escrita",
"new-posts-and-pages-synchronized": "Novas postagens e páginas sincronizadas.",
"you-can-choose-the-users-privilege": "Pode alterar os previlégios dos usuários. O editor só poderá gerenciar páginas e postagens.",
"email-will-not-be-publicly-displayed": "O endereço de email não é visível. Recomendado para recuperar sua senha e receber notificações.",
"use-this-field-to-name-your-site": "Utilize este campo para adicionar um título para seu site, ele aparecerá na parte superior das páginas.",
"use-this-field-to-add-a-catchy-phrase": "Utilize este campo se desejar adicionar um slogan ao nome do seu site.",
"you-can-add-a-site-description-to-provide": "Pode adicionar um descrição para promover uma biografia do seu site.",
"you-can-add-a-small-text-on-the-bottom": "Pode adicionar um pequeno texto no final da página. ex: copyright, autor, etc.",
"number-of-posts-to-show-per-page": "Número de postagens para mostrar por página.",
"the-url-of-your-site": "URL do seu site.",
"add-or-edit-description-tags-or": "Adicionar ou editar a descrição, tags e alterar URL amigável.",
"select-your-sites-language": "Selecione o idioma padrão do seu site.",
"select-a-timezone-for-a-correct": "Selecione a zona horária correta do seu país.",
"you-can-use-this-field-to-define-a-set-of": "Use este campo para o correto conjunto de idioma, país e preferências especiais.",
"you-can-modify-the-url-which-identifies": "Pode alterar a URL para facilitar a sua localização de forma legível. Em 150 caractéres.",
"this-field-can-help-describe-the-content": "Resumo do conteúdo da postagem. Em 150 caractéres.",
"write-the-tags-separeted-by-comma": "Criar tags separadas por vírgulas. ex: tag1, tag2, tag3",
"delete-the-user-and-all-its-posts": "Eliminar usuário e suas postagens",
"delete-the-user-and-associate-its-posts-to-admin-user": "Eliminar usuário e associar postagens ao administrador",
"read-more": "Ler mais",
"show-blog": "Ver blog",
"default-home-page": "página de início padrão",
"version": "Versão",
"there-are-no-drafts": "Não há rascunhos",
"create-a-new-article-for-your-blog":"Criar um novo artigo para seu blog.",
"create-a-new-page-for-your-website":"Criar nova página para seu site.",
"invite-a-friend-to-collaborate-on-your-website":"Convidar amigos para colaborar com seu site.",
"change-your-language-and-region-settings":"Modificar as configurações de idioma e região.",
"language-and-timezone":"Idioma e zona horária",
"author": "Autor",
"start-here": "Começe aqui",
"install-theme": "Instalar tema",
"first-post": "Primeira postagem",
"congratulations-you-have-successfully-installed-your-bludit": "Parabéns, você instalou **Bludit** com sucesso",
"whats-next": "Siguientes pasos",
"manage-your-bludit-from-the-admin-panel": "Gerencie seu Bludit em [painel de administração](./admin/)",
"follow-bludit-on": "Siga Bludit em",
"visit-the-support-forum": "Visite o [fórum](http://forum.bludit.com) para obter ajuda",
"read-the-documentation-for-more-information": "Leia a [documentación](http://docs.bludit.com) para mais informações",
"share-with-your-friends-and-enjoy": "Compartilhe com os seus amigos para que desfrutem também",
"the-page-has-not-been-found": "A página não foi localizada.",
"error": "Erro",
"bludit-installer": "Instalador do Bludit",
"welcome-to-the-bludit-installer": "Bem vindo(a) ao instalador do Bludit",
"complete-the-form-choose-a-password-for-the-username-admin": "Crie uma senha e informe um endereço de email para o usuário « admin »",
"password-visible-field": "Senha, este campo é visível.",
"install": "Instalar",
"the-password-field-is-empty": "Preencha o campo da senha",
"your-email-address-is-invalid":"O endereço do email é inválido",
"proceed-anyway": "Continuar assim mesmo!",
"drafts":"Rascunhos",
"ip-address-has-been-blocked":"O endereço de IP foi bloqueado.",
"try-again-in-a-few-minutes": "Volte e tente daqui uns minutinhos!"
}

0
languages/ru_RU.json Executable file → Normal file
View File

0
languages/zh_TW.json Executable file → Normal file
View File

0
plugins/maintancemode/languages/en_US.json Executable file → Normal file
View File

0
plugins/maintancemode/languages/es_AR.json Executable file → Normal file
View File

0
plugins/maintancemode/languages/fr_FR.json Executable file → Normal file
View File

0
plugins/maintancemode/plugin.php Executable file → Normal file
View File

View File

@ -0,0 +1,15 @@
{
"plugin-data":
{
"name": "Liste aller Seiten",
"description": "Auflistung aller Seiten.",
"author": "Bludit",
"email": "",
"website": "http://www.bludit.com",
"version": "0.1",
"releaseDate": "2015-09-22"
},
"home": "Hauptseite",
"show-home-link": "Hauptseite zeigen"
}

0
plugins/pages/languages/en_US.json Executable file → Normal file
View File

0
plugins/pages/languages/es_AR.json Executable file → Normal file
View File

0
plugins/pages/languages/fr_FR.json Executable file → Normal file
View File

29
plugins/pages/plugin.php Executable file → Normal file
View File

@ -15,7 +15,7 @@ class pluginPages extends Plugin {
global $Language; global $Language;
$html = '<div>'; $html = '<div>';
$html .= '<label>Plugin label</label>'; $html .= '<label>'.$Language->get('Plugin label').'</label>';
$html .= '<input name="label" id="jslabel" type="text" value="'.$this->getDbField('label').'">'; $html .= '<input name="label" id="jslabel" type="text" value="'.$this->getDbField('label').'">';
$html .= '</div>'; $html .= '</div>';
@ -32,51 +32,48 @@ class pluginPages extends Plugin {
global $Language; global $Language;
global $pagesParents; global $pagesParents;
global $Site, $Url; global $Site, $Url;
$home = $Url->whereAmI()==='home';
$html = '<div class="plugin plugin-pages">'; $html = '<div class="plugin plugin-pages">';
// If the label is not empty, print it. // 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>'.$label.'</h2>';
} }
$html .= '<div class="plugin-content">'; $html .= '<div class="plugin-content">';
$parents = $pagesParents[NO_PARENT_CHAR];
$html .= '<ul>'; $html .= '<ul>';
// Show home link ?
if($this->getDbField('homeLink')) { if($this->getDbField('homeLink')) {
$current = ($Site->homeLink()==$home) ? ' class="active"' : ''; $html .= '<li>';
$html .= '<li' .$current. '><a class="parent" href="'.$Site->homeLink().'">'.$Language->get('Home').'</a></li>'; $html .= '<a class="parent'.( ($Url->whereAmI()=='home')?' active':'').'" href="'.$Site->homeLink().'">'.$Language->get('Home').'</a>';
$html .= '</li>';
} }
$parents = $pagesParents[NO_PARENT_CHAR];
foreach($parents as $parent) foreach($parents as $parent)
{ {
//if($Site->homepage()!==$parent->key())
{
$current_parent = ($parent->slug()==$Url->slug()) ? ' class="active"' : '';
// Print the parent // Print the parent
$html .= '<li' .$current_parent. '><a class="parent" href="'.$parent->permalink().'">'.$parent->title().'</a>'; $html .= '<li>';
$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()]))
{ {
$children = $pagesParents[$parent->key()]; $children = $pagesParents[$parent->key()];
// Print the children // Print children
$html .= '<ul>'; $html .= '<ul>';
foreach($children as $child) foreach($children as $child)
{ {
$current_child = ($child->slug()==$Url->slug()) ? ' class="active"' : ''; $html .= '<li>';
$html .= '<li' .$current_child. '><a class="children" href="'.$child->permalink().'">'.$child->title().'</a></li>'; $html .= '<a class="children '.( ($child->key()==$Url->slug())?' active':'').'" href="'.$child->permalink().'">'.$child->title().'</a>';
$html .= '</li>';
} }
$html .= '</ul>'; $html .= '</ul>';
} }
} }
}
$html .= '</li></ul>'; $html .= '</li></ul>';
$html .= '</div>'; $html .= '</div>';

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,14 @@
{
"plugin-data":
{
"name": "SimpleMDE",
"description": "Ein einfacher und sch&ouml;ner JavaScript-Editor f&uuml; Markdown von @WesCossick. Angepasst f&uuml;r Bludit von Diego Najar.",
"author": "NextStepWebs",
"email": "",
"website": "https://github.com/NextStepWebs/simplemde-markdown-editor",
"version": "1.7.1",
"releaseDate": "2015-09-22"
},
"toolbar": "Werkzeugleiste",
"tab-size": "Abst&auml;nde der Tabstopps"
}

9
plugins/simplemde/languages/en_US.json Executable file → Normal file
View File

@ -2,14 +2,13 @@
"plugin-data": "plugin-data":
{ {
"name": "SimpleMDE", "name": "SimpleMDE",
"description": "A simple, beautiful, and embeddable JavaScript markdown editor.", "description": "A simple, beautiful, and embeddable JavaScript markdown editor by @WesCossick. Adapted by Diego Najar for Bludit.",
"author": "Bludit", "author": "NextStepWebs",
"email": "", "email": "",
"website": "https://github.com/NextStepWebs/simplemde-markdown-editor", "website": "https://github.com/NextStepWebs/simplemde-markdown-editor",
"version": "0.1", "version": "1.7.1",
"releaseDate": "2015-08-27" "releaseDate": "2015-09-18"
}, },
"toolbar": "Toolbar", "toolbar": "Toolbar",
"tab-size": "Tab size" "tab-size": "Tab size"
} }

9
plugins/simplemde/languages/es_AR.json Executable file → Normal file
View File

@ -2,14 +2,13 @@
"plugin-data": "plugin-data":
{ {
"name": "SimpleMDE", "name": "SimpleMDE",
"description": "Simple, facil y hermoso editor Markdown.", "description": "Simple, facil y hermoso editor Markdown desarrollado por @WesCossick. Adaptado por Diego Najar para Bludit.",
"author": "Bludit", "author": "NextStepWebs",
"email": "", "email": "",
"website": "https://github.com/NextStepWebs/simplemde-markdown-editor", "website": "https://github.com/NextStepWebs/simplemde-markdown-editor",
"version": "0.1", "version": "1.7.1",
"releaseDate": "2015-08-27" "releaseDate": "2015-09-18"
}, },
"toolbar": "Barra de herramientas", "toolbar": "Barra de herramientas",
"tab-size": "Tamaño de la tabulación" "tab-size": "Tamaño de la tabulación"
} }

10
plugins/simplemde/languages/fr_FR.json Executable file → Normal file
View File

@ -3,10 +3,12 @@
{ {
"name": "SimpleMDE", "name": "SimpleMDE",
"description": "Un éditeur Markdown en JavaScript simple, beau, et intégrable.", "description": "Un éditeur Markdown en JavaScript simple, beau, et intégrable.",
"author": "Bludit", "author": "NextStepWebs",
"email": "", "email": "",
"website": "https://github.com/NextStepWebs/simplemde-markdown-editor", "website": "https://github.com/NextStepWebs/simplemde-markdown-editor",
"version": "0.1", "version": "1.7.1",
"releaseDate": "2015-08-27" "releaseDate": "2015-09-18"
} },
"toolbar": "Toolbar",
"tab-size": "Tab size"
} }

0
plugins/simplemde/plugin.php Executable file → Normal file
View File

View File

@ -0,0 +1,12 @@
{
"plugin-data":
{
"name": "Liste aller Schlagw&ouml;rter",
"description": "Anzeige aller Schlagw&ouml;rter.",
"author": "Bludit",
"email": "",
"website": "http://www.bludit.com",
"version": "0.1",
"releaseDate": "2015-09-22"
}
}

0
plugins/tags/languages/en_US.json Executable file → Normal file
View File

0
plugins/tags/languages/fr_FR.json Executable file → Normal file
View File

0
plugins/tags/plugin.php Executable file → Normal file
View File

25
themes/pure/css/blog.css Executable file → Normal file
View File

@ -54,6 +54,10 @@ pre, code {
white-space: pre-wrap !important; white-space: pre-wrap !important;
} }
blockquote {
border-left: 10px solid #f0f2f4;
padding-left: 10px;
}
/* ------------------------ /* ------------------------
Content / Main Content / Main
@ -139,15 +143,20 @@ margin: 0;
.post-title a .post-title a
{ {
color: #555; color: #555;
border-bottom: 5px solid #ccc;
display: inline-block; display: inline-block;
} }
.page a.read-more, .page a.read-more,
.post a.read-more{ .post a.read-more{
display: block; border: 1px solid #ccc;
text-align: center; display: inline-block;
padding: 2px 5px; margin-top: 10px;
padding: 2px 20px;
}
.page a.read-more:hover,
.post a.read-more:hover{
background: #f1f1f1;
} }
@ -268,9 +277,6 @@ div.plugin-content li {
margin-top: 5px; margin-top: 5px;
} }
div.plugin-content ul li.active a {
color: #2672ec;
}
div.plugin-content ul { div.plugin-content ul {
display: block; display: block;
list-style-type: none; list-style-type: none;
@ -292,6 +298,11 @@ div.plugin-content ul > li > ul > li > a {
color: #777; color: #777;
} }
div.plugin-content a.active {
color: #2672ec !important;
}
/* ------------------------ /* ------------------------
Responsive Responsive
------------------------ */ ------------------------ */

View File

@ -3,7 +3,7 @@
<head> <head>
<!-- Meta tags --> <!-- Meta tags -->
<?php include('php/head.php') ?> <?php include(PATH_THEME_PHP.'head.php') ?>
</head> </head>
<body> <body>
@ -16,7 +16,7 @@
<!-- Sidebar --> <!-- Sidebar -->
<div class="sidebar pure-u-1 pure-u-md-1-4"> <div class="sidebar pure-u-1 pure-u-md-1-4">
<?php include('php/sidebar.php') ?> <?php include(PATH_THEME_PHP.'sidebar.php') ?>
</div> </div>
<!-- Main --> <!-- Main -->
@ -26,21 +26,21 @@
<?php <?php
if( ($Url->whereAmI()=='home') || ($Url->whereAmI()=='tag') ) if( ($Url->whereAmI()=='home') || ($Url->whereAmI()=='tag') )
{ {
include('php/home.php'); include(PATH_THEME_PHP.'home.php');
} }
elseif($Url->whereAmI()=='post') elseif($Url->whereAmI()=='post')
{ {
include('php/post.php'); include(PATH_THEME_PHP.'post.php');
} }
elseif($Url->whereAmI()=='page') elseif($Url->whereAmI()=='page')
{ {
include('php/page.php'); include(PATH_THEME_PHP.'page.php');
} }
?> ?>
<!-- Footer --> <!-- Footer -->
<div class="footer"> <div class="footer">
<p><?php echo $Site->footer(); ?> | <?php echo $Language->get('Powered by') ?> <a target="_blank" href="http://www.bludit.com">Bludit</a></p> <p><?php echo $Site->footer() ?> | <?php echo $Language->get('Powered by') ?> <a target="_blank" href="http://www.bludit.com">Bludit</a></p>
</div> </div>
</div> </div>

0
themes/pure/languages/en_US.json Executable file → Normal file
View File

View File

@ -1,13 +1,23 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="<?php echo $Site->description() ?>">
<title><?php echo $Site->title() ?></title>
<?php <?php
Theme::charset('UTF-8'); // CSS from theme/css/
Theme::css(array(
'pure-min.css',
'grids-responsive-min.css',
'blog.css',
'rainbow.github.css'
));
Theme::viewport(); // Javascript from theme/js/
Theme::javascript('rainbow.min.js');
// <title>Site title</title> // Favicon from theme/img/
Theme::title( $Site->title() ); Theme::favicon('favicon.png');
// <meta name="description" content="Site description">
Theme::description( $Site->description() );
// <meta name="keywords" content="HTML,CSS,XML,JavaScript"> // <meta name="keywords" content="HTML,CSS,XML,JavaScript">
if( $Url->whereAmI()=='post' ) { if( $Url->whereAmI()=='post' ) {
@ -16,35 +26,17 @@
elseif( $Url->whereAmI()=='page' ) { elseif( $Url->whereAmI()=='page' ) {
Theme::keywords( $Page->tags() ); Theme::keywords( $Page->tags() );
} }
// <link rel="stylesheet" type="text/css" href="pure-min.css">
// <link rel="stylesheet" type="text/css" href="grids-responsive-min.css">
// <link rel="stylesheet" type="text/css" href="blog.css">
// <link rel="stylesheet" type="text/css" href="rainbow.github.css">
Theme::css(array(
'pure-min.css',
'grids-responsive-min.css',
'blog.css',
'rainbow.github.css'
));
Theme::css(array(
'http://fonts.googleapis.com/css?family=Open+Sans:400,300,600&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,cyrillic,latin-ext'
), '');
// <script src="rainbow.min.js"></script>
Theme::javascript(array(
'rainbow.min.js'
));
?> ?>
<!-- Custom Fonts -->
<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,cyrillic,latin-ext" rel="stylesheet" type="text/css">
<!-- Pure and Google Fonts --> <!-- Pure and Google Fonts -->
<style> <style>
html, button, input, select, textarea, html, button, input, select, textarea,
.pure-g [class *= "pure-u"] { .pure-g [class *= "pure-u"] {
font-family: 'Open Sans', sans-serif; font-family: 'Open Sans', sans-serif;
} }
</style> </style>
<!-- Plugins Site Head --> <!-- Plugins Site Head -->