mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-10-28 16:56:36 +01:00
renamed Whitebox to WhiteLabel
This commit is contained in:
24
admin.php
24
admin.php
@@ -29,7 +29,7 @@ use Grav\Plugin\Admin\Router;
|
|||||||
use Grav\Plugin\Admin\Themes;
|
use Grav\Plugin\Admin\Themes;
|
||||||
use Grav\Plugin\Admin\AdminController;
|
use Grav\Plugin\Admin\AdminController;
|
||||||
use Grav\Plugin\Admin\Twig\AdminTwigExtension;
|
use Grav\Plugin\Admin\Twig\AdminTwigExtension;
|
||||||
use Grav\Plugin\Admin\Whitebox;
|
use Grav\Plugin\Admin\WhiteLabel;
|
||||||
use Grav\Plugin\Form\Form;
|
use Grav\Plugin\Form\Form;
|
||||||
use Grav\Plugin\Login\Login;
|
use Grav\Plugin\Login\Login;
|
||||||
use Pimple\Container;
|
use Pimple\Container;
|
||||||
@@ -250,8 +250,8 @@ class AdminPlugin extends Plugin
|
|||||||
return new Themes($this->grav);
|
return new Themes($this->grav);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Initialize whitebox functionality
|
// Initialize white label functionality
|
||||||
$this->grav['admin-whitebox'] = new Whitebox();
|
$this->grav['admin-whitelabel'] = new WhiteLabel();
|
||||||
}
|
}
|
||||||
|
|
||||||
// We need popularity no matter what
|
// We need popularity no matter what
|
||||||
@@ -291,7 +291,7 @@ class AdminPlugin extends Plugin
|
|||||||
|
|
||||||
if ($obj instanceof Data && $obj->blueprints()->getFilename() === 'admin/blueprints') {
|
if ($obj instanceof Data && $obj->blueprints()->getFilename() === 'admin/blueprints') {
|
||||||
|
|
||||||
[$status, $msg] = $this->grav['admin-whitebox']->compileScss($obj);
|
[$status, $msg] = $this->grav['admin-whitelabel']->compileScss($obj);
|
||||||
if (!$status) {
|
if (!$status) {
|
||||||
$this->grav['messages']->add($msg, 'error');
|
$this->grav['messages']->add($msg, 'error');
|
||||||
}
|
}
|
||||||
@@ -618,7 +618,7 @@ class AdminPlugin extends Plugin
|
|||||||
$preset_css = 'asset://admin-preset.css';
|
$preset_css = 'asset://admin-preset.css';
|
||||||
$preset_path = $this->grav['locator']->findResource($preset_css);
|
$preset_path = $this->grav['locator']->findResource($preset_css);
|
||||||
if (!$preset_path) {
|
if (!$preset_path) {
|
||||||
$this->grav['admin-whitebox']->compileScss($this->config->get('plugins.admin.whitebox'));
|
$this->grav['admin-whitelabel']->compileScss($this->config->get('plugins.admin.whitelabel'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -663,12 +663,12 @@ class AdminPlugin extends Plugin
|
|||||||
$twig->twig_vars['logviewer'] = new LogViewer();
|
$twig->twig_vars['logviewer'] = new LogViewer();
|
||||||
$twig->twig_vars['form_max_filesize'] = Utils::getUploadLimit() / 1024 / 1024;
|
$twig->twig_vars['form_max_filesize'] = Utils::getUploadLimit() / 1024 / 1024;
|
||||||
|
|
||||||
// Start whitebox functionality
|
// Start white label functionality
|
||||||
$twig->twig_vars['whitebox_presets'] = $this->getPresets();
|
$twig->twig_vars['whitelabel_presets'] = $this->getPresets();
|
||||||
|
|
||||||
$custom_logo = $this->config->get('plugins.admin.whitebox.logo_custom', false);
|
$custom_logo = $this->config->get('plugins.admin.whitelabel.logo_custom', false);
|
||||||
$custom_login_logo = $this->config->get('plugins.admin.whitebox.logo_login', false);
|
$custom_login_logo = $this->config->get('plugins.admin.whitelabel.logo_login', false);
|
||||||
$custom_footer = $this->config->get('plugins.admin.whitebox.custom_footer', false);
|
$custom_footer = $this->config->get('plugins.admin.whitelabel.custom_footer', false);
|
||||||
|
|
||||||
if ($custom_logo && is_array($custom_logo)) {
|
if ($custom_logo && is_array($custom_logo)) {
|
||||||
$custom_logo = array_keys($custom_logo);
|
$custom_logo = array_keys($custom_logo);
|
||||||
@@ -687,12 +687,12 @@ class AdminPlugin extends Plugin
|
|||||||
$twig->twig_vars['custom_admin_footer'] = $footer;
|
$twig->twig_vars['custom_admin_footer'] = $footer;
|
||||||
}
|
}
|
||||||
|
|
||||||
$custom_css = $this->config->get('plugins.admin.whitebox.custom_css', false);
|
$custom_css = $this->config->get('plugins.admin.whitelabel.custom_css', false);
|
||||||
|
|
||||||
if ($custom_css) {
|
if ($custom_css) {
|
||||||
$this->grav['assets']->addInlineCss($custom_css);
|
$this->grav['assets']->addInlineCss($custom_css);
|
||||||
}
|
}
|
||||||
// End Whitebox functionality
|
// End white label functionality
|
||||||
|
|
||||||
$fa_icons_file = CompiledYamlFile::instance($this->grav['locator']->findResource('plugin://admin/themes/grav/templates/forms/fields/iconpicker/icons' . YAML_EXT));
|
$fa_icons_file = CompiledYamlFile::instance($this->grav['locator']->findResource('plugin://admin/themes/grav/templates/forms/fields/iconpicker/icons' . YAML_EXT));
|
||||||
$fa_icons = $fa_icons_file->content();
|
$fa_icons = $fa_icons_file->content();
|
||||||
|
|||||||
52
admin.yaml
52
admin.yaml
@@ -45,41 +45,41 @@ popularity:
|
|||||||
daily: 30
|
daily: 30
|
||||||
monthly: 12
|
monthly: 12
|
||||||
visitors: 20
|
visitors: 20
|
||||||
whitebox:
|
whitelabel:
|
||||||
logo_custom:
|
logo_custom:
|
||||||
logo_login:
|
logo_login:
|
||||||
color_scheme:
|
color_scheme:
|
||||||
accents:
|
accents:
|
||||||
primary-accent: 'button'
|
primary-accent: button
|
||||||
secondary-accent: 'notice'
|
secondary-accent: notice
|
||||||
tertiary-accent: 'critical'
|
tertiary-accent: critical
|
||||||
colors:
|
colors:
|
||||||
logo-bg: '#1e333e'
|
logo-bg: '#323640'
|
||||||
logo-link: '#ffffff'
|
logo-link: '#FFFFFF'
|
||||||
nav-bg: '#253a47'
|
nav-bg: '#3D424E'
|
||||||
nav-text: '#afc7d5'
|
nav-text: '#B7B9BD'
|
||||||
nav-link: '#d1dee7'
|
nav-link: '#ffffff'
|
||||||
nav-selected-bg: '#2d4d5b'
|
nav-selected-bg: '#323640'
|
||||||
nav-selected-link: '#ffffff'
|
nav-selected-link: '#ffffff'
|
||||||
nav-hover-bg: '#1e333e'
|
nav-hover-bg: '#434753'
|
||||||
nav-hover-link: '#ffffff'
|
nav-hover-link: '#ffffff'
|
||||||
toolbar-bg: '#349886'
|
toolbar-bg: '#ffffff'
|
||||||
toolbar-text: '#ffffff'
|
toolbar-text: '#3D424E'
|
||||||
page-bg: '#314d5b'
|
page-bg: '#F6F6F6'
|
||||||
page-text: '#81a5b5'
|
page-text: '#6f7b8a'
|
||||||
page-link: '#aad9ed'
|
page-link: '#0090D9'
|
||||||
content-bg: '#eeeeee'
|
content-bg: '#ffffff'
|
||||||
content-text: '#737c81'
|
content-text: '#6f7b8a'
|
||||||
content-link: '#0082ba'
|
content-link: '#0090D9'
|
||||||
content-link2: '#da4b46'
|
content-link2: '#da4b46'
|
||||||
content-header: '#314d5b'
|
content-header: '#414147'
|
||||||
content-tabs-bg: '#223a47'
|
content-tabs-bg: '#e3e3e3'
|
||||||
content-tabs-text: '#d1dee7'
|
content-tabs-text: '#808080'
|
||||||
button-bg: '#41bea8'
|
button-bg: '#0090D9'
|
||||||
button-text: '#ffffff'
|
button-text: '#ffffff'
|
||||||
notice-bg: '#00a6cf'
|
notice-bg: '#06A599'
|
||||||
notice-text: '#ffffff'
|
notice-text: '#ffffff'
|
||||||
update-bg: '#8f5aad'
|
update-bg: '#77559D'
|
||||||
update-text: '#ffffff'
|
update-text: '#ffffff'
|
||||||
critical-bg: '#da4b46'
|
critical-bg: '#F45857'
|
||||||
critical-text: '#ffffff'
|
critical-text: '#ffffff'
|
||||||
|
|||||||
@@ -356,26 +356,26 @@ form:
|
|||||||
title: Customization
|
title: Customization
|
||||||
|
|
||||||
fields:
|
fields:
|
||||||
whitebox.logos:
|
whitelabel.logos:
|
||||||
type: section
|
type: section
|
||||||
underline: true
|
underline: true
|
||||||
title: PLUGIN_ADMIN.LOGOS
|
title: PLUGIN_ADMIN.LOGOS
|
||||||
|
|
||||||
whitebox.logo_login:
|
whitelabel.logo_login:
|
||||||
type: file
|
type: file
|
||||||
label: PLUGIN_ADMIN.LOGIN_SCREEN_CUSTOM_LOGO_LABEL
|
label: PLUGIN_ADMIN.LOGIN_SCREEN_CUSTOM_LOGO_LABEL
|
||||||
destination: 'user/plugins/admin/assets'
|
destination: 'user/plugins/admin/assets'
|
||||||
accept:
|
accept:
|
||||||
- image/*
|
- image/*
|
||||||
|
|
||||||
whitebox.logo_custom:
|
whitelabel.logo_custom:
|
||||||
type: file
|
type: file
|
||||||
label: PLUGIN_ADMIN.TOP_LEFT_CUSTOM_LOGO_LABEL
|
label: PLUGIN_ADMIN.TOP_LEFT_CUSTOM_LOGO_LABEL
|
||||||
destination: 'user/plugins/admin/assets'
|
destination: 'user/plugins/admin/assets'
|
||||||
accept:
|
accept:
|
||||||
- image/*
|
- image/*
|
||||||
|
|
||||||
whitebox.customization:
|
whitelabel.customization:
|
||||||
type: section
|
type: section
|
||||||
underline: true
|
underline: true
|
||||||
title: PLUGIN_ADMIN.CUSTOMIZATION
|
title: PLUGIN_ADMIN.CUSTOMIZATION
|
||||||
@@ -393,152 +393,152 @@ form:
|
|||||||
help: PLUGIN_ADMIN.COLOR_SCHEME_HELP
|
help: PLUGIN_ADMIN.COLOR_SCHEME_HELP
|
||||||
|
|
||||||
fields:
|
fields:
|
||||||
whitebox.color_scheme.colors.logo-bg:
|
whitelabel.color_scheme.colors.logo-bg:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#1e333e'
|
default: '#1e333e'
|
||||||
help: "Logo bg"
|
help: "Logo bg"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.logo-link:
|
whitelabel.color_scheme.colors.logo-link:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#ffffff'
|
default: '#ffffff'
|
||||||
help: "Logo link"
|
help: "Logo link"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.nav-bg:
|
whitelabel.color_scheme.colors.nav-bg:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#253a47'
|
default: '#253a47'
|
||||||
help: "Nav bg"
|
help: "Nav bg"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.nav-text:
|
whitelabel.color_scheme.colors.nav-text:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#afc7d5'
|
default: '#afc7d5'
|
||||||
help: "Nav text"
|
help: "Nav text"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.nav-link:
|
whitelabel.color_scheme.colors.nav-link:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#d1dee7'
|
default: '#d1dee7'
|
||||||
help: "Nav link"
|
help: "Nav link"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.nav-selected-bg:
|
whitelabel.color_scheme.colors.nav-selected-bg:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#2d4d5b'
|
default: '#2d4d5b'
|
||||||
help: "Nav selected bg"
|
help: "Nav selected bg"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.nav-selected-link:
|
whitelabel.color_scheme.colors.nav-selected-link:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#ffffff'
|
default: '#ffffff'
|
||||||
help: "Nav selected link"
|
help: "Nav selected link"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.nav-hover-bg:
|
whitelabel.color_scheme.colors.nav-hover-bg:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#1e333e'
|
default: '#1e333e'
|
||||||
help: "Nav hover bg"
|
help: "Nav hover bg"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.nav-hover-link:
|
whitelabel.color_scheme.colors.nav-hover-link:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#ffffff'
|
default: '#ffffff'
|
||||||
help: "Nav hover link"
|
help: "Nav hover link"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.toolbar-bg:
|
whitelabel.color_scheme.colors.toolbar-bg:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#349886'
|
default: '#349886'
|
||||||
help: "Toolbar bg"
|
help: "Toolbar bg"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.toolbar-text:
|
whitelabel.color_scheme.colors.toolbar-text:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#ffffff'
|
default: '#ffffff'
|
||||||
help: "Toolbar text"
|
help: "Toolbar text"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.page-bg:
|
whitelabel.color_scheme.colors.page-bg:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#314d5b'
|
default: '#314d5b'
|
||||||
help: "Page bg"
|
help: "Page bg"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.page-text:
|
whitelabel.color_scheme.colors.page-text:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#81a5b5'
|
default: '#81a5b5'
|
||||||
help: "Page text"
|
help: "Page text"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.page-link:
|
whitelabel.color_scheme.colors.page-link:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#aad9ed'
|
default: '#aad9ed'
|
||||||
help: "Page link"
|
help: "Page link"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.content-bg:
|
whitelabel.color_scheme.colors.content-bg:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#eeeeee'
|
default: '#eeeeee'
|
||||||
help: "Content bg"
|
help: "Content bg"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.content-text:
|
whitelabel.color_scheme.colors.content-text:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#737c81'
|
default: '#737c81'
|
||||||
help: "Content text"
|
help: "Content text"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.content-link:
|
whitelabel.color_scheme.colors.content-link:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#0082ba'
|
default: '#0082ba'
|
||||||
help: "Content link"
|
help: "Content link"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.content-link2:
|
whitelabel.color_scheme.colors.content-link2:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#da4b46'
|
default: '#da4b46'
|
||||||
help: "Content link 2"
|
help: "Content link 2"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.content-header:
|
whitelabel.color_scheme.colors.content-header:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#314d5b'
|
default: '#314d5b'
|
||||||
help: "Content header"
|
help: "Content header"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.content-tabs-bg:
|
whitelabel.color_scheme.colors.content-tabs-bg:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#223a47'
|
default: '#223a47'
|
||||||
help: "Content tabs bg"
|
help: "Content tabs bg"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.content-tabs-text:
|
whitelabel.color_scheme.colors.content-tabs-text:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#d1dee7'
|
default: '#d1dee7'
|
||||||
help: "Content tabs text"
|
help: "Content tabs text"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.button-bg:
|
whitelabel.color_scheme.colors.button-bg:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#41bea8'
|
default: '#41bea8'
|
||||||
help: "Button bg"
|
help: "Button bg"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.button-text:
|
whitelabel.color_scheme.colors.button-text:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#ffffff'
|
default: '#ffffff'
|
||||||
help: "Button text"
|
help: "Button text"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.notice-bg:
|
whitelabel.color_scheme.colors.notice-bg:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#00a6cf'
|
default: '#00a6cf'
|
||||||
help: "Notice bg"
|
help: "Notice bg"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.notice-text:
|
whitelabel.color_scheme.colors.notice-text:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#ffffff'
|
default: '#ffffff'
|
||||||
help: "Notice text"
|
help: "Notice text"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.update-bg:
|
whitelabel.color_scheme.colors.update-bg:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#8f5aad'
|
default: '#8f5aad'
|
||||||
help: "Updates bg"
|
help: "Updates bg"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.update-text:
|
whitelabel.color_scheme.colors.update-text:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#ffffff'
|
default: '#ffffff'
|
||||||
help: "Updates text"
|
help: "Updates text"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.critical-bg:
|
whitelabel.color_scheme.colors.critical-bg:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#da4b46'
|
default: '#da4b46'
|
||||||
help: "Critical bg"
|
help: "Critical bg"
|
||||||
|
|
||||||
whitebox.color_scheme.colors.critical-text:
|
whitelabel.color_scheme.colors.critical-text:
|
||||||
type: colorscheme.color
|
type: colorscheme.color
|
||||||
default: '#ffffff'
|
default: '#ffffff'
|
||||||
help: "Critical text"
|
help: "Critical text"
|
||||||
|
|
||||||
whitebox.color_scheme.accents.primary-accent:
|
whitelabel.color_scheme.accents.primary-accent:
|
||||||
type: select
|
type: select
|
||||||
size: meidum
|
size: meidum
|
||||||
classes: fancy
|
classes: fancy
|
||||||
@@ -556,7 +556,7 @@ form:
|
|||||||
toolbar: 'Toolbar colors'
|
toolbar: 'Toolbar colors'
|
||||||
update: 'Update colors'
|
update: 'Update colors'
|
||||||
|
|
||||||
whitebox.color_scheme.accents.secondary-accent:
|
whitelabel.color_scheme.accents.secondary-accent:
|
||||||
type: select
|
type: select
|
||||||
size: meidum
|
size: meidum
|
||||||
classes: fancy
|
classes: fancy
|
||||||
@@ -574,7 +574,7 @@ form:
|
|||||||
toolbar: 'Toolbar colors'
|
toolbar: 'Toolbar colors'
|
||||||
update: 'Update colors'
|
update: 'Update colors'
|
||||||
|
|
||||||
whitebox.color_scheme.accents.tertiary-accent:
|
whitelabel.color_scheme.accents.tertiary-accent:
|
||||||
type: select
|
type: select
|
||||||
size: meidum
|
size: meidum
|
||||||
classes: fancy
|
classes: fancy
|
||||||
@@ -592,7 +592,7 @@ form:
|
|||||||
toolbar: 'Toolbar colors'
|
toolbar: 'Toolbar colors'
|
||||||
update: 'Update colors'
|
update: 'Update colors'
|
||||||
|
|
||||||
whitebox.custom_footer:
|
whitelabel.custom_footer:
|
||||||
type: textarea
|
type: textarea
|
||||||
rows: 2
|
rows: 2
|
||||||
label: PLUGIN_ADMIN.CUSTOM_FOOTER
|
label: PLUGIN_ADMIN.CUSTOM_FOOTER
|
||||||
@@ -600,7 +600,7 @@ form:
|
|||||||
placeholder: Enter HTML/Markdown to override default footer
|
placeholder: Enter HTML/Markdown to override default footer
|
||||||
|
|
||||||
|
|
||||||
whitebox.custom_css:
|
whitelabel.custom_css:
|
||||||
type: textarea
|
type: textarea
|
||||||
rows: 10
|
rows: 10
|
||||||
label: PLUGIN_ADMIN.CUSTOM_CSS_LABEL
|
label: PLUGIN_ADMIN.CUSTOM_CSS_LABEL
|
||||||
|
|||||||
@@ -2164,7 +2164,7 @@ class AdminController extends AdminBaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$preview = $this->data['preview'] ?? false;
|
$preview = $this->data['preview'] ?? false;
|
||||||
$data = ['color_scheme' => $this->data['whitebox']['color_scheme'] ?? null];
|
$data = ['color_scheme' => $this->data['whitelabel']['color_scheme'] ?? null];
|
||||||
$output_file = $preview ? 'admin-preset.css' : 'admin-preset__tmp.css';
|
$output_file = $preview ? 'admin-preset.css' : 'admin-preset__tmp.css';
|
||||||
|
|
||||||
$options = [
|
$options = [
|
||||||
@@ -2172,7 +2172,7 @@ class AdminController extends AdminBaseController
|
|||||||
'output' => 'asset://' .$output_file
|
'output' => 'asset://' .$output_file
|
||||||
];
|
];
|
||||||
|
|
||||||
[$compile_status, $msg] = $this->grav['admin-whitebox']->compileScss($data, $options);
|
[$compile_status, $msg] = $this->grav['admin-whitelabel']->compileScss($data, $options);
|
||||||
|
|
||||||
$json_response = [
|
$json_response = [
|
||||||
'status' => $compile_status ? 'success' : 'error',
|
'status' => $compile_status ? 'success' : 'error',
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ namespace Grav\Plugin\Admin;
|
|||||||
use Grav\Common\Grav;
|
use Grav\Common\Grav;
|
||||||
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
|
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
|
||||||
|
|
||||||
class Whitebox
|
class WhiteLabel
|
||||||
{
|
{
|
||||||
protected $grav;
|
protected $grav;
|
||||||
protected $scss;
|
protected $scss;
|
||||||
@@ -23,7 +23,7 @@ class Whitebox
|
|||||||
if (is_array($config)) {
|
if (is_array($config)) {
|
||||||
$color_scheme = $config['color_scheme'];
|
$color_scheme = $config['color_scheme'];
|
||||||
} else {
|
} else {
|
||||||
$color_scheme = $config->get('whitebox.color_scheme');
|
$color_scheme = $config->get('whitelabel.color_scheme');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($color_scheme) {
|
if ($color_scheme) {
|
||||||
3
themes/grav/css-compiled/preset.css
vendored
Normal file
3
themes/grav/css-compiled/preset.css
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -96,8 +96,8 @@
|
|||||||
// Tools
|
// Tools
|
||||||
@import "template/tools";
|
@import "template/tools";
|
||||||
|
|
||||||
// Whitebox
|
// Whitelabel
|
||||||
@import "template/whitebox";
|
@import "template/whitelabel";
|
||||||
|
|
||||||
// Custom
|
// Custom
|
||||||
@import "template/custom";
|
@import "template/custom";
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% extends "forms/field.html.twig" %}
|
{% extends "forms/field.html.twig" %}
|
||||||
|
|
||||||
{% block input %}
|
{% block input %}
|
||||||
{% for id,preset in whitebox_presets %}
|
{% for id,preset in whitelabel_presets %}
|
||||||
<style>
|
<style>
|
||||||
.pid-{{ id }} .admin-preview {
|
.pid-{{ id }} .admin-preview {
|
||||||
background: {{ preset.colors['page-bg'] }};
|
background: {{ preset.colors['page-bg'] }};
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
<button data-preview-scss class="button"><i class="fa fa-fw fa-eye"></i> {{ "PLUGIN_ADMIN_WHITEBOX.PREVIEW"|tu|e }}</button>
|
<button data-preview-scss class="button"><i class="fa fa-fw fa-eye"></i> {{ "PLUGIN_ADMIN.PREVIEW"|tu|e }}</button>
|
||||||
<button data-recompile-scss class="button"><i class="fa fa-fw fa-tasks"></i> {{ "PLUGIN_ADMIN_WHITEBOX.RECOMPILE"|tu|e }}</button>
|
<button data-recompile-scss class="button"><i class="fa fa-fw fa-tasks"></i> {{ "PLUGIN_ADMIN.RECOMPILE"|tu|e }}</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user