Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,11 @@ form:
help: CSS Files that will be loaded on every page. Use relative or absolute URLs
fields:
.path:
type: text
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
4 changes: 2 additions & 2 deletions custom-css.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}