1 |
efrain |
1 |
{{!
|
|
|
2 |
This file is part of Moodle - http://moodle.org/
|
|
|
3 |
|
|
|
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.
|
|
|
8 |
|
|
|
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.
|
|
|
13 |
|
|
|
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/>.
|
|
|
16 |
}}
|
|
|
17 |
{{!
|
|
|
18 |
Context variables required for this template:
|
|
|
19 |
* sitename - The name of the site
|
|
|
20 |
* output - The core renderer for the page
|
|
|
21 |
* bodyattributes - attributes for the body tag as a string of html attributes
|
|
|
22 |
* sidepreblocks - HTML for the blocks
|
|
|
23 |
* hasblocks - true if there are blocks on this page
|
|
|
24 |
* navdraweropen - true if the nav drawer should be open on page load
|
|
|
25 |
* regionmainsettingsmenu - HTML for the region main settings menu
|
|
|
26 |
* hasregionmainsettingsmenu - There is a region main settings menu on this page.
|
|
|
27 |
|
|
|
28 |
Example context (json):
|
|
|
29 |
{
|
|
|
30 |
"sitename": "Moodle",
|
|
|
31 |
"output": {
|
|
|
32 |
"doctype": "<!DOCTYPE html>",
|
|
|
33 |
"page_title": "Test page",
|
|
|
34 |
"favicon": "favicon.ico",
|
|
|
35 |
"main_content": "<h1>Headings make html validators happier</h1>"
|
|
|
36 |
},
|
|
|
37 |
"bodyattributes":"",
|
|
|
38 |
"sidepreblocks": "<h2>Blocks html goes here</h2>",
|
|
|
39 |
"hasblocks":true,
|
|
|
40 |
"navdraweropen":true,
|
|
|
41 |
"regionmainsettingsmenu": "",
|
|
|
42 |
"hasregionmainsettingsmenu": false
|
|
|
43 |
}
|
|
|
44 |
}}
|
|
|
45 |
{{> theme_universe/head }}
|
|
|
46 |
|
|
|
47 |
<body {{{ bodyattributes }}}>
|
|
|
48 |
{{> core/local/toast/wrapper}}
|
|
|
49 |
|
|
|
50 |
<div id="page-wrapper" class="d-print-block wrapper-md">
|
|
|
51 |
|
|
|
52 |
{{{ output.standard_top_of_body_html }}}
|
|
|
53 |
|
|
|
54 |
<div id="page" data-region="mainpage" class="drawers {{#topbarcustomhtml}}topbar--ext{{/topbarcustomhtml}}">
|
|
|
55 |
|
|
|
56 |
<div id="page-content" class="page-content wrapper-xl">
|
|
|
57 |
{{{coursepageinformationbanners}}}
|
|
|
58 |
<div id="region-main-box">
|
|
|
59 |
<section id="region-main" class="{{#hassidecourseblocks}}has-sidecourseblocks wrapper-has-blocks{{/hassidecourseblocks}}" aria-label="{{#str}}content{{/str}}">
|
|
|
60 |
<div {{#hassidecourseblocks}}class="blocks-wrapper d-inline-flex flex-wrap justify-content-between w-100"{{/hassidecourseblocks}}>
|
|
|
61 |
<div class="{{#hassidecourseblocks}}wrapper-blocks mx-0{{/hassidecourseblocks}}">
|
|
|
62 |
{{#courseimagecontent}}<div class="rui-course-cover mb-4">{{{ output.course_hero }}}</div>{{/courseimagecontent}}
|
|
|
63 |
{{{ output.course_content_header }}}
|
|
|
64 |
{{{ output.main_content }}}
|
|
|
65 |
{{{ output.course_content_footer }}}
|
|
|
66 |
</div>
|
|
|
67 |
</div>
|
|
|
68 |
</section>
|
|
|
69 |
|
|
|
70 |
</div>
|
|
|
71 |
</div>
|
|
|
72 |
</div>
|
|
|
73 |
|
|
|
74 |
{{#hasblocks}}
|
|
|
75 |
{{< theme_universe/drawer }}
|
|
|
76 |
{{$id}}universe-drawers-blocks{{/id}}
|
|
|
77 |
{{$drawerclasses}}drawer drawer-right{{#blockdraweropen}} show{{/blockdraweropen}}{{/drawerclasses}}
|
|
|
78 |
{{$drawercontent}}
|
|
|
79 |
<section class="d-print-none" aria-label="{{#str}}blocks{{/str}}">
|
|
|
80 |
{{{ addblockbutton }}}
|
|
|
81 |
{{{ sidepreblocks }}}
|
|
|
82 |
</section>
|
|
|
83 |
{{/drawercontent}}
|
|
|
84 |
{{$drawerpreferencename}}drawer-open-block{{/drawerpreferencename}}
|
|
|
85 |
{{$forceopen}}{{#forceblockdraweropen}}1{{/forceblockdraweropen}}{{/forceopen}}
|
|
|
86 |
{{$drawerstate}}show-drawer-right{{/drawerstate}}
|
|
|
87 |
{{$tooltipplacement}}left{{/tooltipplacement}}
|
|
|
88 |
{{$drawercloseonresize}}1{{/drawercloseonresize}}
|
|
|
89 |
{{$closebuttontext}}{{#str}}closeblockdrawer, core{{/str}}{{/closebuttontext}}
|
|
|
90 |
{{/ theme_universe/drawer}}
|
|
|
91 |
{{/hasblocks}}
|
|
|
92 |
|
|
|
93 |
|
|
|
94 |
{{{ output.standard_after_main_region_html }}}
|
|
|
95 |
|
|
|
96 |
<footer class="my-4 py-3 wrapper-md text-center">
|
|
|
97 |
<div class="rui-footer-copy rui-footer-content">
|
|
|
98 |
{{{ footercopy }}}
|
|
|
99 |
</div>
|
|
|
100 |
</footer>
|
|
|
101 |
|
|
|
102 |
</div>
|
|
|
103 |
|
|
|
104 |
{{{ output.standard_end_of_body_html }}}
|
|
|
105 |
|
|
|
106 |
</body>
|
|
|
107 |
</html>
|
|
|
108 |
{{#js}}
|
|
|
109 |
M.util.js_pending('theme_universe/loader');
|
|
|
110 |
require(['theme_universe/loader'], function() {
|
|
|
111 |
M.util.js_complete('theme_universe/loader');
|
|
|
112 |
});
|
|
|
113 |
M.util.js_pending('theme_universe/drawer');
|
|
|
114 |
require(['theme_universe/drawer'], function(drawer) {
|
|
|
115 |
drawer.init();
|
|
|
116 |
M.util.js_complete('theme_universe/drawer');
|
|
|
117 |
});
|
|
|
118 |
{{/js}}
|