New Dashboard

This commit is contained in:
dignajar 2016-09-07 10:03:53 -03:00
parent 832e47e94a
commit 0e99046419
39 changed files with 866 additions and 866 deletions

View File

@ -1,246 +1,209 @@
.uk-form * {
border-radius: 2px !important;
}
.uk-tab a {
color: #2196f3 !important;
}
a {
color: #2196f3 !important;
}
/* UIKIT HACKs navbar
/* UIKIT HACKs
---------------------------------------------------------------- */
.uk-navbar {
background: #323232 !important;
border: 0 !important;
border-radius: 0 !important;
.uk-width-1-4 {
width: 20% !important;
}
.uk-navbar-nav a {
border: none !important;
border-radius: none !important;
text-shadow: none !important;
color: #fff !important;
font-weight: 300 !important;
padding: 0 25px !important;
.uk-width-3-4 {
width: 80% !important;
}
.uk-navbar-nav > li.uk-open > a,
.uk-navbar-nav > li:hover > a,
.uk-navbar-nav > li:focus > a,
.uk-navbar-nav > li > a:focus,
.uk-navbar-nav > li > a:hover {
background: none !important;
border-radius: 0 !important;
color: #BBBBBB !important;
box-shadow: none !important;
text-shadow: none !important;
}
.uk-nav-navbar > li > a:focus,
.uk-nav-navbar > li > a:hover {
background: none !important;
border-radius: 0 !important;
color: #888 !important;
box-shadow: none !important;
text-shadow: none !important;
}
.uk-navbar-nav > li.uk-active > a {
background: none !important;
color: #BBBBBB !important;
}
.uk-navbar-nav .uk-border-circle {
border-radius: 20px !important;
}
.uk-dropdown-navbar {
margin: 0 !important;
padding: 10px 0 !important;
position: fixed;
.label-draft,
.label-empty-title,
.label-time {
background: #A979D1 none repeat scroll 0 0;
border-radius: 2px;
color: #ffffff;
display: inline-block;
padding: 0 8px;
text-align: center;
width: 100%;
border-radius: 0 !important;
border-left: 0 !important;
border-right: 0 !important;
border-top: 0 !important;
vertical-align: middle;
margin-right: 5px;
font-size: 0.8em;
}
.uk-dropdown-navbar li {
display: inline-block !important;
.label-empty-title {
background: #53D192;
}
.uk-dropdown-navbar a {
color: #323232 !important;
.label-time {
font-style: italic;
background: #A979D1;
}
li.bludit-logo {
color: #fff !important;
display: block;
font-size: 14px;
font-weight: 400;
height: 41px;
line-height: 40px;
margin-left: -1px;
margin-top: -1px;
margin-right: 12px;
}
.bludit-user-navbar {
background: #333 none repeat scroll 0 0;
border-color: #ccc;
border-radius: 0 0 5px 5px !important;
color: #fff;
position: absolute;
}
.bludit-user-navbar a {
color: #fff !important;
}
@media (min-width: 333px) and (max-width: 959px) {
/* Hidden the Welcome USERNAME */
.uk-navbar-flip {
display: none !important;
}
/* Expand and hidden the sidebar */
.uk-width-large-8-10 {
width: 100% !important;
}
/* Hidden the sidebar */
.uk-width-large-2-10 {
width: 0% !important;
display: none !important;
}
}
@media (min-width: 960px) {
.uk-width-large-4-5,
.uk-width-large-8-10 {
width: 75% !important;
}
.uk-width-large-1-5,
.uk-width-large-2-10 {
width: 25% !important;
}
}
/* UIKIT HACKs hidden navbar
/* UIKIT HACKs tabs
---------------------------------------------------------------- */
.uk-navbar-brand {
text-shadow: none !important;
color: #fff !important;
}
.uk-navbar-toggle {
text-shadow: none !important;
color: #fff !important;
}
.uk-nav-offcanvas > li > a {
color: #fff !important;
.uk-nav-dropdown > li > a:focus,
.uk-nav-dropdown > li > a:hover {
background-color: #007add !important;
}
/* UIKIT HACKs buttons
---------------------------------------------------------------- */
.uk-button {
padding: 2px 26px;
text-shadow: none;
color: #333 !important;
border-radius: 2px !important;
padding: 1px 20px !important;
}
.uk-button-primary {
background: #2196f3 !important;
color: #fff !important;
background-color: #007add !important;
}
.uk-button-primary:hover {
background: #2EA3FF;
color: #fafafa !important;
.uk-button-primary:hover,
.uk-button-primary:focus {
background-color: #0069BE !important;
}
/* UIKIT HACKs forms
/* CSS defaults
---------------------------------------------------------------- */
legend {
width: 70% !important;
margin-top: 40px !important;
}
legend.first-child {
margin-top: 0px !important;
}
.uk-form-label {
color: #666666;
font-weight: normal !important;
}
.uk-form-help-block {
color: #AAAAAA;
font-size: 0.9em;
}
.uk-table th,
.uk-table td {
padding: 15px 10px;
}
.uk-table td.children {
padding: 15px 10px 15px 25px;
}
.uk-badge {
margin-right: 5px !important;
font-size: 0.9em;
padding: 2px 7px;
font-weight: normal;
}
a {
color: #2672ec;
}
.uk-panel-box {
background: #F9F9F9 !important;
border: 0;
}
.uk-container {
max-width: 1280px !important;
}
.uk-thumbnail {
margin: 2px 3px !important;
max-width: 30% !important;
padding: 0 !important;
}
.uk-progress-bar {
background: #2672ec !important;
}
.uk-placeholder {
margin-bottom: 0 !important;
}
/* ----------- BLUDIT ----------- */
body {
overflow-y: scroll;
}
.bludit-navbar {
#bl-container {
margin-bottom: 20px;
}
/* TOPBAR
---------------------------------------------------------------- */
#bl-navbar {
background: #f1f1f1;
margin-bottom: 20px;
width: 100%;
}
#bl-navbar a.bl-brand {
font-size: 20px;
line-height: 60px;
margin: 0 0 0 35px;
text-transform: uppercase;
text-shadow: 0 1px 0 #fff;
}
#bl-navbar a.bl-brand:hover {
text-decoration: none;
}
/* SIDEBAR
---------------------------------------------------------------- */
#bl-sidebar a {
color: #777 !important;
}
#bl-sidebar .uk-nav {
margin: 0px 0 0 20px !important;
}
#bl-sidebar .uk-nav-header {
font-weight: normal !important;
font-size: 16px;
}
/* VIEW
---------------------------------------------------------------- */
#bl-view {
margin-right: 20px;
}
#bl-view .uk-width-2-10 {
padding-left: 10px !important;
}
.plugin-incompatible,
.theme-incompatible {
background: #ffdc7d;
border: 1px dashed #eec24a;
color: #826106;
display: table-cell;
font-size: 12px;
margin-top: 6px;
padding: 1px 10px;
}
/* DASHBOARD
---------------------------------------------------------------- */
#dashboard-panel .uk-panel {
background-color: #fafafa !important;
border: 1px solid #f8f8f8;
box-shadow: 5px 1px 1px #fdfdfd;
padding: 10px !important;
}
#dashboard-panel .uk-panel h4.panel-title {
text-transform: uppercase;
font-size: 14px !important;
}
div.dashboard-links {
background-color: #fafafa !important;
border: 1px solid #f8f8f8;
box-shadow: 5px 1px 1px #fdfdfd;
margin-bottom: 20px;
padding: 50px 20px;
}
div.dashboard-links h4 {
margin-bottom: -8px !important;
}
/* FORM
---------------------------------------------------------------- */
.uk-form input:not([type]), .uk-form input[type="text"], .uk-form input[type="password"], .uk-form input[type="email"], .uk-form input[type="url"], .uk-form input[type="search"], .uk-form input[type="tel"], .uk-form input[type="number"], .uk-form input[type="datetime"], .uk-form input[type="datetime-local"], .uk-form input[type="date"], .uk-form input[type="month"], .uk-form input[type="time"], .uk-form input[type="week"], .uk-form input[type="color"], .uk-form select, .uk-form textarea {
border-radius: 2px !important;
}
.uk-form-help-block {
color: #777 !important;
font-size: 0.9em !important;
}
.sidebar-meta .uk-form-label {
font-size: 0.9em;
text-transform: uppercase;
}
.uk-form legend {
margin-top: 20px;
}
.uk-form legend.first-child {
margin-top: 0 !important;
}
button.aslink {
background: rgba(0, 0, 0, 0) none repeat scroll 0 0;
border: 0 none;
color: #07d;
cursor: pointer;
display: block;
font-size: 1em;
margin: 0 !important;
padding: 0 !important;
}
button.aslink:hover {
text-decoration: underline;
}
/* OLD
---------------------------------------------------------------- */
.bl-view {
margin-top: 25px;
margin-bottom: 25px;
}
#logo {
@ -270,10 +233,7 @@ button.delete-button:hover {
height: 400px;
}
.bl-view {
margin-top: 25px;
margin-bottom: 25px;
}
table.statistics tr:last-child td {
border-bottom: none !important;
@ -302,10 +262,6 @@ table.statistics tr:last-child td {
/* ----------- FORM ----------- */
.sidebar .uk-form-label {
font-size: 0.9em;
text-transform: uppercase;
}
#bludit-tags {
margin-top: 15px;
@ -527,24 +483,7 @@ div.login-form {
width: 400px;
}
/* ----------- DASHBOARD ----------- */
div.dashboard-links {
margin: 0 0 25px 0;
}
div.dashboard-links h4 {
margin-bottom: -8px !important;
}
div.dashboard-links a {
color: #555;
}
/* NEW POST */
h3.titleOptions {
font-size: 1em;
}
/* ----------- PLUGIN LIST / THEME LIST ----------- */
@ -562,28 +501,6 @@ div.plugin-links > span.separator {
color: #ccc;
}
.label-draft,
.label-empty-title,
.label-time {
background: #2672ec none repeat scroll 0 0;
border-radius: 2px;
color: #ffffff;
display: inline-block;
padding: 0 8px;
text-align: center;
vertical-align: middle;
margin-right: 5px;
font-size: 0.9em;
}
.label-empty-title {
background: #ED8F26;
}
.label-time {
font-style: italic;
background: #ED3A26;
}
/* ----------- PAGINATOR ----------- */

View File

@ -1,2 +1,2 @@
/*! UIkit 2.26.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
/*! UIkit 2.26.4 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
.uk-form-file{display:inline-block;vertical-align:middle;position:relative;overflow:hidden}.uk-form-file input[type=file]{position:absolute;top:0;z-index:1;width:100%;opacity:0;cursor:pointer;left:0;font-size:500px}

View File

@ -1,2 +1,2 @@
/*! UIkit 2.26.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
/*! UIkit 2.26.4 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
.uk-placeholder{margin-bottom:15px;padding:15px;border:1px dashed #ddd;background:#fafafa;color:#444}*+.uk-placeholder{margin-top:15px}.uk-placeholder>:last-child{margin-bottom:0}.uk-placeholder-large{padding-top:80px;padding-bottom:80px}

View File

@ -1,2 +1,2 @@
/*! UIkit 2.26.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
/*! UIkit 2.26.4 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
.uk-progress{box-sizing:border-box;height:20px;margin-bottom:15px;background:#f5f5f5;overflow:hidden;line-height:20px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.06);border-radius:4px}*+.uk-progress{margin-top:15px}.uk-progress-bar{width:0;height:100%;background:#00a8e6;float:left;-webkit-transition:width .6s ease;transition:width .6s ease;font-size:12px;color:#fff;text-align:center;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-progress-mini{height:6px}.uk-progress-small{height:12px}.uk-progress-success .uk-progress-bar{background-color:#8cc14c}.uk-progress-warning .uk-progress-bar{background-color:#faa732}.uk-progress-danger .uk-progress-bar{background-color:#da314b}.uk-progress-striped .uk-progress-bar{background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:30px 30px}.uk-progress-striped.uk-active .uk-progress-bar{-webkit-animation:uk-progress-bar-stripes 2s linear infinite;animation:uk-progress-bar-stripes 2s linear infinite}@-webkit-keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}@keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}.uk-progress-mini,.uk-progress-small{border-radius:500px}

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
/*! UIkit 2.26.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
/*! UIkit 2.26.4 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
.uk-dragover{box-shadow:0 0 20px rgba(100,100,100,.3)}

View File

@ -51,82 +51,6 @@ $(document).ready(function() {
<?php Alert::p() ?>
</div>
<!-- Navbar -->
<nav class="uk-navbar bludit-navbar">
<!-- Navbar for Desktop -->
<div class="uk-container uk-container-center uk-hidden-small">
<ul class="uk-navbar-nav">
<li class="bludit-logo">BLUDIT</li>
<li <?php echo ($layout['view']=='dashboard')?'class="uk-active"':'' ?> ><a href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>"><?php $L->p('Dashboard') ?></a></li>
<li <?php echo ($layout['view']=='new-post')?'class="uk-active"':'' ?>><a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-post' ?>"><?php $L->p('New post') ?></a></li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>><a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-page' ?>"><?php $L->p('New page') ?></a></li>
<li class="uk-parent" data-uk-dropdown>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'manage-posts' ?>"><?php $L->p('Manage') ?> ▾</a>
<div class="uk-dropdown uk-dropdown-navbar">
<ul class="uk-nav uk-nav-navbar">
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'manage-posts' ?>"><i class="uk-icon-folder-o"></i> <?php $L->p('Posts') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'manage-pages' ?>"><i class="uk-icon-folder-o"></i> <?php $L->p('Pages') ?></a></li>
<?php if($Login->role() == 'admin') { ?>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>"><i class="uk-icon-users"></i> <?php $L->p('Users') ?></a></li>
<?php } ?>
</ul>
</div>
</li>
<?php if($Login->role() == 'admin') { ?>
<li class="uk-parent" data-uk-dropdown>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-general' ?>"><?php $L->p('Settings') ?> ▾</a>
<div class="uk-dropdown uk-dropdown-navbar">
<ul class="uk-nav uk-nav-navbar">
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-general' ?>"><i class="uk-icon-cog"></i> <?php $L->p('General') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-advanced' ?>"><i class="uk-icon-cogs"></i> <?php $L->p('Advanced') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-regional' ?>"><i class="uk-icon-globe"></i> <?php $L->p('Language and timezone') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'plugins' ?>"><i class="uk-icon-puzzle-piece"></i> <?php $L->p('Plugins') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'themes' ?>"><i class="uk-icon-paint-brush"></i> <?php $L->p('Themes') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'about' ?>"><i class="uk-icon-support"></i> <?php $L->p('About') ?></a></li>
</ul>
</div>
</li>
<?php } ?>
<li><a target="_blank" href="<?php echo HTML_PATH_ROOT ?>"><?php $L->p('Website') ?></a></li>
</ul>
<div class="uk-navbar-flip">
<ul class="uk-navbar-nav">
<li class="uk-parent" data-uk-dropdown>
<?php
$profilePictureSrc = HTML_PATH_ADMIN_THEME_IMG.'default.png';
if(file_exists(PATH_UPLOADS_PROFILES.$Login->username().'.png')) {
$profilePictureSrc = HTML_PATH_UPLOADS_PROFILES.$Login->username().'.png';
}
?>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'edit-user/'.$Login->username() ?>">
<img class="uk-border-circle" width="28px" src="<?php echo $profilePictureSrc ?>" alt=""> <?php $L->p('Welcome') ?> <?php echo $Login->username() ?>
</a>
<div class="uk-dropdown uk-dropdown-navbar bludit-user-navbar">
<ul class="uk-nav uk-nav-navbar">
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'logout' ?>"><?php $L->p('Logout') ?></a></li>
</ul>
</div>
</li>
</ul>
</div>
</div>
<!-- Navbar for Mobile -->
<a href="#offcanvas" class="uk-navbar-toggle uk-visible-small" data-uk-offcanvas></a>
<div class="uk-navbar-brand uk-navbar-center uk-visible-small">BLUDIT</div>
</nav>
<!-- Offcanvas for Mobile -->
<div id="offcanvas" class="uk-offcanvas">
<div class="uk-offcanvas-bar">
@ -149,13 +73,77 @@ $(document).ready(function() {
</div>
</div>
<!-- View -->
<div class="uk-container uk-container-center bl-view">
<?php
if( Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'].'.php') ) {
include(PATH_ADMIN_VIEWS.$layout['view'].'.php');
}
?>
<nav id="bl-navbar">
<a href="" class="bl-brand">BLUDIT</a>
</nav>
<div id="bl-container">
<div class="uk-grid uk-grid-small">
<div class="uk-width-1-4">
<div id="bl-sidebar">
<ul class="uk-nav">
<li <?php echo ($layout['view']=='dashboard')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>"><?php $L->p('Dashboard') ?></a>
</li>
<li class="uk-nav-header">Write</li>
<li <?php echo ($layout['view']=='new-post')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-post' ?>"><?php $L->p('New post') ?></a>
</li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-page' ?>"><?php $L->p('New page') ?></a>
</li>
<li class="uk-nav-header">Manage</li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'manage-posts' ?>"><?php $L->p('Posts') ?></a>
</li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'manage-pages' ?>"><?php $L->p('Pages') ?></a>
</li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>"><?php $L->p('Users') ?></a>
</li>
<li class="uk-nav-header">Settings</li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-general' ?>"><?php $L->p('General') ?></a>
</li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-advanced' ?>"><?php $L->p('Advanced') ?></a>
</li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-regional' ?>"><?php $L->p('Language and timezone') ?></a>
</li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'plugins' ?>"><?php $L->p('Plugins') ?></a>
</li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'themes' ?>"><?php $L->p('Themes') ?></a>
</li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'about' ?>"><?php $L->p('About') ?></a>
</li>
</ul>
</div>
</div>
<div class="uk-width-3-4">
<div id="bl-view">
<?php
if( Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'].'.php') ) {
include(PATH_ADMIN_VIEWS.$layout['view'].'.php');
}
?>
</div>
</div>
</div>
<!-- Javascript -->

View File

@ -356,7 +356,7 @@ $(document).ready(function() {
{
type: "json",
action: HTML_PATH_ADMIN_ROOT+"ajax/uploader",
allow : "*.(jpg|jpeg|gif|png|svg)",
allow : "*.(jpg|jpeg|gif|png)",
params: {"type":"profilePicture", "username":"'.$username.'"},
loadstart: function() {

File diff suppressed because one or more lines are too long

View File

@ -1,256 +1,2 @@
(function(addon) {
var component;
if (window.UIkit) {
component = addon(UIkit);
}
if (typeof define == "function" && define.amd) {
define("uikit-upload", ["uikit"], function(){
return component || addon(UIkit);
});
}
})(function(UI){
"use strict";
UI.component('uploadSelect', {
init: function() {
var $this = this;
this.on("change", function() {
xhrupload($this.element[0].files, $this.options);
var twin = $this.element.clone(true).data('uploadSelect', $this);
$this.element.replaceWith(twin);
$this.element = twin;
});
}
});
UI.component('uploadDrop', {
defaults: {
'dragoverClass': 'uk-dragover'
},
init: function() {
var $this = this, hasdragCls = false;
this.on("drop", function(e){
if (e.originalEvent.dataTransfer && e.originalEvent.dataTransfer.files) {
e.stopPropagation();
e.preventDefault();
$this.element.removeClass($this.options.dragoverClass);
$this.element.trigger('dropped.uk.upload', [e.originalEvent.dataTransfer.files]);
xhrupload(e.originalEvent.dataTransfer.files, $this.options);
}
}).on("dragenter", function(e){
e.stopPropagation();
e.preventDefault();
}).on("dragover", function(e){
e.stopPropagation();
e.preventDefault();
if (!hasdragCls) {
$this.element.addClass($this.options.dragoverClass);
hasdragCls = true;
}
}).on("dragleave", function(e){
e.stopPropagation();
e.preventDefault();
$this.element.removeClass($this.options.dragoverClass);
hasdragCls = false;
});
}
});
UI.support.ajaxupload = (function() {
function supportFileAPI() {
var fi = document.createElement('INPUT'); fi.type = 'file'; return 'files' in fi;
}
function supportAjaxUploadProgressEvents() {
var xhr = new XMLHttpRequest(); return !! (xhr && ('upload' in xhr) && ('onprogress' in xhr.upload));
}
function supportFormData() {
return !! window.FormData;
}
return supportFileAPI() && supportAjaxUploadProgressEvents() && supportFormData();
})();
function xhrupload(files, settings) {
if (!UI.support.ajaxupload){
return this;
}
settings = UI.$.extend({}, xhrupload.defaults, settings);
if (!files.length){
return;
}
if (settings.allow !== '*.*') {
for(var i=0,file;file=files[i];i++) {
if(!matchName(settings.allow, file.name)) {
if(typeof(settings.notallowed) == 'string') {
alert(settings.notallowed);
} else {
settings.notallowed(file, settings);
}
return;
}
}
}
var complete = settings.complete;
if (settings.single){
var count = files.length,
uploaded = 0,
allow = true;
settings.beforeAll(files);
settings.complete = function(response, xhr){
uploaded = uploaded + 1;
complete(response, xhr);
if (settings.filelimit && uploaded >= settings.filelimit){
allow = false;
}
if (allow && uploaded<count){
upload([files[uploaded]], settings);
} else {
settings.allcomplete(response, xhr);
}
};
upload([files[0]], settings);
} else {
settings.complete = function(response, xhr){
complete(response, xhr);
settings.allcomplete(response, xhr);
};
upload(files, settings);
}
function upload(files, settings){
// upload all at once
var formData = new FormData(), xhr = new XMLHttpRequest();
if (settings.before(settings, files)===false) return;
for (var i = 0, f; f = files[i]; i++) { formData.append(settings.param, f); }
for (var p in settings.params) { formData.append(p, settings.params[p]); }
// Add any event handlers here...
xhr.upload.addEventListener("progress", function(e){
var percent = (e.loaded / e.total)*100;
settings.progress(percent, e);
}, false);
xhr.addEventListener("loadstart", function(e){ settings.loadstart(e); }, false);
xhr.addEventListener("load", function(e){ settings.load(e); }, false);
xhr.addEventListener("loadend", function(e){ settings.loadend(e); }, false);
xhr.addEventListener("error", function(e){ settings.error(e); }, false);
xhr.addEventListener("abort", function(e){ settings.abort(e); }, false);
xhr.open(settings.method, settings.action, true);
if (settings.type=="json") {
xhr.setRequestHeader("Accept", "application/json");
}
xhr.onreadystatechange = function() {
settings.readystatechange(xhr);
if (xhr.readyState==4){
var response = xhr.responseText;
if (settings.type=="json") {
try {
response = UI.$.parseJSON(response);
} catch(e) {
response = false;
}
}
settings.complete(response, xhr);
}
};
settings.beforeSend(xhr);
xhr.send(formData);
}
}
xhrupload.defaults = {
'action': '',
'single': true,
'method': 'POST',
'param' : 'files[]',
'params': {},
'allow' : '*.*',
'type' : 'text',
'filelimit': false,
// events
'before' : function(o){},
'beforeSend' : function(xhr){},
'beforeAll' : function(){},
'loadstart' : function(){},
'load' : function(){},
'loadend' : function(){},
'error' : function(){},
'abort' : function(){},
'progress' : function(){},
'complete' : function(){},
'allcomplete' : function(){},
'readystatechange': function(){},
'notallowed' : function(file, settings){ alert('Only the following file types are allowed: '+settings.allow); }
};
function matchName(pattern, path) {
var parsedPattern = '^' + pattern.replace(/\//g, '\\/').
replace(/\*\*/g, '(\\/[^\\/]+)*').
replace(/\*/g, '[^\\/]+').
replace(/((?!\\))\?/g, '$1.') + '$';
parsedPattern = '^' + parsedPattern + '$';
return (path.match(new RegExp(parsedPattern, 'i')) !== null);
}
UI.Utils.xhrupload = xhrupload;
return xhrupload;
});
/*! UIkit 2.26.4 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
!function(e){var t;window.UIkit&&(t=e(UIkit)),"function"==typeof define&&define.amd&&define("uikit-upload",["uikit"],function(){return t||e(UIkit)})}(function(e){"use strict";function t(o,a){function r(t,n){var o=new FormData,a=new XMLHttpRequest;if(n.before(n,t)!==!1){for(var r,i=0;r=t[i];i++)o.append(n.param,r);for(var l in n.params)o.append(l,n.params[l]);a.upload.addEventListener("progress",function(e){var t=e.loaded/e.total*100;n.progress(t,e)},!1),a.addEventListener("loadstart",function(e){n.loadstart(e)},!1),a.addEventListener("load",function(e){n.load(e)},!1),a.addEventListener("loadend",function(e){n.loadend(e)},!1),a.addEventListener("error",function(e){n.error(e)},!1),a.addEventListener("abort",function(e){n.abort(e)},!1),a.open(n.method,n.action,!0),"json"==n.type&&a.setRequestHeader("Accept","application/json"),a.onreadystatechange=function(){if(n.readystatechange(a),4==a.readyState){var t=a.responseText;if("json"==n.type)try{t=e.$.parseJSON(t)}catch(o){t=!1}n.complete(t,a)}},n.beforeSend(a),a.send(o)}}if(!e.support.ajaxupload)return this;if(a=e.$.extend({},t.defaults,a),o.length){if("*.*"!==a.allow)for(var i,l=0;i=o[l];l++)if(!n(a.allow,i.name))return"string"==typeof a.notallowed?alert(a.notallowed):a.notallowed(i,a),void 0;var f=a.complete;if(a.single){var s=o.length,d=0,p=!0;a.beforeAll(o),a.complete=function(e,t){d+=1,f(e,t),a.filelimit&&d>=a.filelimit&&(p=!1),p&&s>d?r([o[d]],a):a.allcomplete(e,t)},r([o[0]],a)}else a.complete=function(e,t){f(e,t),a.allcomplete(e,t)},r(o,a)}}function n(e,t){var n="^"+e.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")+"$";return n="^"+n+"$",null!==t.match(new RegExp(n,"i"))}return e.component("uploadSelect",{init:function(){var e=this;this.on("change",function(){t(e.element[0].files,e.options);var n=e.element.clone(!0).data("uploadSelect",e);e.element.replaceWith(n),e.element=n})}}),e.component("uploadDrop",{defaults:{dragoverClass:"uk-dragover"},init:function(){var e=this,n=!1;this.on("drop",function(n){n.originalEvent.dataTransfer&&n.originalEvent.dataTransfer.files&&(n.stopPropagation(),n.preventDefault(),e.element.removeClass(e.options.dragoverClass),e.element.trigger("dropped.uk.upload",[n.originalEvent.dataTransfer.files]),t(n.originalEvent.dataTransfer.files,e.options))}).on("dragenter",function(e){e.stopPropagation(),e.preventDefault()}).on("dragover",function(t){t.stopPropagation(),t.preventDefault(),n||(e.element.addClass(e.options.dragoverClass),n=!0)}).on("dragleave",function(t){t.stopPropagation(),t.preventDefault(),e.element.removeClass(e.options.dragoverClass),n=!1})}}),e.support.ajaxupload=function(){function e(){var e=document.createElement("INPUT");return e.type="file","files"in e}function t(){var e=new XMLHttpRequest;return!!(e&&"upload"in e&&"onprogress"in e.upload)}function n(){return!!window.FormData}return e()&&t()&&n()}(),t.defaults={action:"",single:!0,method:"POST",param:"files[]",params:{},allow:"*.*",type:"text",filelimit:!1,before:function(){},beforeSend:function(){},beforeAll:function(){},loadstart:function(){},load:function(){},loadend:function(){},error:function(){},abort:function(){},progress:function(){},complete:function(){},allcomplete:function(){},readystatechange:function(){},notallowed:function(e,t){alert("Only the following file types are allowed: "+t.allow)}},e.Utils.xhrupload=t,t});

View File

@ -1,2 +0,0 @@
/*! UIkit 2.26.4 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
.uk-dragover{box-shadow:0 0 20px rgba(100,100,100,.3)}

File diff suppressed because one or more lines are too long

View File

@ -1,2 +0,0 @@
/*! UIkit 2.26.4 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
!function(e){var t;window.UIkit&&(t=e(UIkit)),"function"==typeof define&&define.amd&&define("uikit-upload",["uikit"],function(){return t||e(UIkit)})}(function(e){"use strict";function t(o,a){function r(t,n){var o=new FormData,a=new XMLHttpRequest;if(n.before(n,t)!==!1){for(var r,i=0;r=t[i];i++)o.append(n.param,r);for(var l in n.params)o.append(l,n.params[l]);a.upload.addEventListener("progress",function(e){var t=e.loaded/e.total*100;n.progress(t,e)},!1),a.addEventListener("loadstart",function(e){n.loadstart(e)},!1),a.addEventListener("load",function(e){n.load(e)},!1),a.addEventListener("loadend",function(e){n.loadend(e)},!1),a.addEventListener("error",function(e){n.error(e)},!1),a.addEventListener("abort",function(e){n.abort(e)},!1),a.open(n.method,n.action,!0),"json"==n.type&&a.setRequestHeader("Accept","application/json"),a.onreadystatechange=function(){if(n.readystatechange(a),4==a.readyState){var t=a.responseText;if("json"==n.type)try{t=e.$.parseJSON(t)}catch(o){t=!1}n.complete(t,a)}},n.beforeSend(a),a.send(o)}}if(!e.support.ajaxupload)return this;if(a=e.$.extend({},t.defaults,a),o.length){if("*.*"!==a.allow)for(var i,l=0;i=o[l];l++)if(!n(a.allow,i.name))return"string"==typeof a.notallowed?alert(a.notallowed):a.notallowed(i,a),void 0;var f=a.complete;if(a.single){var s=o.length,d=0,p=!0;a.beforeAll(o),a.complete=function(e,t){d+=1,f(e,t),a.filelimit&&d>=a.filelimit&&(p=!1),p&&s>d?r([o[d]],a):a.allcomplete(e,t)},r([o[0]],a)}else a.complete=function(e,t){f(e,t),a.allcomplete(e,t)},r(o,a)}}function n(e,t){var n="^"+e.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")+"$";return n="^"+n+"$",null!==t.match(new RegExp(n,"i"))}return e.component("uploadSelect",{init:function(){var e=this;this.on("change",function(){t(e.element[0].files,e.options);var n=e.element.clone(!0).data("uploadSelect",e);e.element.replaceWith(n),e.element=n})}}),e.component("uploadDrop",{defaults:{dragoverClass:"uk-dragover"},init:function(){var e=this,n=!1;this.on("drop",function(n){n.originalEvent.dataTransfer&&n.originalEvent.dataTransfer.files&&(n.stopPropagation(),n.preventDefault(),e.element.removeClass(e.options.dragoverClass),e.element.trigger("dropped.uk.upload",[n.originalEvent.dataTransfer.files]),t(n.originalEvent.dataTransfer.files,e.options))}).on("dragenter",function(e){e.stopPropagation(),e.preventDefault()}).on("dragover",function(t){t.stopPropagation(),t.preventDefault(),n||(e.element.addClass(e.options.dragoverClass),n=!0)}).on("dragleave",function(t){t.stopPropagation(),t.preventDefault(),e.element.removeClass(e.options.dragoverClass),n=!1})}}),e.support.ajaxupload=function(){function e(){var e=document.createElement("INPUT");return e.type="file","files"in e}function t(){var e=new XMLHttpRequest;return!!(e&&"upload"in e&&"onprogress"in e.upload)}function n(){return!!window.FormData}return e()&&t()&&n()}(),t.defaults={action:"",single:!0,method:"POST",param:"files[]",params:{},allow:"*.*",type:"text",filelimit:!1,before:function(){},beforeSend:function(){},beforeAll:function(){},loadstart:function(){},load:function(){},loadend:function(){},error:function(){},abort:function(){},progress:function(){},complete:function(){},allcomplete:function(){},readystatechange:function(){},notallowed:function(e,t){alert("Only the following file types are allowed: "+t.allow)}},e.Utils.xhrupload=t,t});

View File

@ -1,209 +1,246 @@
.uk-form * {
border-radius: 2px !important;
}
/* UIKIT HACKs
.uk-tab a {
color: #2196f3 !important;
}
a {
color: #2196f3 !important;
}
/* UIKIT HACKs navbar
---------------------------------------------------------------- */
.uk-width-1-4 {
width: 20% !important;
.uk-navbar {
background: #323232 !important;
border: 0 !important;
border-radius: 0 !important;
}
.uk-width-3-4 {
width: 80% !important;
.uk-navbar-nav a {
border: none !important;
border-radius: none !important;
text-shadow: none !important;
color: #fff !important;
font-weight: 300 !important;
padding: 0 25px !important;
}
.label-draft,
.label-empty-title,
.label-time {
background: #A979D1 none repeat scroll 0 0;
border-radius: 2px;
color: #ffffff;
display: inline-block;
padding: 0 8px;
.uk-navbar-nav > li.uk-open > a,
.uk-navbar-nav > li:hover > a,
.uk-navbar-nav > li:focus > a,
.uk-navbar-nav > li > a:focus,
.uk-navbar-nav > li > a:hover {
background: none !important;
border-radius: 0 !important;
color: #BBBBBB !important;
box-shadow: none !important;
text-shadow: none !important;
}
.uk-nav-navbar > li > a:focus,
.uk-nav-navbar > li > a:hover {
background: none !important;
border-radius: 0 !important;
color: #888 !important;
box-shadow: none !important;
text-shadow: none !important;
}
.uk-navbar-nav > li.uk-active > a {
background: none !important;
color: #BBBBBB !important;
}
.uk-navbar-nav .uk-border-circle {
border-radius: 20px !important;
}
.uk-dropdown-navbar {
margin: 0 !important;
padding: 10px 0 !important;
position: fixed;
text-align: center;
vertical-align: middle;
margin-right: 5px;
font-size: 0.8em;
width: 100%;
border-radius: 0 !important;
border-left: 0 !important;
border-right: 0 !important;
border-top: 0 !important;
}
.label-empty-title {
background: #53D192;
.uk-dropdown-navbar li {
display: inline-block !important;
}
.label-time {
font-style: italic;
background: #A979D1;
.uk-dropdown-navbar a {
color: #323232 !important;
}
/* UIKIT HACKs tabs
li.bludit-logo {
color: #fff !important;
display: block;
font-size: 14px;
font-weight: 400;
height: 41px;
line-height: 40px;
margin-left: -1px;
margin-top: -1px;
margin-right: 12px;
}
.bludit-user-navbar {
background: #333 none repeat scroll 0 0;
border-color: #ccc;
border-radius: 0 0 5px 5px !important;
color: #fff;
position: absolute;
}
.bludit-user-navbar a {
color: #fff !important;
}
@media (min-width: 333px) and (max-width: 959px) {
/* Hidden the Welcome USERNAME */
.uk-navbar-flip {
display: none !important;
}
/* Expand and hidden the sidebar */
.uk-width-large-8-10 {
width: 100% !important;
}
/* Hidden the sidebar */
.uk-width-large-2-10 {
width: 0% !important;
display: none !important;
}
}
@media (min-width: 960px) {
.uk-width-large-4-5,
.uk-width-large-8-10 {
width: 75% !important;
}
.uk-width-large-1-5,
.uk-width-large-2-10 {
width: 25% !important;
}
}
/* UIKIT HACKs hidden navbar
---------------------------------------------------------------- */
.uk-nav-dropdown > li > a:focus,
.uk-nav-dropdown > li > a:hover {
background-color: #007add !important;
.uk-navbar-brand {
text-shadow: none !important;
color: #fff !important;
}
.uk-navbar-toggle {
text-shadow: none !important;
color: #fff !important;
}
.uk-nav-offcanvas > li > a {
color: #fff !important;
}
/* UIKIT HACKs buttons
---------------------------------------------------------------- */
.uk-button {
border-radius: 2px !important;
padding: 1px 20px !important;
padding: 2px 26px;
text-shadow: none;
color: #333 !important;
}
.uk-button-primary {
background-color: #007add !important;
background: #2196f3 !important;
color: #fff !important;
}
.uk-button-primary:hover,
.uk-button-primary:focus {
background-color: #0069BE !important;
.uk-button-primary:hover {
background: #2EA3FF;
color: #fafafa !important;
}
/* CSS defaults
/* UIKIT HACKs forms
---------------------------------------------------------------- */
legend {
width: 70% !important;
margin-top: 40px !important;
}
legend.first-child {
margin-top: 0px !important;
}
.uk-form-label {
color: #666666;
font-weight: normal !important;
}
.uk-form-help-block {
color: #AAAAAA;
font-size: 0.9em;
}
.uk-table th,
.uk-table td {
padding: 15px 10px;
}
.uk-table td.children {
padding: 15px 10px 15px 25px;
}
.uk-badge {
margin-right: 5px !important;
font-size: 0.9em;
padding: 2px 7px;
font-weight: normal;
}
a {
color: #2672ec;
}
.uk-panel-box {
background: #F9F9F9 !important;
border: 0;
}
.uk-container {
max-width: 1280px !important;
}
.uk-thumbnail {
margin: 2px 3px !important;
max-width: 30% !important;
padding: 0 !important;
}
.uk-progress-bar {
background: #2672ec !important;
}
.uk-placeholder {
margin-bottom: 0 !important;
}
/* ----------- BLUDIT ----------- */
body {
overflow-y: scroll;
}
#bl-container {
margin-bottom: 20px;
}
.bludit-navbar {
/* TOPBAR
---------------------------------------------------------------- */
#bl-navbar {
background: #f1f1f1;
margin-bottom: 20px;
width: 100%;
}
#bl-navbar a.bl-brand {
font-size: 20px;
line-height: 60px;
margin: 0 0 0 35px;
text-transform: uppercase;
text-shadow: 0 1px 0 #fff;
}
#bl-navbar a.bl-brand:hover {
text-decoration: none;
}
/* SIDEBAR
---------------------------------------------------------------- */
#bl-sidebar a {
color: #777 !important;
}
#bl-sidebar .uk-nav {
margin: 0px 0 0 20px !important;
}
#bl-sidebar .uk-nav-header {
font-weight: normal !important;
font-size: 16px;
}
/* VIEW
---------------------------------------------------------------- */
#bl-view {
margin-right: 20px;
}
#bl-view .uk-width-2-10 {
padding-left: 10px !important;
}
.plugin-incompatible,
.theme-incompatible {
background: #ffdc7d;
border: 1px dashed #eec24a;
color: #826106;
display: table-cell;
font-size: 12px;
margin-top: 6px;
padding: 1px 10px;
}
/* DASHBOARD
---------------------------------------------------------------- */
#dashboard-panel .uk-panel {
background-color: #fafafa !important;
border: 1px solid #f8f8f8;
box-shadow: 5px 1px 1px #fdfdfd;
padding: 10px !important;
}
#dashboard-panel .uk-panel h4.panel-title {
text-transform: uppercase;
font-size: 14px !important;
}
div.dashboard-links {
background-color: #fafafa !important;
border: 1px solid #f8f8f8;
box-shadow: 5px 1px 1px #fdfdfd;
margin-bottom: 20px;
padding: 50px 20px;
}
div.dashboard-links h4 {
margin-bottom: -8px !important;
}
/* FORM
---------------------------------------------------------------- */
.uk-form input:not([type]), .uk-form input[type="text"], .uk-form input[type="password"], .uk-form input[type="email"], .uk-form input[type="url"], .uk-form input[type="search"], .uk-form input[type="tel"], .uk-form input[type="number"], .uk-form input[type="datetime"], .uk-form input[type="datetime-local"], .uk-form input[type="date"], .uk-form input[type="month"], .uk-form input[type="time"], .uk-form input[type="week"], .uk-form input[type="color"], .uk-form select, .uk-form textarea {
border-radius: 2px !important;
}
.uk-form-help-block {
color: #777 !important;
font-size: 0.9em !important;
}
.sidebar-meta .uk-form-label {
font-size: 0.9em;
text-transform: uppercase;
}
.uk-form legend {
margin-top: 20px;
}
.uk-form legend.first-child {
margin-top: 0 !important;
}
button.aslink {
background: rgba(0, 0, 0, 0) none repeat scroll 0 0;
border: 0 none;
color: #07d;
cursor: pointer;
display: block;
font-size: 1em;
margin: 0 !important;
padding: 0 !important;
}
button.aslink:hover {
text-decoration: underline;
}
/* OLD
---------------------------------------------------------------- */
.bl-view {
margin-top: 25px;
margin-bottom: 25px;
}
#logo {
@ -233,7 +270,10 @@ button.delete-button:hover {
height: 400px;
}
.bl-view {
margin-top: 25px;
margin-bottom: 25px;
}
table.statistics tr:last-child td {
border-bottom: none !important;
@ -262,6 +302,10 @@ table.statistics tr:last-child td {
/* ----------- FORM ----------- */
.sidebar .uk-form-label {
font-size: 0.9em;
text-transform: uppercase;
}
#bludit-tags {
margin-top: 15px;
@ -483,7 +527,24 @@ div.login-form {
width: 400px;
}
/* ----------- DASHBOARD ----------- */
div.dashboard-links {
margin: 0 0 25px 0;
}
div.dashboard-links h4 {
margin-bottom: -8px !important;
}
div.dashboard-links a {
color: #555;
}
/* NEW POST */
h3.titleOptions {
font-size: 1em;
}
/* ----------- PLUGIN LIST / THEME LIST ----------- */
@ -501,6 +562,28 @@ div.plugin-links > span.separator {
color: #ccc;
}
.label-draft,
.label-empty-title,
.label-time {
background: #2672ec none repeat scroll 0 0;
border-radius: 2px;
color: #ffffff;
display: inline-block;
padding: 0 8px;
text-align: center;
vertical-align: middle;
margin-right: 5px;
font-size: 0.9em;
}
.label-empty-title {
background: #ED8F26;
}
.label-time {
font-style: italic;
background: #ED3A26;
}
/* ----------- PAGINATOR ----------- */

View File

@ -1,2 +1,2 @@
/*! UIkit 2.26.4 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
/*! UIkit 2.26.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
.uk-form-file{display:inline-block;vertical-align:middle;position:relative;overflow:hidden}.uk-form-file input[type=file]{position:absolute;top:0;z-index:1;width:100%;opacity:0;cursor:pointer;left:0;font-size:500px}

View File

@ -1,2 +1,2 @@
/*! UIkit 2.26.4 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
/*! UIkit 2.26.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
.uk-placeholder{margin-bottom:15px;padding:15px;border:1px dashed #ddd;background:#fafafa;color:#444}*+.uk-placeholder{margin-top:15px}.uk-placeholder>:last-child{margin-bottom:0}.uk-placeholder-large{padding-top:80px;padding-bottom:80px}

View File

@ -1,2 +1,2 @@
/*! UIkit 2.26.4 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
/*! UIkit 2.26.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
.uk-progress{box-sizing:border-box;height:20px;margin-bottom:15px;background:#f5f5f5;overflow:hidden;line-height:20px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.06);border-radius:4px}*+.uk-progress{margin-top:15px}.uk-progress-bar{width:0;height:100%;background:#00a8e6;float:left;-webkit-transition:width .6s ease;transition:width .6s ease;font-size:12px;color:#fff;text-align:center;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-progress-mini{height:6px}.uk-progress-small{height:12px}.uk-progress-success .uk-progress-bar{background-color:#8cc14c}.uk-progress-warning .uk-progress-bar{background-color:#faa732}.uk-progress-danger .uk-progress-bar{background-color:#da314b}.uk-progress-striped .uk-progress-bar{background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:30px 30px}.uk-progress-striped.uk-active .uk-progress-bar{-webkit-animation:uk-progress-bar-stripes 2s linear infinite;animation:uk-progress-bar-stripes 2s linear infinite}@-webkit-keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}@keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}.uk-progress-mini,.uk-progress-small{border-radius:500px}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
/*! UIkit 2.26.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
.uk-dragover{box-shadow:0 0 20px rgba(100,100,100,.3)}

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1005 B

After

Width:  |  Height:  |  Size: 1005 B

View File

@ -51,6 +51,82 @@ $(document).ready(function() {
<?php Alert::p() ?>
</div>
<!-- Navbar -->
<nav class="uk-navbar bludit-navbar">
<!-- Navbar for Desktop -->
<div class="uk-container uk-container-center uk-hidden-small">
<ul class="uk-navbar-nav">
<li class="bludit-logo">BLUDIT</li>
<li <?php echo ($layout['view']=='dashboard')?'class="uk-active"':'' ?> ><a href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>"><?php $L->p('Dashboard') ?></a></li>
<li <?php echo ($layout['view']=='new-post')?'class="uk-active"':'' ?>><a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-post' ?>"><?php $L->p('New post') ?></a></li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>><a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-page' ?>"><?php $L->p('New page') ?></a></li>
<li class="uk-parent" data-uk-dropdown>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'manage-posts' ?>"><?php $L->p('Manage') ?> ▾</a>
<div class="uk-dropdown uk-dropdown-navbar">
<ul class="uk-nav uk-nav-navbar">
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'manage-posts' ?>"><i class="uk-icon-folder-o"></i> <?php $L->p('Posts') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'manage-pages' ?>"><i class="uk-icon-folder-o"></i> <?php $L->p('Pages') ?></a></li>
<?php if($Login->role() == 'admin') { ?>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>"><i class="uk-icon-users"></i> <?php $L->p('Users') ?></a></li>
<?php } ?>
</ul>
</div>
</li>
<?php if($Login->role() == 'admin') { ?>
<li class="uk-parent" data-uk-dropdown>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-general' ?>"><?php $L->p('Settings') ?> ▾</a>
<div class="uk-dropdown uk-dropdown-navbar">
<ul class="uk-nav uk-nav-navbar">
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-general' ?>"><i class="uk-icon-cog"></i> <?php $L->p('General') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-advanced' ?>"><i class="uk-icon-cogs"></i> <?php $L->p('Advanced') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-regional' ?>"><i class="uk-icon-globe"></i> <?php $L->p('Language and timezone') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'plugins' ?>"><i class="uk-icon-puzzle-piece"></i> <?php $L->p('Plugins') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'themes' ?>"><i class="uk-icon-paint-brush"></i> <?php $L->p('Themes') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'about' ?>"><i class="uk-icon-support"></i> <?php $L->p('About') ?></a></li>
</ul>
</div>
</li>
<?php } ?>
<li><a target="_blank" href="<?php echo HTML_PATH_ROOT ?>"><?php $L->p('Website') ?></a></li>
</ul>
<div class="uk-navbar-flip">
<ul class="uk-navbar-nav">
<li class="uk-parent" data-uk-dropdown>
<?php
$profilePictureSrc = HTML_PATH_ADMIN_THEME_IMG.'default.png';
if(file_exists(PATH_UPLOADS_PROFILES.$Login->username().'.png')) {
$profilePictureSrc = HTML_PATH_UPLOADS_PROFILES.$Login->username().'.png';
}
?>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'edit-user/'.$Login->username() ?>">
<img class="uk-border-circle" width="28px" src="<?php echo $profilePictureSrc ?>" alt=""> <?php $L->p('Welcome') ?> <?php echo $Login->username() ?>
</a>
<div class="uk-dropdown uk-dropdown-navbar bludit-user-navbar">
<ul class="uk-nav uk-nav-navbar">
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'logout' ?>"><?php $L->p('Logout') ?></a></li>
</ul>
</div>
</li>
</ul>
</div>
</div>
<!-- Navbar for Mobile -->
<a href="#offcanvas" class="uk-navbar-toggle uk-visible-small" data-uk-offcanvas></a>
<div class="uk-navbar-brand uk-navbar-center uk-visible-small">BLUDIT</div>
</nav>
<!-- Offcanvas for Mobile -->
<div id="offcanvas" class="uk-offcanvas">
<div class="uk-offcanvas-bar">
@ -73,77 +149,13 @@ $(document).ready(function() {
</div>
</div>
<nav id="bl-navbar">
<a href="" class="bl-brand">BLUDIT</a>
</nav>
<div id="bl-container">
<div class="uk-grid uk-grid-small">
<div class="uk-width-1-4">
<div id="bl-sidebar">
<ul class="uk-nav">
<li <?php echo ($layout['view']=='dashboard')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>"><?php $L->p('Dashboard') ?></a>
</li>
<li class="uk-nav-header">Write</li>
<li <?php echo ($layout['view']=='new-post')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-post' ?>"><?php $L->p('New post') ?></a>
</li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-page' ?>"><?php $L->p('New page') ?></a>
</li>
<li class="uk-nav-header">Manage</li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'manage-posts' ?>"><?php $L->p('Posts') ?></a>
</li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'manage-pages' ?>"><?php $L->p('Pages') ?></a>
</li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>"><?php $L->p('Users') ?></a>
</li>
<li class="uk-nav-header">Settings</li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-general' ?>"><?php $L->p('General') ?></a>
</li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-advanced' ?>"><?php $L->p('Advanced') ?></a>
</li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-regional' ?>"><?php $L->p('Language and timezone') ?></a>
</li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'plugins' ?>"><?php $L->p('Plugins') ?></a>
</li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'themes' ?>"><?php $L->p('Themes') ?></a>
</li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'about' ?>"><?php $L->p('About') ?></a>
</li>
</ul>
</div>
</div>
<div class="uk-width-3-4">
<div id="bl-view">
<?php
if( Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'].'.php') ) {
include(PATH_ADMIN_VIEWS.$layout['view'].'.php');
}
?>
</div>
</div>
<!-- View -->
<div class="uk-container uk-container-center bl-view">
<?php
if( Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'].'.php') ) {
include(PATH_ADMIN_VIEWS.$layout['view'].'.php');
}
?>
</div>
<!-- Javascript -->

View File

@ -356,7 +356,7 @@ $(document).ready(function() {
{
type: "json",
action: HTML_PATH_ADMIN_ROOT+"ajax/uploader",
allow : "*.(jpg|jpeg|gif|png)",
allow : "*.(jpg|jpeg|gif|png|svg)",
params: {"type":"profilePicture", "username":"'.$username.'"},
loadstart: function() {

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,256 @@
(function(addon) {
var component;
if (window.UIkit) {
component = addon(UIkit);
}
if (typeof define == "function" && define.amd) {
define("uikit-upload", ["uikit"], function(){
return component || addon(UIkit);
});
}
})(function(UI){
"use strict";
UI.component('uploadSelect', {
init: function() {
var $this = this;
this.on("change", function() {
xhrupload($this.element[0].files, $this.options);
var twin = $this.element.clone(true).data('uploadSelect', $this);
$this.element.replaceWith(twin);
$this.element = twin;
});
}
});
UI.component('uploadDrop', {
defaults: {
'dragoverClass': 'uk-dragover'
},
init: function() {
var $this = this, hasdragCls = false;
this.on("drop", function(e){
if (e.originalEvent.dataTransfer && e.originalEvent.dataTransfer.files) {
e.stopPropagation();
e.preventDefault();
$this.element.removeClass($this.options.dragoverClass);
$this.element.trigger('dropped.uk.upload', [e.originalEvent.dataTransfer.files]);
xhrupload(e.originalEvent.dataTransfer.files, $this.options);
}
}).on("dragenter", function(e){
e.stopPropagation();
e.preventDefault();
}).on("dragover", function(e){
e.stopPropagation();
e.preventDefault();
if (!hasdragCls) {
$this.element.addClass($this.options.dragoverClass);
hasdragCls = true;
}
}).on("dragleave", function(e){
e.stopPropagation();
e.preventDefault();
$this.element.removeClass($this.options.dragoverClass);
hasdragCls = false;
});
}
});
UI.support.ajaxupload = (function() {
function supportFileAPI() {
var fi = document.createElement('INPUT'); fi.type = 'file'; return 'files' in fi;
}
function supportAjaxUploadProgressEvents() {
var xhr = new XMLHttpRequest(); return !! (xhr && ('upload' in xhr) && ('onprogress' in xhr.upload));
}
function supportFormData() {
return !! window.FormData;
}
return supportFileAPI() && supportAjaxUploadProgressEvents() && supportFormData();
})();
function xhrupload(files, settings) {
if (!UI.support.ajaxupload){
return this;
}
settings = UI.$.extend({}, xhrupload.defaults, settings);
if (!files.length){
return;
}
if (settings.allow !== '*.*') {
for(var i=0,file;file=files[i];i++) {
if(!matchName(settings.allow, file.name)) {
if(typeof(settings.notallowed) == 'string') {
alert(settings.notallowed);
} else {
settings.notallowed(file, settings);
}
return;
}
}
}
var complete = settings.complete;
if (settings.single){
var count = files.length,
uploaded = 0,
allow = true;
settings.beforeAll(files);
settings.complete = function(response, xhr){
uploaded = uploaded + 1;
complete(response, xhr);
if (settings.filelimit && uploaded >= settings.filelimit){
allow = false;
}
if (allow && uploaded<count){
upload([files[uploaded]], settings);
} else {
settings.allcomplete(response, xhr);
}
};
upload([files[0]], settings);
} else {
settings.complete = function(response, xhr){
complete(response, xhr);
settings.allcomplete(response, xhr);
};
upload(files, settings);
}
function upload(files, settings){
// upload all at once
var formData = new FormData(), xhr = new XMLHttpRequest();
if (settings.before(settings, files)===false) return;
for (var i = 0, f; f = files[i]; i++) { formData.append(settings.param, f); }
for (var p in settings.params) { formData.append(p, settings.params[p]); }
// Add any event handlers here...
xhr.upload.addEventListener("progress", function(e){
var percent = (e.loaded / e.total)*100;
settings.progress(percent, e);
}, false);
xhr.addEventListener("loadstart", function(e){ settings.loadstart(e); }, false);
xhr.addEventListener("load", function(e){ settings.load(e); }, false);
xhr.addEventListener("loadend", function(e){ settings.loadend(e); }, false);
xhr.addEventListener("error", function(e){ settings.error(e); }, false);
xhr.addEventListener("abort", function(e){ settings.abort(e); }, false);
xhr.open(settings.method, settings.action, true);
if (settings.type=="json") {
xhr.setRequestHeader("Accept", "application/json");
}
xhr.onreadystatechange = function() {
settings.readystatechange(xhr);
if (xhr.readyState==4){
var response = xhr.responseText;
if (settings.type=="json") {
try {
response = UI.$.parseJSON(response);
} catch(e) {
response = false;
}
}
settings.complete(response, xhr);
}
};
settings.beforeSend(xhr);
xhr.send(formData);
}
}
xhrupload.defaults = {
'action': '',
'single': true,
'method': 'POST',
'param' : 'files[]',
'params': {},
'allow' : '*.*',
'type' : 'text',
'filelimit': false,
// events
'before' : function(o){},
'beforeSend' : function(xhr){},
'beforeAll' : function(){},
'loadstart' : function(){},
'load' : function(){},
'loadend' : function(){},
'error' : function(){},
'abort' : function(){},
'progress' : function(){},
'complete' : function(){},
'allcomplete' : function(){},
'readystatechange': function(){},
'notallowed' : function(file, settings){ alert('Only the following file types are allowed: '+settings.allow); }
};
function matchName(pattern, path) {
var parsedPattern = '^' + pattern.replace(/\//g, '\\/').
replace(/\*\*/g, '(\\/[^\\/]+)*').
replace(/\*/g, '[^\\/]+').
replace(/((?!\\))\?/g, '$1.') + '$';
parsedPattern = '^' + parsedPattern + '$';
return (path.match(new RegExp(parsedPattern, 'i')) !== null);
}
UI.Utils.xhrupload = xhrupload;
return xhrupload;
});