/** * */ protected function _loadTheme() { /* Template side */ $templateAssets = json_decode($this->getAssetsFile('template.json')); if ($templateAssets && isset($templateAssets->assets)) { $this->assets->load($templateAssets->assets); } $style = array(); if ($this->profile->theme) { $style = $this->profile->getThemeStylesheet(); $this->assets->addStyleSheetDeclaration($style); if (isset($this->profile->theme->css) && $this->profile->theme->css != '') { $this->assets->addStyleSheet('zo2/css/' . $this->profile->theme->css . '.css'); } } /* Prepare Fonts */ $selectors = array('body_font' => 'body', 'menu_font' => 'nav, .sidebar-nav', 'h1_font' => 'h1', 'h2_font' => 'h2', 'h3_font' => 'h3', 'h4_font' => 'h4', 'h5_font' => 'h5', 'h6_font' => 'h6'); /* */ foreach ($selectors as $key => $selector) { $value = $this->get($key); if (!empty($value)) { $value = new JObject($value); switch ($value->get('type')) { case 'standard': $this->_buildStandardFontStyle($value, $selector); break; case 'googlefonts': $this->_buildGoogleFontsStyle($value, $selector); break; case 'fontdeck': $this->_buildFontDeckStyle($value, $selector); break; default: break; } } } }