diff --git a/blueprints.yaml b/blueprints.yaml index d193e15..ef3b042 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -36,4 +36,11 @@ form: help: CSS Files that will be loaded on every page. Use relative or absolute URLs fields: .path: - type: text \ No newline at end of file + type: text + label: File path + help: Relative to web root + .priority: + type: int + label: Priority (0=Default) + help: Lower means later inclusion. Negative value to add this file after the other files (that come with the theme) + default: 0 diff --git a/custom-css.php b/custom-css.php index 6a8b127..f557c97 100644 --- a/custom-css.php +++ b/custom-css.php @@ -40,7 +40,7 @@ public function onAssetsInitialized() $this->grav['assets']->addInlineCss($this->config->get('plugins.custom-css.css_inline')); foreach($this->config->get('plugins.custom-css.css_files') as $file) { - $this->grav['assets']->addCss($file['path']); - } + $this->grav['assets']->addCss($file['path'], isset($file['priority']) ? $file['priority'] : null); + } } }