mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-03-22 12:31:32 +01:00
Merge branch 'develop' of https://github.com/getgrav/grav-plugin-admin into develop
This commit is contained in:
29
admin.php
29
admin.php
@@ -182,9 +182,29 @@ class AdminPlugin extends Plugin
|
||||
// Replace page service with admin.
|
||||
$this->grav['page'] = function () use ($self) {
|
||||
$page = new Page;
|
||||
$page->init(new \SplFileInfo(__DIR__ . "/pages/admin/{$self->template}.md"));
|
||||
$page->slug(basename($self->template));
|
||||
return $page;
|
||||
|
||||
if (file_exists(__DIR__ . "/pages/admin/{$self->template}.md")) {
|
||||
$page->init(new \SplFileInfo(__DIR__ . "/pages/admin/{$self->template}.md"));
|
||||
$page->slug(basename($self->template));
|
||||
return $page;
|
||||
}
|
||||
|
||||
// If the page cannot be found, try looking in plugins.
|
||||
// Allows pages added by plugins in admin
|
||||
$plugins = Grav::instance()['config']->get('plugins', []);
|
||||
|
||||
foreach($plugins as $plugin => $data) {
|
||||
$folder = GRAV_ROOT . "/user/plugins/" . $plugin . "/admin";
|
||||
|
||||
if (file_exists($folder)) {
|
||||
$file = $folder . "/pages/{$self->template}.md";
|
||||
if (file_exists($file)) {
|
||||
$page->init(new \SplFileInfo($file));
|
||||
$page->slug(basename($self->template));
|
||||
return $page;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -223,6 +243,9 @@ class AdminPlugin extends Plugin
|
||||
$twig->twig_vars['base_path'] = GRAV_ROOT;
|
||||
$twig->twig_vars['admin'] = $this->admin;
|
||||
|
||||
// Gather Plugin-hooked nav items
|
||||
$this->grav->fireEvent('onAdminTemplateNavPluginHook');
|
||||
|
||||
switch ($this->template) {
|
||||
case 'dashboard':
|
||||
$twig->twig_vars['popularity'] = $this->popularity;
|
||||
|
||||
@@ -818,6 +818,11 @@ tr {
|
||||
flex: 2; }
|
||||
tr td:first-child {
|
||||
padding-left: 3rem; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
tr td:first-child {
|
||||
padding-left: .5rem; }
|
||||
tr td:first-child .plugin-update-button {
|
||||
float: left; } }
|
||||
tr td:last-child, tr td.gpm-actions {
|
||||
padding-right: 3rem; }
|
||||
tr td.gpm-actions {
|
||||
@@ -832,6 +837,9 @@ tr {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #f7f7f7; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
tr td.gpm-details {
|
||||
word-wrap: break-word; } }
|
||||
tr td.gpm-details > .table-wrapper {
|
||||
display: none; }
|
||||
tr td.gpm-details > .table-wrapper td {
|
||||
@@ -1017,6 +1025,11 @@ tr {
|
||||
bottom: 0;
|
||||
width: 20%;
|
||||
background: #253A47; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
#admin-sidebar {
|
||||
display: none;
|
||||
width: 75%;
|
||||
z-index: 999999; } }
|
||||
#admin-sidebar a {
|
||||
color: #cccccc; }
|
||||
#admin-sidebar a:hover {
|
||||
@@ -1045,10 +1058,16 @@ tr {
|
||||
transition: all 0.5s ease;
|
||||
border-radius: 100%;
|
||||
float: left; }
|
||||
@media only all and (min-width: 48em) and (max-width: 59.938em) {
|
||||
#admin-user-details img {
|
||||
float: none; } }
|
||||
#admin-user-details:hover img {
|
||||
box-shadow: 0px 0px 0 50px #2a4251; }
|
||||
#admin-user-details .admin-user-names {
|
||||
margin-left: 45px; }
|
||||
@media only all and (min-width: 48em) and (max-width: 59.938em) {
|
||||
#admin-user-details .admin-user-names {
|
||||
margin-left: 0; } }
|
||||
#admin-user-details .admin-user-names h4, #admin-user-details .admin-user-names h5 {
|
||||
color: #e6e6e6;
|
||||
margin: 0;
|
||||
@@ -1094,12 +1113,18 @@ tr {
|
||||
padding-top: 0.7rem;
|
||||
padding-bottom: 0.7rem;
|
||||
color: #d1dee7; }
|
||||
@media only all and (min-width: 48em) and (max-width: 59.938em) {
|
||||
#admin-menu li a {
|
||||
padding-left: 20px; } }
|
||||
#admin-menu li a i {
|
||||
-webkit-transition: all 0.2s ease;
|
||||
-moz-transition: all 0.2s ease;
|
||||
transition: all 0.2s ease;
|
||||
color: #afc7d5;
|
||||
margin-right: 8px; }
|
||||
@media only all and (min-width: 48em) and (max-width: 59.938em) {
|
||||
#admin-menu li a i {
|
||||
display: none; } }
|
||||
#admin-menu li a:hover {
|
||||
background: #21333e;
|
||||
color: #fff; }
|
||||
@@ -1110,11 +1135,18 @@ tr {
|
||||
color: #fff;
|
||||
padding-left: 16px;
|
||||
border-left: 9px solid #349886; }
|
||||
@media only all and (min-width: 48em) and (max-width: 59.938em) {
|
||||
#admin-menu li.selected a {
|
||||
padding-left: 11px; } }
|
||||
#admin-menu li.selected a i {
|
||||
color: #e1eaf0; }
|
||||
|
||||
#admin-main {
|
||||
margin-left: 20%; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
#admin-main {
|
||||
width: 100%;
|
||||
margin-left: 0; } }
|
||||
#admin-main .hint:after, #admin-main [data-hint]:after {
|
||||
font-size: 0.9rem;
|
||||
width: 400px;
|
||||
@@ -1129,8 +1161,14 @@ tr {
|
||||
position: relative;
|
||||
height: 4.2rem;
|
||||
padding: 0 3rem; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
#admin-main .titlebar h1 > i:first-child:before {
|
||||
content: "\f0c9"; } }
|
||||
#admin-main .titlebar .button-bar {
|
||||
padding: 0; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
#admin-main .titlebar .button-bar {
|
||||
display: none; } }
|
||||
#admin-main .titlebar .preview {
|
||||
color: #fff;
|
||||
font-size: 90%; }
|
||||
@@ -1178,11 +1216,35 @@ tr {
|
||||
-webkit-transition: margin-top 0.15s ease-out;
|
||||
-moz-transition: margin-top 0.15s ease-out;
|
||||
transition: margin-top 0.15s ease-out; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
#admin-main .grav-update.grav {
|
||||
position: absolute;
|
||||
z-index: 9;
|
||||
bottom: 0;
|
||||
width: 100%; }
|
||||
#admin-main .grav-update.grav p * {
|
||||
display: none; }
|
||||
#admin-main .grav-update.grav p {
|
||||
font-size: 0; }
|
||||
#admin-main .grav-update.grav p button {
|
||||
width: 95%;
|
||||
display: inherit;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
margin-left: 2.5%;
|
||||
margin-right: 2.5%;
|
||||
padding-left: 0; } }
|
||||
#admin-main .grav-update.grav + .content-padding {
|
||||
top: 7.2rem;
|
||||
-webkit-transition: top 0.15s ease-out;
|
||||
-moz-transition: top 0.15s ease-out;
|
||||
transition: top 0.15s ease-out; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
#admin-main .grav-update.grav + .content-padding {
|
||||
top: 5.2rem;
|
||||
padding-bottom: 8rem;
|
||||
padding-top: 0rem; } }
|
||||
#admin-main .content-padding {
|
||||
position: absolute;
|
||||
top: 4.2rem;
|
||||
@@ -1191,6 +1253,9 @@ tr {
|
||||
right: 0;
|
||||
overflow-y: auto;
|
||||
padding: 2.5rem; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
#admin-main .content-padding {
|
||||
left: 0; } }
|
||||
#admin-main .admin-block {
|
||||
background: #EEEEEE;
|
||||
color: #737C81;
|
||||
@@ -1200,15 +1265,35 @@ tr {
|
||||
padding: 0 3rem 0.5rem;
|
||||
margin: 0 0 1rem;
|
||||
border-bottom: 3px solid #e1e1e1; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
#admin-main .admin-block h1 {
|
||||
padding: 0 0 0.5rem;
|
||||
margin: 0 0 1rem !important; } }
|
||||
#admin-main .admin-block h1.no_underline {
|
||||
border-bottom: 0; }
|
||||
#admin-main .admin-block .button-bar {
|
||||
margin-right: 3rem; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
#admin-main .admin-block .button-bar {
|
||||
width: 100%;
|
||||
margin: -.5rem 0 1rem 0;
|
||||
text-align: center; }
|
||||
#admin-main .admin-block .button-bar .button {
|
||||
width: 100%; } }
|
||||
#admin-main .flush-bottom.button-bar {
|
||||
margin: 1rem -2rem -1rem;
|
||||
height: 70px;
|
||||
padding: 0 1rem;
|
||||
float: none; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
#admin-main .flush-bottom.button-bar {
|
||||
height: auto;
|
||||
padding: 2rem 1rem 0rem 1rem; } }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
#admin-main .flush-bottom.button-bar .button {
|
||||
margin-left: 0 !important;
|
||||
margin-bottom: .5rem;
|
||||
width: 100%; } }
|
||||
#admin-main .danger, #admin-main .success {
|
||||
position: relative; }
|
||||
#admin-main .danger.button-bar, #admin-main .success.button-bar {
|
||||
@@ -1236,12 +1321,21 @@ tr {
|
||||
float: left;
|
||||
width: 50%;
|
||||
margin-bottom: 2.5rem; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
#admin-dashboard .dashboard-item {
|
||||
width: 100%; } }
|
||||
#admin-dashboard .dashboard-item > div {
|
||||
padding: 1rem 2rem; }
|
||||
#admin-dashboard .dashboard-left {
|
||||
padding-right: 1.25rem; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
#admin-dashboard .dashboard-left {
|
||||
padding-right: 0rem; } }
|
||||
#admin-dashboard .dashboard-right {
|
||||
padding-left: 1.25rem; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
#admin-dashboard .dashboard-right {
|
||||
padding-left: 0rem; } }
|
||||
#admin-dashboard #updates p {
|
||||
text-align: center;
|
||||
color: rgba(255, 255, 255, 0.95);
|
||||
@@ -1275,6 +1369,11 @@ tr {
|
||||
clear: both; }
|
||||
#admin-dashboard #updates .button {
|
||||
margin-left: 0.5rem; }
|
||||
@media only all and (min-width: 48em) and (max-width: 59.938em) {
|
||||
#admin-dashboard #updates .button {
|
||||
width: 49%;
|
||||
padding: .3rem 0rem;
|
||||
margin-left: 0; } }
|
||||
#admin-dashboard #popularity p {
|
||||
text-align: center;
|
||||
color: rgba(255, 255, 255, 0.95);
|
||||
@@ -1373,6 +1472,15 @@ tr {
|
||||
#latest .last-modified {
|
||||
padding-left: 10px; }
|
||||
|
||||
#overlay {
|
||||
position: fixed;
|
||||
width: 25%;
|
||||
height: 100%;
|
||||
z-index: 999999;
|
||||
left: 75%;
|
||||
top: 0;
|
||||
display: none; }
|
||||
|
||||
.pages-list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
@@ -1451,6 +1559,9 @@ tr {
|
||||
#page-filtering .page-filters {
|
||||
width: 60%;
|
||||
float: left; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
#page-filtering .page-filters {
|
||||
width: 100%; } }
|
||||
#page-filtering .page-search {
|
||||
position: relative;
|
||||
width: 40%;
|
||||
@@ -1463,6 +1574,13 @@ tr {
|
||||
top: 10px;
|
||||
content: '\f002';
|
||||
font-family: 'FontAwesome'; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
#page-filtering .page-search {
|
||||
width: 100%;
|
||||
padding-top: 1rem;
|
||||
padding-left: 0rem; }
|
||||
#page-filtering .page-search:after {
|
||||
top: 1.5rem; } }
|
||||
#page-filtering .page-shortcuts {
|
||||
clear: both;
|
||||
padding-top: 5px; }
|
||||
@@ -1505,10 +1623,19 @@ tr {
|
||||
position: absolute;
|
||||
right: 0.5rem;
|
||||
height: 3.5rem; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
#admin-topbar {
|
||||
width: 100%;
|
||||
right: 0;
|
||||
top: .25rem;
|
||||
padding: 0 .5rem; } }
|
||||
#admin-topbar #admin-mode-toggle, #admin-topbar #admin-lang-toggle {
|
||||
height: 37px;
|
||||
display: inline-block;
|
||||
vertical-align: inherit; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
#admin-topbar #admin-mode-toggle, #admin-topbar #admin-lang-toggle {
|
||||
width: 100%; } }
|
||||
#admin-topbar #admin-lang-toggle {
|
||||
z-index: 10; }
|
||||
#admin-topbar #admin-lang-toggle button {
|
||||
@@ -1530,6 +1657,9 @@ tr {
|
||||
#admin-topbar .switch-grav {
|
||||
border: 0;
|
||||
background-color: #365569; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
#admin-topbar .switch-toggle {
|
||||
width: 100%; } }
|
||||
#admin-topbar .switch-toggle input:checked + label {
|
||||
color: #fff; }
|
||||
#admin-topbar .switch-toggle input + label {
|
||||
@@ -1730,6 +1860,12 @@ body.remodal_active .remodal {
|
||||
.tab-bar li.active span, .tab-bar li.active a {
|
||||
background: #EEEEEE;
|
||||
color: #737C81; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
.tab-bar li {
|
||||
width: 100%; }
|
||||
.tab-bar li span, .tab-bar li a {
|
||||
width: 100%;
|
||||
text-align: center; } }
|
||||
.tab-bar span, .tab-bar a {
|
||||
display: inline-block;
|
||||
padding: 0 4rem;
|
||||
@@ -1759,6 +1895,9 @@ body.remodal_active .remodal {
|
||||
background: #253A47;
|
||||
font-family: "Montserrat", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
|
||||
margin-top: -4rem; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
.form-tabs {
|
||||
padding-top: 4rem; } }
|
||||
.form-tabs > input[type=radio] {
|
||||
display: none; }
|
||||
.form-tabs > input[type=radio]:checked + label {
|
||||
@@ -1772,6 +1911,9 @@ body.remodal_active .remodal {
|
||||
text-align: center;
|
||||
line-height: 3.5em;
|
||||
padding: 0 2rem; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
.form-tabs > label {
|
||||
width: 100%; } }
|
||||
.form-tabs > label:last-of-type {
|
||||
border-bottom: none; }
|
||||
.form-tabs > label:hover {
|
||||
@@ -2339,6 +2481,9 @@ button.toast-close-button {
|
||||
padding-bottom: 1rem;
|
||||
margin-bottom: 3rem;
|
||||
overflow: hidden; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
.gpm .gpm-item-info {
|
||||
word-wrap: break-word; } }
|
||||
.gpm .gpm-item-info .gpm-item-icon {
|
||||
color: #e6e6e6;
|
||||
position: absolute;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -349,7 +349,7 @@ $(function () {
|
||||
plugin = $('[data-gpm-plugin="' + key + '"] .gpm-name');
|
||||
url = plugin.find('a');
|
||||
if (!plugin.find('.badge.update').length) {
|
||||
plugin.append('<a href="' + url.attr('href') + '"><span class="badge update">' + translations.PLUGIN_ADMIN.UPDATE_AVAILABLE + '!</span></a>');
|
||||
plugin.append('<a class="plugin-update-button" href="' + url.attr('href') + '"><span class="badge update">' + translations.PLUGIN_ADMIN.UPDATE_AVAILABLE + '!</span></a>');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -93,6 +93,10 @@
|
||||
};
|
||||
|
||||
ArrayField.prototype.remove = function(event) {
|
||||
if ($(event.target).closest('[data-grav-array-type="row"]').siblings().length == 0) {
|
||||
//disable for the last item
|
||||
return;
|
||||
}
|
||||
$(event.target).closest('[data-grav-array-type="row"]').remove();
|
||||
if (this.isValueOnly()) {
|
||||
this.refreshAll();
|
||||
|
||||
@@ -82,12 +82,14 @@
|
||||
var target = $(e.currentTarget).parent('.dz-preview').find('.dz-filename');
|
||||
editor.focus();
|
||||
|
||||
var filename = target.text();
|
||||
var filename = encodeURI(target.text());
|
||||
filename = filename.replace(/@3x|@2x|@1x/, '');
|
||||
filename = filename.replace(/\(/g, '%28');
|
||||
filename = filename.replace(/\)/g, '%29');
|
||||
if (filename.match(/\.(jpg|jpeg|png|gif)$/)) {
|
||||
editor.doc.replaceSelection(' + ')');
|
||||
editor.doc.replaceSelection('');
|
||||
} else {
|
||||
editor.doc.replaceSelection('[' + filename + '](' + encodeURI(filename) + ')');
|
||||
editor.doc.replaceSelection('[' + decodeURI(filename) + '](' + filename + ')');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
96
themes/grav/js/mobile.js
Normal file
96
themes/grav/js/mobile.js
Normal file
@@ -0,0 +1,96 @@
|
||||
$(document).ready(function(){
|
||||
var large_desktop_container = 75.000;
|
||||
var desktop_container= 60.000;
|
||||
var tablet_container= 48.000;
|
||||
var large_mobile_container= 30.000;
|
||||
|
||||
var mobile_only= tablet_container - 0.062;
|
||||
var no_mobile= tablet_container;
|
||||
var small_mobile_range= large_mobile_container;
|
||||
|
||||
var media_mobile = window.matchMedia('(max-width:' + mobile_only + 'em)');
|
||||
|
||||
var titlebar = document.getElementById("titlebar");
|
||||
var sidebar = document.getElementById("admin-sidebar");
|
||||
var overlay = document.getElementById("overlay");
|
||||
|
||||
//var selected = sidebar.getElementsByClassName('selected')[0].getElementsByTagName('a');
|
||||
//Var selected will be added later when solution to a few pages not having it is found.
|
||||
//Var selected is used to prevent the page from reloading when clicking on the current page in the menu
|
||||
var mobile = {
|
||||
setup: function() {
|
||||
//selected[0].href = 'javascript:void(0)';
|
||||
//actions here please;
|
||||
console.log("Mobile setup");
|
||||
//event listener to titlebar
|
||||
titlebar.addEventListener('click',mobile.titlebar_click);
|
||||
//event listener to admin-sidebar
|
||||
sidebar.addEventListener('click',mobile.sidebar_click);
|
||||
//event listener to overlay
|
||||
overlay.addEventListener('click',mobile.overlay_click);
|
||||
},
|
||||
teardown: function() {
|
||||
//teardown actions here please
|
||||
console.log("Mobile teardown");
|
||||
//remove event listeners
|
||||
titlebar.removeEventListener('click',mobile.titlebar_click);
|
||||
sidebar.removeEventListener('click',mobile.sidebar_click);
|
||||
overlay.removeEventListener('click',mobile.overlay_click);
|
||||
},
|
||||
titlebar_click: function(){
|
||||
//onclick event stuff here;
|
||||
console.log("Mobile onClick");
|
||||
$(sidebar).toggle('slide');
|
||||
overlay.style.display = "inherit";
|
||||
},
|
||||
sidebar_click: function(){
|
||||
//onclick event stuff here;
|
||||
console.log("Sidebar Clicked");
|
||||
if(event.target == sidebar || event.target == selected[0]) {
|
||||
$(sidebar).toggle('slide');
|
||||
overlay.style.display = "none";
|
||||
}
|
||||
},
|
||||
overlay_click: function(){
|
||||
//onclick event stuff here;
|
||||
console.log("Overlay Clicked");
|
||||
$(sidebar).toggle('slide');
|
||||
overlay.style.display = "none";
|
||||
}
|
||||
};
|
||||
|
||||
var other = {
|
||||
setup: function() {
|
||||
//actions here please;
|
||||
console.log("Other setup");
|
||||
//make sure menu is visible
|
||||
if(sidebar.style.display == 'none') {
|
||||
sidebar.style.display = 'block';
|
||||
}
|
||||
},
|
||||
teardown: function() {
|
||||
//teardown actions here please
|
||||
console.log("Other teardown");
|
||||
},
|
||||
onClick: function(){
|
||||
//onclick event stuff here;
|
||||
console.log("Other onClick");
|
||||
}
|
||||
};
|
||||
|
||||
media_mobile.addListener(function(data) {
|
||||
if(data.matches) {
|
||||
other.teardown();
|
||||
mobile.setup();
|
||||
} else {
|
||||
mobile.teardown();
|
||||
other.setup();
|
||||
}
|
||||
});
|
||||
|
||||
if (media_mobile.matches) {
|
||||
mobile.setup();
|
||||
} else {
|
||||
other.setup();
|
||||
}
|
||||
});
|
||||
@@ -12,6 +12,12 @@ $update-height: 3rem;
|
||||
|
||||
background: $accent-bg;
|
||||
|
||||
@include breakpoint(mobile-only) {
|
||||
display: none;
|
||||
width: 75%;
|
||||
z-index: 999999;
|
||||
}
|
||||
|
||||
a {
|
||||
color: shade($accent-fg,20%);
|
||||
&:hover {
|
||||
@@ -49,6 +55,10 @@ $update-height: 3rem;
|
||||
@include transition(all 0.5s ease);
|
||||
border-radius: 100%;
|
||||
float: left;
|
||||
|
||||
@include breakpoint(tablet-range){
|
||||
float: none;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover img {
|
||||
@@ -58,6 +68,10 @@ $update-height: 3rem;
|
||||
.admin-user-names {
|
||||
margin-left: 45px;
|
||||
|
||||
@include breakpoint(tablet-range){
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
h4, h5 {
|
||||
color: darken($accent-fg,10%);
|
||||
margin: 0;
|
||||
@@ -129,10 +143,18 @@ $update-height: 3rem;
|
||||
|
||||
color: lighten($accent-bg,65%);
|
||||
|
||||
@include breakpoint(tablet-range){
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
i {
|
||||
@include transition(all 0.2s ease);
|
||||
color: lighten($accent-bg,55%);
|
||||
margin-right: 8px;
|
||||
|
||||
@include breakpoint(tablet-range){
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
@@ -153,6 +175,10 @@ $update-height: 3rem;
|
||||
padding-left: 16px;
|
||||
border-left: 9px solid $secondary-accent-bg;
|
||||
|
||||
@include breakpoint(tablet-range){
|
||||
padding-left: 11px;
|
||||
}
|
||||
|
||||
i {
|
||||
color: lighten($accent-bg,70%);
|
||||
}
|
||||
@@ -168,6 +194,11 @@ $update-height: 3rem;
|
||||
#admin-main {
|
||||
margin-left: $sidebar-width;
|
||||
|
||||
@include breakpoint(mobile-only) {
|
||||
width: 100%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.hint:after, [data-hint]:after {
|
||||
font-size: 0.9rem;
|
||||
width: 400px;
|
||||
@@ -190,11 +221,21 @@ $update-height: 3rem;
|
||||
|
||||
h1 {
|
||||
@extend %vertical-align;
|
||||
|
||||
@include breakpoint(mobile-only){
|
||||
> i:first-child:before {
|
||||
content: "\f0c9";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.button-bar {
|
||||
@extend %vertical-align;
|
||||
padding: 0;
|
||||
|
||||
@include breakpoint(mobile-only) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.preview {
|
||||
@@ -250,12 +291,41 @@ $update-height: 3rem;
|
||||
&.grav {
|
||||
margin-top: 0;
|
||||
@include transition (margin-top 0.15s ease-out);
|
||||
|
||||
@include breakpoint(mobile-only){
|
||||
position: absolute;
|
||||
z-index: 9;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
p * {
|
||||
display: none;
|
||||
}
|
||||
p {
|
||||
font-size: 0;
|
||||
button {
|
||||
width: 95%;
|
||||
display: inherit;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
margin-left: 2.5%;
|
||||
margin-right: 2.5%;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.grav-update.grav + .content-padding {
|
||||
top: $topbar-height + $update-height;
|
||||
@include transition (top 0.15s ease-out);
|
||||
|
||||
@include breakpoint(mobile-only){
|
||||
top: 5.2rem;
|
||||
padding-bottom: 8rem;
|
||||
padding-top: 0rem;
|
||||
}
|
||||
}
|
||||
|
||||
.content-padding {
|
||||
@@ -266,6 +336,10 @@ $update-height: 3rem;
|
||||
right: 0;
|
||||
overflow-y: auto;
|
||||
padding: 2.5rem;
|
||||
|
||||
@include breakpoint(mobile-only) {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.admin-block {
|
||||
@@ -278,6 +352,11 @@ $update-height: 3rem;
|
||||
padding: 0 $padding-default 0.5rem;
|
||||
margin: 0 0 1rem;
|
||||
border-bottom: 3px solid darken($content-bg, 5%);
|
||||
|
||||
@include breakpoint(mobile-only){
|
||||
padding: 0 0 0.5rem;
|
||||
margin: 0 0 1rem !important;
|
||||
}
|
||||
|
||||
&.no_underline {
|
||||
border-bottom: 0;
|
||||
@@ -286,6 +365,16 @@ $update-height: 3rem;
|
||||
|
||||
.button-bar {
|
||||
margin-right: $padding-default;
|
||||
|
||||
@include breakpoint(mobile-only) {
|
||||
width: 100%;
|
||||
margin: -.5rem 0 1rem 0;
|
||||
text-align: center;
|
||||
|
||||
.button {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -295,8 +384,19 @@ $update-height: 3rem;
|
||||
height: 70px;
|
||||
padding: 0 1rem;
|
||||
float: none;
|
||||
|
||||
@include breakpoint(mobile-only){
|
||||
height: auto;
|
||||
padding: 2rem 1rem 0rem 1rem;
|
||||
}
|
||||
.button {
|
||||
@extend %vertical-align;
|
||||
|
||||
@include breakpoint(mobile-only) {
|
||||
margin-left: 0 !important;
|
||||
margin-bottom: .5rem;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -336,6 +436,10 @@ $update-height: 3rem;
|
||||
width: 50%;
|
||||
margin-bottom: 2.5rem;
|
||||
|
||||
@include breakpoint(mobile-only) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
> div {
|
||||
padding: 1rem 2rem;
|
||||
}
|
||||
@@ -345,11 +449,19 @@ $update-height: 3rem;
|
||||
|
||||
.dashboard-left {
|
||||
padding-right: 1.25rem;
|
||||
|
||||
@include breakpoint(mobile-only) {
|
||||
padding-right: 0rem;
|
||||
}
|
||||
}
|
||||
|
||||
.dashboard-right {
|
||||
padding-left: 1.25rem;
|
||||
|
||||
@include breakpoint(mobile-only) {
|
||||
padding-left: 0rem;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#updates {
|
||||
@@ -403,6 +515,11 @@ $update-height: 3rem;
|
||||
|
||||
.button {
|
||||
margin-left: 0.5rem;
|
||||
@include breakpoint(tablet-range){
|
||||
width: 49%;
|
||||
padding: .3rem 0rem;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -540,3 +657,12 @@ $update-height: 3rem;
|
||||
}
|
||||
|
||||
|
||||
#overlay {
|
||||
position: fixed;
|
||||
width: 25%;
|
||||
height: 100%;
|
||||
z-index: 999999;
|
||||
left: 75%;
|
||||
top: 0;
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -46,6 +46,10 @@
|
||||
margin-bottom: 3rem;
|
||||
overflow: hidden;
|
||||
|
||||
@include breakpoint(mobile-only) {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.gpm-item-icon {
|
||||
color: darken($content-bg, 3%);
|
||||
position: absolute;
|
||||
@@ -136,4 +140,4 @@
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,6 +115,11 @@
|
||||
.page-filters {
|
||||
width: 60%;
|
||||
float: left;
|
||||
|
||||
@include breakpoint(mobile-only) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.page-search {
|
||||
@@ -130,6 +135,16 @@
|
||||
content: '\f002';
|
||||
font-family: 'FontAwesome';
|
||||
}
|
||||
|
||||
@include breakpoint(mobile-only) {
|
||||
width: 100%;
|
||||
padding-top: 1rem;
|
||||
padding-left: 0rem;
|
||||
|
||||
&:after {
|
||||
top: 1.5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.page-shortcuts {
|
||||
@@ -181,12 +196,23 @@
|
||||
position: absolute;
|
||||
right: 0.5rem;
|
||||
height: 3.5rem;
|
||||
|
||||
@include breakpoint(mobile-only){
|
||||
width: 100%;
|
||||
right: 0;
|
||||
top: .25rem;
|
||||
padding: 0 .5rem;
|
||||
}
|
||||
|
||||
#admin-mode-toggle, #admin-lang-toggle {
|
||||
@extend %vertical-align;
|
||||
height: 37px;
|
||||
display: inline-block;
|
||||
vertical-align: inherit;
|
||||
|
||||
@include breakpoint(mobile-only){
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
#admin-lang-toggle {
|
||||
@@ -212,6 +238,10 @@
|
||||
}
|
||||
|
||||
.switch-toggle {
|
||||
|
||||
@include breakpoint(mobile-only) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
input:checked + label {
|
||||
color: $white;
|
||||
|
||||
@@ -45,6 +45,15 @@ tr {
|
||||
|
||||
&:first-child {
|
||||
padding-left: $padding-default;
|
||||
|
||||
@include breakpoint(mobile-only) {
|
||||
padding-left: .5rem;
|
||||
|
||||
.plugin-update-button {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
&:last-child, &.gpm-actions {
|
||||
@@ -68,6 +77,10 @@ tr {
|
||||
padding: 0;
|
||||
background-color: #f7f7f7;
|
||||
|
||||
@include breakpoint(mobile-only){
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
> .table-wrapper {
|
||||
display: none;
|
||||
|
||||
|
||||
@@ -23,6 +23,13 @@ $tab-label-height:3.5em;
|
||||
color: $content-fg;
|
||||
}
|
||||
}
|
||||
@include breakpoint(mobile-only) {
|
||||
width: 100%;
|
||||
span, a {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
span, a {
|
||||
@@ -53,6 +60,10 @@ $tab-label-height:3.5em;
|
||||
background: $accent-bg;
|
||||
font-family: $font-family-header;
|
||||
margin-top: -4rem;
|
||||
|
||||
@include breakpoint(mobile-only){
|
||||
padding-top: 4rem;
|
||||
}
|
||||
|
||||
> input[type=radio] {
|
||||
display:none;
|
||||
@@ -76,6 +87,10 @@ $tab-label-height:3.5em;
|
||||
text-align:center;
|
||||
line-height: $tab-label-height;
|
||||
padding: 0 2rem;
|
||||
|
||||
@include breakpoint(mobile-only){
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&:last-of-type {
|
||||
border-bottom:none;
|
||||
|
||||
@@ -124,10 +124,13 @@
|
||||
var dropzone = new Dropzone("#gravDropzone", { url: URI + '/task{{ config.system.param_sep }}addmedia', createImageThumbnails: { thumbnailWidth: 150} });
|
||||
|
||||
$("#gravDropzone").delegate('.dz-preview', 'dragstart', function(e){
|
||||
var uri = $(this).find('.dz-filename').text();
|
||||
var shortcode = ' + ')';
|
||||
var uri = encodeURI($(this).find('.dz-filename').text());
|
||||
uri = uri.replace(/\(/g, '%28');
|
||||
uri = uri.replace(/\)/g, '%29');
|
||||
|
||||
var shortcode = '';
|
||||
if (!uri.match(/\.(jpg|jpeg|png|gif)$/)) {
|
||||
shortcode = '[' + uri + '](' + encodeURI(uri) + ')';
|
||||
shortcode = '[' + decodeURI(uri) + '](' + uri + ')';
|
||||
}
|
||||
|
||||
dropzone.disable();
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
|
||||
{% do assets.addJs(theme_url~'/js/admin-all.js') %}
|
||||
{% do assets.addJs(theme_url~'/js/dropdown.js') %}
|
||||
{% do assets.addJs(theme_url~'/js/mobile.js') %}
|
||||
|
||||
{% do assets.addJs(theme_url~'/js/datepicker/kendo.custom.min.js') %}
|
||||
{% do assets.addJs(theme_url~'/js/datepicker/init.js') %}
|
||||
@@ -74,7 +75,7 @@
|
||||
{% endblock %}
|
||||
|
||||
<section id="admin-main" >
|
||||
<div class="titlebar secondary-accent">
|
||||
<div id="titlebar" class="titlebar secondary-accent">
|
||||
{% block titlebar %}{% endblock %}
|
||||
</div>
|
||||
|
||||
@@ -101,6 +102,7 @@
|
||||
</div>
|
||||
|
||||
</section>
|
||||
<div id='overlay'></div>
|
||||
</div>
|
||||
{% endblock page %}
|
||||
</body>
|
||||
|
||||
@@ -31,6 +31,15 @@
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{% if grav.twig.plugins_hooked_nav %}
|
||||
{% for label, item in grav.twig.plugins_hooked_nav %}
|
||||
<li class="{{ (location == item.route) ? 'selected' : '' }}">
|
||||
<a href="{{ base_url_relative }}/{{ item.route }}">
|
||||
<i class="fa fa-fw {{ item.icon }}"></i> {{ label|tu }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<li class="{{ (location == 'plugins') ? 'selected' : '' }}">
|
||||
<a href="{{ base_url_relative }}/plugins">
|
||||
<i class="fa fa-fw fa-plug"></i> {{ "PLUGIN_ADMIN.PLUGINS"|tu }}
|
||||
|
||||
Reference in New Issue
Block a user