mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-05 04:46:03 +01:00
Moved CSS preset compile
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
# v1.10.13
|
||||||
|
## mm/dd/2021
|
||||||
|
|
||||||
|
1. [](#bugfix)
|
||||||
|
* Moved preset CSS compile to earlier in the process to ensure compilation happens in time.
|
||||||
|
|
||||||
# v1.10.12
|
# v1.10.12
|
||||||
## 04/15/2021
|
## 04/15/2021
|
||||||
|
|
||||||
|
|||||||
15
admin.php
15
admin.php
@@ -578,13 +578,6 @@ class AdminPlugin extends Plugin
|
|||||||
$assets->setJsPipeline(false);
|
$assets->setJsPipeline(false);
|
||||||
$assets->setCssPipeline(false);
|
$assets->setCssPipeline(false);
|
||||||
|
|
||||||
// Compile a missing preset.css file
|
|
||||||
$preset_css = 'asset://admin-preset.css';
|
|
||||||
$preset_path = $this->grav['locator']->findResource($preset_css);
|
|
||||||
if (!$preset_path) {
|
|
||||||
$this->grav['admin-whitelabel']->compilePresetScss($this->config->get('plugins.admin.whitelabel'));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -600,6 +593,7 @@ class AdminPlugin extends Plugin
|
|||||||
$twig_paths[] = __DIR__ . '/themes/' . $this->theme . '/templates';
|
$twig_paths[] = __DIR__ . '/themes/' . $this->theme . '/templates';
|
||||||
|
|
||||||
$this->grav['twig']->twig_paths = $twig_paths;
|
$this->grav['twig']->twig_paths = $twig_paths;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1116,6 +1110,13 @@ class AdminPlugin extends Plugin
|
|||||||
// Initialize white label functionality
|
// Initialize white label functionality
|
||||||
$this->grav['admin-whitelabel'] = new WhiteLabel();
|
$this->grav['admin-whitelabel'] = new WhiteLabel();
|
||||||
|
|
||||||
|
// Compile a missing preset.css file
|
||||||
|
$preset_css = 'asset://admin-preset.css';
|
||||||
|
$preset_path = $this->grav['locator']->findResource($preset_css);
|
||||||
|
if (!$preset_path) {
|
||||||
|
$this->grav['admin-whitelabel']->compilePresetScss($this->config->get('plugins.admin.whitelabel'));
|
||||||
|
}
|
||||||
|
|
||||||
// These events are needed for login.
|
// These events are needed for login.
|
||||||
$this->enable([
|
$this->enable([
|
||||||
'onTwigExtensions' => ['onTwigExtensions', 1000],
|
'onTwigExtensions' => ['onTwigExtensions', 1000],
|
||||||
|
|||||||
Reference in New Issue
Block a user