mirror of
https://github.com/a2nt/cms-niceties.git
synced 2024-10-22 11:05:46 +02:00
IMPR: Requirements priority improvement
This commit is contained in:
parent
33a10bdc1e
commit
395266963c
@ -81,20 +81,6 @@ class DeferredRequirements implements TemplateGlobalProvider
|
||||
}
|
||||
}
|
||||
|
||||
// App libs
|
||||
if (!$config['nofontawesome']) {
|
||||
$v = !isset($config['fontawesome_version']) || !$config['fontawesome_version']
|
||||
? Config::inst()->get(FontAwesomeField::class, 'version')
|
||||
: $config['fontawesome_version'];
|
||||
|
||||
if ($config['fontawesome_svg']) {
|
||||
Requirements::customScript('FontAwesomeConfig={searchPseudoElements:true}');
|
||||
self::loadJS('//use.fontawesome.com/releases/v'.$v.'/js/all.js');
|
||||
} else {
|
||||
self::loadCSS('//use.fontawesome.com/releases/v'.$v.'/css/all.css');
|
||||
}
|
||||
}
|
||||
|
||||
self::loadCSS($mainTheme.'.css');
|
||||
|
||||
// hot reloading
|
||||
@ -136,6 +122,20 @@ class DeferredRequirements implements TemplateGlobalProvider
|
||||
self::loadJS($projectName.'_'.$curr_class . '.js');
|
||||
}
|
||||
|
||||
// App libs
|
||||
if (!$config['nofontawesome']) {
|
||||
$v = !isset($config['fontawesome_version']) || !$config['fontawesome_version']
|
||||
? Config::inst()->get(FontAwesomeField::class, 'version')
|
||||
: $config['fontawesome_version'];
|
||||
|
||||
if ($config['fontawesome_svg']) {
|
||||
Requirements::customScript('FontAwesomeConfig={searchPseudoElements:true}');
|
||||
self::loadJS('//use.fontawesome.com/releases/v'.$v.'/js/all.js');
|
||||
} else {
|
||||
self::loadCSS('//use.fontawesome.com/releases/v'.$v.'/css/all.css');
|
||||
}
|
||||
}
|
||||
|
||||
return self::forTemplate();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user