eced8e3dab69d98e71b02ac7916cbaccce9f4bff
[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 } ?>
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>
73 <!-- END OF HEADER -->
75 <!-- START OF CONTENT -->
76 <?php if ($hascustommenu) { ?>
77       <div id="custommenu"><?php echo $custommenu; ?></div>
78 <?php } ?>
80 <div id="page-content-wrapper">
81     <div id="page-content">
82         <div id="region-main-box">
83             <div id="region-post-box">
85                 <div id="region-main-wrap">
86                     <div id="region-main">
87                         <div class="region-content">
88                             <?php echo $OUTPUT->main_content() ?>
89                         </div>
90                     </div>
91                 </div>
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 } ?>
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 } ?>
109             </div>
110         </div>
111     </div>
112 </div>
114 <!-- END OF CONTENT -->
116 </div>
118 <!-- END OF WRAPPER -->
120 <!-- START OF FOOTER -->
122         <div id="page-footer">
125         <!-- START OF FOOTER-INNER -->
127                 <div id="page-footer-inner">
128                         <div class="footnote"><?php echo $footnote; ?></div>
129                         <?php
130                         echo $OUTPUT->login_info();
131                         ?>
132                 </div>
134         <!-- END OF FOOTER-INNER -->
136                 <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')); ?></p>
137                 <?php echo $OUTPUT->home_link(); ?>
138                 <?php echo $OUTPUT->standard_footer_html(); ?>
141         </div>
143 <!-- END OF FOOTER -->
145 </div>
147 <!-- END OF PAGE -->
148 <?php echo $OUTPUT->standard_end_of_body_html() ?>
149 </body>
150 </html>