Added ability to specify a LESS file to be used as a default backend brand CSS override with the config item "brand.customLessPath"

This commit is contained in:
Luke Towers 2019-09-18 18:27:18 -06:00
parent fafd05f7c0
commit 7e6c1aed84

View File

@ -80,6 +80,12 @@ class BrandSetting extends Model
$this->secondary_color = $config->get('brand.secondaryColor', self::SECONDARY_COLOR);
$this->accent_color = $config->get('brand.accentColor', self::ACCENT_COLOR);
$this->menu_mode = $config->get('brand.menuMode', self::INLINE_MENU);
// Attempt to load custom CSS
$brandCssPath = File::symbolizePath(Config::get('brand.customLessPath'));
if ($brandCssPath && File::exists($brandCssPath)) {
$this->custom_css = File::get($brandCssPath);
}
}
public function afterSave()