Proyectos de Subversion Moodle

Rev

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