-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
196 lines (145 loc) · 6.52 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
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
<?php
/**
* @package Joomla.Site
* @subpackage Templates.BEEZ4
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access.
defined('_JEXEC') or die;
/** @var JDocumentHtml $this */
JLoader::import('joomla.filesystem.file');
// Check modules
$showRightColumn = ($this->countModules('position-3') or $this->countModules('position-6') or $this->countModules('position-8'));
$showbottom = ($this->countModules('position-9') or $this->countModules('position-10') or $this->countModules('position-11'));
$showleft = ($this->countModules('position-4') or $this->countModules('position-7') or $this->countModules('position-5'));
if ($showRightColumn === false && $showleft === false)
{
$showno = 0;
}
// JHtml::_('behavior.framework', true);
// Get params
$color = $this->params->get('templatecolor');
$logo = $this->params->get('logo');
$headerImage = $this->params->get('headerImage');
$config = JFactory::getConfig();
$bootstrap = explode(',', $this->params->get('bootstrap'));
$option = JFactory::getApplication()->input->getCmd('option', '');
if (in_array($option, $bootstrap))
{
// Load optional rtl Bootstrap css and Bootstrap bugfixes
JHtml::_('bootstrap.loadCss', true, $this->direction);
}
// Add stylesheets
JHtml::_('stylesheet', 'vars.css', array('version' => 'auto', 'relative' => true));
JHtml::_('stylesheet', 'templates/system/css/system.css', array('version' => 'auto'));
JHtml::_('stylesheet', 'position.css', array('version' => 'auto', 'relative' => true));
JHtml::_('stylesheet', 'layout.css', array('version' => 'auto', 'relative' => true));
JHtml::_('stylesheet', 'print.css', array('version' => 'auto', 'relative' => true), array('media' => 'print'));
JHtml::_('stylesheet', 'general.css', array('version' => 'auto', 'relative' => true));
JHtml::_('stylesheet', htmlspecialchars($color, ENT_COMPAT, 'UTF-8') . '.css', array('version' => 'auto', 'relative' => true));
if ($this->direction === 'rtl')
{
JHtml::_('stylesheet', 'template_rtl.css', array('version' => 'auto', 'relative' => true));
JHtml::_('stylesheet', htmlspecialchars($color, ENT_COMPAT, 'UTF-8') . '_rtl.css', array('version' => 'auto', 'relative' => true));
}
if ($color === 'image')
{
$this->addStyleDeclaration("
.logoheader {
background: url('" . $this->baseurl . "/" . htmlspecialchars($headerImage) . "') no-repeat right;
}
body {
background: " . $this->params->get('backgroundcolor') . ";
}");
}
JHtml::_('script', 'templates/' . $this->template . '/javascript/template.js', array('version' => 'auto'));
// Check for a custom js file
JHtml::_('script', 'templates/' . $this->template . '/javascript/user.js', array('version' => 'auto'));
?>
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=3.0, user-scalable=yes"/>
<meta name="HandheldFriendly" content="true" />
<meta name="apple-mobile-web-app-capable" content="YES" />
<jdoc:include type="head" />
</head>
<body id="shadow">
<div id="all">
<header id="header">
<div class="container">
<div class="row">
<h1 id="logo">
<?php if ($logo) : ?>
<img src="<?php echo $this->baseurl; ?>/<?php echo htmlspecialchars($logo); ?>" alt="<?php echo htmlspecialchars($this->params->get('sitetitle')); ?>" />
<?php endif;?>
<?php if (!$logo AND $this->params->get('sitetitle')) : ?>
<?php echo htmlspecialchars($this->params->get('sitetitle')); ?>
<?php elseif (!$logo AND $config->get('sitename')) : ?>
<?php echo htmlspecialchars($config->get('sitename')); ?>
<?php endif; ?>
<span class="header1">
<?php echo htmlspecialchars($this->params->get('sitedescription')); ?>
</span></h1>
<ul class="skiplinks">
<li><a href="#main" class="u2"><?php echo JText::_('TPL_BEEZ4_SKIP_TO_CONTENT'); ?></a></li>
<li><a href="#nav" class="u2"><?php echo JText::_('TPL_BEEZ4_JUMP_TO_NAV'); ?></a></li>
<?php if ($showRightColumn) : ?>
<li><a href="#right" class="u2"><?php echo JText::_('TPL_BEEZ4_JUMP_TO_INFO'); ?></a></li>
<?php endif; ?>
</ul>
<h2 class="unseen"><?php echo JText::_('TPL_BEEZ4_NAV_VIEW_SEARCH'); ?></h2>
<h3 class="unseen"><?php echo JText::_('TPL_BEEZ4_NAVIGATION'); ?></h3>
<jdoc:include type="modules" name="position-1" />
</div></div>
<div id="line">
<h3 class="unseen"><?php echo JText::_('TPL_BEEZ4_SEARCH'); ?></h3>
<jdoc:include type="modules" name="search" />
</div> <!-- end line -->
</header><!-- end header -->
<div class="headerimage">
<div id="breadcrumbs">
<jdoc:include type="modules" name="position-2" />
</div>
<jdoc:include type="modules" name="headerimage" />
</div>
<div id="contentarea">
<main id="main">
<?php if ($this->countModules('position-12')) : ?>
<div id="top">
<jdoc:include type="modules" name="position-12" />
</div>
<?php endif; ?>
<jdoc:include type="message" />
<jdoc:include type="component" />
</main><!-- end main -->
<?php if ($showRightColumn) : ?>
<aside id="right">
<h2 class="unseen"><?php echo JText::_('TPL_BEEZ4_ADDITIONAL_INFORMATION'); ?></h2>
<jdoc:include type="modules" name="position-6" style="beezDivision" headerLevel="3" />
<jdoc:include type="modules" name="position-8" style="beezDivision" headerLevel="3" />
<jdoc:include type="modules" name="position-3" style="beezDivision" headerLevel="3" />
</aside><!-- end right -->
<?php endif; ?>
</div> <!-- end contentarea -->
</div><!-- all -->
<aside id="footer-outer">
<?php if ($showbottom) : ?>
<div id="footer-inner" >
<div id="bottom">
<div class="box box1"> <jdoc:include type="modules" name="position-9" style="beezDivision" headerlevel="3" /></div>
<div class="box box2"> <jdoc:include type="modules" name="position-10" style="beezDivision" headerlevel="3" /></div>
<div class="box box3"> <jdoc:include type="modules" name="position-11" style="beezDivision" headerlevel="3" /></div>
</div>
</div>
<?php endif; ?>
<footer id="footer">
<jdoc:include type="modules" name="footer" />
</footer><!-- end footer -->
</div>
</aside>
<jdoc:include type="modules" name="debug" />
</body>
</html>