columns2.mustache 4.44 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{{!
    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/>.
}}
{{!
    @template theme_boost/columns2

    Admin time setting template.

    Boost 2 column layout template.

    Context variables required for this template:
    * sitename - The name of the site
    * output - The core renderer for the page
    * bodyattributes - attributes for the body tag as a string of html attributes
    * sidepreblocks - HTML for the blocks
    * hasblocks - true if there are blocks on this page
    * navdraweropen - true if the nav drawer should be open on page load
    * regionmainsettingsmenu - HTML for the region main settings menu
    * hasregionmainsettingsmenu - There is a region main settings menu on this page.

    Example context (json):
    {
        "sitename": "Moodle",
37
38
39
40
41
42
        "output": {
            "doctype": "<!DOCTYPE html>",
            "page_title": "Test page",
            "favicon": "favicon.ico",
            "main_content": "<h1>Headings make html validators happier</h1>"
         },
43
        "bodyattributes":"",
44
        "sidepreblocks": "<h2>Blocks html goes here</h2>",
45
46
47
48
49
50
        "hasblocks":true,
        "navdraweropen":true,
        "regionmainsettingsmenu": "",
        "hasregionmainsettingsmenu": false
    }
}}
51
52
53
{{{ output.doctype }}}
<html {{{ output.htmlattributes }}}>
<head>
54
    <title>{{{ output.page_title }}}</title>
55
56
57
58
59
    <link rel="shortcut icon" href="{{{ output.favicon }}}" />
    {{{ output.standard_head_html }}}
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>

60
<body {{{ bodyattributes }}}>
61

62
<div id="page-wrapper">
63

64
    {{{ output.standard_top_of_body_html }}}
65

66
    {{>theme_boost/header}}
67

68
    <div id="page" class="container-fluid">
69
        {{{ output.full_header }}}
70

71
        <div id="page-content" class="row">
72
            <div id="region-main-box" class="col-xs-12">
73
                {{#hasregionmainsettingsmenu}}
74
                <div id="region-main-settings-menu" class="hidden-print {{#hasblocks}}has-blocks{{/hasblocks}}">
75
76
                    <div> {{{ output.region_main_settings_menu }}} </div>
                </div>
77
78
                {{/hasregionmainsettingsmenu}}
                <section id="region-main" {{#hasblocks}}class="has-blocks"{{/hasblocks}}>
79
                    <div class="card card-block">
80
81
82
                    {{#hasregionmainsettingsmenu}}
                        <div class="region_main_settings_menu_proxy"></div>
                    {{/hasregionmainsettingsmenu}}
83
84
                    {{{ output.course_content_header }}}
                    {{{ output.main_content }}}
85
                    {{{ output.activity_navigation }}}
86
                    {{{ output.course_content_footer }}}
87
                    </div>
88
                </section>
89
                {{#hasblocks}}
90
                <section data-region="blocks-column" class="hidden-print">
91
92
93
                    {{{ sidepreblocks }}}
                </section>
                {{/hasblocks}}
94
            </div>
95
        </div>
96
    </div>
97
    {{> theme_boost/nav-drawer }}
98
</div>
99
<footer id="page-footer" class="p-y-1 bg-inverse">
100
    <div class="container">
101
102
103
104
105
106
107
108
        <div id="course-footer">{{{ output.course_footer }}}</div>

        {{# output.page_doc_link }}
            <p class="helplink">{{{ output.page_doc_link }}}</p>
        {{/ output.page_doc_link }}

        {{{ output.login_info }}}
        {{{ output.home_link }}}
109
110
        <nav class="nav navbar-nav hidden-lg-up">
            {{# output.custom_menu_flat }}
111
112
113
                <ul class="list-unstyled p-t-1">
                    {{> theme_boost/custom_menu_footer }}
                </ul>
114
115
            {{/ output.custom_menu_flat }}
        </nav>
116
117
118
        {{{ output.standard_footer_html }}}
        {{{ output.standard_end_of_body_html }}}
    </div>
119
120
</footer>

121
</body>
122
123
</html>
{{#js}}
124
125
126
127
require(['theme_boost/loader']);
require(['theme_boost/drawer'], function(mod) {
    mod.init();
});
128
{{/js}}