<?php /** * @package Joomla.Administrator * @subpackage Templates.isis * * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $app = JFactory::getApplication(); $doc = JFactory::getDocument(); $lang = JFactory::getLanguage(); // Color Params $template_is_light = $this->params->get('templateColor') && colorIsLight($this->params->get('templateColor')); // Add JavaScript Frameworks JHtml::_('bootstrap.framework'); JHtml::_('bootstrap.tooltip'); // Add Stylesheets $doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/template' . ($this->direction == 'rtl' ? '-rtl' : '') . '.css'); // Load optional RTL Bootstrap CSS JHtml::_('bootstrap.loadCss', false, $this->direction); // Load specific language related CSS $file = 'language/' . $lang->getTag() . '/' . $lang->getTag() . '.css'; if (is_file($file)) { $doc->addStyleSheet($file); } // Detecting Active Variables $option = $app->input->getCmd('option', ''); $view = $app->input->getCmd('view', ''); $layout = $app->input->getCmd('layout', '');
foreach ($this->submenumodules as $submenumodule) { $output = JModuleHelper::renderModule($submenumodule); if (strlen($output)) { $showSubmenu = true; break; } } // Template Parameters $displayHeader = $this->params->get('displayHeader', '1'); $statusFixed = $this->params->get('statusFixed', '1'); $stickyToolbar = $this->params->get('stickyToolbar', '1'); // Header classes $navbar_color = $this->params->get('templateColor') ? $this->params->get('templateColor') : ''; $header_color = $displayHeader && $this->params->get('headerColor') ? $this->params->get('headerColor') : ''; $navbar_is_light = $navbar_color && colorIsLight($navbar_color); $header_is_light = $header_color && colorIsLight($header_color); if ($displayHeader) { // Logo file if ($this->params->get('logoFile')) { $logo = JUri::root() . $this->params->get('logoFile'); } else { $logo = $this->baseurl . '/templates/' . $this->template . '/images/logo' . ($header_is_light ? '-inverse' : '') . '.png'; } } function colorIsLight($color) { $r = hexdec(substr($color, 1, 2)); $g = hexdec(substr($color, 3, 2)); $b = hexdec(substr($color, 5, 2)); $yiq = ($r * 299 + $g * 587 + $b * 114) / 1000; return $yiq >= 200;
$showSubmenu = false; $this->submenumodules = JModuleHelper::getModules('submenu'); foreach ($this->submenumodules as $submenumodule) { $output = JModuleHelper::renderModule($submenumodule); if (strlen($output)) { $showSubmenu = true; break; } } // Template Parameters $displayHeader = $this->params->get('displayHeader', '1'); $statusFixed = $this->params->get('statusFixed', '1'); $stickyToolbar = $this->params->get('stickyToolbar', '1'); // Header classes $template_is_light = $this->params->get('templateColor') && colorIsLight($this->params->get('templateColor')); $header_is_light = $displayHeader && $this->params->get('headerColor') && colorIsLight($this->params->get('headerColor')); if ($displayHeader) { // Logo file if ($this->params->get('logoFile')) { $logo = JUri::root() . $this->params->get('logoFile'); } else { $logo = $this->baseurl . '/templates/' . $this->template . '/images/logo' . ($header_is_light ? '-inverse' : '') . '.png'; } } function colorIsLight($color) { $r = hexdec(substr($color, 1, 2)); $g = hexdec(substr($color, 3, 2)); $b = hexdec(substr($color, 5, 2)); $yiq = ($r * 299 + $g * 587 + $b * 114) / 1000; return $yiq >= 200;
<?php /** * @package Joomla.Administrator * @subpackage Templates.isis * * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $app = JFactory::getApplication(); $doc = JFactory::getDocument(); $lang = JFactory::getLanguage(); // Color Params $background_color = $this->params->get('loginBackgroundColor') ? $this->params->get('loginBackgroundColor') : ''; $color_is_light = $background_color && colorIsLight($background_color); // Add JavaScript Frameworks JHtml::_('bootstrap.framework'); JHtml::_('bootstrap.tooltip'); // Add Stylesheets $doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/template' . ($this->direction == 'rtl' ? '-rtl' : '') . '.css'); // Load optional RTL Bootstrap CSS JHtml::_('bootstrap.loadCss', false, $this->direction); // Load specific language related CSS $file = 'language/' . $lang->getTag() . '/' . $lang->getTag() . '.css'; if (is_file($file)) { $doc->addStyleSheet($file); } // Load custom.css $file = 'templates/' . $this->template . '/css/custom.css'; if (is_file($file)) {