UI improved and new icons set

This commit is contained in:
Diego Najar 2019-05-18 11:54:39 +02:00
parent a4fc00aa63
commit 4c095f9ffc
21 changed files with 139 additions and 71 deletions

View File

@ -4,8 +4,6 @@
// Functions
// ============================================================================
// ============================================================================
// Main before POST
// ============================================================================

View File

@ -3,7 +3,8 @@ a {
}
a:hover {
color: #0078D4;
color: #003f6f;
text-decoration: none;
}
.bg-success {
@ -17,6 +18,10 @@ a:hover {
.text-danger {
color: #D40000!important;
}
a.text-danger:focus,
a.text-danger:hover {
color: #790000!important;
}
/* Buttons */
.btn {
@ -46,4 +51,12 @@ a:hover {
box-shadow: none;
}
/* */
/* Tables */
.table-striped tbody tr:nth-of-type(odd) {
background-color: rgba(0, 0, 0, 0.02);
}
.table thead th {
font-size: 0.8em;
text-transform: uppercase!important;
}

View File

@ -14,6 +14,51 @@ body {
pointer-events: none;
} */
/*
ICONS
*/
.fa {
padding-right: 2px;
line-height: inherit;
}
/*
SIDEBAR
*/
div.sidebar .nav-item a {
padding-left:0;
padding-right:0;
color: #555;
padding-top: 5px;
padding-bottom: 5px;
}
div.sidebar .nav-item a:hover {
color: #0078D4;
}
div.sidebar .nav-item h4 {
font-size: 1.2em;
text-transform: uppercase;
font-weight: 400;
margin-top: 10px;
}
/*
AUTOCOMPLETE SEARCH
*/
.search-suggestion {
padding: 5px;
}
.search-suggestion-options {
font-size: 0.9em;
padding-top: 2px;
}
/*
BOOTSTRAP Hacks
*/
@ -176,34 +221,7 @@ body.login {
color: #ffffff;
}
/*
SIDEBAR
*/
div.sidebar .nav-item a {
padding-left:0;
padding-right:0;
color: #777;
padding-top: 5px;
padding-bottom: 5px;
}
div.sidebar .nav-item a:hover {
text-decoration: underline;
}
div.sidebar .nav-item h4 {
font-size: 1.3em;
text-transform: uppercase;
font-weight: 400;
margin-top: 10px;
}
div.sidebar .nav-item span.oi {
color: #000;
font-size: 0.8em;
padding-right: 5px;
}
/*
PLUGINS

File diff suppressed because one or more lines are too long

View File

@ -9,20 +9,21 @@
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>"><span class="fa fa-dashboard"></span><?php $L->p('Dashboard') ?></a>
</li>
<li class="nav-item">
<a class="nav-link" target="_blank" href="<?php echo HTML_PATH_ROOT ?>"><span class="fa fa-external-link"></span><?php $L->p('Website') ?></a>
<a class="nav-link" target="_blank" href="<?php echo HTML_PATH_ROOT ?>"><span class="fa fa-home"></span><?php $L->p('Website') ?></a>
</li>
<li class="nav-item mt-3">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'new-content' ?>"><span style="color: #0078D4;" class="fa fa-plus"></span><?php $L->p('New content') ?></a>
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'new-content' ?>"><span style="color: #0078D4;" class="fa fa-plus-circle"></span><?php $L->p('New content') ?></a>
</li>
<?php if (!checkRole(array('admin'),false)): ?>
<li class="nav-item">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'content' ?>"><span class="fa fa-layers"></span><?php $L->p('Content') ?></a>
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'content' ?>"><span class="fa fa-archive"></span><?php $L->p('Content') ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'edit-user/'.$login->username() ?>"><span class="fa fa-person"></span><?php $L->p('Profile') ?></a>
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'edit-user/'.$login->username() ?>"><span class="fa fa-user"></span><?php $L->p('Profile') ?></a>
</li>
<?php endif; ?>
<?php if (checkRole(array('admin'),false)): ?>
@ -74,6 +75,6 @@
<?php endif; ?>
<li class="nav-item mt-5">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'logout' ?>"><span class="fa fa-account-logout"></span><?php $L->p('Logout') ?></a>
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'logout' ?>"><span class="fa fa-arrow-circle-right"></span><?php $L->p('Logout') ?></a>
</li>
</ul>

View File

@ -16,7 +16,6 @@
echo Theme::cssLineAwesome(); // Icons
echo Theme::css(array(
'jquery-auto-complete.css',
'open-iconic-bootstrap.min.css',
'jquery.datetimepicker.min.css',
'bludit.css',
'bludit.bootstrap.css'

View File

@ -44,7 +44,7 @@ EOF;
}
if (isset($args['icon'])) {
return '<a '.$options.'><span class="oi oi-'.$args['icon'].'" style="font-size: 0.7em;"></span> '.$args['title'].'</a>';
return '<a '.$options.'><span class="fa fa-'.$args['icon'].'" style="font-size: 0.7em;"></span> '.$args['title'].'</a>';
}
return '<a '.$options.'>'.$args['title'].'</a>';
@ -56,7 +56,7 @@ EOF;
$title = $args['title'];
return <<<EOF
<h2 class="mt-0 mb-3">
<span class="fa fa-$icon" style="font-size: 0.7em;"></span> $title
<span class="fa fa-$icon" style="font-size: 0.9em;"></span><span>$title</span>
</h2>
EOF;
}

View File

@ -1,6 +1,6 @@
<?php
echo Bootstrap::pageTitle(array('title'=>$L->g('About'), 'icon'=>'info'));
echo Bootstrap::pageTitle(array('title'=>$L->g('About'), 'icon'=>'info-circle'));
echo '
<table class="table table-striped mt-3">
@ -10,7 +10,7 @@ echo '
echo '<tr>';
echo '<td>Bludit Edition</td>';
if (defined('BLUDIT_PRO')) {
echo '<td>PRO - '.$L->g('Thanks for support Bludit').'</td>';
echo '<td>PRO - '.$L->g('Thanks for support Bludit').' <span class="fa fa-heart" style="color: #ffc107"></span></td>';
} else {
echo '<td>Standard - <a target="_blank" href="https://pro.bludit.com">'.$L->g('Upgrade to Bludit PRO').'</a></td>';
}

View File

@ -4,20 +4,22 @@
<!-- Good message -->
<div>
<h2 id="hello-message"><?php echo $L->g('hello') ?></h2>
<h2 id="hello-message" class="pt-0">
<span class="fa fa-hand-spock-o"></span><span><?php echo $L->g('hello') ?></span>
</h2>
<script>
$( document ).ready(function() {
$("#hello-message").fadeOut(1000, function() {
var date = new Date()
var hours = date.getHours()
if (hours > 6 && hours < 12) {
$(this).html('<span class="oi oi-sun"></span> <?php echo $L->g('good-morning') ?>');
$(this).html('<span class="fa fa-sun-o"></span><?php echo $L->g('good-morning') ?>');
} else if (hours > 12 && hours < 18) {
$(this).html('<span class="oi oi-sun"></span> <?php echo $L->g('good-afternoon') ?>');
$(this).html('<span class="fa fa-sun-o"></span><?php echo $L->g('good-afternoon') ?>');
} else if (hours > 18 && hours < 22) {
$(this).html('<span class="oi oi-moon"></span> <?php echo $L->g('good-evening') ?>');
$(this).html('<span class="fa fa-moon-o"></span><?php echo $L->g('good-evening') ?>');
} else {
$(this).html('<span class="oi oi-moon"></span> <?php echo $L->g('good-night') ?>');
$(this).html('<span class="fa fa-moon-o"></span><span><?php echo $L->g('good-night') ?></span>');
}
}).fadeIn(1000);
});
@ -30,19 +32,19 @@
<div class="row">
<div class="col">
<a class="quick-links text-center" style="color: #4586d4" href="<?php echo HTML_PATH_ADMIN_ROOT.'new-content' ?>">
<div class="oi oi-justify-left quick-links-icons"></div>
<div class="fa fa-edit quick-links-icons"></div>
<div><?php $L->p('New content') ?></div>
</a>
</div>
<div class="col border-left border-right">
<a class="quick-links text-center" href="<?php echo HTML_PATH_ADMIN_ROOT.'categories' ?>">
<div class="oi oi-tags quick-links-icons"></div>
<div class="fa fa-tags quick-links-icons"></div>
<div><?php $L->p('Categories') ?></div>
</a>
</div>
<div class="col">
<a class="quick-links text-center" href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>">
<div class="oi oi-people quick-links-icons"></div>
<div class="fa fa-users quick-links-icons"></div>
<div><?php $L->p('Users') ?></div>
</a>
</div>
@ -52,19 +54,19 @@
<div class="row">
<div class="col">
<a class="quick-links text-center" target="_blank" href="https://docs.bludit.com">
<div class="oi oi-compass quick-links-icons"></div>
<div class="fa fa-compass quick-links-icons"></div>
<div><?php $L->p('Documentation') ?></div>
</a>
</div>
<div class="col border-left border-right">
<a class="quick-links text-center" target="_blank" href="https://forum.bludit.org">
<div class="oi oi-loop-square quick-links-icons"></div>
<div class="fa fa-support quick-links-icons"></div>
<div><?php $L->p('Forum support') ?></div>
</a>
</div>
<div class="col">
<a class="quick-links text-center" target="_blank" href="https://gitter.im/bludit/support">
<div class="oi oi-chat quick-links-icons"></div>
<div class="fa fa-comments quick-links-icons"></div>
<div><?php $L->p('Chat support') ?></div>
</a>
</div>

View File

@ -1,6 +1,6 @@
<?php
echo Bootstrap::pageTitle(array('title'=>$L->g('Developers'), 'icon'=>'beaker'));
echo Bootstrap::pageTitle(array('title'=>$L->g('Developers'), 'icon'=>'gears'));
echo '<h2 class="mb-4 mt-4"><b>PHP version: '.phpversion().'</b></h2>';

View File

@ -7,7 +7,7 @@
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" role="button"><?php $L->p('Cancel') ?></a>
</div>
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Edit user'), 'icon'=>'person')); ?>
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Edit user'), 'icon'=>'user')); ?>
</div>
<!-- TABS -->
@ -56,7 +56,7 @@
'options'=>array('author'=>$L->g('Author'), 'editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')),
'selected'=>$user->role(),
'class'=>'',
'tip'=>''
'tip'=>'Author: Can write and edit his own content. Editor: Can write and edit the content of others.'
));
}

View File

@ -7,7 +7,7 @@
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" role="button"><?php $L->p('Cancel') ?></a>
</div>
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Add a new user'), 'icon'=>'person')); ?>
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Add a new user'), 'icon'=>'user')); ?>
</div>
<?php
@ -51,7 +51,7 @@
'options'=>array('author'=>$L->g('Author'), 'editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')),
'selected'=>'Author',
'class'=>'',
'tip'=>''
'tip'=>'Author: Can write and edit his own content. Editor: Can write and edit the content of others.'
));
echo Bootstrap::formInputText(array(

View File

@ -26,7 +26,7 @@
echo '<ul class="list-group list-group-sortable">';
foreach ($plugins['siteSidebar'] as $Plugin) {
echo '<li class="list-group-item" data-plugin="'.$Plugin->className().'"><span class="oi oi-move"></span> '.$Plugin->name().'</li>';
echo '<li class="list-group-item" data-plugin="'.$Plugin->className().'"><span class="fa fa-move"></span> '.$Plugin->name().'</li>';
}
echo '</ul>';
?>

View File

@ -7,7 +7,7 @@
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'edit-user/'.$user->username() ?>" role="button"><?php $L->p('Cancel') ?></a>
</div>
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Change password'), 'icon'=>'person')); ?>
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Change password'), 'icon'=>'user')); ?>
</div>
<?php

View File

@ -2,7 +2,7 @@
<?php
echo Bootstrap::pageTitle(array('title'=>$L->g('Users'), 'icon'=>'people'));
echo Bootstrap::pageTitle(array('title'=>$L->g('Users'), 'icon'=>'users'));
echo Bootstrap::link(array(
'title'=>$L->g('add-a-new-user'),
@ -38,6 +38,8 @@ foreach ($list as $username) {
echo '<td>'.$L->g('Administrator').'</td>';
} elseif ($user->role()=='editor') {
echo '<td>'.$L->g('Editor').'</td>';
} elseif ($user->role()=='author') {
echo '<td>'.$L->g('Author').'</td>';
} else {
echo '<td>'.$L->g('Reader').'</td>';
}

View File

@ -0,0 +1,36 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
header('Content-Type: application/json');
// $_GET
// ----------------------------------------------------------------------------
$published = empty($_GET['published']) ? false:true;
$static = empty($_GET['static']) ? false:true;
$sticky = empty($_GET['sticky']) ? false:true;
$scheduled = empty($_GET['scheduled']) ? false:true;
$draft = empty($_GET['draft']) ? false:true;
$query = isset($_GET['query']) ? Text::lowercase($_GET['query']) : false;
// ----------------------------------------------------------------------------
if ($query===false) {
ajaxResponse(1, 'Invalid query.');
}
$pageNumber = 1;
$numberOfItems = -1;
$pagesKey = $pages->getList($pageNumber, $numberOfItems, $published, $static, $sticky, $draft, $scheduled);
$tmp = array();
foreach ($pagesKey as $pageKey) {
try {
$page = new Page($pageKey);
$lowerTitle = Text::lowercase($page->title());
if (Text::stringContains($lowerTitle, $query)) {
$tmp[$page->title()] = $page->key();
}
} catch (Exception $e) {
// continue
}
}
exit (json_encode($tmp));
?>

View File

@ -54,7 +54,7 @@ class pluginBackup extends Plugin {
}
$html .= '<div>';
$html .= '<button name="createBackup" value="true" class="btn btn-primary btn-sm" type="submit"><span class="oi oi-play-circle"></span> '.$L->get('create-backup').'</button>';
$html .= '<button name="createBackup" value="true" class="btn btn-primary btn-sm" type="submit"><span class="fa fa-play-circle"></span> '.$L->get('create-backup').'</button>';
$html .= '</div>';
$html .= '<hr>';
@ -66,10 +66,10 @@ class pluginBackup extends Plugin {
$html .= '<h4 class="font-weight-normal">'.Date::format($filename, BACKUP_DATE_FORMAT, 'F j, Y, g:i a').'</h4>';
// Allow download if a zip file
if ($this->zip) {
$html .= '<a class="btn btn-outline-secondary btn-sm mr-1 mt-1" href="'.DOMAIN_CONTENT.'workspaces/backup/'.$filename.'.zip"><span class="oi oi-data-transfer-download"></span> '.$L->get('download').'</a>';
$html .= '<a class="btn btn-outline-secondary btn-sm mr-1 mt-1" href="'.DOMAIN_CONTENT.'workspaces/backup/'.$filename.'.zip"><span class="fa fa-download"></span> '.$L->get('download').'</a>';
}
$html .= '<button name="restoreBackup" value="'.$filename.'" class="btn btn-outline-secondary btn-sm mr-1 mt-1" type="submit"><span class="oi oi-timer"></span> '.$L->get('restore-backup').'</button>';
$html .= '<button name="deleteBackup" value="'.$filename.'" class="btn btn-outline-danger btn-sm mr-1 mt-1" type="submit"><span class="oi oi-trash"></span> '.$L->get('delete-backup').'</button>';
$html .= '<button name="restoreBackup" value="'.$filename.'" class="btn btn-outline-secondary btn-sm mr-1 mt-1" type="submit"><span class="fa fa-rotate-left"></span> '.$L->get('restore-backup').'</button>';
$html .= '<button name="deleteBackup" value="'.$filename.'" class="btn btn-outline-danger btn-sm mr-1 mt-1" type="submit"><span class="fa fa-trash"></span> '.$L->get('delete-backup').'</button>';
$html .= '</div>';
$html .= '<hr>';
}

View File

@ -37,4 +37,4 @@ fa-arrows-alt
oi-fullscreen-enter
fa fa-
oi oi-
fa fa-

File diff suppressed because one or more lines are too long

View File

@ -110,7 +110,7 @@ class pluginsimpleMDE extends Plugin {
output = "\n'.PAGE_BREAK.'\n";
cm.replaceSelection(output);
},
className: "oi oi-crop",
className: "fa fa-crop",
title: "'.$L->get('Pagebreak').'",
}]
});';

View File

@ -5,8 +5,8 @@ class pluginVersion extends Plugin {
public function adminSidebar()
{
global $L;
$html = '<a id="current-version" class="nav-link" href="'.HTML_PATH_ADMIN_ROOT.'about'.'">Version '.(defined('BLUDIT_PRO')?'<span class="oi oi-heart" style="color: #ffc107"></span>':'').'<span class="badge badge-warning badge-pill">'.BLUDIT_VERSION.'</span></a>';
$html .= '<a id="new-version" style="display: none;" target="_blank" href="https://www.bludit.com">'.$L->get('New version available').' <span class="oi oi-bell" style="color: red"></span></a>';
$html = '<a id="current-version" class="nav-link" href="'.HTML_PATH_ADMIN_ROOT.'about'.'">Version '.(defined('BLUDIT_PRO')?'<span class="fa fa-heart" style="color: #ffc107"></span>':'').'<span class="badge badge-warning badge-pill">'.BLUDIT_VERSION.'</span></a>';
$html .= '<a id="new-version" style="display: none;" target="_blank" href="https://www.bludit.com">'.$L->get('New version available').' <span class="fa fa-bell" style="color: red"></span></a>';
return $html;
}