[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
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\Router\Route; 18 use Joomla\CMS\Uri\Uri; 19 20 /** @var \Joomla\CMS\Document\HtmlDocument $this */ 21 22 $app = Factory::getApplication(); 23 $input = $app->input; 24 $wa = $this->getWebAssetManager(); 25 26 // Detecting Active Variables 27 $option = $input->get('option', ''); 28 $view = $input->get('view', ''); 29 $layout = $input->get('layout', 'default'); 30 $task = $input->get('task', 'display'); 31 $cpanel = $option === 'com_cpanel' || ($option === 'com_admin' && $view === 'help'); 32 $hiddenMenu = $app->input->get('hidemainmenu'); 33 $sidebarState = $input->cookie->get('atumSidebarState', ''); 34 35 // Getting user accessibility settings 36 $a11y_mono = (bool) $app->getIdentity()->getParam('a11y_mono', ''); 37 $a11y_contrast = (bool) $app->getIdentity()->getParam('a11y_contrast', ''); 38 $a11y_highlight = (bool) $app->getIdentity()->getParam('a11y_highlight', ''); 39 $a11y_font = (bool) $app->getIdentity()->getParam('a11y_font', ''); 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 // Template params 47 $logoBrandLarge = $this->params->get('logoBrandLarge') 48 ? Uri::root() . htmlspecialchars($this->params->get('logoBrandLarge'), ENT_QUOTES) 49 : Uri::root() . 'media/templates/administrator/atum/images/logos/brand-large.svg'; 50 $logoBrandSmall = $this->params->get('logoBrandSmall') 51 ? Uri::root() . htmlspecialchars($this->params->get('logoBrandSmall'), ENT_QUOTES) 52 : Uri::root() . 'media/templates/administrator/atum/images/logos/brand-small.svg'; 53 54 $logoBrandLargeAlt = empty($this->params->get('logoBrandLargeAlt')) && empty($this->params->get('emptyLogoBrandLargeAlt')) 55 ? 'alt=""' 56 : 'alt="' . htmlspecialchars($this->params->get('logoBrandLargeAlt'), ENT_COMPAT, 'UTF-8') . '"'; 57 $logoBrandSmallAlt = empty($this->params->get('logoBrandSmallAlt')) && empty($this->params->get('emptyLogoBrandSmallAlt')) 58 ? 'alt=""' 59 : 'alt="' . htmlspecialchars($this->params->get('logoBrandSmallAlt'), ENT_COMPAT, 'UTF-8') . '"'; 60 61 // Get the hue value 62 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); 63 64 // Enable assets 65 $wa->usePreset('template.atum.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr')) 66 ->useStyle('template.active.language') 67 ->useStyle('template.user') 68 ->addInlineStyle(':root { 69 --hue: ' . $matches[1] . '; 70 --template-bg-light: ' . $this->params->get('bg-light', '#f0f4fb') . '; 71 --template-text-dark: ' . $this->params->get('text-dark', '#495057') . '; 72 --template-text-light: ' . $this->params->get('text-light', '#ffffff') . '; 73 --template-link-color: ' . $this->params->get('link-color', '#2a69b8') . '; 74 --template-special-color: ' . $this->params->get('special-color', '#001B4C') . '; 75 }'); 76 77 // Override 'template.active' asset to set correct ltr/rtl dependency 78 $wa->registerStyle('template.active', '', [], [], ['template.atum.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr')]); 79 80 // Set some meta data 81 $this->setMetaData('viewport', 'width=device-width, initial-scale=1'); 82 83 $monochrome = (bool) $this->params->get('monochrome'); 84 85 Text::script('TPL_ATUM_MORE_ELEMENTS'); 86 87 // @see administrator/templates/atum/html/layouts/status.php 88 $statusModules = LayoutHelper::render('status', ['modules' => 'status']); 89 ?> 90 <!DOCTYPE html> 91 <html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>"<?php echo $a11y_font ? ' class="a11y_font"' : ''; ?>> 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 || $a11y_mono ? ' monochrome' : '') . ($a11y_contrast ? ' a11y_contrast' : '') . ($a11y_highlight ? ' a11y_highlight' : ''); ?>"> 99 <noscript> 100 <div class="alert alert-danger" role="alert"> 101 <?php echo Text::_('JGLOBAL_WARNJAVASCRIPT'); ?> 102 </div> 103 </noscript> 104 105 <jdoc:include type="modules" name="customtop" style="none" /> 106 107 <?php // Header ?> 108 <header id="header" class="header"> 109 <div class="header-inside"> 110 <div class="header-title d-flex"> 111 <div class="d-flex align-items-center"> 112 <?php // No home link in edit mode (so users can not jump out) and control panel (for a11y reasons) ?> 113 <?php if ($hiddenMenu || $cpanel) : ?> 114 <div class="logo <?php echo $sidebarState === 'closed' ? 'small' : ''; ?>"> 115 <img src="<?php echo $logoBrandLarge; ?>" <?php echo $logoBrandLargeAlt; ?>> 116 <img class="logo-collapsed" src="<?php echo $logoBrandSmall; ?>" <?php echo $logoBrandSmallAlt; ?>> 117 </div> 118 <?php else : ?> 119 <a class="logo <?php echo $sidebarState === 'closed' ? 'small' : ''; ?>" href="<?php echo Route::_('index.php'); ?>"> 120 <img src="<?php echo $logoBrandLarge; ?>" alt="<?php echo Text::_('TPL_ATUM_BACK_TO_CONTROL_PANEL'); ?>"> 121 <img class="logo-collapsed" src="<?php echo $logoBrandSmall; ?>" alt="<?php echo Text::_('TPL_ATUM_BACK_TO_CONTROL_PANEL'); ?>"> 122 </a> 123 <?php endif; ?> 124 </div> 125 <jdoc:include type="modules" name="title" /> 126 </div> 127 <?php echo $statusModules; ?> 128 </div> 129 </header> 130 131 <?php // Wrapper ?> 132 <div id="wrapper" class="d-flex wrapper<?php echo $hiddenMenu ? '0' : ''; ?> <?php echo $sidebarState; ?>"> 133 <?php // Sidebar ?> 134 <?php if (!$hiddenMenu) : ?> 135 <?php HTMLHelper::_('bootstrap.collapse', '.toggler-burger'); ?> 136 <button class="navbar-toggler toggler-burger collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebar-wrapper" aria-controls="sidebar-wrapper" aria-expanded="false" aria-label="<?php echo Text::_('JTOGGLE_SIDEBAR_MENU'); ?>"> 137 <span class="navbar-toggler-icon"></span> 138 </button> 139 140 <div id="sidebar-wrapper" class="sidebar-wrapper sidebar-menu" <?php echo $hiddenMenu ? 'data-hidden="' . $hiddenMenu . '"' : ''; ?>> 141 <div id="sidebarmenu" class="sidebar-sticky"> 142 <div class="sidebar-toggle item item-level-1"> 143 <a id="menu-collapse" href="#" aria-label="<?php echo Text::_('JTOGGLE_SIDEBAR_MENU'); ?>"> 144 <span id="menu-collapse-icon" class="<?php echo $sidebarState === 'closed' ? 'icon-toggle-on' : 'icon-toggle-off'; ?> icon-fw" aria-hidden="true"></span> 145 <span class="sidebar-item-title"><?php echo Text::_('JTOGGLE_SIDEBAR_MENU'); ?></span> 146 </a> 147 </div> 148 <jdoc:include type="modules" name="menu" style="none" /> 149 </div> 150 </div> 151 <?php endif; ?> 152 153 <?php // container-fluid ?> 154 <div class="container-fluid container-main"> 155 <?php if (!$cpanel) : ?> 156 <?php // Subheader ?> 157 <?php HTMLHelper::_('bootstrap.collapse', '.toggler-toolbar'); ?> 158 <button class="navbar-toggler toggler-toolbar toggler-burger collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#subhead-container" aria-controls="subhead-container" aria-expanded="false" aria-label="<?php echo Text::_('TPL_ATUM_TOOLBAR'); ?>"> 159 <span class="toggler-toolbar-icon"></span> 160 </button> 161 <div id="subhead-container" class="subhead mb-3"> 162 <div class="row"> 163 <div class="col-md-12"> 164 <jdoc:include type="modules" name="toolbar" style="none" /> 165 </div> 166 </div> 167 </div> 168 <?php endif; ?> 169 <section id="content" class="content"> 170 <?php // Begin Content ?> 171 <jdoc:include type="modules" name="top" style="html5" /> 172 <div class="row"> 173 <div class="col-md-12"> 174 <main> 175 <jdoc:include type="message" /> 176 <jdoc:include type="component" /> 177 </main> 178 </div> 179 <?php if ($this->countModules('bottom')) : ?> 180 <jdoc:include type="modules" name="bottom" style="html5" /> 181 <?php endif; ?> 182 </div> 183 <?php // End Content ?> 184 </section> 185 </div> 186 </div> 187 <jdoc:include type="modules" name="debug" style="none" /> 188 </body> 189 </html>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |