Dashboard clean-up

This commit is contained in:
dignajar 2015-10-22 00:14:22 -03:00
parent 4d99885320
commit 654b3d6b3b
12 changed files with 93 additions and 7807 deletions

View File

@ -16,17 +16,16 @@
// Main after POST
// ============================================================================
//$_newPosts = $dbPosts->regenerateCli();
$_newPages = $dbPages->regenerateCli();
$_newPages = $_newPosts = array();
$_draftPosts = array();
$_scheduledPosts = array();
foreach($posts as $Post)
{
if($Post->draft()) {
array_push($_draftPosts, $Post);
}
elseif($Post->scheduled()) {
array_push($_scheduledPosts, $Post);
}
}
$_draftPages = array();

View File

@ -1,13 +1,15 @@
/* ----------- UIKIT HACKs FOR BLUDIT ----------- */
.uk-navbar {
background: #f5f5f5;
background: #EEEEEE !important;
border: none !important;
}
.uk-button {
color: #ffffff;
padding: 1px 18px;
padding: 2px 22px;
text-shadow: none;
background: #888888;
border-radius: 3px;
}
.uk-button:hover,
@ -16,12 +18,24 @@
color: #ffffff;
}
.uk-button-primary {
background: #2672ec;
}
.uk-button-primary:hover {
background: #1F5FC4;
}
.uk-navbar-nav > li > a {
border: none;
height: 70px;
padding: 15px;
}
.uk-nav-navbar > li > a:hover {
background: #2672ec;
}
.uk-form-label {
color: #666666;
font-weight: normal !important;
@ -44,6 +58,10 @@
font-weight: normal;
}
a {
color: #2672ec;
}
a.bludit-logo {
color: #848484 !important;
}
@ -52,6 +70,10 @@ a.bludit-logo:hover {
background: none !important;
}
.uk-panel-box {
background: #F9F9F9 !important;
}
/* ----------- BLUDIT ----------- */
#logo {
@ -77,6 +99,17 @@ button.delete-button:hover {
text-decoration: underline;
}
#alert {
display: none;
background: rgba(48, 102, 187, 0.91);
color: #ffffff;
padding: 24px;
position: fixed;
text-align: center;
width: 100%;
z-index: 100;
}
/* ----------- LOGIN FORM ----------- */
div.login-box > h1 {
@ -117,7 +150,8 @@ div.plugin-links > span.separator {
}
.label-draft,
.label-empty-title {
.label-empty-title,
.label-time {
background: #2672ec none repeat scroll 0 0;
border-radius: 2px;
color: #ffffff;
@ -133,6 +167,11 @@ div.plugin-links > span.separator {
background: #ED8F26;
}
.label-time {
font-style: italic;
background: #ED3A26;
}
/* ----------- PAGINATOR ----------- */
#paginator ul {

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,7 @@
<link rel="shortcut icon" type="image/x-icon" href="./img/favicon.png">
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="./css/uikit.css?version=<?php echo BLUDIT_VERSION ?>">
<link rel="stylesheet" type="text/css" href="./css/uikit.almost-flat.min.css?version=<?php echo BLUDIT_VERSION ?>">
<link rel="stylesheet" type="text/css" href="./css/default.css?version=<?php echo BLUDIT_VERSION ?>">
<link rel="stylesheet" type="text/css" href="./css/jquery.datetimepicker.css?version=<?php echo BLUDIT_VERSION ?>">
@ -30,6 +30,24 @@
<!-- Plugins -->
<?php Theme::plugins('adminBodyBegin') ?>
<!-- Alert -->
<script>
$(document).ready(function() {
<?php
if( Alert::defined() ) {
echo '$("#alert").slideDown().delay(3500).slideUp();';
}
?>
$("#alert").click(function() {
$(this).hide();
});
});
</script>
<div id="alert">
<?php Alert::p() ?>
</div>
<!-- Navbar -->
<nav class="uk-navbar">
<div class="uk-container uk-container-center">

View File

@ -1,2 +0,0 @@
/*! UIkit 2.22.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
!function(t){var i;window.UIkit&&(i=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-form-password",["uikit"],function(){return i||t(UIkit)})}(function(t){"use strict";return t.component("formPassword",{defaults:{lblShow:"Show",lblHide:"Hide"},boot:function(){t.$html.on("click.formpassword.uikit","[data-uk-form-password]",function(i){var e=t.$(this);e.data("formPassword")||(i.preventDefault(),t.formPassword(e,t.Utils.options(e.attr("data-uk-form-password"))),e.trigger("click"))})},init:function(){var t=this;this.on("click",function(i){if(i.preventDefault(),t.input.length){var e=t.input.attr("type");t.input.attr("type","text"==e?"password":"text"),t.element.html(t.options["text"==e?"lblShow":"lblHide"])}}),this.input=this.element.next("input").length?this.element.next("input"):this.element.prev("input"),this.element.html(this.options[this.input.is("[type='password']")?"lblShow":"lblHide"]),this.element.data("formPassword",this)}}),t.formPassword});

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
</div>
<div class="uk-width-medium-1-3">
<div class="uk-width-medium-1-3" style="border-right: 1px solid #E6E6E6; border-left: 1px solid #E6E6E6">
<div class="uk-panel">
<h4><a href=""><i class="uk-icon-file-text-o"></i> <?php $L->p('New page') ?></a></h4>
@ -102,8 +102,16 @@
<div class="uk-panel uk-panel-box">
<h4><?php $L->p('Scheduled posts') ?></h4>
<ul class="uk-list">
<li>Test xx IL porto <span><i class="uk-icon-clock-o"></i>18 october - 22:35hs</span></li>
<li>Loremp ipsum scheduled <span><i class="uk-icon-clock-o"></i>18 october - 22:35hs</span></li>
<?php
if( empty($_scheduledPosts) ) {
echo '<li>'.$Language->g('There are no scheduled posts').'</li>';
}
else {
foreach($_scheduledPosts as $Post) {
echo '<li><span class="label-time">'.$Post->date(SCHEDULED_DATE_FORMAT).'</span><a href="'.HTML_PATH_ADMIN_ROOT.'edit-post/'.$Post->key().'">'.($Post->title()?$Post->title():'['.$Language->g('Empty title').'] ').'</a></li>';
}
}
?>
</ul>
</div>

View File

@ -69,6 +69,9 @@ define('CLI_STATUS', 'published');
// Database format date
define('DB_DATE_FORMAT', 'Y-m-d H:i');
// Database format date
define('SCHEDULED_DATE_FORMAT', 'd M - h:i a');
// Token time to live for login via email. The offset is defined by http://php.net/manual/en/datetime.modify.php
define('TOKEN_TTL', '+1 day');

View File

@ -17,6 +17,11 @@ class Alert {
return Session::get($key);
}
public static function p($key='alert')
{
echo self::get($key);
}
public static function defined()
{
return Session::get('defined');

View File

@ -104,8 +104,7 @@ class Post extends fileContent
$date = $this->getField('date');
if($format) {
// En %d %b deberia ir el formato definido por el usuario
return Date::format($date, DB_DATE_FORMAT, '%d %B');
return Date::format($date, DB_DATE_FORMAT, $format);
}
return $date;

View File

@ -189,5 +189,6 @@
"back-to-login-form": "Back to login form",
"send-me-a-login-access-code": "Send me a login access code",
"get-login-access-code": "Get login access code",
"email-notification-login-access-code": "<p>This is a notification from your website {{WEBSITE_NAME}}</p><p>You request a login access code, follow the next link:</p><p>{{LINK}}</p>"
"email-notification-login-access-code": "<p>This is a notification from your website {{WEBSITE_NAME}}</p><p>You request a login access code, follow the next link:</p><p>{{LINK}}</p>",
"there-are-no-scheduled-posts": "There are no scheduled posts"
}