themes lib MDL-24895 Multiple fixes to better handle overflow.
[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));
5
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) {
21 $bodyclasses[] = 'background';
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')?>" />
41 <meta name="description" content="<?php echo strip_tags(format_text($SITE->summary, FORMAT_HTML)) ?>" />
42 <?php echo $OUTPUT->standard_head_html() ?>
43</head>
44<body id="<?php echo $PAGE->bodyid ?>" class="<?php echo $PAGE->bodyclasses.' '.join(' ', $bodyclasses) ?>">
45<?php echo $OUTPUT->standard_top_of_body_html() ?>
46
47<div id="page">
48 <div id="wrapper" class="clearfix">
49
50<!-- START OF HEADER -->
51
52 <div id="page-header" class="clearfix">
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
63 <div class="headermenu">
64 <?php
65 echo $OUTPUT->login_info();
66 echo $OUTPUT->lang_menu();
67 echo $PAGE->headingmenu;
68 ?>
69 </div>
70 </div>
71 </div>
72
73<!-- END OF HEADER -->
74
75<!-- START OF CONTENT -->
76<?php if ($hascustommenu) { ?>
77 <div id="custommenu"><?php echo $custommenu; ?></div>
78<?php } ?>
79
80<div id="page-content-wrapper">
81 <div id="page-content">
82 <div id="region-main-box">
83 <div id="region-post-box">
84
85 <div id="region-main-wrap">
86 <div id="region-main">
87 <div class="region-content">
88 <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
89 </div>
90 </div>
91 </div>
92
93 <?php if ($hassidepre) { ?>
94 <div id="region-pre" class="block-region">
95 <div class="region-content">
96 <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
97 </div>
98 </div>
99 <?php } ?>
100
101 <?php if ($hassidepost) { ?>
102 <div id="region-post" class="block-region">
103 <div class="region-content">
104 <?php echo $OUTPUT->blocks_for_region('side-post') ?>
105 </div>
106 </div>
107 <?php } ?>
108
109 </div>
110 </div>
111 </div>
112</div>
113
114<!-- END OF CONTENT -->
115
116
117
118<!-- START OF FOOTER -->
119
120 <div id="page-footer">
121 <div class="footnote"><?php echo $footnote; ?></div>
122 <?php
123 echo $OUTPUT->login_info();
124 echo $OUTPUT->standard_footer_html();
125 ?>
126 </div>
127
128<!-- END OF FOOTER -->
129</div>
130</div>
131 <p class="helplink">
132 <?php echo page_doc_link(get_string('moodledocslink')) ?>
133 </p><center>
134 <?php
135 echo $OUTPUT->home_link();
136 echo $OUTPUT->standard_end_of_body_html() ?>
137</center>
138</body>
139</html>