Dashboard clean-up
This commit is contained in:
parent
4d99885320
commit
654b3d6b3b
|
@ -16,17 +16,16 @@
|
||||||
// Main after POST
|
// Main after POST
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
//$_newPosts = $dbPosts->regenerateCli();
|
|
||||||
$_newPages = $dbPages->regenerateCli();
|
|
||||||
|
|
||||||
$_newPages = $_newPosts = array();
|
|
||||||
|
|
||||||
$_draftPosts = array();
|
$_draftPosts = array();
|
||||||
|
$_scheduledPosts = array();
|
||||||
foreach($posts as $Post)
|
foreach($posts as $Post)
|
||||||
{
|
{
|
||||||
if($Post->draft()) {
|
if($Post->draft()) {
|
||||||
array_push($_draftPosts, $Post);
|
array_push($_draftPosts, $Post);
|
||||||
}
|
}
|
||||||
|
elseif($Post->scheduled()) {
|
||||||
|
array_push($_scheduledPosts, $Post);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$_draftPages = array();
|
$_draftPages = array();
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
/* ----------- UIKIT HACKs FOR BLUDIT ----------- */
|
/* ----------- UIKIT HACKs FOR BLUDIT ----------- */
|
||||||
.uk-navbar {
|
.uk-navbar {
|
||||||
background: #f5f5f5;
|
background: #EEEEEE !important;
|
||||||
border: none !important;
|
border: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uk-button {
|
.uk-button {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
padding: 1px 18px;
|
padding: 2px 22px;
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
|
background: #888888;
|
||||||
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uk-button:hover,
|
.uk-button:hover,
|
||||||
|
@ -16,12 +18,24 @@
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.uk-button-primary {
|
||||||
|
background: #2672ec;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uk-button-primary:hover {
|
||||||
|
background: #1F5FC4;
|
||||||
|
}
|
||||||
|
|
||||||
.uk-navbar-nav > li > a {
|
.uk-navbar-nav > li > a {
|
||||||
border: none;
|
border: none;
|
||||||
height: 70px;
|
height: 70px;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.uk-nav-navbar > li > a:hover {
|
||||||
|
background: #2672ec;
|
||||||
|
}
|
||||||
|
|
||||||
.uk-form-label {
|
.uk-form-label {
|
||||||
color: #666666;
|
color: #666666;
|
||||||
font-weight: normal !important;
|
font-weight: normal !important;
|
||||||
|
@ -44,6 +58,10 @@
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #2672ec;
|
||||||
|
}
|
||||||
|
|
||||||
a.bludit-logo {
|
a.bludit-logo {
|
||||||
color: #848484 !important;
|
color: #848484 !important;
|
||||||
}
|
}
|
||||||
|
@ -52,6 +70,10 @@ a.bludit-logo:hover {
|
||||||
background: none !important;
|
background: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.uk-panel-box {
|
||||||
|
background: #F9F9F9 !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* ----------- BLUDIT ----------- */
|
/* ----------- BLUDIT ----------- */
|
||||||
|
|
||||||
#logo {
|
#logo {
|
||||||
|
@ -77,6 +99,17 @@ button.delete-button:hover {
|
||||||
text-decoration: underline;
|
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 ----------- */
|
/* ----------- LOGIN FORM ----------- */
|
||||||
|
|
||||||
div.login-box > h1 {
|
div.login-box > h1 {
|
||||||
|
@ -117,7 +150,8 @@ div.plugin-links > span.separator {
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-draft,
|
.label-draft,
|
||||||
.label-empty-title {
|
.label-empty-title,
|
||||||
|
.label-time {
|
||||||
background: #2672ec none repeat scroll 0 0;
|
background: #2672ec none repeat scroll 0 0;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
|
@ -133,6 +167,11 @@ div.plugin-links > span.separator {
|
||||||
background: #ED8F26;
|
background: #ED8F26;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.label-time {
|
||||||
|
font-style: italic;
|
||||||
|
background: #ED3A26;
|
||||||
|
}
|
||||||
|
|
||||||
/* ----------- PAGINATOR ----------- */
|
/* ----------- PAGINATOR ----------- */
|
||||||
|
|
||||||
#paginator ul {
|
#paginator ul {
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -12,7 +12,7 @@
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="./img/favicon.png">
|
<link rel="shortcut icon" type="image/x-icon" href="./img/favicon.png">
|
||||||
|
|
||||||
<!-- CSS -->
|
<!-- 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/default.css?version=<?php echo BLUDIT_VERSION ?>">
|
||||||
<link rel="stylesheet" type="text/css" href="./css/jquery.datetimepicker.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 -->
|
<!-- Plugins -->
|
||||||
<?php Theme::plugins('adminBodyBegin') ?>
|
<?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 -->
|
<!-- Navbar -->
|
||||||
<nav class="uk-navbar">
|
<nav class="uk-navbar">
|
||||||
<div class="uk-container uk-container-center">
|
<div class="uk-container uk-container-center">
|
||||||
|
|
|
@ -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
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
</div>
|
</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">
|
<div class="uk-panel">
|
||||||
<h4><a href=""><i class="uk-icon-file-text-o"></i> <?php $L->p('New page') ?></a></h4>
|
<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">
|
<div class="uk-panel uk-panel-box">
|
||||||
<h4><?php $L->p('Scheduled posts') ?></h4>
|
<h4><?php $L->p('Scheduled posts') ?></h4>
|
||||||
<ul class="uk-list">
|
<ul class="uk-list">
|
||||||
<li>Test xx IL porto <span><i class="uk-icon-clock-o"></i>18 october - 22:35hs</span></li>
|
<?php
|
||||||
<li>Loremp ipsum scheduled <span><i class="uk-icon-clock-o"></i>18 october - 22:35hs</span></li>
|
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>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,9 @@ define('CLI_STATUS', 'published');
|
||||||
// Database format date
|
// Database format date
|
||||||
define('DB_DATE_FORMAT', 'Y-m-d H:i');
|
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
|
// 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');
|
define('TOKEN_TTL', '+1 day');
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,14 @@ class Alert {
|
||||||
return Session::get($key);
|
return Session::get($key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function p($key='alert')
|
||||||
|
{
|
||||||
|
echo self::get($key);
|
||||||
|
}
|
||||||
|
|
||||||
public static function defined()
|
public static function defined()
|
||||||
{
|
{
|
||||||
return Session::get('defined');
|
return Session::get('defined');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -104,8 +104,7 @@ class Post extends fileContent
|
||||||
$date = $this->getField('date');
|
$date = $this->getField('date');
|
||||||
|
|
||||||
if($format) {
|
if($format) {
|
||||||
// En %d %b deberia ir el formato definido por el usuario
|
return Date::format($date, DB_DATE_FORMAT, $format);
|
||||||
return Date::format($date, DB_DATE_FORMAT, '%d %B');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $date;
|
return $date;
|
||||||
|
|
|
@ -189,5 +189,6 @@
|
||||||
"back-to-login-form": "Back to login form",
|
"back-to-login-form": "Back to login form",
|
||||||
"send-me-a-login-access-code": "Send me a login access code",
|
"send-me-a-login-access-code": "Send me a login access code",
|
||||||
"get-login-access-code": "Get 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"
|
||||||
}
|
}
|
Loading…
Reference in New Issue