MDL-31189 whitespace fixes
[moodle.git] / theme / sky_high / layout / frontpage.php
1 <?php
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));
6 $showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
7 $showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
9 $custommenu = $OUTPUT->custom_menu();
10 $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
12 $bodyclasses = array();
13 if ($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 }
20 if ($hassidepre || $hassidepost) {
21     $bodyclasses[] = 'background';
22 }
24 if (!empty($PAGE->theme->settings->logo)) {
25     $logourl = $PAGE->theme->settings->logo;
26 } else {
27     $logourl = NULL;
28 }
30 if (!empty($PAGE->theme->settings->footnote)) {
31     $footnote = $PAGE->theme->settings->footnote;
32 } else {
33     $footnote = '<!-- There was no custom footnote set -->';
34 }
36 echo $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 p(strip_tags(format_text($SITE->summary, FORMAT_HTML))) ?>" />
42     <?php echo $OUTPUT->standard_head_html() ?>
43 </head>
44 <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
45 <?php echo $OUTPUT->standard_top_of_body_html() ?>
47 <div id="page">
48     <div id="wrapper" class="clearfix">
50 <!-- START OF HEADER -->
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 } ?>
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>
70     </div>
72 <!-- END OF HEADER -->
74 <!-- START OF CONTENT -->
75 <?php if ($hascustommenu) { ?>
76       <div id="custommenu"><?php echo $custommenu; ?></div>
77 <?php } ?>
79 <div id="page-content-wrapper">
80     <div id="page-content">
81         <div id="region-main-box">
82             <div id="region-post-box">
84                 <div id="region-main-wrap">
85                     <div id="region-main">
86                         <div class="region-content">
87                             <?php echo $OUTPUT->main_content() ?>
88                         </div>
89                     </div>
90                 </div>
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 } ?>
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 } ?>
108             </div>
109         </div>
110     </div>
111 </div>
113 <!-- END OF CONTENT -->
115 </div>
117 <!-- END OF WRAPPER -->
119 <!-- START OF FOOTER -->
121     <div id="page-footer">
124     <!-- START OF FOOTER-INNER -->
126         <div id="page-footer-inner">
127             <div class="footnote"><?php echo $footnote; ?></div>
128             <?php
129             echo $OUTPUT->login_info();
130             ?>
131         </div>
133     <!-- END OF FOOTER-INNER -->
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(); ?>
139 </div>
141 <!-- END OF FOOTER -->
143 </div>
145 <!-- END OF PAGE -->
146 <?php echo $OUTPUT->standard_end_of_body_html() ?>
147 </body>
148 </html>