Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-39824 theme_bootstrapbase: converted $PAGE use to new $OUTPUT met…

…hods.
  • Loading branch information...
commit 6964e6a5800fe69ec8022d58c0d25eb9c332516a 1 parent 5c8c94e
@samhemelryk samhemelryk authored
View
52 theme/bootstrapbase/config.php
@@ -32,7 +32,7 @@
$THEME->doctype = 'html5';
$THEME->yuicssmodules = array();
$THEME->name = 'bootstrapbase';
-$THEME->parents = array('');
+$THEME->parents = array();
$THEME->sheets = array('moodle');
$THEME->supportscssoptimisation = false;
@@ -52,115 +52,112 @@
$THEME->layouts = array(
// Most backwards compatible layout without the blocks - this is the layout used by default.
'base' => array(
- 'file' => 'general.php',
+ 'file' => 'columns1.php',
'regions' => array(),
),
// Standard layout with blocks, this is recommended for most pages with general information.
'standard' => array(
- 'file' => 'general.php',
+ 'file' => 'columns3.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre',
),
// Main course page.
'course' => array(
- 'file' => 'general.php',
+ 'file' => 'columns3.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true),
),
'coursecategory' => array(
- 'file' => 'general.php',
+ 'file' => 'columns3.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre',
),
// part of course, typical for modules - default page layout if $cm specified in require_login()
'incourse' => array(
- 'file' => 'general.php',
+ 'file' => 'columns3.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre',
),
// The site home page.
'frontpage' => array(
- 'file' => 'general.php',
+ 'file' => 'columns3.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre',
'options' => array('nonavbar'=>true),
),
// Server administration scripts.
'admin' => array(
- 'file' => 'general.php',
+ 'file' => 'columns2.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre',
),
// My dashboard page.
'mydashboard' => array(
- 'file' => 'general.php',
+ 'file' => 'columns3.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true),
),
// My public page.
'mypublic' => array(
- 'file' => 'general.php',
+ 'file' => 'columns3.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre',
),
'login' => array(
- 'file' => 'general.php',
+ 'file' => 'columns1.php',
'regions' => array(),
'options' => array('langmenu'=>true),
),
// Pages that appear in pop-up windows - no navigation, no blocks, no header.
'popup' => array(
- 'file' => 'general.php',
+ 'file' => 'columns1.php',
'regions' => array(),
- 'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true, 'nologininfo'=>true, 'nocourseheaderfooter'=>true),
+ 'options' => array('nofooter'=>true, 'nonavbar'=>true),
),
// No blocks and minimal footer - used for legacy frame layouts only!
'frametop' => array(
- 'file' => 'general.php',
+ 'file' => 'columns1.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nocoursefooter'=>true),
),
// Embeded pages, like iframe/object embeded in moodleform - it needs as much space as possible
'embedded' => array(
'file' => 'embedded.php',
- 'regions' => array(),
- 'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true, 'nocourseheaderfooter'=>true),
+ 'regions' => array()
),
// Used during upgrade and install, and for the 'This site is undergoing maintenance' message.
// This must not have any blocks, and it is good idea if it does not have links to
// other places - for example there should not be a home link in the footer...
'maintenance' => array(
- 'file' => 'general.php',
+ 'file' => 'columns1.php',
'regions' => array(),
- 'options' => array('noblocks'=>true, 'nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true, 'nocourseheaderfooter'=>true),
+ 'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocoursefooter'=>true, 'nocourseheader'=>true),
),
// Should display the content and basic headers only.
'print' => array(
- 'file' => 'general.php',
+ 'file' => 'columns1.php',
'regions' => array(),
- 'options' => array('noblocks'=>true, 'nofooter'=>true, 'nonavbar'=>false, 'nocustommenu'=>true, 'nocourseheaderfooter'=>true),
+ 'options' => array('nofooter'=>true, 'nonavbar'=>false),
),
// The pagelayout used when a redirection is occuring.
'redirect' => array(
'file' => 'embedded.php',
'regions' => array(),
- 'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true, 'nocourseheaderfooter'=>true),
),
// The pagelayout used for reports.
'report' => array(
- 'file' => 'general.php',
+ 'file' => 'columns2.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre',
),
// The pagelayout used for safebrowser and securewindow.
'secure' => array(
- 'file' => 'general.php',
+ 'file' => 'secure.php',
'regions' => array('side-pre', 'side-post'),
- 'defaultregion' => 'side-pre',
- 'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true, 'nologinlinks'=>true, 'nocourseheaderfooter'=>true),
+ 'defaultregion' => 'side-pre'
),
);
@@ -175,3 +172,8 @@
}
$THEME->hidefromselector = true;
+
+$THEME->blockrtlmanipulations = array(
+ 'side-pre' => 'side-post',
+ 'side-post' => 'side-pre'
+);
View
85 theme/bootstrapbase/layout/columns1.php
@@ -0,0 +1,85 @@
+<?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+
+echo $OUTPUT->doctype() ?>
+<html <?php echo $OUTPUT->htmlattributes(); ?>>
+<head>
+ <title><?php echo $OUTPUT->page_title(); ?></title>
+ <link rel="shortcut icon" href="<?php echo $OUTPUT->favicon(); ?>" />
+ <?php echo $OUTPUT->standard_head_html() ?>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+</head>
+
+<body <?php echo $OUTPUT->body_attributes(); ?>>
+
+<?php echo $OUTPUT->standard_top_of_body_html() ?>
+
+<header role="banner" class="navbar navbar-fixed-top">
+ <nav role="navigation" class="navbar-inner">
+ <div class="container-fluid">
+ <a class="brand" href="<?php echo $CFG->wwwroot;?>"><?php echo $SITE->shortname; ?></a>
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </a>
+ <div class="nav-collapse collapse">
+ <?php echo $OUTPUT->custom_menu(); ?>
+ <ul class="nav pull-right">
+ <li><?php echo $OUTPUT->page_heading_menu(); ?></li>
+ <li class="navbar-text"><?php echo $OUTPUT->login_info() ?></li>
+ </ul>
+ </div>
+ </div>
+ </nav>
+</header>
+
+<div id="page" class="container-fluid">
+
+ <header id="page-header" class="clearfix">
+ <div id="page-navbar">
+ <nav class="breadcrumb-button"><?php echo $OUTPUT->page_heading_button(); ?></nav>
+ <?php echo $OUTPUT->navbar(); ?>
+ </div>
+ <?php echo $OUTPUT->page_heading(); ?>
+ <div id="course-header">
+ <?php echo $OUTPUT->course_header(); ?>
+ </div>
+ </header>
+
+ <div id="page-content">
+ <div id="region-bs-main-and-pre">
+ <section id="region-main">
+ <?php
+ echo $OUTPUT->course_content_header();
+ echo $OUTPUT->main_content();
+ echo $OUTPUT->course_content_footer();
+ ?>
+ </section>
+ </div>
+ </div>
+
+ <footer id="page-footer">
+ <div id="course-footer"><?php echo $OUTPUT->course_footer(); ?></div>
+ <p class="helplink"><?php echo $OUTPUT->page_doc_link(); ?></p>
+ <?php echo $OUTPUT->standard_footer_html(); ?>
+ </footer>
+
+ <?php echo $OUTPUT->standard_end_of_body_html() ?>
+
+</div>
+</body>
+</html>
View
96 theme/bootstrapbase/layout/columns2.php
@@ -0,0 +1,96 @@
+<?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+
+echo $OUTPUT->doctype() ?>
+<html <?php echo $OUTPUT->htmlattributes(); ?>>
+<head>
+ <title><?php echo $OUTPUT->page_title(); ?></title>
+ <link rel="shortcut icon" href="<?php echo $OUTPUT->favicon(); ?>" />
+ <?php echo $OUTPUT->standard_head_html() ?>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+</head>
+
+<body <?php echo $OUTPUT->body_attributes('two-column'); ?>>
+
+<?php echo $OUTPUT->standard_top_of_body_html() ?>
+
+<header role="banner" class="navbar navbar-fixed-top">
+ <nav role="navigation" class="navbar-inner">
+ <div class="container-fluid">
+ <a class="brand" href="<?php echo $CFG->wwwroot;?>"><?php echo $SITE->shortname; ?></a>
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </a>
+ <div class="nav-collapse collapse">
+ <?php echo $OUTPUT->custom_menu(); ?>
+ <ul class="nav pull-right">
+ <li><?php echo $OUTPUT->page_heading_menu(); ?></li>
+ <li class="navbar-text"><?php echo $OUTPUT->login_info() ?></li>
+ </ul>
+ </div>
+ </div>
+ </nav>
+</header>
+
+<div id="page" class="container-fluid">
+
+ <header id="page-header" class="clearfix">
+ <div id="page-navbar">
+ <nav class="breadcrumb-button"><?php echo $OUTPUT->page_heading_button(); ?></nav>
+ <?php echo $OUTPUT->navbar(); ?>
+ </div>
+ <?php echo $OUTPUT->page_heading(); ?>
+ <div id="course-header">
+ <?php echo $OUTPUT->course_header(); ?>
+ </div>
+ </header>
+
+ <div id="page-content" class="row-fluid">
+ <div id="region-bs-main-and-pre" class="span9">
+ <div class="row-fluid">
+ <section id="region-main" class="span9 pull-right">
+ <?php
+ echo $OUTPUT->course_content_header();
+ echo $OUTPUT->main_content();
+ echo $OUTPUT->course_content_footer();
+ ?>
+ </section>
+ <?php
+ if (!right_to_left()) {
+ echo $OUTPUT->blocks('side-pre', 'span3 desktop-first-column');
+ } ?>
+ </div>
+ </div>
+ <?php
+ if (right_to_left()) {
+ echo $OUTPUT->blocks('side-post', 'span3');
+ }
+ ?>
+ </div>
+
+ <footer id="page-footer">
+ <div id="course-footer"><?php echo $OUTPUT->course_footer(); ?></div>
+ <p class="helplink"><?php echo $OUTPUT->page_doc_link(); ?></p>
+ <?php echo $OUTPUT->standard_footer_html(); ?>
+ </footer>
+
+ <?php echo $OUTPUT->standard_end_of_body_html() ?>
+
+</div>
+</body>
+</html>
View
180 theme/bootstrapbase/layout/columns3.php
@@ -14,70 +14,16 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-$hasheading = ($PAGE->heading);
-$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
-$hasfooter = (empty($PAGE->layout_options['nofooter']));
-$hasheader = (empty($PAGE->layout_options['noheader']));
-
-$hassidepre = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT));
-$hassidepost = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-post', $OUTPUT));
-
-$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
-$showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
-
-// If there can be a sidepost region on this page and we are editing, always
-// show it so blocks can be dragged into it.
-if ($PAGE->user_is_editing()) {
- if ($PAGE->blocks->is_known_region('side-pre')) {
- $showsidepre = true;
- }
- if ($PAGE->blocks->is_known_region('side-post')) {
- $showsidepost = true;
- }
-}
-
-$custommenu = $OUTPUT->custom_menu();
-$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
-
-$courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = '';
-
-if (empty($PAGE->layout_options['nocourseheaderfooter'])) {
- $courseheader = $OUTPUT->course_header();
- $coursecontentheader = $OUTPUT->course_content_header();
- if (empty($PAGE->layout_options['nocoursefooter'])) {
- $coursecontentfooter = $OUTPUT->course_content_footer();
- $coursefooter = $OUTPUT->course_footer();
- }
-}
-
-$layout = 'pre-and-post';
-if ($showsidepre && !$showsidepost) {
- if (!right_to_left()) {
- $layout = 'side-pre-only';
- } else {
- $layout = 'side-post-only';
- }
-} else if ($showsidepost && !$showsidepre) {
- if (!right_to_left()) {
- $layout = 'side-post-only';
- } else {
- $layout = 'side-pre-only';
- }
-} else if (!$showsidepost && !$showsidepre) {
- $layout = 'content-only';
-}
-$bodyclasses[] = $layout;
-
echo $OUTPUT->doctype() ?>
-<html <?php echo $OUTPUT->htmlattributes() ?>>
+<html <?php echo $OUTPUT->htmlattributes(); ?>>
<head>
- <title><?php echo $PAGE->title ?></title>
- <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
+ <title><?php echo $OUTPUT->page_title(); ?></title>
+ <link rel="shortcut icon" href="<?php echo $OUTPUT->favicon(); ?>" />
<?php echo $OUTPUT->standard_head_html() ?>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
-<body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join($bodyclasses)) ?>">
+<body <?php echo $OUTPUT->body_attributes(); ?>>
<?php echo $OUTPUT->standard_top_of_body_html() ?>
@@ -91,13 +37,11 @@
<span class="icon-bar"></span>
</a>
<div class="nav-collapse collapse">
- <?php if ($hascustommenu) {
- echo $custommenu;
- } ?>
- <ul class="nav pull-right">
- <li><?php echo $PAGE->headingmenu ?></li>
- <li class="navbar-text"><?php echo $OUTPUT->login_info() ?></li>
- </ul>
+ <?php echo $OUTPUT->custom_menu(); ?>
+ <ul class="nav pull-right">
+ <li><?php echo $OUTPUT->page_heading_menu(); ?></li>
+ <li class="navbar-text"><?php echo $OUTPUT->login_info() ?></li>
+ </ul>
</div>
</div>
</nav>
@@ -105,85 +49,41 @@
<div id="page" class="container-fluid">
-<?php if ($hasheader) { ?>
-<header id="page-header" class="clearfix">
- <?php if ($hasnavbar) { ?>
- <nav class="breadcrumb-button"><?php echo $PAGE->button; ?></nav>
- <?php echo $OUTPUT->navbar(); ?>
- <?php } ?>
- <h1><?php echo $PAGE->heading ?></h1>
-
- <?php if (!empty($courseheader)) { ?>
- <div id="course-header"><?php echo $courseheader; ?></div>
- <?php } ?>
-</header>
-<?php } ?>
-
-<div id="page-content" class="row-fluid">
-
-<?php if ($layout === 'pre-and-post') { ?>
- <div id="region-bs-main-and-pre" class="span9">
- <div class="row-fluid">
- <section id="region-main" class="span8 pull-right">
-<?php } else if ($layout === 'side-post-only') { ?>
- <section id="region-main" class="span9">
-<?php } else if ($layout === 'side-pre-only') { ?>
- <section id="region-main" class="span9 pull-right">
-<?php } else if ($layout === 'content-only') { ?>
- <section id="region-main" class="span12">
-<?php } ?>
-
-
- <?php echo $coursecontentheader; ?>
- <?php echo $OUTPUT->main_content() ?>
- <?php echo $coursecontentfooter; ?>
- </section>
-
-
-<?php if ($layout !== 'content-only') {
- if ($layout === 'pre-and-post') { ?>
- <aside class="span4 desktop-first-column">
- <?php } else if ($layout === 'side-pre-only') { ?>
- <aside class="span3 desktop-first-column">
- <?php } ?>
- <div id="region-pre" class="block-region">
- <div class="region-content">
- <?php
- if (!right_to_left()) {
- echo $OUTPUT->blocks_for_region('side-pre');
- } else if ($hassidepost) {
- echo $OUTPUT->blocks_for_region('side-post');
- } ?>
- </div>
- </div>
- </aside>
- <?php if ($layout === 'pre-and-post') {
- ?></div></div><?php // Close row-fluid and span9.
- }
-
- if ($layout === 'side-post-only' OR $layout === 'pre-and-post') { ?>
- <aside class="span3">
- <div id="region-post" class="block-region">
- <div class="region-content">
- <?php if (!right_to_left()) {
- echo $OUTPUT->blocks_for_region('side-post');
- } else {
- echo $OUTPUT->blocks_for_region('side-pre');
- } ?>
+ <header id="page-header" class="clearfix">
+ <div id="page-navbar">
+ <nav class="breadcrumb-button"><?php echo $OUTPUT->page_heading_button(); ?></nav>
+ <?php echo $OUTPUT->navbar(); ?>
</div>
+ <?php echo $OUTPUT->page_heading(); ?>
+ <div id="course-header">
+ <?php echo $OUTPUT->course_header(); ?>
</div>
- </aside>
- <?php } ?>
-<?php } ?>
-</div>
+ </header>
+
+ <div id="page-content" class="row-fluid">
+ <div id="region-bs-main-and-pre" class="span9">
+ <div class="row-fluid">
+ <section id="region-main" class="span8 pull-right">
+ <?php
+ echo $OUTPUT->course_content_header();
+ echo $OUTPUT->main_content();
+ echo $OUTPUT->course_content_footer();
+ ?>
+ </section>
+ <?php echo $OUTPUT->blocks('side-pre', 'span4 desktop-first-column'); ?>
+ </div>
+ </div>
+ <?php echo $OUTPUT->blocks('side-post', 'span3'); ?>
+ </div>
-<footer id="page-footer">
- <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
- <?php echo $OUTPUT->standard_footer_html(); ?>
-</footer>
+ <footer id="page-footer">
+ <div id="course-footer"><?php echo $OUTPUT->course_footer(); ?></div>
+ <p class="helplink"><?php echo $OUTPUT->page_doc_link(); ?></p>
+ <?php echo $OUTPUT->standard_footer_html(); ?>
+ </footer>
-<?php echo $OUTPUT->standard_end_of_body_html() ?>
+ <?php echo $OUTPUT->standard_end_of_body_html() ?>
</div>
</body>
-</html>
+</html>
View
40 theme/bootstrapbase/layout/embedded.php
@@ -1,23 +1,35 @@
-<?php echo $OUTPUT->doctype() ?>
-<html <?php echo $OUTPUT->htmlattributes() ?>>
+<?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+
+echo $OUTPUT->doctype() ?>
+<html <?php echo $OUTPUT->htmlattributes(); ?>>
<head>
- <title><?php echo $PAGE->title ?></title>
- <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
+ <title><?php echo $OUTPUT->page_title(); ?></title>
+ <link rel="shortcut icon" href="<?php echo $OUTPUT->favicon(); ?>" />
<?php echo $OUTPUT->standard_head_html() ?>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
-<body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses) ?>">
-<?php echo $OUTPUT->standard_top_of_body_html() ?>
+<body <?php echo $OUTPUT->body_attributes(); ?>>
+<?php echo $OUTPUT->standard_top_of_body_html() ?>
<div id="page">
-
-<!-- END OF HEADER -->
-
- <div id="content" class="clearfix">
- <?php echo $OUTPUT->main_content() ?>
+ <div id="page-content" class="clearfix">
+ <?php echo $OUTPUT->main_content(); ?>
</div>
-
-<!-- START OF FOOTER -->
</div>
<?php echo $OUTPUT->standard_end_of_body_html() ?>
</body>
-</html>
+</html>
View
70 theme/bootstrapbase/layout/secure.php
@@ -0,0 +1,70 @@
+<?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+
+echo $OUTPUT->doctype() ?>
+<html <?php echo $OUTPUT->htmlattributes(); ?>>
+<head>
+ <title><?php echo $OUTPUT->page_title(); ?></title>
+ <link rel="shortcut icon" href="<?php echo $OUTPUT->favicon(); ?>" />
+ <?php echo $OUTPUT->standard_head_html() ?>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+</head>
+
+<body <?php echo $OUTPUT->body_attributes(); ?>>
+
+<?php echo $OUTPUT->standard_top_of_body_html() ?>
+
+<header role="banner" class="navbar navbar-fixed-top">
+ <nav role="navigation" class="navbar-inner">
+ <div class="container-fluid">
+ <a class="brand" href="<?php echo $CFG->wwwroot;?>"><?php echo $SITE->shortname; ?></a>
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </a>
+ <div class="nav-collapse collapse">
+ <ul class="nav pull-right">
+ <li><?php echo $OUTPUT->page_heading_menu(); ?></li>
+ </ul>
+ </div>
+ </div>
+ </nav>
+</header>
+
+<div id="page" class="container-fluid">
+
+ <header id="page-header" class="clearfix">
+ <?php echo $OUTPUT->page_heading(); ?>
+ </header>
+
+ <div id="page-content" class="row-fluid">
+ <div id="region-bs-main-and-pre" class="span9">
+ <div class="row-fluid">
+ <section id="region-main" class="span8 pull-right">
+ <?php echo $OUTPUT->main_content(); ?>
+ </section>
+ <?php echo $OUTPUT->blocks('side-pre', 'span4 desktop-first-column'); ?>
+ </div>
+ </div>
+ <?php echo $OUTPUT->blocks('side-post', 'span3'); ?>
+ </div>
+
+ <?php echo $OUTPUT->standard_end_of_body_html() ?>
+
+</div>
+</body>
+</html>
View
3  theme/bootstrapbase/less/moodle.less
@@ -1,3 +1,6 @@
+// Import the bootstrap variables.
+@import "bootstrap/variables.less";
+
// Old Moodle stuff from base theme.
// Massive, needs broken up.
@import "moodle/core";
View
41 theme/bootstrapbase/less/moodle/core.less
@@ -1,4 +1,45 @@
/* core.less */
+
+/** Page layout CSS starts **/
+.layout-option-noheader #page-header,
+.layout-option-nonavbar #page-navbar,
+.layout-option-nofooter #page-footer,
+.layout-option-nocourseheader .course-content-header,
+.layout-option-nocoursefooter .course-content-footer {
+ display:none;
+}
+
+.empty-region-side-pre #block-region-side-pre,
+.empty-region-side-post #block-region-side-post {
+ display:none;
+}
+
+.dir-ltr.two-column #region-bs-main-and-pre.span9,
+.dir-rtl.two-column #region-main.span9,
+.empty-region-side-post #region-bs-main-and-pre.span9 {
+ width:100%;
+}
+
+.empty-region-side-pre #region-main {
+ float:none;
+ width:100%;
+}
+
+.fluid-span (@columns) {
+ width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1));
+ *width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%);
+}
+
+.empty-region-side-post.used-region-side-pre #region-main.span8 {
+ /** increase the span size by 1 **/
+ .fluid-span(9);
+}
+.empty-region-side-post.used-region-side-pre #block-region-side-pre.span4 {
+ /** decrease the span size by 1 **/
+ .fluid-span(3);
+}
+/** Page layout CSS ends **/
+
.dir-ltr,
.mdl-left,
.dir-rtl .mdl-right {
View
2  theme/bootstrapbase/style/moodle.css
1 addition, 1 deletion not shown
Please sign in to comment.
Something went wrong with that request. Please try again.