1
|
<?php
|
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
|
<?php
|
71
|
$page_wrapper_style = '';
|
72
|
$base_vmargin = theme_get_setting('base_vmargin');
|
73
|
if (arg(0) == "admin") $base_vmargin = '0px';
|
74
|
if (empty($base_vmargin)) $base_vmargin = '0px';
|
75
|
$page_wrapper_style .= ' margin-top: ' . $base_vmargin . '; margin-bottom: ' . $base_vmargin . ';';
|
76
|
|
77
|
$page_style = '';
|
78
|
$main_style = '';
|
79
|
$layout_style = theme_get_setting('layout_style');
|
80
|
$page_margin = theme_get_setting('page_margin');
|
81
|
if (empty($page_margin)) $page_margin = '0px';
|
82
|
if (arg(0) == "admin") $page_margin = '20px';
|
83
|
if ($layout_style == 1) {
|
84
|
$page_style = 'padding: ' . $page_margin . ';';
|
85
|
}
|
86
|
else {
|
87
|
$main_style = 'padding: 0px ' . $page_margin . '; box-sizing: border-box;';
|
88
|
}
|
89
|
|
90
|
$header_style = '';
|
91
|
$header_height = theme_get_setting('header_height');
|
92
|
if (!empty($header_height)) $header_style .= 'height: ' . $header_height . ';';
|
93
|
$header_bg_file = check_url(theme_get_setting('header_bg_file'));
|
94
|
if ($header_bg_file) {
|
95
|
$header_style .= 'filter:;background: url(' . $header_bg_file . ') repeat ';
|
96
|
$header_style .= theme_get_setting('header_bg_alignment') . ';';
|
97
|
}
|
98
|
if ($layout_style == 2 || $header_bg_file) {
|
99
|
|
100
|
$header_style .= 'border: none;';
|
101
|
}
|
102
|
else {
|
103
|
$header_border_width = theme_get_setting('header_border_width');
|
104
|
$header_style .= 'border-width: ' . $header_border_width . ';';
|
105
|
}
|
106
|
|
107
|
$header_watermark_style = '';
|
108
|
$header_watermark = theme_get_setting('header_watermark');
|
109
|
if($header_watermark) {
|
110
|
$header_watermark_style = 'background-image: url(' . file_create_url(drupal_get_path('theme', 'mayo') . '/images/pat-' . $header_watermark . '.png') . ');';
|
111
|
}
|
112
|
|
113
|
$logo_style = '';
|
114
|
$logo_left_margin = theme_get_setting('logo_left_margin');
|
115
|
if (empty($logo_left_margin)) $logo_left_margin = '0px';
|
116
|
$logo_top_margin = theme_get_setting('logo_top_margin');
|
117
|
if (empty($logo_top_margin)) $logo_top_margin = '0px';
|
118
|
$logo_style = 'margin-left: ' . $logo_left_margin . '; margin-top: ' . $logo_top_margin . ';';
|
119
|
|
120
|
$sitename_style = '';
|
121
|
$sitename_left_margin = theme_get_setting('sitename_left_margin');
|
122
|
if (empty($sitename_left_margin)) $sitename_left_margin = '0px';
|
123
|
$sitename_top_margin = theme_get_setting('sitename_top_margin');
|
124
|
if (empty($sitename_top_margin)) $sitename_top_margin = '0px';
|
125
|
$sitename_style = 'margin-left: ' . $sitename_left_margin . '; margin-top: ' . $sitename_top_margin . ';';
|
126
|
|
127
|
$searchbox_style = '';
|
128
|
$searchbox_right_margin = theme_get_setting('searchbox_right_margin');
|
129
|
if (empty($searchbox_right_margin)) $searchbox_right_margin = '0px';
|
130
|
$searchbox_top_margin = theme_get_setting('searchbox_top_margin');
|
131
|
if (empty($searchbox_top_margin)) $searchbox_top_margin = '0px';
|
132
|
$searchbox_style = 'margin-right: ' . $searchbox_right_margin . '; margin-top: ' . $searchbox_top_margin . ';';
|
133
|
|
134
|
$menubar_style = '';
|
135
|
$menubar_bg_value = theme_get_setting('menubar_bg_value');
|
136
|
if (theme_get_setting('menubar_background') == 1) $menubar_style = ' style=" background-color: ' . $menubar_bg_value . ';"';
|
137
|
|
138
|
$fontsizer_top_margin = (intval($searchbox_top_margin) + 3) . 'px';
|
139
|
$fontsizer_style = 'margin-top: ' . $fontsizer_top_margin . ';';
|
140
|
|
141
|
if (theme_get_setting('header_fontsizer')) {
|
142
|
drupal_add_js(drupal_get_path('theme', 'mayo') . '/js/mayo-fontsize.js');
|
143
|
}
|
144
|
if ($page['top_column_first'] ||
|
145
|
$page['top_column_second'] ||
|
146
|
$page['top_column_third'] ||
|
147
|
$page['top_column_fourth'] ||
|
148
|
$page['bottom_column_first'] ||
|
149
|
$page['bottom_column_second'] ||
|
150
|
$page['bottom_column_third'] ||
|
151
|
$page['bottom_column_fourth'] ||
|
152
|
$page['footer_column_first'] ||
|
153
|
$page['footer_column_second'] ||
|
154
|
$page['footer_column_third'] ||
|
155
|
$page['footer_column_fourth']) {
|
156
|
drupal_add_js(drupal_get_path('theme', 'mayo') . '/js/mayo-columns.js',
|
157
|
array('type'=>'file',
|
158
|
'scope'=>'footer',
|
159
|
));
|
160
|
}
|
161
|
?>
|
162
|
|
163
|
<div id="page-wrapper" style="<?php echo $page_wrapper_style; ?>">
|
164
|
<div id="page" style="<?php echo $page_style; ?>">
|
165
|
|
166
|
<div id="header" style="<?php echo $header_style; ?>">
|
167
|
<div id="header-watermark" style="<?php echo $header_watermark_style; ?>">
|
168
|
<div class="section clearfix">
|
169
|
|
170
|
<?php if ($logo): ?>
|
171
|
<div id="logo" style="<?php echo $logo_style; ?>">
|
172
|
<a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home">
|
173
|
<img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
|
174
|
</a>
|
175
|
</div>
|
176
|
<?php endif; ?>
|
177
|
|
178
|
<?php if ($site_name || $site_slogan): ?>
|
179
|
<div id="name-and-slogan" style="<?php echo $sitename_style; ?>">
|
180
|
<?php if ($site_name): ?>
|
181
|
<?php if ($title): ?>
|
182
|
<div id="site-name"><strong>
|
183
|
<a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
|
184
|
</strong></div>
|
185
|
<?php else: ?>
|
186
|
<h1 id="site-name">
|
187
|
<a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
|
188
|
</h1>
|
189
|
<?php endif; ?>
|
190
|
<?php endif; ?>
|
191
|
|
192
|
<?php if ($site_slogan): ?>
|
193
|
<div id="site-slogan"><?php print $site_slogan; ?></div>
|
194
|
<?php endif; ?>
|
195
|
</div>
|
196
|
<?php endif; ?>
|
197
|
|
198
|
<?php if ((theme_get_setting('header_searchbox')) && function_exists('search_box')) { ?>
|
199
|
<div id="header-searchbox" style="<?php echo $searchbox_style; ?>">
|
200
|
<?php $output_form = drupal_get_form('search_block_form'); print render($output_form); ?>
|
201
|
</div>
|
202
|
<?php } ?>
|
203
|
|
204
|
<?php if (theme_get_setting('header_fontsizer')) { ?>
|
205
|
<div id="header-fontsizer" style="<?php echo $fontsizer_style; ?>">
|
206
|
<a href="#" class="decreaseFont" title="Decrease text size"></a>
|
207
|
<a href="#" class="resetFont" title="Restore default text size"></a>
|
208
|
<a href="#" class="increaseFont" title="Increase text size"></a>
|
209
|
</div>
|
210
|
<?php } ?>
|
211
|
|
212
|
<div class="clearfix cfie"></div>
|
213
|
|
214
|
<?php print render($page['header']); ?>
|
215
|
|
216
|
</div>
|
217
|
</div>
|
218
|
</div>
|
219
|
|
220
|
<?php if ($main_menu || $secondary_menu) { ?>
|
221
|
<div id="navigation"><div class="section">
|
222
|
<?php print theme('links__system_main_menu', array('links' => $main_menu, 'attributes' => array('id' => 'main-menu', 'class' => array('links', 'inline', 'clearfix')))); ?>
|
223
|
<?php print theme('links__system_secondary_menu', array('links' => $secondary_menu, 'attributes' => array('id' => 'secondary-menu', 'class' => array('links', 'inline', 'clearfix')))); ?>
|
224
|
</div></div>
|
225
|
<?php } ?>
|
226
|
|
227
|
<div class="clearfix cfie"></div>
|
228
|
|
229
|
|
230
|
<?php if ($page['menubar']) { ?>
|
231
|
<div id="menubar" class="menubar clearfix"<?php if(!empty($menubar_style)) echo $menubar_style; ?>>
|
232
|
<?php print render($page['menubar']); ?>
|
233
|
</div>
|
234
|
<?php } ?>
|
235
|
<?php if ($page['submenubar']) { ?>
|
236
|
<div id="submenubar" class="menubar clearfix">
|
237
|
<?php print render($page['submenubar']); ?>
|
238
|
</div>
|
239
|
<?php } ?>
|
240
|
|
241
|
|
242
|
<div class="spacer clearfix cfie"></div>
|
243
|
|
244
|
|
245
|
<div id="main-wrapper">
|
246
|
<div id="main" class="clearfix" style="<?php echo $main_style; ?>">
|
247
|
|
248
|
<?php print $messages; ?>
|
249
|
|
250
|
<?php if ($page['banner_top']) { ?>
|
251
|
<div id="banner-top" class="banner clearfix"><?php print render($page['banner_top']); ?></div>
|
252
|
<div class="spacer clearfix cfie"></div>
|
253
|
<?php } ?>
|
254
|
|
255
|
<?php if ($page['top_column_first'] | $page['top_column_second'] |
|
256
|
$page['top_column_third'] | $page['top_column_fourth']) { ?>
|
257
|
<div id="top-wrapper">
|
258
|
<div id="top-columns" class="clearfix">
|
259
|
<?php print mayo_build_columns( array(
|
260
|
$page['top_column_first'],
|
261
|
$page['top_column_second'],
|
262
|
$page['top_column_third'],
|
263
|
$page['top_column_fourth'],
|
264
|
));
|
265
|
?>
|
266
|
</div>
|
267
|
</div>
|
268
|
<?php } ?>
|
269
|
|
270
|
<div class="clearfix cfie"></div>
|
271
|
|
272
|
|
273
|
|
274
|
<div id="content" class="column"><div class="section">
|
275
|
|
276
|
<?php if ($page['highlighted']) { ?>
|
277
|
<div id="highlighted"><?php print render($page['highlighted']); ?></div>
|
278
|
<?php } ?>
|
279
|
|
280
|
<?php if ($breadcrumb && theme_get_setting('display_breadcrumb')) { ?>
|
281
|
<div id="breadcrumb"><?php print $breadcrumb; ?></div>
|
282
|
<?php } ?>
|
283
|
|
284
|
<a id="main-content"></a>
|
285
|
<?php print render($title_prefix); ?>
|
286
|
<?php if ($title): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
|
287
|
<?php print render($title_suffix); ?>
|
288
|
<?php if ($tabs): ?><div class="tabs clearfix"><?php print render($tabs); ?></div><?php endif; ?>
|
289
|
<?php print render($page['help']); ?>
|
290
|
<?php if ($action_links): ?><ul class="action-links"><?php print render($action_links); ?></ul><?php endif; ?>
|
291
|
<?php print render($page['content']); ?>
|
292
|
<?php print $feed_icons; ?>
|
293
|
|
294
|
</div></div>
|
295
|
|
296
|
|
297
|
<?php if ($page['sidebar_first']){ ?>
|
298
|
<div id="sidebar-first" class="column sidebar"><div class="section">
|
299
|
<?php print render($page['sidebar_first']); ?>
|
300
|
</div></div>
|
301
|
<?php } ?>
|
302
|
|
303
|
|
304
|
<?php if ($page['sidebar_second']) { ?>
|
305
|
<div id="sidebar-second" class="column sidebar"><div class="section">
|
306
|
<?php print render($page['sidebar_second']); ?>
|
307
|
</div></div>
|
308
|
<?php } ?>
|
309
|
|
310
|
|
311
|
<div class="clearfix cfie"></div>
|
312
|
|
313
|
<?php if ($page['bottom_column_first'] | $page['bottom_column_second'] |
|
314
|
$page['bottom_column_third'] | $page['bottom_column_fourth']) { ?>
|
315
|
<div id="bottom-wrapper">
|
316
|
<div id="bottom-columns" class="clearfix">
|
317
|
<?php print mayo_build_columns( array(
|
318
|
$page['bottom_column_first'],
|
319
|
$page['bottom_column_second'],
|
320
|
$page['bottom_column_third'],
|
321
|
$page['bottom_column_fourth'],
|
322
|
));
|
323
|
?>
|
324
|
</div>
|
325
|
</div>
|
326
|
<?php } ?>
|
327
|
|
328
|
<div class="clearfix cfie"></div>
|
329
|
|
330
|
|
331
|
<?php if ($page['banner_bottom']) { ?>
|
332
|
<div id="spacer" class="clearfix cfie"></div>
|
333
|
<div id="banner-bottom" class="banner clearfix"><?php print render($page['banner_bottom']); ?></div>
|
334
|
<?php } ?>
|
335
|
|
336
|
</div>
|
337
|
</div>
|
338
|
|
339
|
|
340
|
<div id="spacer" class="clearfix cfie"></div>
|
341
|
|
342
|
<div id="footer-wrapper">
|
343
|
<?php if ($page['footer_column_first'] | $page['footer_column_second'] |
|
344
|
$page['footer_column_third'] | $page['footer_column_fourth']) { ?>
|
345
|
<div id="footer-columns" class="clearfix">
|
346
|
<?php print mayo_build_columns( array(
|
347
|
$page['footer_column_first'],
|
348
|
$page['footer_column_second'],
|
349
|
$page['footer_column_third'],
|
350
|
$page['footer_column_fourth'],
|
351
|
));
|
352
|
?>
|
353
|
</div>
|
354
|
<?php } ?>
|
355
|
|
356
|
<?php if ($page['footer']) { ?>
|
357
|
<div id="footer"><div class="section">
|
358
|
<?php print render($page['footer']); ?>
|
359
|
</div></div>
|
360
|
<?php } ?>
|
361
|
|
362
|
</div>
|
363
|
</div>
|
364
|
</div>
|