MDL-63796 theme_boost: reduce padding of blocks
[moodle.git] / theme / boost / templates / columns2.mustache
blob704705521933bdcb14f3812819f58990c2bf4baa
1 {{!
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/>.
17 {{!
18     @template theme_boost/columns2
20     Admin time setting template.
22     Boost 2 column layout template.
24     Context variables required for this template:
25     * sitename - The name of the site
26     * output - The core renderer for the page
27     * bodyattributes - attributes for the body tag as a string of html attributes
28     * sidepreblocks - HTML for the blocks
29     * hasblocks - true if there are blocks on this page
30     * navdraweropen - true if the nav drawer should be open on page load
31     * regionmainsettingsmenu - HTML for the region main settings menu
32     * hasregionmainsettingsmenu - There is a region main settings menu on this page.
34     Example context (json):
35     {
36         "sitename": "Moodle",
37         "output": {
38             "doctype": "<!DOCTYPE html>",
39             "page_title": "Test page",
40             "favicon": "favicon.ico",
41             "main_content": "<h1>Headings make html validators happier</h1>"
42          },
43         "bodyattributes":"",
44         "sidepreblocks": "<h2>Blocks html goes here</h2>",
45         "hasblocks":true,
46         "navdraweropen":true,
47         "regionmainsettingsmenu": "",
48         "hasregionmainsettingsmenu": false
49     }
51 {{> theme_boost/head }}
53 <body {{{ bodyattributes }}}>
55 <div id="page-wrapper">
57     {{{ output.standard_top_of_body_html }}}
59     {{> theme_boost/navbar }}
61     <div id="page" class="container-fluid">
62         {{{ output.full_header }}}
64         <div id="page-content" class="row pb-3">
65             <div id="region-main-box" class="col-12">
66                 {{#hasregionmainsettingsmenu}}
67                 <div id="region-main-settings-menu" class="d-print-none {{#hasblocks}}has-blocks{{/hasblocks}}">
68                     <div> {{{ output.region_main_settings_menu }}} </div>
69                 </div>
70                 {{/hasregionmainsettingsmenu}}
71                 <section id="region-main" {{#hasblocks}}class="has-blocks mb-3"{{/hasblocks}}>
73                     {{#hasregionmainsettingsmenu}}
74                         <div class="region_main_settings_menu_proxy"></div>
75                     {{/hasregionmainsettingsmenu}}
76                     {{{ output.course_content_header }}}
77                     {{{ output.main_content }}}
78                     {{{ output.activity_navigation }}}
79                     {{{ output.course_content_footer }}}
81                 </section>
82                 {{#hasblocks}}
83                 <section data-region="blocks-column" class="d-print-none">
84                     {{{ sidepreblocks }}}
85                 </section>
86                 {{/hasblocks}}
87             </div>
88         </div>
89     </div>
90     {{> theme_boost/nav-drawer }}
91     {{> theme_boost/footer }}
92 </div>
94 </body>
95 </html>
96 {{#js}}
97 require(['theme_boost/loader']);
98 require(['theme_boost/drawer'], function(mod) {
99     mod.init();
101 {{/js}}