/
index.php
138 lines (117 loc) · 4.32 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?php
/**
* @package Joomla.Administrator
* @subpackage Templates.Atum
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @since 4.0
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Language\Text;
/** @var JDocumentHtml $this */
$app = Factory::getApplication();
$lang = Factory::getLanguage();
$input = $app->input;
// Detecting Active Variables
$option = $input->get('option', '');
$view = $input->get('view', '');
$layout = $input->get('layout', '');
$task = $input->get('task', '');
$itemid = $input->get('Itemid', '');
$cpanel = $option === 'com_cpanel';
$hidden = $app->input->get('hidemainmenu');
$logo = $this->baseurl . '/templates/' . $this->template . '/images/logo.svg';
$logoBlue = $this->baseurl . '/templates/' . $this->template . '/images/logo-blue.svg';
// Enable assets
/** @var \Joomla\CMS\WebAsset\WebAssetRegistry $wa */
$wa = Factory::getContainer()->get('webasset');
$wa->enableAsset('template.atum.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr'));
// Load specific language related CSS
HTMLHelper::_('stylesheet', 'administrator/language/' . $lang->getTag() . '/' . $lang->getTag() . '.css', array('version' => 'auto'));
// Set some meta data
$this->setMetaData('viewport', 'width=device-width, initial-scale=1');
// @TODO sync with _variables.scss
$this->setMetaData('theme-color', '#1c3d5c');
$this->addScriptDeclaration('cssVars();');
?>
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<jdoc:include type="metas" />
<jdoc:include type="styles" />
<jdoc:include type="scripts" />
</head>
<body class="admin <?php echo $option . ' view-' . $view . ' layout-' . $layout . ' task-' . $task . ' itemid-' . $itemid; ?>">
<noscript>
<div class="alert alert-danger" role="alert">
<?php echo Text::_('JGLOBAL_WARNJAVASCRIPT'); ?>
</div>
</noscript>
<?php // Header ?>
<header id="header" class="header">
<div class="d-flex align-items-center">
<div class="header-title d-flex mr-auto">
<div class="d-flex">
<a class="logo" href="<?php echo Route::_('index.php'); ?>" aria-label="<?php echo Text::_('TPL_BACK_TO_CONTROL_PANEL'); ?>">
<img src="<?php echo $logoBlue; ?>" alt="">
</a>
</div>
<jdoc:include type="modules" name="title" />
</div>
<div class="header-items d-flex ml-auto">
<jdoc:include type="modules" name="status" style="no" />
</div>
</div>
</header>
<?php // Wrapper ?>
<div id="wrapper" class="d-flex wrapper<?php echo $hidden ? '0' : ''; ?>">
<?php // Sidebar ?>
<?php if (!$hidden) : ?>
<div id="sidebar-wrapper" class="sidebar-wrapper" <?php echo $hidden ? 'data-hidden="' . $hidden . '"' : ''; ?>>
<jdoc:include type="modules" name="menu" style="none" />
<div id="main-brand" class="main-brand d-flex align-items-center justify-content-center">
<img src="<?php echo $logo; ?>" alt="">
</div>
</div>
<?php endif; ?>
<?php // container-fluid ?>
<div class="container-fluid container-main">
<?php if (!$cpanel) : ?>
<?php // Subheader ?>
<a class="btn btn-subhead d-md-none d-lg-none d-xl-none" data-toggle="collapse" data-target=".subhead-collapse"><?php echo Text::_('TPL_ATUM_TOOLBAR'); ?>
<span class="icon-wrench"></span></a>
<div id="subhead" class="subhead">
<div id="container-collapse" class="container-collapse"></div>
<div class="row">
<div class="col-md-12">
<jdoc:include type="modules" name="toolbar" style="no" />
</div>
</div>
</div>
<?php endif; ?>
<section id="content" class="content">
<?php // Begin Content ?>
<jdoc:include type="modules" name="top" style="xhtml" />
<div class="row">
<div class="col-md-12">
<main>
<jdoc:include type="component" />
</main>
</div>
<?php if ($this->countModules('bottom')) : ?>
<jdoc:include type="modules" name="bottom" style="xhtml" />
<?php endif; ?>
</div>
<?php // End Content ?>
</section>
<div class="notify-alerts">
<jdoc:include type="message" />
</div>
</div>
</div>
<jdoc:include type="modules" name="debug" style="none" />
</body>
</html>