Minor changes

This commit is contained in:
dignajar 2015-08-01 23:47:45 -03:00
parent 7634aa9bc4
commit f272c05d0d
12 changed files with 166 additions and 21 deletions

View File

@ -0,0 +1,23 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
if($Login->role()!=='admin') {
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
Redirect::page('admin', 'dashboard');
}
// ============================================================================
// POST Method
// ============================================================================
if( $_SERVER['REQUEST_METHOD'] == 'POST' )
{
$Site->set($_POST);
}
// ============================================================================
// Main
// ============================================================================

View File

@ -63,7 +63,7 @@ body {
} }
#sidebar li { #sidebar li {
} }
/* ----------- ALERT ----------- */ /* ----------- ALERT ----------- */
@ -163,7 +163,7 @@ div.dashboardBox ul.menu a {
} }
div.dashboardBox ul.menu li.title { div.dashboardBox ul.menu li.title {
} }
div.dashboardBox ul.menu li.description { div.dashboardBox ul.menu li.description {
@ -173,6 +173,10 @@ div.dashboardBox ul.menu li.description {
color: #555; color: #555;
} }
div.dashboardBox ul.menu li.description:last-child {
border-bottom: 0 !important;
margin-bottom: 0 !important;
}
/* ----------- FORMS ----------- */ /* ----------- FORMS ----------- */
@ -235,8 +239,8 @@ a.btn-red:hover {
margin-left: 10px; margin-left: 10px;
} }
/* ----------- THEMES ----------- */
/* ----------- PLUGINS ----------- */
div.pluginBox { div.pluginBox {
box-shadow: 0 1px 2px rgba(0,0,0,.26); box-shadow: 0 1px 2px rgba(0,0,0,.26);
background-color: #fff; background-color: #fff;
@ -251,9 +255,54 @@ div.pluginBox p {
margin-bottom: 10px; margin-bottom: 10px;
} }
div.pluginBox span.version { div.pluginBox span.author {
color: #ccc; color: #999;
margin-left: 10px; margin-left: 10px;
float: right;
}
div.pluginBox span.version {
color: #999;
margin-left: 10px;
float: right;
}
/* ----------- PLUGINS ----------- */
div.pluginBox {
box-shadow: 0 1px 2px rgba(0,0,0,.26);
background-color: #fff;
border-radius: 2px;
box-sizing: border-box;
padding: 15px 20px;
width: 70%;
margin-bottom: 20px;
}
div.pluginBox p {
margin-bottom: 6px;
}
div.pluginBox p.name {
border-bottom: 1px dashed #ccc;
}
div.pluginBox a.btn-smaller {
padding: 4px 10px;
margin-right: 10px;
}
div.pluginBox span.author {
color: #777;
margin-left: 10px;
float: right;
font-size: 0.9em;
}
div.pluginBox span.version {
color: #777;
margin-left: 10px;
float: right;
font-size: 0.9em;
} }
/* ----------- PLUGINS FORM ----------- */ /* ----------- PLUGINS FORM ----------- */

View File

@ -8,18 +8,18 @@
<h2>Start here!</h2> <h2>Start here!</h2>
<div class="content"> <div class="content">
<ul class="menu"> <ul class="menu">
<li class="title"><a href="">New post</a></li> <li class="title"><a href="<?php echo HTML_PATH_ADMIN_ROOT ?>new-post"><?php $Language->p('New post') ?></a></li>
<li class="description">Create a new article for your blog</li> <li class="description"><?php $Language->p('Create a new article for your blog') ?></li>
<li class="title"><a href="">New page</a></li> <li class="title"><a href="<?php echo HTML_PATH_ADMIN_ROOT ?>new-page"><?php $Language->p('New page') ?></a></li>
<li class="description">Create a new page for your site</li> <li class="description"><?php $Language->p('Create a new page for your website') ?></li>
<li class="title"><a href="">Language and timezone</a></li> <li class="title"><a href="<?php echo HTML_PATH_ADMIN_ROOT ?>add-user"><?php $Language->p('Add a new user') ?></a></li>
<li class="description">Select your language and locale for a correct display of dates</li> <li class="description"><?php $Language->p('Invite a friend to collaborate on your website') ?></li>
<li class="title"><a href="<?php echo HTML_PATH_ADMIN_ROOT ?>settings#regional"><?php $Language->p('Language and timezone') ?></a></li>
<li class="description"><?php $Language->p('Change your language and region settings') ?></li>
</ul> </ul>
</div> </div>
</div> </div>
</div> </div>
<div class="unit-50"> <div class="unit-50">
@ -32,7 +32,7 @@
</div> </div>
</div> </div>
<?php } ?> <?php } ?>
<div class="dashboardBox"> <div class="dashboardBox">
<div class="content contentBlue"> <div class="content contentBlue">
<div class="bigContent"><?php echo $dbPosts->count() ?></div> <div class="bigContent"><?php echo $dbPosts->count() ?></div>

View File

@ -5,17 +5,18 @@
{ {
echo '<div class="pluginBox">'; echo '<div class="pluginBox">';
echo '<p>'.$Plugin->name().'<span class="version">'.$Language->g('Version').': '.$Plugin->version().'</span></p>'; echo '<p class="name">'.$Plugin->name().'</p>';
echo '<p>'.$Plugin->description().'</p>'; echo '<p>'.$Plugin->description().'</p>';
echo '<span class="version">'.$Language->g('Version').': '.$Plugin->version().'</span><span class="author">'.$Language->g('author').': '.$Plugin->author().'</span>';
if($Plugin->installed()) { if($Plugin->installed()) {
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'uninstall-plugin/'.$Plugin->className().'" class="btn btn-red btn-small">'.$Language->g('Uninstall plugin').'</a>';
if($Plugin->form()) { if($Plugin->form()) {
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'configure-plugin/'.$Plugin->className().'" class="btn btn-small">'.$Language->g('Configure plugin').'</a>'; echo '<a href="'.HTML_PATH_ADMIN_ROOT.'configure-plugin/'.$Plugin->className().'" class="btn btn-smaller">'.$Language->g('Configure plugin').'</a>';
} }
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'uninstall-plugin/'.$Plugin->className().'" class="btn btn-red btn-smaller">'.$Language->g('Uninstall plugin').'</a>';
} }
else { else {
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'install-plugin/'.$Plugin->className().'" class="btn btn-blue btn-small">'.$Language->g('Install plugin').'</a>'; echo '<a href="'.HTML_PATH_ADMIN_ROOT.'install-plugin/'.$Plugin->className().'" class="btn btn-blue btn-smaller">'.$Language->g('Install plugin').'</a>';
} }
echo '</div>'; echo '</div>';

View File

@ -1,2 +1,2 @@
<h2 class="title"><i class="fa fa-adjust"></i> Themes</h2> <h2 class="title"><i class="fa fa-adjust"></i> <?php $Language->p('Themes') ?></h2>
<p>Not implemented...</p>

View File

@ -43,6 +43,7 @@ else
include(PATH_RULES.'80.plugins.php'); include(PATH_RULES.'80.plugins.php');
include(PATH_RULES.'99.header.php'); include(PATH_RULES.'99.header.php');
include(PATH_RULES.'99.paginator.php'); include(PATH_RULES.'99.paginator.php');
include(PATH_RULES.'99.themes.php');
if($Url->notFound() || !$Login->isLogged() || ($Url->slug()==='login') ) if($Url->notFound() || !$Login->isLogged() || ($Url->slug()==='login') )
{ {

View File

@ -145,6 +145,9 @@ 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/');
// PHP PATHs with dependency
define('PATH_THEME', PATH_ROOT.'themes/'.$Site->theme().'/');
// Objects with dependency // Objects with dependency
$Language = new dbLanguage( $Site->locale() ); $Language = new dbLanguage( $Site->locale() );
$Login = new Login( $dbUsers ); $Login = new Login( $dbUsers );

View File

@ -0,0 +1,50 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Variables
// ============================================================================
$theme = array(
'name'=>'',
'description'=>'',
'author'=>'',
'email'=>'',
'website'=>'',
'version'=>'',
'releaseDate'=>''
);
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main
// ============================================================================
$langLocaleFile = PATH_THEME.'language'.DS.$Site->locale().'.json';
$langDefaultFile = PATH_THEME.'language'.DS.'en_US.json';
$database = false;
// Check if exists locale language
if( Sanitize::pathFile($langLocaleFile) ) {
$database = new dbJSON($langLocaleFile, false);
}
// Check if exists default language
elseif( Sanitize::pathFile($langDefaultFile) ) {
$database = new dbJSON($langDefaultFile, false);
}
if($database!==false)
{
$databaseArray = $database->db;
// Theme data
$theme = $databaseArray['theme-data'];
// Remove theme data
unset($databaseArray['theme-data']);
// Add new words from language theme
$Language->add($databaseArray);
}

View File

@ -6,6 +6,7 @@ include(PATH_RULES.'70.build_pages.php');
include(PATH_RULES.'80.plugins.php'); include(PATH_RULES.'80.plugins.php');
include(PATH_RULES.'99.header.php'); include(PATH_RULES.'99.header.php');
include(PATH_RULES.'99.paginator.php'); include(PATH_RULES.'99.paginator.php');
include(PATH_RULES.'99.themes.php');
// Plugins before site loaded // Plugins before site loaded
Theme::plugins('beforeSiteLoad'); Theme::plugins('beforeSiteLoad');

View File

@ -131,5 +131,10 @@
"default-home-page": "Default home page", "default-home-page": "Default home page",
"version": "Version", "version": "Version",
"there-are-no-drafts": "There are no drafts.", "there-are-no-drafts": "There are no drafts.",
"plugin-label": "Plugin label" "create-a-new-article-for-your-blog":"Create a new article for your blog.",
"create-a-new-page-for-your-website":"Create a new page for your website.",
"invite-a-friend-to-collaborate-on-your-website":"Invite a friend to collaborate on your website.",
"change-your-language-and-region-settings":"Change your language and region settings.",
"language-and-timezone":"Language and timezone",
"author": "Author"
} }

12
themes/pure/language/en_US.json Executable file
View File

@ -0,0 +1,12 @@
{
"theme-data":
{
"name": "Pure",
"description": "Pure is based on the framework Pure.css. Website: http://purecss.io",
"author": "Diego",
"email": "",
"website": "",
"version": "0.1",
"releaseDate": ""
}
}

BIN
themes/pure/screenshot.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB