Skip to content
Permalink
cc855a6eb2
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
35 lines (31 sloc) 817 Bytes
<?php
namespace Grav\Theme;
use Grav\Common\Theme;
class QuarkCustom extends Quark
{
/**
* @return array
*/
public static function getSubscribedEvents()
{
return [
'onTwigSiteVariables' => ['onTwigSiteVariables', 0]
];
}
/**
* Add theme assets globally
*
* @return void
*/
public function onTwigSiteVariables()
{
// Add FontAwesome Globally
if ($this->config->get('theme.include_fontawesome')) {
$this->grav['assets']->add('theme://css/fontAwesome.css');
}
if ($this->config->get('theme.dark_mode')) {
$this->grav['assets']->add('theme://css/darkMode.css');
$this->grav['assets']->addJs('theme://js/darkMode.js', ['group' => 'bottom']);
}
}
}