Proyectos de Subversion Moodle

Rev

Rev 146 | Rev 149 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
126 ariadna 1
<?php
1 efrain 2
defined('MOODLE_INTERNAL') || die();
134 ariadna 3
 
136 ariadna 4
$THEME->name = 'universe_child';
5
$THEME->parents = ['universe'];
6
 
134 ariadna 7
require_once(__DIR__ . '/lib.php');
8
 
1 efrain 9
$THEME->sheets = ['styles', 'quiz'];
10
$THEME->editor_sheets = [];
11
$THEME->editor_scss = ['styles'];
12
$THEME->enable_dock = false;
13
$THEME->yuicssmodules = array();
14
$THEME->rendererfactory = 'theme_overridden_renderer_factory';
15
$THEME->requiredblocks = '';
16
$THEME->addblockposition = BLOCK_ADDBLOCK_POSITION_FLATNAV;
17
$THEME->hidefromselector = false;
18
$THEME->extrascsscallback = 'theme_universe_child_get_extra_scss';
19
$THEME->iconsystem = core\output\icon_system::FONTAWESOME;
126 ariadna 20
$THEME->scss = function ($theme) {
1 efrain 21
    return theme_universe_get_main_scss_content($theme);
22
};
23
$THEME->haseditswitch = true;
126 ariadna 24
$THEME->scss = function ($theme) {
1 efrain 25
 
26
    // We need to load the config for our parent theme because that is where the preset setting is defined.
27
    $parentconfig = theme_config::load('universe');
28
    // Call a function from our parent themes lib.php file to fetch the content of the themes main SCSS file based on it's own config, not ours.
29
    return theme_universe_get_main_scss_content($parentconfig);
30
};
31
$THEME->prescsscallback = 'theme_universe_child_get_pre_scss';
131 ariadna 32
 
33
$THEME->layouts = [
147 ariadna 34
    // Most backwards compatible layout without the blocks - this is the layout used by default.
35
    'base' => array(
36
        'file' => 'tmpl-columns2.php',
37
        'regions' => array('side-pre'),
38
        'defaultregion' => 'side-pre',
39
    ),
40
    // Standard layout with blocks, this is recommended for most pages with general information.
41
    'standard' => array(
42
        'file' => 'tmpl-columns2.php',
43
        'regions' => array('side-pre'),
44
        'defaultregion' => 'side-pre',
45
    ),
46
    // Main course page.
131 ariadna 47
    'course' => array(
132 ariadna 48
        'file' => 'course.php',
131 ariadna 49
        'regions' => array(
50
            'coursetab-a',
51
            'coursetab-b',
52
            'coursetab-c',
53
            'coursetab-d',
54
            'coursetab-e',
55
            'ctopbl',
56
            'cbottombl',
57
            'cstopbl',
58
            'csbottombl',
133 ariadna 59
            'side-pre',
131 ariadna 60
            'bellow-custom'
61
        ),
146 ariadna 62
        'defaultregion' => 'bellow-custom',
131 ariadna 63
        'options' => array('langmenu' => true),
64
    ),
147 ariadna 65
    'coursecategory' => array(
66
        'file' => 'tmpl-columns2.php',
67
        'regions' => array('side-pre'),
68
        'defaultregion' => 'side-pre',
69
    ),
70
    // Part of course, typical for modules - default page layout if $cm specified in require_login().
131 ariadna 71
    'incourse' => array(
132 ariadna 72
        'file' => 'incourse.php',
133 ariadna 73
        'regions' => array('side-pre', 'bellow-custom'),
146 ariadna 74
        'defaultregion' => 'bellow-custom',
131 ariadna 75
    ),
147 ariadna 76
    // The site home page.
77
    'frontpage' => array(
78
        'file' => 'tmpl-frontpage.php',
79
        'regions' => array(
80
            'side-pre',
81
            'fpblocks-t',
82
            'fpblocks-b'
83
        ),
84
        'defaultregion' => 'side-pre',
85
        'options' => array('nonavbar' => true),
86
    ),
87
    // Server administration scripts.
88
    'admin' => array(
89
        'file' => 'tmpl-admin.php',
90
        'regions' => array('side-pre'),
91
        'defaultregion' => 'side-pre',
92
    ),
93
    // Moodle 4. - My courses page.
94
    'mycourses' => array(
95
        'file' => 'tmpl-columns2.php',
96
        'regions' => array('side-pre', 'side-post'),
97
        'defaultregion' => 'side-pre',
98
    ),
99
    // My dashboard page.
100
    'mydashboard' => array(
101
        'file' => 'tmpl-dashboard.php',
102
        'regions' => array(
103
            'side-pre',
104
            'dtopblocks',
105
            'dbottomblocks'
106
        ),
107
        'defaultregion' => 'side-pre',
108
        'options' => array('nonavbar' => true, 'langmenu' => true, 'nocontextheader' => true),
109
    ),
110
    // My public page.
111
    'mypublic' => array(
112
        'file' => 'tmpl-mypublic.php',
113
        'regions' => array(),
114
        'defaultregion' => 'side-pre',
115
    ),
116
    'login' => array(
117
        'file' => 'tmpl-login.php',
118
        'regions' => array(),
119
        'options' => array('langmenu' => true),
120
    ),
121
 
122
    // Pages that appear in pop-up windows - no navigation, no blocks, no header and bare activity header.
123
    'popup' => array(
124
        'file' => 'tmpl-popup.php',
125
        'regions' => array(),
126
        'options' => array(
127
            'nofooter' => true,
128
            'nonavbar' => true,
129
            'activityheader' => [
130
                'notitle' => true,
131
                'nocompletion' => true,
132
                'nodescription' => true
133
            ]
134
        )
135
    ),
136
    // No blocks and minimal footer - used for legacy frame layouts only!
137
    'frametop' => array(
138
        'file' => 'tmpl-columns1.php',
139
        'regions' => array(),
140
        'options' => array(
141
            'nofooter' => true,
142
            'nocoursefooter' => true,
143
            'activityheader' => [
144
                'nocompletion' => true
145
            ]
146
        ),
147
    ),
148
    // Embeded pages, like iframe/object embeded in moodleform - it needs as much universe as possible.
149
    'embedded' => array(
150
        'file' => 'embedded.php',
151
        'regions' => array()
152
    ),
153
    // Used during upgrade and install, and for the 'This site is undergoing maintenance' message.
154
    // This must not have any blocks, links, or API calls that would lead to database or cache interaction.
155
    // Please be extremely careful if you are modifying this layout.
156
    'maintenance' => array(
157
        'file' => 'tmpl-maintenance.php',
158
        'regions' => array(),
159
    ),
160
    // Should display the content and basic headers only.
161
    'print' => array(
162
        'file' => 'tmpl-columns1.php',
163
        'regions' => array(),
164
        'options' => array('nofooter' => true, 'nonavbar' => false, 'noactivityheader' => true),
165
    ),
166
    // The pagelayout used when a redirection is occuring.
167
    'redirect' => array(
168
        'file' => 'embedded.php',
169
        'regions' => array(),
170
    ),
171
    // The pagelayout used for reports.
172
    'report' => array(
173
        'file' => 'tmpl-report.php',
174
        'regions' => array('side-pre'),
175
        'defaultregion' => 'side-pre',
176
    ),
177
    // The pagelayout used for safebrowser and securewindow.
178
    'secure' => array(
179
        'file' => 'secure.php',
180
        'regions' => array('side-pre'),
181
        'defaultregion' => 'side-pre'
182
    )
131 ariadna 183
];