[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

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

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Administrator
   5   * @subpackage  Templates.Atum
   6   *
   7   * @copyright   (C) 2012 Open Source Matters, Inc. <https://www.joomla.org>
   8   * @license     GNU General Public License version 2 or later; see LICENSE.txt
   9   */
  10  
  11  defined('_JEXEC') or die;
  12  
  13  use Joomla\CMS\HTML\HTMLHelper;
  14  
  15  /** @var \Joomla\CMS\Document\HtmlDocument $this */
  16  
  17  $wa = $this->getWebAssetManager();
  18  
  19  // Get the hue value
  20  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);
  21  
  22  // Enable assets
  23  $wa->usePreset('template.atum.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr'))
  24      ->useStyle('template.active.language')
  25      ->useStyle('template.user')
  26      ->addInlineStyle(':root {
  27          --hue: ' . $matches[1] . ';
  28          --template-bg-light: ' . $this->params->get('bg-light', '--template-bg-light') . ';
  29          --template-text-dark: ' . $this->params->get('text-dark', '--template-text-dark') . ';
  30          --template-text-light: ' . $this->params->get('text-light', '--template-text-light') . ';
  31          --template-link-color: ' . $this->params->get('link-color', '--template-link-color') . ';
  32          --template-special-color: ' . $this->params->get('special-color', '--template-special-color') . ';
  33      }');
  34  
  35  // No template.js for modals
  36  $wa->disableScript('template.atum');
  37  
  38  // Override 'template.active' asset to set correct ltr/rtl dependency
  39  $wa->registerStyle('template.active', '', [], [], ['template.atum.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr')]);
  40  
  41  // Browsers support SVG favicons
  42  $this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon.svg', '', [], true, 1), 'icon', 'rel', ['type' => 'image/svg+xml']);
  43  $this->addHeadLink(HTMLHelper::_('image', 'favicon.ico', '', [], true, 1), 'alternate icon', 'rel', ['type' => 'image/vnd.microsoft.icon']);
  44  $this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon-pinned.svg', '', [], true, 1), 'mask-icon', 'rel', ['color' => '#000']);
  45  
  46  ?>
  47  
  48  <!DOCTYPE html>
  49  <html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
  50  <head>
  51      <jdoc:include type="metas" />
  52      <jdoc:include type="styles" />
  53      <jdoc:include type="scripts" />
  54  </head>
  55  <body class="contentpane component">
  56      <jdoc:include type="message" />
  57      <jdoc:include type="component" />
  58  </body>
  59  </html>


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