Proyectos de Subversion Moodle

Rev

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