Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
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
 * monocolor config.
19
 *
20
 * @package   theme_monocolor
21
 * @copyright 2022 - 2023 Marcin Czaja (https://rosea.io)
22
 * @license   Commercial https://themeforest.net/licenses
23
 */
24
 
25
defined('MOODLE_INTERNAL') || die();
26
 
27
require_once(__DIR__ . '/lib.php');
28
 
29
$THEME->name = 'monocolor';
30
$THEME->sheets = [];
31
$THEME->editor_sheets = [];
32
$THEME->editor_scss = ['editor'];
33
$THEME->usefallback = true;
34
$THEME->scss = function($theme) {
35
    return theme_monocolor_get_main_scss_content($theme);
36
};
37
 
38
$THEME->layouts = [
39
    // Most backwards compatible layout without the blocks - this is the layout used by default.
40
    'base' => array(
41
        'file' => 'tmpl-columns2.php',
42
        'regions' => array('side-pre'),
43
        'defaultregion' => 'side-pre',
44
    ),
45
    // Standard layout with blocks, this is recommended for most pages with general information.
46
    'standard' => array(
47
        'file' => 'tmpl-columns2.php',
48
        'regions' => array('side-pre'),
49
        'defaultregion' => 'side-pre',
50
    ),
51
    // Main course page.
52
    'course' => array(
53
        'file' => 'tmpl-course.php',
54
        'regions' => array(
55
            'coursetab-a',
56
            'coursetab-b',
57
            'coursetab-c',
58
            'coursetab-d',
59
            'coursetab-e',
60
            'side-pre',
61
            'ctopbl',
62
            'cbottombl',
63
            'cstopbl',
64
            'csbottombl'),
65
        'defaultregion' => 'side-pre',
66
        'options' => array('langmenu' => true),
67
    ),
68
    'coursecategory' => array(
69
        'file' => 'tmpl-columns2.php',
70
        'regions' => array('side-pre'),
71
        'defaultregion' => 'side-pre',
72
    ),
73
    // Part of course, typical for modules - default page layout if $cm specified in require_login().
74
    'incourse' => array(
75
        'file' => 'tmpl-incourse.php',
76
        'regions' => array('side-pre'),
77
        'defaultregion' => 'side-pre',
78
    ),
79
    // The site home page.
80
    'frontpage' => array(
81
        'file' => 'tmpl-frontpage.php',
82
        'regions' => array(
83
            'side-pre',
84
            'fpblocks-t',
85
            'fpblocks-b'),
86
        'defaultregion' => 'side-pre',
87
        'options' => array('nonavbar' => true),
88
    ),
89
    // Server administration scripts.
90
    'admin' => array(
91
        'file' => 'tmpl-admin.php',
92
        'regions' => array('side-pre'),
93
        'defaultregion' => 'side-pre',
94
    ),
95
    // Moodle 4. - My courses page.
96
    'mycourses' => array(
97
        'file' => 'tmpl-mycourses.php',
98
        'regions' => array('side-pre'),
99
        'defaultregion' => 'side-pre',
100
    ),
101
    // My dashboard page.
102
    'mydashboard' => array(
103
        'file' => 'tmpl-dashboard.php',
104
        'regions' => array(
105
            'side-pre',
106
            'dtopblocks',
107
            'dbottomblocks'),
108
        'defaultregion' => 'side-pre',
109
        'options' => array('nonavbar' => true, 'langmenu' => true, 'nocontextheader' => true),
110
    ),
111
    // My public page.
112
    'mypublic' => array(
113
        'file' => 'tmpl-mypublic.php',
114
        'regions' => array(),
115
        'defaultregion' => 'side-pre',
116
    ),
117
    'login' => array(
118
        'file' => 'tmpl-login.php',
119
        'regions' => array(),
120
        'options' => array('langmenu' => true),
121
    ),
122
 
123
    // Pages that appear in pop-up windows - no navigation, no blocks, no header and bare activity header.
124
    'popup' => array(
125
        'file' => 'tmpl-popup.php',
126
        'regions' => array(),
127
        'options' => array(
128
            'nofooter' => true,
129
            'nonavbar' => true,
130
            'activityheader' => [
131
                'notitle' => true,
132
                'nocompletion' => true,
133
                'nodescription' => true
134
            ]
135
        )
136
    ),
137
    // No blocks and minimal footer - used for legacy frame layouts only!
138
    'frametop' => array(
139
        'file' => 'tmpl-columns1.php',
140
        'regions' => array(),
141
        'options' => array(
142
            'nofooter' => true,
143
            'nocoursefooter' => true,
144
            'activityheader' => [
145
                'nocompletion' => true
146
            ]
147
        ),
148
    ),
149
    // Embeded pages, like iframe/object embeded in moodleform - it needs as much monocolor as possible.
150
    'embedded' => array(
151
        'file' => 'embedded.php',
152
        'regions' => array()
153
    ),
154
    // Used during upgrade and install, and for the 'This site is undergoing maintenance' message.
155
    // This must not have any blocks, links, or API calls that would lead to database or cache interaction.
156
    // Please be extremely careful if you are modifying this layout.
157
    'maintenance' => array(
158
        'file' => 'tmpl-maintenance.php',
159
        'regions' => array(),
160
    ),
161
    // Should display the content and basic headers only.
162
    'print' => array(
163
        'file' => 'tmpl-columns1.php',
164
        'regions' => array(),
165
        'options' => array('nofooter' => true, 'nonavbar' => false, 'noactivityheader' => true),
166
    ),
167
    // The pagelayout used when a redirection is occuring.
168
    'redirect' => array(
169
        'file' => 'embedded.php',
170
        'regions' => array(),
171
    ),
172
    // The pagelayout used for reports.
173
    'report' => array(
174
        'file' => 'tmpl-report.php',
175
        'regions' => array('side-pre'),
176
        'defaultregion' => 'side-pre',
177
    ),
178
    // The pagelayout used for safebrowser and securewindow.
179
    'secure' => array(
180
        'file' => 'secure.php',
181
        'regions' => array('side-pre'),
182
        'defaultregion' => 'side-pre'
183
    )
184
];
185
 
186
$THEME->parents = [];
187
$THEME->enable_dock = false;
188
$THEME->extrascsscallback = 'theme_monocolor_get_extra_scss';
189
$THEME->prescsscallback = 'theme_monocolor_get_pre_scss';
190
$THEME->precompiledcsscallback = 'theme_monocolor_get_precompiled_css';
191
$THEME->yuicssmodules = array();
192
$THEME->rendererfactory = 'theme_overridden_renderer_factory';
193
$THEME->requiredblocks = '';
194
$THEME->addblockposition = BLOCK_ADDBLOCK_POSITION_FLATNAV;
195
$THEME->haseditswitch = true;
196
$THEME->iconsystem = \core\output\icon_system::FONTAWESOME;
197
 
198
$hidecourseindexnav = 0;
199
if ($THEME->settings->hidecourseindexnav == 0) {
200
    $THEME->usescourseindex = true;
201
} else {
202
    $THEME->usescourseindex = false;
203
}
204
$THEME->removedprimarynavitems = explode(',', get_config('theme_monocolor', 'hidenodesprimarynavigation'));
205
// By default, all boost theme do not need their titles displayed.
206
$THEME->activityheaderconfig = [
207
    'notitle' => true
208
];