Darkmode for Admin panel and Website, Bootstrap 5.0.1, refactor for Bludit v4
This commit is contained in:
parent
fca4deb8c9
commit
1c49bef304
31 changed files with 434 additions and 315 deletions
|
@ -2,6 +2,10 @@ html {
|
|||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.link {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/*
|
||||
Left sidebar
|
||||
*/
|
||||
|
@ -30,33 +34,6 @@ div.sidebar .nav-item h4 {
|
|||
.link {
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.link:hover {
|
||||
color: #0a58ca;
|
||||
}
|
||||
|
||||
/*
|
||||
OLD >>>>>>>>>
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
AUTOCOMPLETE SEARCH
|
||||
*/
|
||||
|
||||
.search-suggestion {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.search-suggestion-options {
|
||||
font-size: 0.9em;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
.list-group-sortable {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
12
bl-kernel/admin/themes/booty/css/02-bootstrap-hacks.css
Normal file
12
bl-kernel/admin/themes/booty/css/02-bootstrap-hacks.css
Normal file
|
@ -0,0 +1,12 @@
|
|||
/* Remove Focus glow */
|
||||
.btn:focus,
|
||||
.form-control:focus,
|
||||
.form-select:focus {
|
||||
outline: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
/* Icons */
|
||||
.bi {
|
||||
margin-right: .5rem!important;
|
||||
}
|
134
bl-kernel/admin/themes/booty/css/99-darkmode.css
Normal file
134
bl-kernel/admin/themes/booty/css/99-darkmode.css
Normal file
|
@ -0,0 +1,134 @@
|
|||
body {
|
||||
background-color: #1C1C1E;
|
||||
color: #b3b3b3;
|
||||
}
|
||||
|
||||
.bg-dark {
|
||||
background-color: #111111 !important;
|
||||
}
|
||||
|
||||
.bg-light {
|
||||
background-color: #111111 !important;
|
||||
}
|
||||
|
||||
.bg-info {
|
||||
background-color: #003c58!important;
|
||||
}
|
||||
|
||||
a,
|
||||
a.nav-link,
|
||||
.link,
|
||||
a.dropdown-menu,
|
||||
.dropdown-item {
|
||||
color: #b3b3b3;
|
||||
}
|
||||
|
||||
a:hover,
|
||||
a.nav-link:hover,
|
||||
.link:hover {
|
||||
color: #e2e2e2 !important
|
||||
}
|
||||
|
||||
.form-text {
|
||||
color: #989899 !important;
|
||||
}
|
||||
|
||||
.form-control:disabled, .form-control[readonly] {
|
||||
background-color: #444;
|
||||
}
|
||||
|
||||
.color-blue {
|
||||
color: #688bbd !important;
|
||||
}
|
||||
|
||||
.btn {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.btn-outline-primary {
|
||||
color: #688bbd !important;
|
||||
border-color: #688bbd !important;
|
||||
}
|
||||
|
||||
.btn-outline-primary:hover {
|
||||
background-color: #1C1C1E !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.page-link {
|
||||
color: #688bbd !important;
|
||||
border-color: #688bbd !important;
|
||||
background-color: #1C1C1E !important;
|
||||
}
|
||||
|
||||
.form-control,
|
||||
.form-select {
|
||||
background-color: #111111;
|
||||
border-color: #302F33;
|
||||
color: #b3b3b3;
|
||||
}
|
||||
|
||||
.form-control:focus {
|
||||
background-color: #111111;
|
||||
border-color: #302F33;
|
||||
color: #b3b3b3;
|
||||
}
|
||||
|
||||
.nav-tabs .nav-item.show .nav-link,
|
||||
.nav-tabs .nav-link.active {
|
||||
background-color: #1C1C1E !important;
|
||||
border-color: #302F33 !important;
|
||||
color: #b3b3b3 !important;
|
||||
}
|
||||
|
||||
.nav-tabs .nav-link:focus,
|
||||
.nav-tabs .nav-link:hover {
|
||||
border-color: #302F33 !important;
|
||||
}
|
||||
|
||||
.nav-tabs {
|
||||
border-bottom-color:#302F33 !important;
|
||||
}
|
||||
|
||||
.table {
|
||||
color: #b3b3b3 !important;
|
||||
border-bottom-color:#302F33 !important;
|
||||
}
|
||||
|
||||
.table-striped>tbody>tr:nth-of-type(odd) {
|
||||
background-color: #171717;
|
||||
color: #b3b3b3;
|
||||
}
|
||||
|
||||
.border-bottom {
|
||||
border-bottom-color:#302F33 !important;
|
||||
}
|
||||
|
||||
.alert-primary {
|
||||
background-color: #97A4B9;
|
||||
border-color: #aebcd2;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background-color: #121212 !important;
|
||||
color: #b3b3b3 !important;
|
||||
border-color: #2f3233;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
border-top-color: #302F33;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
background-color: #121212 !important;
|
||||
color: #b3b3b3 !important;
|
||||
}
|
||||
|
||||
.list-group-item {
|
||||
background-color: inherit;
|
||||
color: #b3b3b3;
|
||||
}
|
||||
|
||||
.list-group-item a {
|
||||
text-decoration: none;
|
||||
}
|
17
bl-kernel/admin/themes/booty/css/99-lightmode.css
Normal file
17
bl-kernel/admin/themes/booty/css/99-lightmode.css
Normal file
|
@ -0,0 +1,17 @@
|
|||
a {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
a.nav-link {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.form-control:focus,
|
||||
.form-select:focus {
|
||||
border-color: #999999;
|
||||
}
|
||||
|
||||
.btn-primary-disabled {
|
||||
background-color: #4792ff !important;
|
||||
border-color: #4792ff !important;
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
/* Commons */
|
||||
a {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
/* Remove Focus glow */
|
||||
.btn:focus,
|
||||
.form-control:focus,
|
||||
.form-select:focus {
|
||||
outline: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.form-control:focus,
|
||||
.form-select:focus {
|
||||
border-color: #999999;
|
||||
}
|
||||
|
||||
|
||||
/* Icons */
|
||||
.bi {
|
||||
margin-right: .5rem!important;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
.btn-primary-disabled {
|
||||
background-color: #4792ff !important;
|
||||
border-color: #4792ff !important;
|
||||
}
|
|
@ -1,143 +0,0 @@
|
|||
/* Tables */
|
||||
|
||||
.table {
|
||||
background-color: #F4F4F4;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.table td {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
|
||||
/* Common elements */
|
||||
|
||||
a {
|
||||
color: #1A66A6;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #1A66A6;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.bg-success {
|
||||
background-color: #8BC34A!important;
|
||||
}
|
||||
|
||||
.text-primary {
|
||||
color: #06A8C5!important;
|
||||
}
|
||||
|
||||
.text-danger {
|
||||
color: #D40000!important;
|
||||
}
|
||||
|
||||
a.text-danger:focus,
|
||||
a.text-danger:hover {
|
||||
color: #790000!important;
|
||||
}
|
||||
|
||||
|
||||
/* Buttons */
|
||||
|
||||
.btn {
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.btn-sm {
|
||||
padding: .25rem .75rem;
|
||||
}
|
||||
|
||||
.btn-save {
|
||||
color: #5b8e09;
|
||||
}
|
||||
|
||||
.btn-save:hover {
|
||||
color: #466d07;
|
||||
}
|
||||
|
||||
.btn-cancel:hover {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: #0378D3;
|
||||
border-color: #0378D3;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: #0270c4;
|
||||
border-color: #0270c4;
|
||||
}
|
||||
|
||||
.btn-primary-disabled {
|
||||
background-color: #71b6ff !important;
|
||||
border-color: #71b6ff !important;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background-color: #6c757d;
|
||||
border-color: #6c757d;
|
||||
}
|
||||
|
||||
.btn-secondary:hover {
|
||||
background-color: #5a6268;
|
||||
border-color: #5a6268;
|
||||
}
|
||||
|
||||
.btn-light {
|
||||
color: #212529;
|
||||
background-color: #f3f3f3;
|
||||
border-color: #ced4d9;
|
||||
}
|
||||
|
||||
.btn-light.focus,
|
||||
.btn-light:focus {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.btn.focus,
|
||||
.btn:focus {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
|
||||
/* Form */
|
||||
|
||||
.form-control:focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
|
||||
/* Right sidebar Options */
|
||||
|
||||
#sidebarOptions .card {
|
||||
background: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#sidebarOptions a {
|
||||
color: #212529;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
border-color: #f9f9f9;
|
||||
}
|
||||
|
||||
.nav-link.active {
|
||||
background-color: #f9f9f9 !important;
|
||||
border-color: #dee2e6 #dee2e6 #f9f9f9 !important;
|
||||
}
|
||||
|
||||
.tab-content>.active {
|
||||
background-color: #f9f9f9 !important;
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
<script charset="utf-8">
|
||||
function showAlert(text) {
|
||||
console.log("[INFO] Function showAlert() called.");
|
||||
$("#alert").html(text);
|
||||
$("#alert").slideDown().delay(<?php echo ALERT_DISAPPEAR_IN*1000 ?>).slideUp();
|
||||
}
|
||||
|
||||
<?php if (Alert::defined()): ?>
|
||||
setTimeout(function(){ showAlert("<?php echo Alert::get() ?>") }, 500);
|
||||
<?php endif; ?>
|
||||
|
||||
$(window).click(function() {
|
||||
$("#alert").hide();
|
||||
});
|
||||
</script>
|
||||
|
||||
<div id="alert" class="alert <?php echo (Alert::status()==ALERT_STATUS_FAIL)?'alert-danger':'alert-success' ?>"></div>
|
|
@ -1,6 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="h-100">
|
||||
|
||||
<head>
|
||||
<title><?php echo $layout['title'] ?></title>
|
||||
<meta charset="<?php echo CHARSET ?>">
|
||||
|
@ -13,19 +12,30 @@
|
|||
|
||||
<!-- CSS -->
|
||||
<?php
|
||||
echo HTML::cssBootstrap();
|
||||
echo HTML::cssBootstrapIcons();
|
||||
echo HTML::css(array(
|
||||
'bludit-bootstrap.css',
|
||||
'bludit.css'
|
||||
), DOMAIN_ADMIN_THEME_CSS);
|
||||
echo HTML::css(array(
|
||||
'jquery.datetimepicker.min.css',
|
||||
'jquery-ui.min.css',
|
||||
'select2.min.css',
|
||||
'select2-bootstrap4.min.css',
|
||||
'tagsinput-revisited.min.css'
|
||||
), DOMAIN_CORE_CSS);
|
||||
echo HTML::cssBootstrap();
|
||||
echo HTML::cssBootstrapIcons();
|
||||
echo HTML::css(array(
|
||||
'01-bludit.css',
|
||||
'02-bootstrap-hacks.css'
|
||||
), DOMAIN_ADMIN_THEME_CSS);
|
||||
|
||||
echo HTML::css(array(
|
||||
'jquery.datetimepicker.min.css',
|
||||
'jquery-ui.min.css',
|
||||
'select2.min.css',
|
||||
'select2-bootstrap4.min.css',
|
||||
'tagsinput-revisited.min.css'
|
||||
), DOMAIN_CORE_CSS);
|
||||
|
||||
if ($site->darkModeAdmin()) {
|
||||
echo HTML::css(array(
|
||||
'99-darkmode.css'
|
||||
), DOMAIN_ADMIN_THEME_CSS);
|
||||
} else {
|
||||
echo HTML::css(array(
|
||||
'99-lightmode.css'
|
||||
), DOMAIN_ADMIN_THEME_CSS);
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- Javascript -->
|
||||
|
@ -48,7 +58,7 @@
|
|||
<?php execPluginsByHook('adminHead') ?>
|
||||
</head>
|
||||
|
||||
<body class="h-100 bg-light">
|
||||
<body class="h-100">
|
||||
|
||||
<!-- Execute plugins for the admin area inside the HTML <body> at the begginig -->
|
||||
<?php execPluginsByHook('adminBodyBegin') ?>
|
||||
|
|
|
@ -4,4 +4,4 @@
|
|||
|
||||
// This theme use the API to work
|
||||
activatePlugin('pluginAPI');
|
||||
$plugins['all']['pluginAPI']->newToken();
|
||||
$plugins['all']['pluginAPI']->newToken();
|
||||
|
|
|
@ -49,9 +49,9 @@ foreach ($categories->keys() as $key) {
|
|||
try {
|
||||
$category = new Category($key);
|
||||
echo '<tr>';
|
||||
echo '<td class="pt-3 pb-3"><a href="'.HTML_PATH_ADMIN_ROOT.'edit-category/'.$key.'">'.$category->name().'</a></td>';
|
||||
echo '<td class="pt-3 pb-3"><span>'.$category->description().'</span></td>';
|
||||
echo '<td class="pt-3 pb-3"><a href="'.$category->permalink().'">'.$category->permalink().'</a></td>';
|
||||
echo '<td class="pt-4 pb-4"><a href="'.HTML_PATH_ADMIN_ROOT.'edit-category/'.$key.'">'.$category->name().'</a></td>';
|
||||
echo '<td class="pt-4 pb-4"><span>'.$category->description().'</span></td>';
|
||||
echo '<td class="pt-4 pb-4"><a href="'.$category->permalink().'">'.$category->permalink().'</a></td>';
|
||||
echo '</tr>';
|
||||
} catch (Exception $e) {
|
||||
// Continue
|
||||
|
|
|
@ -118,7 +118,7 @@ function table($type)
|
|||
if (!$page->isChild()) {
|
||||
echo '<tr>';
|
||||
|
||||
echo '<td class="pt-3 pb-3">
|
||||
echo '<td class="pt-4 pb-4">
|
||||
<div>
|
||||
<span>' . ($page->title() ? $page->title() : '<span class="text-muted">' . $L->g('Empty title') . '</span> ') . '</span>
|
||||
</div>
|
||||
|
@ -135,16 +135,16 @@ function table($type)
|
|||
</div>
|
||||
</td>';
|
||||
|
||||
echo '<td class="pt-3 pb-3 d-none d-lg-table-cell">' . $L->get('Category') . ': ' . ($page->category() ? $page->category() : $L->get('uncategorized')) . '</td>';
|
||||
echo '<td class="pt-4 pb-4 d-none d-lg-table-cell">' . $L->get('Category') . ': ' . ($page->category() ? $page->category() : $L->get('uncategorized')) . '</td>';
|
||||
|
||||
echo '<td class="pt-3 text-center d-sm-table-cell">' . (((ORDER_BY == 'position') || ($type != 'published')) ? $L->g('Position') . ': ' . $page->position() : $page->date(MANAGE_CONTENT_DATE_FORMAT)) . '</td>';
|
||||
echo '<td class="pt-4 text-center d-sm-table-cell">' . (((ORDER_BY == 'position') || ($type != 'published')) ? $L->g('Position') . ': ' . $page->position() : $page->date(MANAGE_CONTENT_DATE_FORMAT)) . '</td>';
|
||||
|
||||
echo '</tr>';
|
||||
|
||||
foreach ($page->children() as $child) {
|
||||
echo '<tr>';
|
||||
|
||||
echo '<td class="ps-3 pt-3 pb-3">
|
||||
echo '<td class="ps-3 pt-4 pb-4">
|
||||
<div>
|
||||
<span>' . ($child->title() ? $child->title() : '<span class="text-muted">' . $L->g('Empty title') . '</span> ') . '</span>
|
||||
</div>
|
||||
|
@ -155,9 +155,9 @@ function table($type)
|
|||
</div>
|
||||
</td>';
|
||||
|
||||
echo '<td class="pt-3 pb-3 d-none d-lg-table-cell">' . $L->get('Category') . ': ' . ($child->category() ? $child->category() : $L->get('uncategorized')) . '</td>';
|
||||
echo '<td class="pt-4 d-none d-lg-table-cell">' . $L->get('Category') . ': ' . ($child->category() ? $child->category() : $L->get('uncategorized')) . '</td>';
|
||||
|
||||
echo '<td class="pt-3 text-center d-sm-table-cell">' . (((ORDER_BY == 'position') || ($type != 'published')) ? $L->g('Position') . ': ' . $child->position() : $child->date(MANAGE_CONTENT_DATE_FORMAT)) . '</td>';
|
||||
echo '<td class="pt-4 text-center d-sm-table-cell">' . (((ORDER_BY == 'position') || ($type != 'published')) ? $L->g('Position') . ': ' . $child->position() : $child->date(MANAGE_CONTENT_DATE_FORMAT)) . '</td>';
|
||||
|
||||
echo '</tr>';
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ function table($type)
|
|||
$page = new Page($pageKey);
|
||||
echo '<tr>';
|
||||
|
||||
echo '<td class="pt-3 pb-3">
|
||||
echo '<td class="pt-4 pb-4">
|
||||
<div>
|
||||
' . ($page->title() ? $page->title() : '<span class="text-muted">' . $L->g('Empty title') . '</span> ') . '
|
||||
</div>
|
||||
|
@ -183,9 +183,9 @@ function table($type)
|
|||
</div>
|
||||
</td>';
|
||||
|
||||
echo '<td class="pt-3 pb-3 d-none d-lg-table-cell">' . $L->get('Category') . ': ' . ($page->category() ? $page->category() : $L->get('uncategorized')) . '</td>';
|
||||
echo '<td class="pt-4 d-none d-lg-table-cell">' . $L->get('Category') . ': ' . ($page->category() ? $page->category() : $L->get('uncategorized')) . '</td>';
|
||||
|
||||
echo '<td class="pt-3 text-center d-sm-table-cell"> ' . (((ORDER_BY == 'position') || ($type != 'published')) ? $L->g('Position') . ': ' . $page->position() : $page->date(MANAGE_CONTENT_DATE_FORMAT)) . '</td>';
|
||||
echo '<td class="pt-4 text-center d-sm-table-cell"> ' . (((ORDER_BY == 'position') || ($type != 'published')) ? $L->g('Position') . ': ' . $page->position() : $page->date(MANAGE_CONTENT_DATE_FORMAT)) . '</td>';
|
||||
|
||||
echo '</tr>';
|
||||
} catch (Exception $e) {
|
||||
|
|
|
@ -564,25 +564,6 @@
|
|||
?>
|
||||
</span>
|
||||
</div>
|
||||
<div id="editorToolbarRight" class="ms-auto">
|
||||
<div class="dropdown">
|
||||
<button type="button" class="btn dropdown-toggle btn-secondary btn-sm" type="button" id="dropdownMenuOptions" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="bi bi-gear"></i></span><?php $L->p('Options') ?>
|
||||
</button>
|
||||
<div class="dropdown-menu ps-1 pe-1" aria-labelledby="dropdownMenuOptions">
|
||||
<a onclick="openModal('description')" class="dropdown-item" href="#"><i class="bi bi-info-square"></i>Description</a>
|
||||
<a onclick="openModal('date')" class="dropdown-item" href="#"><i class="bi bi-calendar"></i>Publish date</a>
|
||||
<a onclick="openModal('friendlyURL')" class="dropdown-item" href="#"><i class="bi bi-link"></i>Change URL</a>
|
||||
<a onclick="openModal('type')" class="dropdown-item" href="#"><i class="bi bi-eye"></i>Type</a>
|
||||
<a onclick="openModal('seo')" class="dropdown-item" href="#"><i class="bi bi-compass"></i>SEO features</a>
|
||||
<a onclick="openModal('parent')" class="dropdown-item" href="#"><i class="bi bi-diagram-2"></i>Parent page</a>
|
||||
<a>
|
||||
<hr class="dropdown-divider">
|
||||
</a>
|
||||
<a onclick="fmOpen()" class="dropdown-item" href="#"><i class="bi bi-files"></i>Files & images</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Toolbar > Save, Preview, Type and Options -->
|
||||
|
||||
|
@ -660,6 +641,18 @@
|
|||
</script>
|
||||
<!-- End Tags -->
|
||||
|
||||
<h6 class="text-uppercase mt-4">More options</h6>
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item p-0 pt-2"><a onclick="fmOpen()" href="#"><i class="bi bi-files"></i>Files & images</a></li>
|
||||
<li class="list-group-item p-0 pt-2"><a onclick="openModal('description')" href="#"><i class="bi bi-info-square"></i>Description</a></li>
|
||||
<li class="list-group-item p-0 pt-2"><a onclick="openModal('date')" href="#"><i class="bi bi-calendar"></i>Publish date</a></li>
|
||||
<li class="list-group-item p-0 pt-2"><a onclick="openModal('friendlyURL')" href="#"><i class="bi bi-link"></i>Change URL</a></li>
|
||||
<li class="list-group-item p-0 pt-2"><a onclick="openModal('type')" href="#"><i class="bi bi-eye"></i>Type</a></li>
|
||||
<li class="list-group-item p-0 pt-2"><a onclick="openModal('seo')" href="#"><i class="bi bi-compass"></i>SEO features</a></li>
|
||||
<li class="list-group-item p-0 pt-2"><a onclick="openModal('parent')" href="#"><i class="bi bi-diagram-2"></i>Parent page</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- Quick files
|
||||
<h6 class="text-uppercase mt-4"><?php $L->p('Quick files') ?></h6>
|
||||
<div id="quickFiles">
|
||||
|
|
|
@ -101,7 +101,7 @@ echo '
|
|||
|
||||
// Show installed plugins
|
||||
foreach ($pluginsInstalled as $plugin) {
|
||||
echo '<tr id="' . $plugin->className() . '" class="bg-light searchItem">';
|
||||
echo '<tr id="' . $plugin->className() . '" class="searchItem">';
|
||||
|
||||
echo '<td class="align-middle pt-3 pb-3 w-25">
|
||||
<div class="searchText">' . $plugin->name() . '</div>
|
||||
|
|
|
@ -227,6 +227,26 @@
|
|||
'data' => array('save' => 'true')
|
||||
));
|
||||
|
||||
echo Bootstrap::formTitle(array('title' => $L->g('Dark Mode')));
|
||||
|
||||
echo Bootstrap::formSelect(array(
|
||||
'name' => 'darkModeAdmin',
|
||||
'label' => $L->g('Admin panel'),
|
||||
'options' => array('true' => $L->g('Enabled'), 'false' => $L->g('Disabled')),
|
||||
'selected' => ($site->darkModeAdmin() ? 'true' : 'false'),
|
||||
'tip' => $L->g('Enable dark mode for the admin panel. The theme has to support this feature.'),
|
||||
'data' => array('save' => 'true')
|
||||
));
|
||||
|
||||
echo Bootstrap::formSelect(array(
|
||||
'name' => 'darkModeWebsite',
|
||||
'label' => $L->g('Website'),
|
||||
'options' => array('true' => $L->g('Enabled'), 'false' => $L->g('Disabled')),
|
||||
'selected' => ($site->darkModeWebsite() ? 'true' : 'false'),
|
||||
'tip' => $L->g('Enable dark mode for the website. The theme has to support this feature.'),
|
||||
'data' => array('save' => 'true')
|
||||
));
|
||||
|
||||
echo Bootstrap::formTitle(array('title' => $L->g('Autosave')));
|
||||
|
||||
echo Bootstrap::formInputText(array(
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
echo Bootstrap::pageTitle(array('title'=>$L->g('Themes'), 'icon'=>'eye'));
|
||||
|
||||
echo '
|
||||
<table class="table mt-3">
|
||||
<table class="table table-striped mt-3">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="border-bottom-0 w-25" scope="col">'.$L->g('Name').'</th>
|
||||
|
@ -43,8 +43,8 @@ echo '
|
|||
|
||||
foreach ($themes as $theme) {
|
||||
echo '
|
||||
<tr '.($theme['dirname']==$site->theme()?'class="bg-light"':'').'>
|
||||
<td class="align-middle pt-3 pb-3">
|
||||
<tr '.($theme['dirname']==$site->theme()?'class="bg-info"':'').'>
|
||||
<td class="align-middle pt-4 pb-4">
|
||||
<div>'.$theme['name'].'</div>
|
||||
<div class="mt-1">
|
||||
';
|
||||
|
|
|
@ -52,20 +52,20 @@ foreach ($list as $username) {
|
|||
try {
|
||||
$user = new User($username);
|
||||
echo '<tr>';
|
||||
echo '<td class="pt-3 pb-3"><a href="'.HTML_PATH_ADMIN_ROOT.'edit-user/'.$username.'">'.$username.'</a></td>';
|
||||
echo '<td class="pt-3 pb-3 d-none d-lg-table-cell">'.$user->nickname().'</td>';
|
||||
echo '<td class="pt-3 pb-3">'.$user->email().'</td>';
|
||||
echo '<td class="pt-3 pb-3">'.($user->enabled()?'<b>'.$L->g('Enabled').'</b>':'<b class="text-danger">'.$L->g('Disabled').'</b>').'</td>';
|
||||
echo '<td class="pt-4 pb-4"><a href="'.HTML_PATH_ADMIN_ROOT.'edit-user/'.$username.'">'.$username.'</a></td>';
|
||||
echo '<td class="pt-4 pb-4 d-none d-lg-table-cell">'.$user->nickname().'</td>';
|
||||
echo '<td class="pt-4 pb-4">'.$user->email().'</td>';
|
||||
echo '<td class="pt-4 pb-4">'.($user->enabled()?'<b>'.$L->g('Enabled').'</b>':'<b class="text-danger">'.$L->g('Disabled').'</b>').'</td>';
|
||||
if ($user->role()=='admin') {
|
||||
echo '<td class="pt-3 pb-3">'.$L->g('Administrator').'</td>';
|
||||
echo '<td class="pt-4 pb-4">'.$L->g('Administrator').'</td>';
|
||||
} elseif ($user->role()=='editor') {
|
||||
echo '<td class="pt-3 pb-3">'.$L->g('Editor').'</td>';
|
||||
echo '<td class="pt-4 pb-4">'.$L->g('Editor').'</td>';
|
||||
} elseif ($user->role()=='author') {
|
||||
echo '<td class="pt-3 pb-3">'.$L->g('Author').'</td>';
|
||||
echo '<td class="pt-4 pb-4">'.$L->g('Author').'</td>';
|
||||
} else {
|
||||
echo '<td class="pt-3 pb-3">'.$L->g('Reader').'</td>';
|
||||
echo '<td class="pt-4 pb-4">'.$L->g('Reader').'</td>';
|
||||
}
|
||||
echo '<td class="pt-3 pb-3 d-none d-lg-table-cell">'.Date::format($user->registered(), DB_DATE_FORMAT, ADMIN_PANEL_DATE_FORMAT).'</td>';
|
||||
echo '<td class="pt-4 pb-4 d-none d-lg-table-cell">'.Date::format($user->registered(), DB_DATE_FORMAT, ADMIN_PANEL_DATE_FORMAT).'</td>';
|
||||
echo '</tr>';
|
||||
} catch (Exception $e) {
|
||||
// Continue
|
||||
|
|
|
@ -50,7 +50,9 @@ class Site extends dbJSON {
|
|||
'thumbnailQuality'=> 100,
|
||||
'logo'=> '',
|
||||
'markdownParser'=> true,
|
||||
'customFields'=> '{}'
|
||||
'customFields'=> '{}',
|
||||
'darkModeAdmin'=> false,
|
||||
'darkModeWebsite'=> false
|
||||
);
|
||||
|
||||
function __construct()
|
||||
|
@ -151,6 +153,16 @@ class Site extends dbJSON {
|
|||
return $this->getField('markdownParser');
|
||||
}
|
||||
|
||||
public function darkModeAdmin()
|
||||
{
|
||||
return $this->getField('darkModeAdmin');
|
||||
}
|
||||
|
||||
public function darkModeWebsite()
|
||||
{
|
||||
return $this->getField('darkModeWebsite');
|
||||
}
|
||||
|
||||
public function twitter()
|
||||
{
|
||||
return $this->getField('twitter');
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -20,28 +20,24 @@ class pluginSearch extends Plugin {
|
|||
{
|
||||
global $L;
|
||||
|
||||
$html = '<div class="alert alert-primary" role="alert">';
|
||||
$html .= $this->description();
|
||||
$html = '<div class="mb-3">';
|
||||
$html .= '<label class="form-label" for="label">'.$L->get('Label').'</label>';
|
||||
$html .= '<input class="form-control" id="label" name="label" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<span class="form-text">'.$L->get('This title is almost always used in the sidebar of the site').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div class="mb-3">';
|
||||
$html .= '<label class="form-label" for="minChars">'.$L->get('Minimum number of characters when searching').'</label>';
|
||||
$html .= '<input class="form-control" id="minChars" name="minChars" type="text" value="'.$this->getValue('minChars').'">';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('Label').'</label>';
|
||||
$html .= '<input name="label" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<span class="tip">'.$L->get('This title is almost always used in the sidebar of the site').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('Minimum number of characters when searching').'</label>';
|
||||
$html .= '<input name="minChars" type="text" value="'.$this->getValue('minChars').'">';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('Show button search').'</label>';
|
||||
$html .= '<select name="showButtonSearch">';
|
||||
$html .= '<option value="true" '.($this->getValue('showButtonSearch')===true?'selected':'').'>'.$L->get('enabled').'</option>';
|
||||
$html .= '<option value="false" '.($this->getValue('showButtonSearch')===false?'selected':'').'>'.$L->get('disabled').'</option>';
|
||||
$html .= '<label class="form-label" for="showButtonSearch">'.$L->get('Show button search').'</label>';
|
||||
$html .= '<select name="showButtonSearch" class="form-select">';
|
||||
$html .= '<option value="true" '.($this->getValue('showButtonSearch')===true?'selected':'').'>'.$L->get('enabled').'</option>';
|
||||
$html .= '<option value="false" '.($this->getValue('showButtonSearch')===false?'selected':'').'>'.$L->get('disabled').'</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '</div>';
|
||||
$html .= '</div>';
|
||||
$html .= '<div>';
|
||||
|
||||
return $html;
|
||||
|
|
13
bl-plugins/tinymce/css/darkmode-content.css
Normal file
13
bl-plugins/tinymce/css/darkmode-content.css
Normal file
|
@ -0,0 +1,13 @@
|
|||
body.mce-content-body {
|
||||
background-color: #111111 !important;
|
||||
color: #b3b3b3 !important;
|
||||
}
|
||||
|
||||
.mce-content-body a {
|
||||
color: #4a90e2;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.mce-content-body blockquote {
|
||||
border-left: 5px solid #eee;
|
||||
}
|
46
bl-plugins/tinymce/css/darkmode-toolbar.css
Normal file
46
bl-plugins/tinymce/css/darkmode-toolbar.css
Normal file
|
@ -0,0 +1,46 @@
|
|||
.tox .tox-toolbar, .tox .tox-toolbar__overflow, .tox .tox-toolbar__primary {
|
||||
background-image: none !important;
|
||||
background-color: #111111 !important;
|
||||
color: #b3b3b3 !important;
|
||||
}
|
||||
|
||||
.tox .tox-tbtn {
|
||||
color: #b3b3b3 !important;
|
||||
}
|
||||
|
||||
.tox .tox-edit-area__iframe {
|
||||
background-color: #131216 !important;
|
||||
color: #b3b3b3 !important;
|
||||
}
|
||||
|
||||
.tox-tinymce {
|
||||
border-color: #302F33 !important;
|
||||
}
|
||||
|
||||
.tox:not([dir=rtl]) .tox-toolbar__group:not(:last-of-type) {
|
||||
border-color: #302F33 !important;
|
||||
}
|
||||
|
||||
.tox .tox-collection--list .tox-collection__item--active {
|
||||
|
||||
}
|
||||
|
||||
.tox :not(svg):not(rect) {
|
||||
color: #b3b3b3 !important;
|
||||
}
|
||||
|
||||
.tox .tox-tbtn svg {
|
||||
fill: #b3b3b3 !important;
|
||||
}
|
||||
|
||||
.tox .tox-tbtn:hover {
|
||||
background-color: #222222 !important;
|
||||
}
|
||||
|
||||
.tox .tox-menu {
|
||||
background-color: #222222 !important;
|
||||
}
|
||||
|
||||
.tox-sidebar-wrap {
|
||||
border-top: 1px solid #302F33 !important;
|
||||
}
|
31
bl-plugins/tinymce/css/default-content.css
Normal file
31
bl-plugins/tinymce/css/default-content.css
Normal file
|
@ -0,0 +1,31 @@
|
|||
body.mce-content-body {
|
||||
padding: 10px 5% !important;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.mce-content-body img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.mce-content-body .mce-pagebreak {
|
||||
height: 5px !important;
|
||||
}
|
||||
|
||||
.mce-content-body p,
|
||||
.mce-content-body div,
|
||||
.mce-content-body h1,
|
||||
.mce-content-body h2,
|
||||
.mce-content-body h3,
|
||||
.mce-content-body h4,
|
||||
.mce-content-body h5,
|
||||
.mce-content-body h6,
|
||||
.mce-content-body ul {
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
.mce-content-body blockquote {
|
||||
padding: 10px 20px;
|
||||
margin: 0 0 20px 20px;
|
||||
font-style: italic;
|
||||
}
|
|
@ -39,12 +39,16 @@ class pluginTinymce extends Plugin {
|
|||
|
||||
public function adminHead()
|
||||
{
|
||||
global $site;
|
||||
// Load the plugin only in the controllers setted in $this->loadOnViews
|
||||
if (!in_array($GLOBALS['ADMIN_VIEW'], $this->loadOnViews)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$html = '<link rel="stylesheet" type="text/css" href="'.$this->htmlPath().'css/tinymce_toolbar.css">'.PHP_EOL;
|
||||
$html = '<link rel="stylesheet" type="text/css" href="'.$this->htmlPath().'css/lightmode-toolbar.css">'.PHP_EOL;
|
||||
if ($site->darkModeAdmin()) {
|
||||
$html = '<link rel="stylesheet" type="text/css" href="'.$this->htmlPath().'css/darkmode-toolbar.css">'.PHP_EOL;
|
||||
}
|
||||
$html .= '<script src="'.$this->htmlPath().'tinymce/tinymce.min.js?version='.$this->version().'"></script>';
|
||||
return $html;
|
||||
}
|
||||
|
@ -52,6 +56,7 @@ class pluginTinymce extends Plugin {
|
|||
public function adminBodyEnd()
|
||||
{
|
||||
global $L;
|
||||
global $site;
|
||||
|
||||
// Load the plugin only in the controllers setted in $this->loadOnViews
|
||||
if (!in_array($GLOBALS['ADMIN_VIEW'], $this->loadOnViews)) {
|
||||
|
@ -60,7 +65,10 @@ class pluginTinymce extends Plugin {
|
|||
|
||||
$toolbar1 = $this->getValue('toolbar1');
|
||||
$toolbar2 = $this->getValue('toolbar2');
|
||||
$content_css = $this->htmlPath().'css/tinymce_content.css';
|
||||
$content_css = $this->htmlPath().'css/lightmode-content.css'.','.$this->htmlPath().'css/default-content.css';
|
||||
if ($site->darkModeAdmin()) {
|
||||
$content_css = $this->htmlPath().'css/darkmode-content.css'.','.$this->htmlPath().'css/default-content.css';
|
||||
}
|
||||
$plugins = $this->getValue('plugins');
|
||||
$version = $this->version();
|
||||
|
||||
|
@ -102,7 +110,7 @@ class pluginTinymce extends Plugin {
|
|||
auto_focus: "editor",
|
||||
element_format : "html",
|
||||
entity_encoding : "raw",
|
||||
skin: "oxide",
|
||||
skin: "oxide-dark",
|
||||
schema: "html5",
|
||||
statusbar: false,
|
||||
menubar:false,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -46,6 +46,13 @@ pre {
|
|||
margin-right: .5rem!important;
|
||||
}
|
||||
|
||||
.btn:focus,
|
||||
.form-control:focus,
|
||||
.form-select:focus {
|
||||
outline: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
/* PAGE */
|
||||
section.page {
|
||||
font-size: 1.1rem;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
body {
|
||||
background-color: #1C1C1E !important;
|
||||
color: #ddd !important;
|
||||
color: #b3b3b3 !important;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #fff !important;
|
||||
color: #b3b3b3 !important;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
|
@ -32,8 +32,19 @@ a.badge:hover {
|
|||
border-color: #688bbd !important;
|
||||
}
|
||||
|
||||
.btn-outline-primary:hover {
|
||||
background-color: #1C1C1E !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.page-link {
|
||||
color: #688bbd !important;
|
||||
border-color: #688bbd !important;
|
||||
background-color: #1C1C1E !important;
|
||||
}
|
||||
|
||||
.form-control {
|
||||
background-color: #1C1C1E !important;
|
||||
border-color: #302F33 !important;
|
||||
color: #b3b3b3 !important;
|
||||
}
|
|
@ -20,14 +20,15 @@
|
|||
<!-- Include CSS Bootstrap ICONS file from Bludit Core -->
|
||||
<?php echo HTML::cssBootstrapIcons(); ?>
|
||||
|
||||
<!-- Include CSS Styles from this theme -->
|
||||
<!-- Include CSS Styles -->
|
||||
<?php
|
||||
echo HTML::css(array(
|
||||
'css/01-style.css',
|
||||
'css/02-helpers.css'
|
||||
));
|
||||
|
||||
if ($darkMode) {
|
||||
# Apply the following CSS only for Dark Mode
|
||||
if ($site->darkModeWebsite()) {
|
||||
echo HTML::css(
|
||||
'css/99-darkmode.css'
|
||||
);
|
||||
|
|
|
@ -18,12 +18,6 @@
|
|||
</div>
|
||||
</header>
|
||||
|
||||
<?php if (empty($content)) : ?>
|
||||
<div class="text-center p-4">
|
||||
<?php $language->p('No pages found') ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Print all the content -->
|
||||
<section class="mt-4 mb-4">
|
||||
<div class="container">
|
||||
|
@ -31,12 +25,36 @@
|
|||
<div class="col-lg-8 mx-auto">
|
||||
|
||||
<!-- Search input -->
|
||||
<?php if (pluginActivated('pluginSearch')): ?>
|
||||
<form class="d-flex mb-4">
|
||||
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
|
||||
<button class="btn btn-outline-primary" type="submit">Search</button>
|
||||
<input id="search-input" class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
|
||||
<button class="btn btn-outline-primary" type="button" onClick="searchNow()">Search</button>
|
||||
</form>
|
||||
<script>
|
||||
function searchNow() {
|
||||
var searchURL = "<?php echo HTML::siteUrl(); ?>search/";
|
||||
window.open(searchURL + document.getElementById("search-input").value, "_self");
|
||||
}
|
||||
document.getElementById("search-input").onkeypress = function(e) {
|
||||
if (!e) e = window.event;
|
||||
var keyCode = e.keyCode || e.which;
|
||||
if (keyCode == '13') {
|
||||
searchNow();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php endif ?>
|
||||
<!-- End Search input -->
|
||||
|
||||
<!-- Content not available -->
|
||||
<?php if (empty($content)) : ?>
|
||||
<div class="text-center p-4">
|
||||
<h3><?php $language->p('No pages found') ?></h3>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<!-- End Content not available -->
|
||||
|
||||
<!-- Pages -->
|
||||
<div class="list-group list-group-flush">
|
||||
<?php foreach ($content as $tmp) : ?>
|
||||
|
|
Loading…
Reference in a new issue