Removed embedded CSS and properly named a few elements
[moodle.git] / theme / boxxie / layout / frontpage.php
CommitLineData
1cbdc5a3
PM
1<?php
2
3$hasheading = ($PAGE->heading);
4$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
5$hasfooter = (empty($PAGE->layout_options['nofooter']));
6$hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
7$hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
8
9$bodyclasses = array();
10if ($hassidepre && !$hassidepost) {
11 $bodyclasses[] = 'side-pre-only';
12} else if ($hassidepost && !$hassidepre) {
13 $bodyclasses[] = 'side-post-only';
14} else if (!$hassidepost && !$hassidepre) {
15 $bodyclasses[] = 'content-only';
16}
17
18echo $OUTPUT->doctype() ?>
19<html <?php echo $OUTPUT->htmlattributes() ?>>
20<head>
21 <title><?php echo $PAGE->title; ?></title>
22 <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
23 <?php echo $OUTPUT->standard_head_html() ?>
24</head>
25
26<body id="<?php echo $PAGE->bodyid ?>" class="<?php echo $PAGE->bodyclasses.' '.join(' ', $bodyclasses) ?>">
27
28<?php echo $OUTPUT->standard_top_of_body_html() ?>
29
30<?php if ($hasheading || $hasnavbar) { ?>
31
32<div id="page-wrapper">
33 <div id="page" class="clearfix">
34
279fac50 35 <div id="page-header" class="clearfix">
1cbdc5a3
PM
36 <?php if ($PAGE->heading) { ?>
37 <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
38 <div class="headermenu">
39 <?php echo $OUTPUT->login_info();
40 if (!empty($PAGE->layout_options['langmenu'])) {
41 echo $OUTPUT->lang_menu();
42 }
43 echo $PAGE->headingmenu; ?>
44 </div>
45 <?php } ?>
46 </div>
47
48
49 <?php if ($hasnavbar) { ?>
50 <div class="navbar clearfix">
51 <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
52 <div class="navbutton"> <?php echo $PAGE->button; ?></div>
53 </div>
54 <?php } ?>
55
56<?php } ?>
57
58 <div id="page-content">
8e0d1f85
PM
59 <div id="region-main-box">
60 <div id="region-post-box">
61
62 <div id="region-main-wrap">
63 <div id="region-main">
64 <div class="region-content">
65 <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
66 </div>
67 </div>
68 </div>
69
70 <?php if ($hassidepre) { ?>
71 <div id="region-pre">
72 <div class="region-content">
73 <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
74 </div>
75 </div>
76 <?php } ?>
77
78 <?php if ($hassidepost) { ?>
79 <div id="region-post">
80 <div class="region-content">
81 <?php echo $OUTPUT->blocks_for_region('side-post') ?>
82 </div>
83 </div>
84 <?php } ?>
85
1cbdc5a3 86 </div>
1cbdc5a3 87 </div>
1cbdc5a3
PM
88 </div>
89
90<?php if ($hasfooter) { ?>
91
92 <div id="page-footer" class="clearfix">
93 <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
94 <?php
95 echo $OUTPUT->login_info();
96 echo $OUTPUT->home_link();
97 echo $OUTPUT->standard_footer_html();
98 ?>
99 </div>
100
101<?php }
102
103if ($hasheading || $hasnavbar) { ?>
104
105 </div> <!-- END #page -->
106</div> <!-- END #page-wrapper -->
107
108<?php } ?>
109
110
111<?php echo $OUTPUT->standard_end_of_body_html() ?>
112</body>
113</html>