setHtml5(true); // Gets the FrontEnd Main page Uri $frontEndUri = JUri::getInstance(JUri::root()); $frontEndUri->setScheme(((int) $app->get('force_ssl', 0) === 2) ? 'https' : 'http'); // Color Params $background_color = $this->params->get('loginBackgroundColor') ?: ''; $color_is_light = $background_color && colorIsLight($background_color); // Add JavaScript Frameworks JHtml::_('bootstrap.framework'); JHtml::_('bootstrap.tooltip'); // Add html5 shiv JHtml::_('script', 'jui/html5.js', array('version' => 'auto', 'relative' => true, 'conditional' => 'lt IE 9')); // Add Stylesheets JHtml::_('stylesheet', 'template' . ($this->direction === 'rtl' ? '-rtl' : '') . '.css', array('version' => 'auto', 'relative' => true)); // Load optional RTL Bootstrap CSS JHtml::_('bootstrap.loadCss', false, $this->direction); // Load specific language related CSS JHtml::_('stylesheet', 'administrator/language/' . $lang->getTag() . '/' . $lang->getTag() . '.css', array('version' => 'auto')); // Load custom.css JHtml::_('stylesheet', 'custom.css', array('version' => 'auto', 'relative' => true)); // Detecting Active Variables $option = $app->input->getCmd('option', ''); $view = $app->input->getCmd('view', ''); $layout = $app->input->getCmd('layout', ''); $task = $app->input->getCmd('task', ''); $itemid = $app->input->getCmd('Itemid', ''); $sitename = htmlspecialchars($app->get('sitename', ''), ENT_QUOTES, 'UTF-8'); 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; } // Background color if ($background_color) { $this->addStyleDeclaration(' .view-login { background-color: ' . $background_color . '; }'); } // Responsive Styles $this->addStyleDeclaration(' @media (max-width: 480px) { .view-login .container { margin-top: -170px; } .btn { font-size: 13px; padding: 4px 10px 4px; } }'); // Check if debug is on if (JPluginHelper::isEnabled('system', 'debug') && ($app->get('debug_lang', 0) || $app->get('debug', 0))) { $this->addStyleDeclaration(' .view-login .container { position: static; margin-top: 20px; margin-left: auto; margin-right: auto; } .view-login .navbar-fixed-bottom { position: relative; }'); } ?>