[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/templates/atum/ -> login.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Administrator
   5   * @subpackage  Templates.Atum
   6   * @copyright   (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
   7   * @license     GNU General Public License version 2 or later; see LICENSE.txt
   8   * @since       4.0.0
   9   */
  10  
  11  defined('_JEXEC') or die;
  12  
  13  use Joomla\CMS\Factory;
  14  use Joomla\CMS\HTML\HTMLHelper;
  15  use Joomla\CMS\Language\Text;
  16  use Joomla\CMS\Layout\LayoutHelper;
  17  use Joomla\CMS\Uri\Uri;
  18  
  19  /** @var \Joomla\CMS\Document\HtmlDocument $this */
  20  
  21  $app   = Factory::getApplication();
  22  $input = $app->input;
  23  $wa    = $this->getWebAssetManager();
  24  
  25  // Detecting Active Variables
  26  $option = $input->get('option', '');
  27  $view   = $input->get('view', '');
  28  $layout = $input->get('layout', 'default');
  29  $task   = $input->get('task', 'display');
  30  
  31  // Browsers support SVG favicons
  32  $this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon.svg', '', [], true, 1), 'icon', 'rel', ['type' => 'image/svg+xml']);
  33  $this->addHeadLink(HTMLHelper::_('image', 'favicon.ico', '', [], true, 1), 'alternate icon', 'rel', ['type' => 'image/vnd.microsoft.icon']);
  34  $this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon-pinned.svg', '', [], true, 1), 'mask-icon', 'rel', ['color' => '#000']);
  35  
  36  // Template params
  37  $logoBrandLarge  = $this->params->get('logoBrandLarge')
  38      ? Uri::root() . htmlspecialchars($this->params->get('logoBrandLarge'), ENT_QUOTES)
  39      : Uri::root() . 'media/templates/administrator/atum/images/logos/brand-large.svg';
  40  $loginLogo = $this->params->get('loginLogo')
  41      ? Uri::root() . $this->params->get('loginLogo')
  42      : Uri::root() . 'media/templates/administrator/atum/images/logos/login.svg';
  43  $logoBrandSmall = $this->params->get('logoBrandSmall')
  44      ? Uri::root() . htmlspecialchars($this->params->get('logoBrandSmall'), ENT_QUOTES)
  45      : Uri::root() . 'media/templates/administrator/atum/images/logos/brand-small.svg';
  46  
  47  $logoBrandLargeAlt = empty($this->params->get('logoBrandLargeAlt')) && empty($this->params->get('emptyLogoBrandLargeAlt'))
  48      ? 'alt=""'
  49      : 'alt="' . htmlspecialchars($this->params->get('logoBrandLargeAlt'), ENT_COMPAT, 'UTF-8') . '"';
  50  $logoBrandSmallAlt = empty($this->params->get('logoBrandSmallAlt')) && empty($this->params->get('emptyLogoBrandSmallAlt'))
  51      ? 'alt=""'
  52      : 'alt="' . htmlspecialchars($this->params->get('logoBrandSmallAlt'), ENT_COMPAT, 'UTF-8') . '"';
  53  $loginLogoAlt = empty($this->params->get('loginLogoAlt')) && empty($this->params->get('emptyLoginLogoAlt'))
  54      ? 'alt=""'
  55      : 'alt="' . htmlspecialchars($this->params->get('loginLogoAlt'), ENT_COMPAT, 'UTF-8') . '"';
  56  
  57  // Get the hue value
  58  preg_match('#^hsla?\(([0-9]+)[\D]+([0-9]+)[\D]+([0-9]+)[\D]+([0-9](?:.\d+)?)?\)$#i', $this->params->get('hue', 'hsl(214, 63%, 20%)'), $matches);
  59  
  60  // Enable assets
  61  $wa->usePreset('template.atum.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr'))
  62      ->useStyle('template.active.language')
  63      ->useStyle('template.user')
  64      ->addInlineStyle(':root {
  65          --hue: ' . $matches[1] . ';
  66          --template-bg-light: ' . $this->params->get('bg-light', '#f0f4fb') . ';
  67          --template-text-dark: ' . $this->params->get('text-dark', '#495057') . ';
  68          --template-text-light: ' . $this->params->get('text-light', '#ffffff') . ';
  69          --template-link-color: ' . $this->params->get('link-color', '#2a69b8') . ';
  70          --template-special-color: ' . $this->params->get('special-color', '#001B4C') . ';
  71      }');
  72  
  73  // Override 'template.active' asset to set correct ltr/rtl dependency
  74  $wa->registerStyle('template.active', '', [], [], ['template.atum.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr')]);
  75  
  76  // Set some meta data
  77  $this->setMetaData('viewport', 'width=device-width, initial-scale=1');
  78  
  79  $monochrome = (bool) $this->params->get('monochrome');
  80  
  81  // Add cookie alert message
  82  Text::script('JGLOBAL_WARNCOOKIES');
  83  
  84  // @see administrator/templates/atum/html/layouts/status.php
  85  $statusModules = LayoutHelper::render('status', ['modules' => 'status']);
  86  
  87  HTMLHelper::_('bootstrap.dropdown');
  88  
  89  ?>
  90  <!DOCTYPE html>
  91  <html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
  92  <head>
  93      <jdoc:include type="metas" />
  94      <jdoc:include type="styles" />
  95      <jdoc:include type="scripts" />
  96  </head>
  97  
  98  <body class="admin <?php echo $option . ' view-' . $view . ' layout-' . $layout . ($task ? ' task-' . $task : '') . ($monochrome ? ' monochrome' : ''); ?>">
  99  
 100      <noscript>
 101          <div class="alert alert-danger" role="alert">
 102              <?php echo Text::_('JGLOBAL_WARNJAVASCRIPT'); ?>
 103          </div>
 104      </noscript>
 105      <div class="ie11 alert alert-warning" role="alert">
 106          <?php echo Text::_('JGLOBAL_WARNIE'); ?>
 107      </div>
 108  
 109      <header id="header" class="header d-flex">
 110          <div class="header-title d-flex">
 111              <div class="d-flex align-items-center">
 112                  <div class="logo">
 113                      <img src="<?php echo $logoBrandLarge; ?>" <?php echo $logoBrandLargeAlt; ?>>
 114                      <img class="logo-collapsed" src="<?php echo $logoBrandSmall; ?>" <?php echo $logoBrandSmallAlt; ?>>
 115                  </div>
 116              </div>
 117              <jdoc:include type="modules" name="title" />
 118          </div>
 119          <?php echo $statusModules; ?>
 120      </header>
 121  
 122      <div id="wrapper" class="wrapper flex-grow-1">
 123          <div class="container-fluid container-main">
 124              <section id="content" class="content h-100">
 125                  <div class="login_message">
 126                      <jdoc:include type="message" />
 127                  </div>
 128                  <main class="d-flex justify-content-center align-items-center h-100">
 129                      <div class="login">
 130                          <div class="main-brand logo text-center">
 131                              <img src="<?php echo $loginLogo; ?>" <?php echo $loginLogoAlt; ?>>
 132                          </div>
 133                          <jdoc:include type="component" />
 134                      </div>
 135                  </main>
 136              </section>
 137          </div>
 138  
 139          <div id="sidebar-wrapper" class="sidebar-wrapper px-3 pb-3">
 140              <div id="main-brand" class="main-brand">
 141                  <h1><?php echo $app->get('sitename'); ?></h1>
 142                  <h2><?php echo Text::_('TPL_ATUM_BACKEND_LOGIN'); ?></h2>
 143              </div>
 144              <div id="sidebar">
 145                  <jdoc:include type="modules" name="sidebar" style="body" />
 146              </div>
 147          </div>
 148      </div>
 149      <jdoc:include type="modules" name="debug" style="none" />
 150  </body>
 151  </html>


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer