2 // This file is part of Moodle - http://moodle.org/
4 // Moodle is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // Moodle is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
20 * @package theme_boost
21 * @copyright 2016 Frédéric Massart
22 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
25 defined('MOODLE_INTERNAL') ||
die();
27 require_once(__DIR__
. '/lib.php');
29 $THEME->name
= 'boost';
31 $THEME->editor_sheets
= [];
32 $THEME->editor_scss
= ['editor'];
33 $THEME->usefallback
= true;
34 $THEME->scss
= function($theme) {
35 return theme_boost_get_main_scss_content($theme);
39 // Most backwards compatible layout without the blocks.
41 'file' => 'drawers.php',
44 // Standard layout with blocks.
46 'file' => 'drawers.php',
47 'regions' => array('side-pre'),
48 'defaultregion' => 'side-pre',
52 'file' => 'drawers.php',
53 'regions' => array('side-pre'),
54 'defaultregion' => 'side-pre',
55 'options' => array('langmenu' => true),
57 'coursecategory' => array(
58 'file' => 'drawers.php',
59 'regions' => array('side-pre'),
60 'defaultregion' => 'side-pre',
62 // Part of course, typical for modules - default page layout if $cm specified in require_login().
64 'file' => 'drawers.php',
65 'regions' => array('side-pre'),
66 'defaultregion' => 'side-pre',
68 // The site home page.
70 'file' => 'drawers.php',
71 'regions' => array('side-pre'),
72 'defaultregion' => 'side-pre',
73 'options' => array('nonavbar' => true),
75 // Server administration scripts.
77 'file' => 'drawers.php',
78 'regions' => array('side-pre'),
79 'defaultregion' => 'side-pre',
83 'file' => 'drawers.php',
84 'regions' => ['side-pre'],
85 'defaultregion' => 'side-pre',
86 'options' => array('nonavbar' => true),
89 'mydashboard' => array(
90 'file' => 'drawers.php',
91 'regions' => array('side-pre'),
92 'defaultregion' => 'side-pre',
93 'options' => array('nonavbar' => true, 'langmenu' => true),
97 'file' => 'drawers.php',
98 'regions' => array('side-pre'),
99 'defaultregion' => 'side-pre',
102 'file' => 'login.php',
103 'regions' => array(),
104 'options' => array('langmenu' => true),
107 // Pages that appear in pop-up windows - no navigation, no blocks, no header and bare activity header.
109 'file' => 'columns1.php',
110 'regions' => array(),
114 'activityheader' => [
116 'nocompletion' => true,
117 'nodescription' => true
121 // No blocks and minimal footer - used for legacy frame layouts only!
123 'file' => 'columns1.php',
124 'regions' => array(),
127 'nocoursefooter' => true,
128 'activityheader' => [
129 'nocompletion' => true
133 // Embeded pages, like iframe/object embeded in moodleform - it needs as much space as possible.
135 'file' => 'embedded.php',
136 'regions' => array('side-pre'),
137 'defaultregion' => 'side-pre',
139 // Used during upgrade and install, and for the 'This site is undergoing maintenance' message.
140 // This must not have any blocks, links, or API calls that would lead to database or cache interaction.
141 // Please be extremely careful if you are modifying this layout.
142 'maintenance' => array(
143 'file' => 'maintenance.php',
144 'regions' => array(),
146 // Should display the content and basic headers only.
148 'file' => 'columns1.php',
149 'regions' => array(),
150 'options' => array('nofooter' => true, 'nonavbar' => false, 'noactivityheader' => true),
152 // The pagelayout used when a redirection is occuring.
154 'file' => 'embedded.php',
155 'regions' => array(),
157 // The pagelayout used for reports.
159 'file' => 'drawers.php',
160 'regions' => array('side-pre'),
161 'defaultregion' => 'side-pre',
163 // The pagelayout used for safebrowser and securewindow.
165 'file' => 'secure.php',
166 'regions' => array('side-pre'),
167 'defaultregion' => 'side-pre'
171 $THEME->parents
= [];
172 $THEME->enable_dock
= false;
173 $THEME->extrascsscallback
= 'theme_boost_get_extra_scss';
174 $THEME->prescsscallback
= 'theme_boost_get_pre_scss';
175 $THEME->precompiledcsscallback
= 'theme_boost_get_precompiled_css';
176 $THEME->yuicssmodules
= array();
177 $THEME->rendererfactory
= 'theme_overridden_renderer_factory';
178 $THEME->requiredblocks
= '';
179 $THEME->addblockposition
= BLOCK_ADDBLOCK_POSITION_FLATNAV
;
180 $THEME->iconsystem
= \core\output\icon_system
::FONTAWESOME
;
181 $THEME->haseditswitch
= true;
182 $THEME->usescourseindex
= true;
183 // By default, all boost theme do not need their titles displayed.
184 $THEME->activityheaderconfig
= [