MDL-31189 whitespace fixes
[moodle.git] / theme / sky_high / layout / frontpage.php
CommitLineData
dc38e364
S
1<?php
2
3$hassidepre = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT));
4$hassidepost = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-post', $OUTPUT));
0ae36f66 5
dc38e364
S
6$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
7$showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
8
9$custommenu = $OUTPUT->custom_menu();
10$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
11
12$bodyclasses = array();
13if ($showsidepre && !$showsidepost) {
14 $bodyclasses[] = 'side-pre-only';
15} else if ($showsidepost && !$showsidepre) {
16 $bodyclasses[] = 'side-post-only';
17} else if (!$showsidepost && !$showsidepre) {
18 $bodyclasses[] = 'content-only';
19}
20if ($hassidepre || $hassidepost) {
df31835a 21 $bodyclasses[] = 'background';
dc38e364
S
22}
23
24if (!empty($PAGE->theme->settings->logo)) {
25 $logourl = $PAGE->theme->settings->logo;
26} else {
27 $logourl = NULL;
28}
29
30if (!empty($PAGE->theme->settings->footnote)) {
31 $footnote = $PAGE->theme->settings->footnote;
32} else {
33 $footnote = '<!-- There was no custom footnote set -->';
34}
35
36echo $OUTPUT->doctype() ?>
37<html <?php echo $OUTPUT->htmlattributes() ?>>
38<head>
39 <title><?php echo $PAGE->title ?></title>
40 <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
0ae36f66 41 <meta name="description" content="<?php p(strip_tags(format_text($SITE->summary, FORMAT_HTML))) ?>" />
dc38e364
S
42 <?php echo $OUTPUT->standard_head_html() ?>
43</head>
0ae36f66 44<body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
dc38e364
S
45<?php echo $OUTPUT->standard_top_of_body_html() ?>
46
47<div id="page">
df31835a 48 <div id="wrapper" class="clearfix">
0ae36f66 49
dc38e364 50<!-- START OF HEADER -->
0ae36f66 51
dc38e364 52 <div id="page-header" class="clearfix">
df31835a
EL
53 <div id="page-header-wrapper">
54 <?php if($logourl == NULL) { ?>
55 <h1 class="headermain">
56 <?php echo $PAGE->heading ?>
57 </h1>
58 <?php } else { ?>
59 <img class="logo" src="<?php echo $logourl;?>" alt="Custom logo here" />
60 <?php } ?>
61
62 <div class="headermenu">
63 <?php
64 echo $OUTPUT->login_info();
65 echo $OUTPUT->lang_menu();
66 echo $PAGE->headingmenu;
67 ?>
68 </div>
69 </div>
dc38e364 70 </div>
0ae36f66 71
dc38e364
S
72<!-- END OF HEADER -->
73
74<!-- START OF CONTENT -->
75<?php if ($hascustommenu) { ?>
76 <div id="custommenu"><?php echo $custommenu; ?></div>
77<?php } ?>
0ae36f66 78
dc38e364
S
79<div id="page-content-wrapper">
80 <div id="page-content">
81 <div id="region-main-box">
82 <div id="region-post-box">
0ae36f66 83
dc38e364
S
84 <div id="region-main-wrap">
85 <div id="region-main">
86 <div class="region-content">
3b3f3028 87 <?php echo $OUTPUT->main_content() ?>
dc38e364
S
88 </div>
89 </div>
90 </div>
0ae36f66 91
dc38e364
S
92 <?php if ($hassidepre) { ?>
93 <div id="region-pre" class="block-region">
94 <div class="region-content">
95 <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
96 </div>
97 </div>
98 <?php } ?>
0ae36f66 99
dc38e364
S
100 <?php if ($hassidepost) { ?>
101 <div id="region-post" class="block-region">
102 <div class="region-content">
103 <?php echo $OUTPUT->blocks_for_region('side-post') ?>
104 </div>
105 </div>
106 <?php } ?>
0ae36f66 107
dc38e364
S
108 </div>
109 </div>
110 </div>
111</div>
112
113<!-- END OF CONTENT -->
114
739efc85 115</div>
0ae36f66 116
739efc85 117<!-- END OF WRAPPER -->
dc38e364
S
118
119<!-- START OF FOOTER -->
120
df31835a 121 <div id="page-footer">
739efc85 122
739efc85 123
df31835a 124 <!-- START OF FOOTER-INNER -->
739efc85 125
df31835a
EL
126 <div id="page-footer-inner">
127 <div class="footnote"><?php echo $footnote; ?></div>
128 <?php
129 echo $OUTPUT->login_info();
130 ?>
131 </div>
739efc85 132
df31835a 133 <!-- END OF FOOTER-INNER -->
739efc85 134
df31835a
EL
135 <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')); ?></p>
136 <?php echo $OUTPUT->home_link(); ?>
137 <?php echo $OUTPUT->standard_footer_html(); ?>
739efc85 138
df31835a 139</div>
dc38e364
S
140
141<!-- END OF FOOTER -->
739efc85 142
dc38e364 143</div>
739efc85
ME
144
145<!-- END OF PAGE -->
146<?php echo $OUTPUT->standard_end_of_body_html() ?>
dc38e364 147</body>
df31835a 148</html>