mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-05 18:57:55 +02:00
Merge branch 'feature/fix-57' into feature/translate-admin
This commit is contained in:
22
CHANGELOG.md
22
CHANGELOG.md
@@ -1,8 +1,26 @@
|
||||
# v0.2.1
|
||||
## XX/XX/2015
|
||||
# v0.3.0
|
||||
## 08/11/2015
|
||||
|
||||
1. [](#new)
|
||||
* Show current date in form date format fields
|
||||
* Added a new **check for updates** button to flush GPM
|
||||
* Added session timeout configuration for admin
|
||||
* Added `isSymlink` logic for Grav
|
||||
* Added new `phpinfo` page
|
||||
1. [](#improved)
|
||||
* Improved toggleables
|
||||
* Support `param_separator` for Apache on windows
|
||||
* Logout now goes to interstitial to provide session messages
|
||||
* Updated hints and improved formatting
|
||||
* Encoding URI for images in editor preview
|
||||
* Create user `system.yaml` and `site.yaml` if they are missing
|
||||
* Open external links in new tab by default
|
||||
* Set edit mode to `normal` by default
|
||||
* Disable CSS/JS pipelining in the admin
|
||||
1. [](#bugfix)
|
||||
* Fixed form submission not working in IE
|
||||
* Fix fatal error when deleting homepage
|
||||
* Prevent admin plugin activating when the URL of a page contains partial route
|
||||
|
||||
# v0.2.0
|
||||
## 08/06/2015
|
||||
|
||||
@@ -91,9 +91,9 @@ class AdminPlugin extends Plugin
|
||||
$this->base = '/' . trim($route, '/');
|
||||
$this->uri = $this->grav['uri'];
|
||||
|
||||
|
||||
// Only activate admin if we're inside the admin path.
|
||||
if (substr($this->uri->route(), 0, strlen($this->base)) == $this->base) {
|
||||
if ($this->uri->route() == $this->base ||
|
||||
substr($this->uri->route(), 0, strlen($this->base) + 1) == $this->base . '/') {
|
||||
$this->active = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: Admin Panel
|
||||
version: 0.2.0
|
||||
version: 0.3.0
|
||||
description: Adds an advanced administration panel to manage your site
|
||||
icon: empire
|
||||
author:
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<?php
|
||||
namespace Grav\Plugin;
|
||||
|
||||
use Grav\Common\Data;
|
||||
use Grav\Common\File\CompiledYamlFile;
|
||||
use Grav\Common\User\User;
|
||||
use Grav\Common\GPM\GPM;
|
||||
use Grav\Common\Grav;
|
||||
use Grav\Common\Page\Page;
|
||||
use Grav\Common\Page\Pages;
|
||||
use Grav\Common\Plugins;
|
||||
use Grav\Common\Themes;
|
||||
use Grav\Common\Uri;
|
||||
use Grav\Common\Page\Pages;
|
||||
use Grav\Common\Page\Page;
|
||||
use Grav\Common\Data;
|
||||
use Grav\Common\GPM\GPM;
|
||||
use Grav\Common\User\User;
|
||||
use RocketTheme\Toolbox\File\File;
|
||||
use RocketTheme\Toolbox\File\JsonFile;
|
||||
use RocketTheme\Toolbox\File\LogFile;
|
||||
@@ -120,12 +120,14 @@ class Admin
|
||||
* Fetch and delete messages from the session queue.
|
||||
*
|
||||
* @param string $type
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function messages($type = null)
|
||||
{
|
||||
/** @var Message $messages */
|
||||
$messages = $this->grav['messages'];
|
||||
|
||||
return $messages->fetch($type);
|
||||
}
|
||||
|
||||
@@ -133,6 +135,7 @@ class Admin
|
||||
* Authenticate user.
|
||||
*
|
||||
* @param array $form Form fields.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authenticate($form)
|
||||
@@ -168,16 +171,18 @@ class Admin
|
||||
/**
|
||||
* Checks user authorisation to the action.
|
||||
*
|
||||
* @param string $action
|
||||
* @param string $action
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorise($action = 'admin.login')
|
||||
{
|
||||
$action = (array) $action;
|
||||
$action = (array)$action;
|
||||
|
||||
foreach ($action as $a) {
|
||||
if ($this->user->authorise($a))
|
||||
if ($this->user->authorise($a)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -187,6 +192,7 @@ class Admin
|
||||
* Returns edited page.
|
||||
*
|
||||
* @param bool $route
|
||||
*
|
||||
* @return Page
|
||||
*/
|
||||
public function page($route = false)
|
||||
@@ -208,6 +214,7 @@ class Admin
|
||||
* Returns blueprints for the given type.
|
||||
*
|
||||
* @param string $type
|
||||
*
|
||||
* @return Data\Blueprint
|
||||
*/
|
||||
public function blueprints($type)
|
||||
@@ -215,6 +222,7 @@ class Admin
|
||||
if ($this->blueprints === null) {
|
||||
$this->blueprints = new Data\Blueprints($this->grav['locator']->findResource('blueprints://'));
|
||||
}
|
||||
|
||||
return $this->blueprints->get($type);
|
||||
}
|
||||
|
||||
@@ -222,7 +230,8 @@ class Admin
|
||||
* Gets configuration data.
|
||||
*
|
||||
* @param string $type
|
||||
* @param array $post
|
||||
* @param array $post
|
||||
*
|
||||
* @return Data\Data|null
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
@@ -320,6 +329,7 @@ class Admin
|
||||
* Converts dot notation to array notation.
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function field($name)
|
||||
@@ -338,6 +348,7 @@ class Admin
|
||||
{
|
||||
/** @var Pages $pages */
|
||||
$pages = $this->grav['pages'];
|
||||
|
||||
return $pages->routes();
|
||||
}
|
||||
|
||||
@@ -349,7 +360,11 @@ class Admin
|
||||
public function plugins($local = true)
|
||||
{
|
||||
$gpm = $this->gpm();
|
||||
return $local ? $gpm->getInstalledPlugins() : $gpm->getRepositoryPlugins()->filter(function ($package, $slug) use ($gpm) {
|
||||
|
||||
return $local ? $gpm->getInstalledPlugins() : $gpm->getRepositoryPlugins()->filter(function (
|
||||
$package,
|
||||
$slug
|
||||
) use ($gpm) {
|
||||
return !$gpm->isPluginInstalled($slug);
|
||||
});
|
||||
}
|
||||
@@ -362,7 +377,11 @@ class Admin
|
||||
public function themes($local = true)
|
||||
{
|
||||
$gpm = $this->gpm();
|
||||
return $local ? $gpm->getInstalledThemes() : $gpm->getRepositoryThemes()->filter(function ($package, $slug) use ($gpm) {
|
||||
|
||||
return $local ? $gpm->getInstalledThemes() : $gpm->getRepositoryThemes()->filter(function ($package, $slug) use
|
||||
(
|
||||
$gpm
|
||||
) {
|
||||
return !$gpm->isThemeInstalled($slug);
|
||||
});
|
||||
}
|
||||
@@ -381,6 +400,7 @@ class Admin
|
||||
|
||||
$this->logs = array_reverse($content);
|
||||
}
|
||||
|
||||
return $this->logs;
|
||||
}
|
||||
|
||||
@@ -389,6 +409,7 @@ class Admin
|
||||
* that have been modified
|
||||
*
|
||||
* @param integer $count number of pages to pull back
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function latestPages($count = 10)
|
||||
@@ -401,7 +422,7 @@ class Admin
|
||||
foreach ($pages->routes() as $url => $path) {
|
||||
$page = $pages->dispatch($url);
|
||||
if ($page && $page->routable()) {
|
||||
$latest[$page->route()] = ['modified'=>$page->modified(), 'page'=>$page];
|
||||
$latest[$page->route()] = ['modified' => $page->modified(), 'page' => $page];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -410,6 +431,7 @@ class Admin
|
||||
if ($a['modified'] == $b['modified']) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ($a['modified'] > $b['modified']) ? -1 : 1;
|
||||
});
|
||||
|
||||
@@ -447,8 +469,8 @@ class Admin
|
||||
$content = $file->content();
|
||||
if (empty($content)) {
|
||||
return [
|
||||
'days' => '∞',
|
||||
'chart_fill' => 100,
|
||||
'days' => '∞',
|
||||
'chart_fill' => 100,
|
||||
'chart_empty' => 0
|
||||
];
|
||||
}
|
||||
@@ -461,8 +483,8 @@ class Admin
|
||||
$chart_fill = $days > 30 ? 100 : round($days / 30 * 100);
|
||||
|
||||
return [
|
||||
'days' => $days,
|
||||
'chart_fill' => $chart_fill,
|
||||
'days' => $days,
|
||||
'chart_fill' => $chart_fill,
|
||||
'chart_empty' => 100 - $chart_fill
|
||||
];
|
||||
}
|
||||
@@ -471,6 +493,7 @@ class Admin
|
||||
* Returns the page creating it if it does not exist.
|
||||
*
|
||||
* @param $path
|
||||
*
|
||||
* @return Page
|
||||
*/
|
||||
protected function getPage($path)
|
||||
@@ -488,7 +511,7 @@ class Admin
|
||||
$slug = basename($path);
|
||||
|
||||
if ($slug == '') {
|
||||
return null;
|
||||
return null;
|
||||
}
|
||||
|
||||
$ppath = dirname($path);
|
||||
@@ -499,7 +522,7 @@ class Admin
|
||||
// Create page.
|
||||
$page = new Page;
|
||||
$page->parent($parent);
|
||||
$page->filePath($parent->path().'/'.$slug.'/'.$page->name());
|
||||
$page->filePath($parent->path() . '/' . $slug . '/' . $page->name());
|
||||
|
||||
// Add routing information.
|
||||
$pages->addPage($page, $path);
|
||||
@@ -511,7 +534,7 @@ class Admin
|
||||
if (isset($this->session->{$page->route()})) {
|
||||
// Found the type and header from the session.
|
||||
$data = $this->session->{$page->route()};
|
||||
$visible = isset($data['visible']) && $data['visible'] != '' ? (bool) $data['visible'] : $this->guessVisibility($page);
|
||||
$visible = isset($data['visible']) && $data['visible'] != '' ? (bool)$data['visible'] : $this->guessVisibility($page);
|
||||
|
||||
$header = ['title' => $data['title'], 'visible' => $visible];
|
||||
|
||||
@@ -522,11 +545,12 @@ class Admin
|
||||
$name = $page->modular() ? str_replace('modular/', '', $data['type']) : $data['type'];
|
||||
$page->name($name . '.md');
|
||||
$page->header($header);
|
||||
$page->frontmatter(Yaml::dump((array) $page->header()));
|
||||
$page->frontmatter(Yaml::dump((array)$page->header()));
|
||||
} else {
|
||||
// Find out the type by looking at the parent.
|
||||
$type = $parent->childType() ? $parent->childType() : $parent->blueprints()->get('child_type', 'default');
|
||||
$page->name($type.CONTENT_EXT);
|
||||
$type = $parent->childType() ? $parent->childType() : $parent->blueprints()->get('child_type',
|
||||
'default');
|
||||
$page->name($type . CONTENT_EXT);
|
||||
$page->header();
|
||||
}
|
||||
$page->modularTwig($slug[0] == '_');
|
||||
@@ -550,6 +574,7 @@ class Admin
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -567,6 +592,7 @@ class Admin
|
||||
* Determine if the plugin or theme info passed is from Team Grav
|
||||
*
|
||||
* @param object $info Plugin or Theme info object
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isTeamGrav($info)
|
||||
@@ -577,4 +603,14 @@ class Admin
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function phpinfo() {
|
||||
ob_start();
|
||||
phpinfo();
|
||||
$pinfo = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$pinfo = preg_replace( '%^.*<body>(.*)</body>.*$%ms','$1',$pinfo);
|
||||
return $pinfo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1148,7 +1148,12 @@ class AdminController
|
||||
|
||||
if (isset($input['type']) && !empty($input['type'])) {
|
||||
$type = (string) strtolower($input['type']);
|
||||
$name = preg_replace('|.*/|', '', $type) . '.md';
|
||||
$name = preg_replace('|.*/|', '', $type);
|
||||
$language = $this->grav['language'];
|
||||
if ($language->enabled()) {
|
||||
$name .= '.' . $language->getLanguage();
|
||||
}
|
||||
$name .= '.md';
|
||||
$page->name($name);
|
||||
$page->template($type);
|
||||
}
|
||||
|
||||
7
pages/admin/info.md
Normal file
7
pages/admin/info.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
title: PHP Info
|
||||
|
||||
access:
|
||||
admin.settings: true
|
||||
admin.super: true
|
||||
---
|
||||
@@ -445,7 +445,7 @@ hr {
|
||||
*/
|
||||
.switch-grav {
|
||||
background-color: #fff;
|
||||
border: 1px solid #d4d4d4;
|
||||
border: 1px solid #d5d5d5;
|
||||
border-radius: 4px;
|
||||
/* Selected ON switch-light
|
||||
*/ }
|
||||
@@ -527,6 +527,8 @@ form input, form select, form textarea, form button, form .selectize-input {
|
||||
line-height: 1.7;
|
||||
border-radius: 4px;
|
||||
-webkit-font-smoothing: antialiased; }
|
||||
form .selectize-dropdown {
|
||||
z-index: 100000; }
|
||||
form .form-column > .form-field.grid {
|
||||
display: block; }
|
||||
form .form-column > .form-field.grid > .block {
|
||||
@@ -574,7 +576,7 @@ form .selectize-control.multi .selectize-input {
|
||||
border-radius: 2px;
|
||||
line-height: 1.5; }
|
||||
form .selectize-control.multi .selectize-input > div.active {
|
||||
background: #d4d4d4; }
|
||||
background: #d5d5d5; }
|
||||
form .selectize-control.single .selectize-input:after {
|
||||
right: 27px; }
|
||||
form .selectize-control.single .selectize-input.dropdown-active:after {
|
||||
@@ -584,7 +586,7 @@ form .x-small {
|
||||
form .small {
|
||||
max-width: 10rem !important; }
|
||||
form .medium {
|
||||
max-width: 20rem !important; }
|
||||
max-width: 20rem; }
|
||||
form .medium textarea {
|
||||
height: 7rem; }
|
||||
form .large {
|
||||
@@ -593,7 +595,7 @@ form .large {
|
||||
height: 10rem; }
|
||||
form select {
|
||||
width: 100%;
|
||||
border: 1px solid #d4d4d4;
|
||||
border: 1px solid #d5d5d5;
|
||||
background: #fff;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
@@ -603,21 +605,18 @@ form select {
|
||||
margin: 0; }
|
||||
form input[type=text], form input[type=password], form input[type=email] {
|
||||
width: 100%;
|
||||
border: 1px solid #d4d4d4;
|
||||
border: 1px solid #d5d5d5;
|
||||
background: #fff; }
|
||||
form input[readonly=readonly] {
|
||||
background: #f2f2f2;
|
||||
font-weight: bold; }
|
||||
form textarea {
|
||||
width: 100%;
|
||||
border: 1px solid #d4d4d4;
|
||||
border: 1px solid #d5d5d5;
|
||||
background: #fff; }
|
||||
form .form-frontmatter-wrapper {
|
||||
border: 1px solid #d4d4d4;
|
||||
border: 1px solid #d5d5d5;
|
||||
border-radius: 4px; }
|
||||
form .switch-toggle.medium {
|
||||
width: 100%;
|
||||
width: 20rem; }
|
||||
form .switch-toggle label {
|
||||
cursor: pointer; }
|
||||
form .switch-toggle a, form .switch-toggle label {
|
||||
@@ -662,7 +661,7 @@ form .checkboxes {
|
||||
margin-right: 10px;
|
||||
position: absolute;
|
||||
background: #fff;
|
||||
border: 1px solid #d4d4d4;
|
||||
border: 1px solid #d5d5d5;
|
||||
border-radius: 4px; }
|
||||
form .checkboxes input[type=checkbox] {
|
||||
display: none; }
|
||||
@@ -679,7 +678,7 @@ form .checkboxes {
|
||||
margin-bottom: 3rem; }
|
||||
.form-frontmatter-wrapper .dragbar {
|
||||
height: 4px;
|
||||
background: #d4d4d4;
|
||||
background: #d5d5d5;
|
||||
cursor: row-resize; }
|
||||
|
||||
#frontmatter + .CodeMirror {
|
||||
@@ -694,7 +693,7 @@ form .checkboxes {
|
||||
.form-order-wrapper ul#ordering li {
|
||||
padding: 0.2rem 1rem;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #d4d4d4;
|
||||
border: 1px solid #d5d5d5;
|
||||
background: #f8f8f8;
|
||||
color: #8d959a;
|
||||
margin: 3px 0;
|
||||
@@ -718,7 +717,7 @@ form .checkboxes {
|
||||
cursor: move;
|
||||
padding: 1rem;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #d4d4d4;
|
||||
border: 1px solid #d5d5d5;
|
||||
background: #f8f8f8;
|
||||
color: #8d959a;
|
||||
margin: 3px 0;
|
||||
@@ -734,6 +733,9 @@ form .checkboxes {
|
||||
.form-list-wrapper .collection-actions {
|
||||
text-align: right; }
|
||||
|
||||
.form-label.block {
|
||||
z-index: 10000; }
|
||||
|
||||
table,
|
||||
tbody {
|
||||
display: inline-block;
|
||||
@@ -765,6 +767,20 @@ tr {
|
||||
-moz-flex-wrap: wrap;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap; }
|
||||
tr th {
|
||||
display: block;
|
||||
-webkit-box-flex: 1;
|
||||
-moz-box-flex: 1;
|
||||
box-flex: 1;
|
||||
-webkit-flex: 1;
|
||||
-moz-flex: 1;
|
||||
-ms-flex: 1;
|
||||
flex: 1;
|
||||
font-weight: bold; }
|
||||
tr th:first-child {
|
||||
padding-left: 3rem; }
|
||||
tr th:last-child {
|
||||
padding-right: 3rem; }
|
||||
tr td {
|
||||
display: block;
|
||||
-webkit-box-flex: 1;
|
||||
@@ -817,16 +833,16 @@ tr {
|
||||
background: #54c5b0;
|
||||
color: #fff; }
|
||||
.button.dropdown-toggle {
|
||||
border-left: 1px solid #3aab97; }
|
||||
border-left: 1px solid #3bab97; }
|
||||
.button.secondary {
|
||||
background: #29796b;
|
||||
background: #2a7a6b;
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
border-radius: 4px; }
|
||||
.button.secondary:hover {
|
||||
background: #2f8c7c;
|
||||
background: #318d7c;
|
||||
color: #fff; }
|
||||
.button.secondary.dropdown-toggle {
|
||||
border-left: 1px solid #2f8c7c; }
|
||||
border-left: 1px solid #318d7c; }
|
||||
|
||||
.button-group {
|
||||
position: relative;
|
||||
@@ -868,7 +884,7 @@ tr {
|
||||
background-color: #41bea8;
|
||||
-webkit-background-clip: padding-box;
|
||||
background-clip: padding-box;
|
||||
border: 1px solid #3aab97;
|
||||
border: 1px solid #3bab97;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
|
||||
@@ -926,7 +942,7 @@ tr {
|
||||
#admin-login .form-data {
|
||||
padding-right: 0; }
|
||||
#admin-login h1 {
|
||||
background: #20333e url(../images/logo.png) 50% 50% no-repeat;
|
||||
background: #21333e url(../images/logo.png) 50% 50% no-repeat;
|
||||
font-size: 0;
|
||||
color: transparent;
|
||||
height: 216px;
|
||||
@@ -942,15 +958,15 @@ tr {
|
||||
text-align: center;
|
||||
font-weight: 300;
|
||||
-webkit-font-smoothing: auto;
|
||||
border: 1px solid #1d2e38; }
|
||||
border: 1px solid #1e2e39; }
|
||||
#admin-login form input::-webkit-input-placeholder {
|
||||
color: #83949c; }
|
||||
color: #83949d; }
|
||||
#admin-login form input::-moz-placeholder {
|
||||
color: #83949c; }
|
||||
color: #83949d; }
|
||||
#admin-login form input:-moz-placeholder {
|
||||
color: #83949c; }
|
||||
color: #83949d; }
|
||||
#admin-login form input:-ms-input-placeholder {
|
||||
color: #83949c; }
|
||||
color: #83949d; }
|
||||
#admin-login form .form-actions {
|
||||
text-align: center;
|
||||
margin: 0 -3rem -3rem -3rem;
|
||||
@@ -974,7 +990,7 @@ tr {
|
||||
color: #fff; }
|
||||
|
||||
#admin-logo {
|
||||
background: #20333e;
|
||||
background: #21333e;
|
||||
height: 4.2rem; }
|
||||
#admin-logo h3 {
|
||||
text-transform: uppercase;
|
||||
@@ -988,7 +1004,7 @@ tr {
|
||||
|
||||
#admin-user-details {
|
||||
padding: 2rem;
|
||||
border-bottom: 1px solid #20333e;
|
||||
border-bottom: 1px solid #21333e;
|
||||
overflow: hidden; }
|
||||
#admin-user-details img {
|
||||
-webkit-transition: all 0.5s ease;
|
||||
@@ -1023,7 +1039,7 @@ tr {
|
||||
#admin-menu li .badges .badge {
|
||||
display: inline-block;
|
||||
margin-right: -5px;
|
||||
color: #e5e5e5; }
|
||||
color: #e6e6e6; }
|
||||
#admin-menu li .badges .count {
|
||||
background-color: #365569; }
|
||||
#admin-menu li .badges .updates {
|
||||
@@ -1052,7 +1068,7 @@ tr {
|
||||
color: #afc7d5;
|
||||
margin-right: 8px; }
|
||||
#admin-menu li a:hover {
|
||||
background: #20333e;
|
||||
background: #21333e;
|
||||
color: #fff; }
|
||||
#admin-menu li a:hover i {
|
||||
font-size: 1.2rem; }
|
||||
@@ -1067,7 +1083,10 @@ tr {
|
||||
#admin-main {
|
||||
margin-left: 20%; }
|
||||
#admin-main .hint:after, #admin-main [data-hint]:after {
|
||||
font-size: 1rem; }
|
||||
font-size: 0.9rem;
|
||||
width: 400px;
|
||||
line-height: inherit;
|
||||
white-space: normal; }
|
||||
#admin-main h1 {
|
||||
margin: 0;
|
||||
font-size: 1.5rem;
|
||||
@@ -1720,7 +1739,7 @@ body.remodal_active .remodal {
|
||||
border-radius: 0; }
|
||||
|
||||
.grav-mdeditor-navbar {
|
||||
border: 1px solid #d4d4d4;
|
||||
border: 1px solid #d5d5d5;
|
||||
border-top-right-radius: 4px;
|
||||
border-top-left-radius: 4px;
|
||||
background: #fbfbfb; }
|
||||
@@ -1739,8 +1758,8 @@ body.remodal_active .remodal {
|
||||
.grav-mdeditor-navbar ul .mdeditor-active a {
|
||||
background: white;
|
||||
cursor: auto;
|
||||
border-left: 1px solid #d4d4d4;
|
||||
border-right: 1px solid #d4d4d4; }
|
||||
border-left: 1px solid #d5d5d5;
|
||||
border-right: 1px solid #d5d5d5; }
|
||||
.grav-mdeditor-navbar ul .mdeditor-active a:hover {
|
||||
background: #fff; }
|
||||
.grav-mdeditor-navbar ul a {
|
||||
@@ -1763,7 +1782,7 @@ body.remodal_active .remodal {
|
||||
border-top-right-radius: 4px; }
|
||||
|
||||
.grav-mdeditor-content {
|
||||
border: 1px solid #d4d4d4;
|
||||
border: 1px solid #d5d5d5;
|
||||
border-top: 0;
|
||||
border-bottom-right-radius: 4px;
|
||||
border-bottom-left-radius: 4px; }
|
||||
@@ -1807,7 +1826,7 @@ body.remodal_active .remodal {
|
||||
[data-mode=split] .grav-mdeditor-button-code, [data-mode=split] .grav-mdeditor-button-preview {
|
||||
display: none; }
|
||||
[data-mode=split] .grav-mdeditor-code {
|
||||
border-right: 1px solid #d4d4d4; }
|
||||
border-right: 1px solid #d5d5d5; }
|
||||
[data-mode=split] .grav-mdeditor-code, [data-mode=split] .grav-mdeditor-code .grav-mdeditor-preview {
|
||||
float: left;
|
||||
width: 50%; }
|
||||
@@ -1903,7 +1922,7 @@ body.remodal_active .remodal {
|
||||
|
||||
.dropzone {
|
||||
position: relative;
|
||||
border: 1px #d4d4d4 solid;
|
||||
border: 1px #d5d5d5 solid;
|
||||
border-radius: 4px;
|
||||
min-height: 4rem;
|
||||
background: #fff; }
|
||||
@@ -2292,4 +2311,26 @@ button.toast-close-button {
|
||||
color: #a2a2a2;
|
||||
font-weight: normal; }
|
||||
|
||||
#phpinfo img {
|
||||
display: none; }
|
||||
#phpinfo table {
|
||||
margin: 1rem 0 0; }
|
||||
#phpinfo tr:hover {
|
||||
background: transparent; }
|
||||
#phpinfo th {
|
||||
background: #d9d9d9; }
|
||||
#phpinfo td {
|
||||
word-wrap: break-word; }
|
||||
#phpinfo td h1 {
|
||||
margin: 0rem -3rem 0rem !important; }
|
||||
#phpinfo td:first-child {
|
||||
color: #349886; }
|
||||
#phpinfo hr {
|
||||
border-bottom: 0; }
|
||||
#phpinfo h1 {
|
||||
font-size: 2.3rem; }
|
||||
#phpinfo h2 {
|
||||
font-size: 1.7rem;
|
||||
margin: 3rem 3rem 0rem !important; }
|
||||
|
||||
/*# sourceMappingURL=template.css.map */
|
||||
|
||||
File diff suppressed because one or more lines are too long
6
themes/grav/css/hint.base.min.css
vendored
6
themes/grav/css/hint.base.min.css
vendored
@@ -1,5 +1,5 @@
|
||||
/*! Hint.css (base version) - v1.3.3 - 2014-07-06
|
||||
/*! Hint.css (base version) - v1.3.5 - 2015-06-16
|
||||
* http://kushagragour.in/lab/hint/
|
||||
* Copyright (c) 2014 Kushagra Gour; Licensed MIT */
|
||||
* Copyright (c) 2015 Kushagra Gour; Licensed MIT */
|
||||
|
||||
.hint,[data-hint]{position:relative;display:inline-block}.hint:before,.hint:after,[data-hint]:before,[data-hint]:after{position:absolute;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0);visibility:hidden;opacity:0;z-index:1000000;pointer-events:none;-webkit-transition:.3s ease;-moz-transition:.3s ease;transition:.3s ease;-webkit-transition-delay:0ms;-moz-transition-delay:0ms;transition-delay:0ms}.hint:hover:before,.hint:hover:after,.hint:focus:before,.hint:focus:after,[data-hint]:hover:before,[data-hint]:hover:after,[data-hint]:focus:before,[data-hint]:focus:after{visibility:visible;opacity:1}.hint:hover:before,.hint:hover:after,[data-hint]:hover:before,[data-hint]:hover:after{-webkit-transition-delay:100ms;-moz-transition-delay:100ms;transition-delay:100ms}.hint:before,[data-hint]:before{content:'';position:absolute;background:transparent;border:6px solid transparent;z-index:1000001}.hint:after,[data-hint]:after{content:attr(data-hint);background:#383838;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap}.hint--top:before{border-top-color:#383838}.hint--bottom:before{border-bottom-color:#383838}.hint--left:before{border-left-color:#383838}.hint--right:before{border-right-color:#383838}.hint--top:before{margin-bottom:-12px}.hint--top:after{margin-left:-18px}.hint--top:before,.hint--top:after{bottom:100%;left:50%}.hint--top:hover:after,.hint--top:hover:before,.hint--top:focus:after,.hint--top:focus:before{-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);transform:translateY(-8px)}.hint--bottom:before{margin-top:-12px}.hint--bottom:after{margin-left:-18px}.hint--bottom:before,.hint--bottom:after{top:100%;left:50%}.hint--bottom:hover:after,.hint--bottom:hover:before,.hint--bottom:focus:after,.hint--bottom:focus:before{-webkit-transform:translateY(8px);-moz-transform:translateY(8px);transform:translateY(8px)}.hint--right:before{margin-left:-12px;margin-bottom:-6px}.hint--right:after{margin-bottom:-14px}.hint--right:before,.hint--right:after{left:100%;bottom:50%}.hint--right:hover:after,.hint--right:hover:before,.hint--right:focus:after,.hint--right:focus:before{-webkit-transform:translateX(8px);-moz-transform:translateX(8px);transform:translateX(8px)}.hint--left:before{margin-right:-12px;margin-bottom:-6px}.hint--left:after{margin-bottom:-14px}.hint--left:before,.hint--left:after{right:100%;bottom:50%}.hint--left:hover:after,.hint--left:hover:before,.hint--left:focus:after,.hint--left:focus:before{-webkit-transform:translateX(-8px);-moz-transform:translateX(-8px);transform:translateX(-8px)}.hint--always:after,.hint--always:before{opacity:1;visibility:visible}.hint--always.hint--top:after,.hint--always.hint--top:before{-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);transform:translateY(-8px)}.hint--always.hint--bottom:after,.hint--always.hint--bottom:before{-webkit-transform:translateY(8px);-moz-transform:translateY(8px);transform:translateY(8px)}.hint--always.hint--left:after,.hint--always.hint--left:before{-webkit-transform:translateX(-8px);-moz-transform:translateX(-8px);transform:translateX(-8px)}.hint--always.hint--right:after,.hint--always.hint--right:before{-webkit-transform:translateX(8px);-moz-transform:translateX(8px);transform:translateX(8px)}
|
||||
.hint--bottom:after,.hint--top:after{margin-left:-18px}.hint,[data-hint]{position:relative;display:inline-block}.hint:after,.hint:before,[data-hint]:after,[data-hint]:before{position:absolute;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0);visibility:hidden;opacity:0;z-index:1000000;pointer-events:none;-webkit-transition:.3s ease;-moz-transition:.3s ease;transition:.3s ease;-webkit-transition-delay:0ms;-moz-transition-delay:0ms;transition-delay:0ms}.hint--always:after,.hint--always:before,.hint:focus:after,.hint:focus:before,.hint:hover:after,.hint:hover:before,[data-hint]:focus:after,[data-hint]:focus:before,[data-hint]:hover:after,[data-hint]:hover:before{opacity:1;visibility:visible}.hint:hover:after,.hint:hover:before,[data-hint]:hover:after,[data-hint]:hover:before{-webkit-transition-delay:100ms;-moz-transition-delay:100ms;transition-delay:100ms}.hint:before,[data-hint]:before{content:'';position:absolute;background:0 0;border:6px solid transparent;z-index:1000001}.hint:after,[data-hint]:after{content:attr(data-hint);background:#383838;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap}.hint--top:before{border-top-color:#383838;margin-bottom:-12px}.hint--bottom:before{border-bottom-color:#383838;margin-top:-12px}.hint--top:after,.hint--top:before{bottom:100%;left:50%}.hint--top:focus:after,.hint--top:focus:before,.hint--top:hover:after,.hint--top:hover:before{-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);transform:translateY(-8px)}.hint--bottom:after,.hint--bottom:before{top:100%;left:50%}.hint--bottom:focus:after,.hint--bottom:focus:before,.hint--bottom:hover:after,.hint--bottom:hover:before{-webkit-transform:translateY(8px);-moz-transform:translateY(8px);transform:translateY(8px)}.hint--right:before{border-right-color:#383838;margin-left:-12px;margin-bottom:-6px}.hint--right:after{margin-bottom:-14px}.hint--right:after,.hint--right:before{left:100%;bottom:50%}.hint--right:focus:after,.hint--right:focus:before,.hint--right:hover:after,.hint--right:hover:before{-webkit-transform:translateX(8px);-moz-transform:translateX(8px);transform:translateX(8px)}.hint--left:before{border-left-color:#383838;margin-right:-12px;margin-bottom:-6px}.hint--left:after{margin-bottom:-14px}.hint--left:after,.hint--left:before{right:100%;bottom:50%}.hint--left:focus:after,.hint--left:focus:before,.hint--left:hover:after,.hint--left:hover:before{-webkit-transform:translateX(-8px);-moz-transform:translateX(-8px);transform:translateX(-8px)}.hint--always.hint--top:after,.hint--always.hint--top:before{-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);transform:translateY(-8px)}.hint--always.hint--bottom:after,.hint--always.hint--bottom:before{-webkit-transform:translateY(8px);-moz-transform:translateY(8px);transform:translateY(8px)}.hint--always.hint--left:after,.hint--always.hint--left:before{-webkit-transform:translateX(-8px);-moz-transform:translateX(-8px);transform:translateX(-8px)}.hint--always.hint--right:after,.hint--always.hint--right:before{-webkit-transform:translateX(8px);-moz-transform:translateX(8px);transform:translateX(8px)}
|
||||
@@ -72,6 +72,9 @@
|
||||
// GPM
|
||||
@import "template/gpm";
|
||||
|
||||
// PHPInfo
|
||||
@import "template/phpinfo";
|
||||
|
||||
// Custom
|
||||
@import "template/custom";
|
||||
|
||||
|
||||
@@ -169,7 +169,10 @@ $update-height: 3rem;
|
||||
margin-left: $sidebar-width;
|
||||
|
||||
.hint:after, [data-hint]:after {
|
||||
font-size: 1rem;
|
||||
font-size: 0.9rem;
|
||||
width: 400px;
|
||||
line-height: inherit;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
h1 {
|
||||
|
||||
@@ -97,6 +97,10 @@ form {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
.selectize-dropdown {
|
||||
z-index: 100000;
|
||||
}
|
||||
|
||||
// override horizontal layout
|
||||
.form-column {
|
||||
> .form-field.grid {
|
||||
@@ -195,7 +199,7 @@ form {
|
||||
|
||||
.medium {
|
||||
|
||||
max-width: 20rem !important;
|
||||
max-width: 20rem;
|
||||
|
||||
textarea {
|
||||
height: 7rem;
|
||||
@@ -270,11 +274,6 @@ form {
|
||||
.switch-toggle {
|
||||
// margin-left: 30%;
|
||||
|
||||
&.medium {
|
||||
width: 100%;
|
||||
width: 20rem;
|
||||
}
|
||||
|
||||
label {
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -300,7 +299,7 @@ form {
|
||||
line-height: 1.7;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
&.array-field-value_only {
|
||||
width: 100%;
|
||||
}
|
||||
@@ -454,5 +453,6 @@ form {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.form-label.block {
|
||||
z-index: 10000;
|
||||
}
|
||||
|
||||
42
themes/grav/scss/template/_phpinfo.scss
Normal file
42
themes/grav/scss/template/_phpinfo.scss
Normal file
@@ -0,0 +1,42 @@
|
||||
#phpinfo {
|
||||
img { display: none;}
|
||||
|
||||
table {
|
||||
margin: 1rem 0 0;
|
||||
}
|
||||
|
||||
tr {
|
||||
&:hover {
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
th {
|
||||
background: #d9d9d9;
|
||||
}
|
||||
|
||||
td {
|
||||
word-wrap: break-word;
|
||||
|
||||
h1 {
|
||||
margin: 0rem (- $padding-default) 0rem !important;
|
||||
}
|
||||
&:first-child {
|
||||
color: $secondary-accent-bg;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
hr {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2.3rem;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.7rem;
|
||||
margin: 3rem ($padding-default) 0rem !important;
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,20 @@ tr {
|
||||
@include display(flex);
|
||||
@include flex-wrap(wrap);
|
||||
|
||||
th {
|
||||
display: block;
|
||||
@include flex(1);
|
||||
font-weight: bold;
|
||||
|
||||
&:first-child {
|
||||
padding-left: $padding-default;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
padding-right: $padding-default;
|
||||
}
|
||||
}
|
||||
|
||||
td {
|
||||
display: block;
|
||||
@include flex(1);
|
||||
|
||||
23
themes/grav/templates/info.html.twig
Normal file
23
themes/grav/templates/info.html.twig
Normal file
@@ -0,0 +1,23 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
|
||||
{% block titlebar %}
|
||||
<div class="button-bar">
|
||||
<a class="button" href="{{ base_url }}"><i class="fa fa-reply"></i> Back</a>
|
||||
</div>
|
||||
<h1><i class="fa fa-fw fa-th"></i> Configuration - PHP Info</h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block content_top %}
|
||||
<ul class="tab-bar">
|
||||
<li><a href="{{ base_url_relative }}/system">System</a></li>
|
||||
<li><a href="{{ base_url_relative }}/site">Site</a></li>
|
||||
<li class="active"><span>Info</span></li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="phpinfo">
|
||||
{{ admin.phpinfo }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
<li class="{{ (location == 'dashboard') ? 'selected' : '' }}">
|
||||
<a href="{{ base_url_relative }}"><i class="fa fa-fw fa-th"></i> {{ "PLUGIN_ADMIN_DASHBOARD"|t }}</a>
|
||||
</li>
|
||||
<li class="{{ (location == 'configuration' or location == 'settings') ? 'selected' : '' }}">
|
||||
<a href="{{ base_url_relative }}/configuration"><i class="fa fa-fw fa-wrench"></i> {{ "PLUGIN_ADMIN_CONFIGURATION"|t }}</a>
|
||||
<li class="{{ (location == 'system' or location == 'site') ? 'selected' : '' }}">
|
||||
<a href="{{ base_url_relative }}/system"><i class="fa fa-fw fa-wrench"></i> {{ "PLUGIN_ADMIN_CONFIGURATION"|t }}</a>
|
||||
</li>
|
||||
<li class="{{ (location == 'pages') ? 'selected' : '' }}">
|
||||
<a href="{{ base_url_relative }}/pages">
|
||||
|
||||
@@ -10,8 +10,9 @@
|
||||
|
||||
{% block content_top %}
|
||||
<ul class="tab-bar">
|
||||
<li><a href="{{ base_url_relative }}/configuration/">System</a></li>
|
||||
<li><a href="{{ base_url_relative }}/system">System</a></li>
|
||||
<li class="active"><span>Site</span></li>
|
||||
<li><a href="{{ base_url_relative }}/info">Info</a></li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
{% block content_top %}
|
||||
<ul class="tab-bar">
|
||||
<li class="active"><span>System</span></li>
|
||||
<li><a href="{{ base_url_relative }}/settings/">Site</a></li>
|
||||
<li><a href="{{ base_url_relative }}/site">Site</a></li>
|
||||
<li><a href="{{ base_url_relative }}/info">Info</a></li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user