-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
323 lines (275 loc) · 10.3 KB
/
index.php
File metadata and controls
323 lines (275 loc) · 10.3 KB
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
<?php
/**
* @package StarAzure
* @subpackage StarAzure HomeRun Template
*
* @copyright Copyright (C) 2018 StarAzure. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/** @var JDocumentHtml $this */
$app = JFactory::getApplication();
$user = JFactory::getUser();
//helper
$helper = require (__DIR__ . '/helper.php');
$helper->init($this);
// Output as HTML5
$this->setHtml5(true);
// Getting params from template
$params = $app->getTemplate(true)->params;
// 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 = $app->get('sitename');
if ($task === 'edit' || $layout === 'form')
{
$fullWidth = 1;
}
else
{
$fullWidth = 0;
}
//SA Remove possible junk stuff to make it fast and furious
// Remove Scripts
$doc = JFactory::getDocument();
JHtml::_('jquery.framework');
$dontInclude = array(
'/media/jui/js/jquery-noconflict.js',
'/media/jui/js/jquery-migrate.min.js'
);
foreach($doc->_scripts as $key => $script){
if(in_array($key, $dontInclude)){
unset($doc->_scripts[$key]);
}
}
// Add js
//JHtml::_('script', 'popper.min.js', array('version' => 'auto', 'relative' => true));
JHtml::_('script', 'template.js', array('version' => 'auto', 'relative' => true));
//JHtml::_('script', 'jui/bootstrap.min.js', array('version' => 'auto', 'relative' => true));
// Add Stylesheets
//JHtml::_('stylesheet', 'bootstrap.min.css', array('version' => 'auto', 'relative' => true));
//JHtml::_('stylesheet', 'template.css', array('version' => 'auto', 'relative' => true));
// Logo file or site title param
if ($this->params->get('styleLogoImage'))
{
$logo = '<img src="' . JUri::root() . $this->params->get('styleLogoImage') . '" alt="' . $sitename . '" />';
}
elseif ($this->params->get('sitetitle'))
{
$logo = '<span class="site-title" title="' . $sitename . '">' . htmlspecialchars($this->params->get('sitetitle'), ENT_COMPAT, 'UTF-8') . '</span>';
}
else
{
$logo = '<span class="site-title" title="' . $sitename . '">' . $sitename . '</span>';
}
?>
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<!-- Custom code -->
<?php $helper->_('customCodeBeforeHead'); ?>
<!-- // Custom code -->
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<jdoc:include type="head" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!-- Custom style -->
<?php $helper->addCustomStyle(); ?>
<!-- Custom style-->
<!-- Custom code -->
<?php $helper->_('customCodeAfterHead'); ?>
<!-- // Custom code -->
</head>
<body class="site <?php echo $option
. ' view-' . $view
. ($layout ? ' layout-' . $layout : ' no-layout')
. ($task ? ' task-' . $task : ' no-task')
. ($itemid ? ' itemid-' . $itemid : '')
. ($params->get('fluidContainer') ? ' fluid' : '');
echo ($this->direction === 'rtl' ? ' rtl' : '');
?>">
<!-- Custom code -->
<?php $helper->_('customCodeBeforeBody'); ?>
<!-- // Custom code -->
<!-- Body -->
<div class="body" id="top">
<!-- Header -->
<header class="header" id="header" role="banner">
<div id="headerarea">
<?php if ($this->countModules('navigation')) : ?>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top" id="starNav">
<div class="container">
<a class="navbar-brand mr-5" href="<?php echo $this->baseurl; ?>/">
<?php echo $logo; ?>
<?php if ($this->params->get('sitedescription')) : ?>
<?php echo '<div class="site-description">' . htmlspecialchars($this->params->get('sitedescription'), ENT_COMPAT, 'UTF-8') . '</div>'; ?>
<?php endif; ?>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<i class="material-icons">menu</i>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<jdoc:include type="modules" name="navigation" style="none" />
<?php if ($this->countModules('nav-utility')) : ?>
<jdoc:include type="modules" name="nav-utility" style="xhtml" />
<?php endif; ?>
<!--
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-secondary my-2 my-sm-0" type="submit">Search</button>
</form>
-->
</div>
</div>
</nav>
<?php endif; ?>
</div>
</header>
<!-- FullScreen -->
<?php if ($this->countModules('fullScreen')) : ?>
<div id="fullScr" class="p-0 container<?php echo ($params->get('fullContainer') ? '-fluid' : ''); ?>">
<div class="fullScreen">
<jdoc:include type="modules" name="fullScreen" style="xhtml" />
</div>
</div>
<?php endif; ?>
<!-- Full Screen End -->
<!-- Top A Start -->
<?php if ($this->countModules('top-a')) : ?>
<div id="topA" class="top-a <?php echo " py-".$params->get('top-a-padding');?>">
<div class="p-0 container<?php echo ($params->get('top-a-width') ? '-fluid' : ''); ?>">
<jdoc:include type="modules" name="top-a" style="xhtml" />
</div>
</div>
<?php endif; ?>
<!-- Top A End-->
<!-- Top B Start -->
<?php if ($this->countModules('top-b')) : ?>
<div id="topB" class="top-b <?php echo " py-".$params->get('top-b-padding');?>">
<div class="p-0 container<?php echo ($params->get('top-b-width') ? '-fluid' : ''); ?>">
<jdoc:include type="modules" name="top-b" style="xhtml" />
</div>
</div>
<?php endif; ?>
<!-- Top B End-->
<?php
$mainLayout = $params->get('layouts');
switch ($mainLayout) {
case "content-sidebara-sidebarb":
$sbAorder = 4;
$sbBorder = 5;
//$conOrder = 1;
break;
case "sidebara-content-sidebarb":
$sbAorder = 2;
$sbBorder = 4;
//$conOrder = 2;
break;
case "sidebara-sidebarb-content":
$sbAorder = 1;
$sbBorder = 2;
//$conOrder = 3;
break;
}
$conwidth = 12;
($this->countModules('sidebar-a') == 0) ? $sbAwidth = 0 : $sbAwidth = 2;
($this->countModules('sidebar-b') == 0) ? $sbBwidth = 0 : $sbBwidth = 2;
?>
<div id="mainContent" class="star content">
<main id="content" role="main" class="">
<!-- Begin Content -->
<div class="container">
<div class="row">
<?php if ($this->countModules('sidebar-a')) : ?>
<div class="col-md-<?php echo $sbAwidth . " order-" . $sbAorder;?>">
<jdoc:include type="modules" name="sidebar-a" style="xhtml" />
</div>
<?php endif; ?>
<div class="col-md-<?php echo $conwidth-($sbBwidth + $sbAwidth);?> order-3">
<jdoc:include type="message" />
<jdoc:include type="component" />
<?php if ($this->countModules('breadcrumb')) : ?>
<jdoc:include type="modules" name="breadcrumb" style="xhtml" />
<?php endif; ?>
</div>
<?php if ($this->countModules('sidebar-b')) : ?>
<div class="col-md-<?php echo $sbBwidth . " order-" . $sbBorder;?>">
<jdoc:include type="modules" name="sidebar-b" style="xhtml" />
</div>
<?php endif; ?>
</div>
</div>
<!-- End Content -->
</main>
</div>
<!-- Bottom A Start -->
<?php if ($this->countModules('bottom-a')) : ?>
<div id="bottomA" class="bottom-a <?php echo " py-".$params->get('bot-a-padding');?>">
<div class="p-0 container<?php echo ($params->get('bottom-a-width') ? '-fluid' : ''); ?>">
<jdoc:include type="modules" name="bottom-a" style="xhtml" />
</div>
</div>
<?php endif; ?>
<!-- Bottom A End-->
<!-- Bottom B Start -->
<?php if ($this->countModules('bottom-b')) : ?>
<div id="bottomB" class="bottom-b <?php echo " py-".$params->get('bot-b-padding');?>">
<div class="p-0 container<?php echo ($params->get('bottom-b-width') ? '-fluid' : ''); ?>">
<jdoc:include type="modules" name="bottom-b" style="xhtml" />
</div>
</div>
<?php endif; ?>
<!-- Bottom B End-->
<!--Body Div Ends Below -->
</div>
<!-- Footer Section -->
<footer class="footer" role="contentinfo">
<!-- Footer Position Start -->
<?php if ($this->countModules('footer')) : ?>
<div id="starFooter" class="footer <?php echo " py-".$params->get('footer-padding');?>">
<div class="p-md-0 container<?php echo ($params->get('footer-width') ? '-fluid' : ''); ?>">
<jdoc:include type="modules" name="footer" style="xhtml" />
</div>
</div>
<?php endif; ?>
<!-- Footer Posiion End-->
<!-- Copyright Position Start -->
<div id="starCopyright" class="copyright <?php echo " py-".$params->get('copy-padding'). " text-" . $params->get('copy_text_color');?>">
<div class="container<?php echo ($params->get('copy-width') ? '-fluid' : ''); ?>">
<div class="row">
<div class="col-sm-3 text-sm-left">
<small>© <?php echo date('Y'); ?> <?php echo $sitename; ?>
</small>
</div>
<div class="col-sm-6 copyright_menu">
<?php $menu = JFactory::getApplication()->getMenu();
$menu_items = $menu->getItems('menutype', ($params->get('foot_small_menu'))); ?>
<ul class="nav copyright_menu text-sm-left">
<?php foreach ($menu_items as $menu_item) :?>
<li class="nav-item">
<a class="small nav-link text-<?php echo $params->get('copy_text_color');?>"
href="<?php echo $menu_item->link; ?>">
<?php echo $menu_item->title; ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
<div class="col-sm-3 text-sm-right">
<small><a href="#top" id="back-top" class="">
<i class="material-icons">arrow_upward</i>
</a></small>
</div>
</div>
</div>
</div>
<!-- Copyright Position End-->
</footer>
<jdoc:include type="modules" name="debug" style="none" />
<!-- Custom code -->
<?php $helper->_('customCodeAfterBody'); ?>
<!-- // Custom code -->
</body>
</html>