Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1288 ariadna 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
 *
19
 * @package   theme_universe
20
 * @copyright 2023 Marcin Czaja (https://rosea.io)
21
 * @license   Commercial https://themeforest.net/licenses
22
 *
23
 */
24
 
25
defined('MOODLE_INTERNAL') || die();
26
global $PAGE, $OUTPUT;
27
 
28
// Variables - Settings.
29
$block21introsubtitle = format_text(theme_universe_get_setting('block21introsubtitle'), FORMAT_HTML, array('noclean' => true));
30
$block21titlecolor = theme_universe_get_setting('block21titlecolor');
31
$block21titlesize = theme_universe_get_setting('block21titlesize');
32
$block21titleweight = theme_universe_get_setting('block21titleweight');
33
 
34
$block21introtitle = format_text(theme_universe_get_setting('block21introtitle'), FORMAT_HTML, array('noclean' => true));
35
$block21introcontent = format_text(theme_universe_get_setting('block21introcontent'), FORMAT_HTML, array('noclean' => true));
36
$block21html = format_text(theme_universe_get_setting('block21htmlcontent'), FORMAT_HTML, array('noclean' => true));
37
$block21footer = format_text(theme_universe_get_setting('block21footercontent'), FORMAT_HTML, array('noclean' => true));
38
$block21css = theme_universe_get_setting('block21customcss');
39
$block21img = $PAGE->theme->setting_file_url("block21bg", "block21bg");
40
$block21textalign = theme_universe_get_setting('block21textalign');
41
$block21class = theme_universe_get_setting('block21class');
42
 
43
// Start Title - Color.
44
$block21titlecolorclass = null;
45
if ($block21titlecolor == 0) {
46
    $block21titlecolorclass = ' rui-text--white';
47
}
48
 
49
if ($block21titlecolor == 1) {
50
    $block21titlecolorclass = ' rui-text--black';
51
}
52
 
53
if ($block21titlecolor == 2) {
54
    $block21titlecolorclass = ' rui-text--gradient';
55
}
56
// End.
57
 
58
// Start Title - Weight.
59
$block21titleweightclass = null;
60
if ($block21titleweight == 0) {
61
    $block21titleweightclass = ' rui-text--weight-normal';
62
}
63
 
64
if ($block21titleweight == 1) {
65
    $block21titleweightclass = ' rui-text--weight-medium';
66
}
67
 
68
if ($block21titleweight == 2) {
69
    $block21titleweightclass = ' rui-text--weight-bold';
70
}
71
// End.
72
 
73
// Start Title - Size.
74
$block21titlesizeclass = null;
75
if ($block21titlesize == 1) {
76
    $block21titlesizeclass = '';
77
}
78
 
79
if ($block21titlesize == 1) {
80
    $block21titlesizeclass = ' rui-hero-title-lg';
81
}
82
 
83
if ($block21titlesize == 2) {
84
    $block21titlesizeclass = ' rui-hero-title-xl';
85
}
86
// End.
87
 
88
$block21customcss = '';
89
$custombg = '';
90
 
91
if (!empty($block21css)) {
92
    $block21customcss = $block21css;
93
}
94
 
95
// Customm ID for the block.
96
$block21customid = theme_universe_get_setting('block21id');
97
$fpblockid21 = 'block21';
98
if (!empty($block21customid)) {
99
    $fpblockid21 = $block21customid;
100
}
101
// End.
102
 
103
if (!empty($block21img)) {
104
    $custombg = ' background-image: url(' . $block21img . '); ';
105
}
106
 
107
echo '<!-- Start Block 21 -->';
108
echo '<div id="' . $fpblockid21 . '" class="wrapper-lg rui-block-margin-top rui-fp-block--21 rui-rounded--lg d-flex align-items-center ' .
109
        $block21class . '" style="' . $block21customcss . $custombg .'">';
110
echo '<div class="rui-cta-wrapper--' .
111
            $block21textalign .
112
            ' text-' .
113
            $block21textalign .
114
            '">';
115
 
116
if (!empty($block23introtitle)) {
117
    echo '<h4 class="rui-cta-subtitle' .
118
        $block23titlecolorclass .
119
        $block23titleweightclass .
120
        '">' .
121
        $block23introsubtitle .
122
        '</h4>';
123
}
124
 
125
if (!empty($block21introtitle)) {
126
    echo '<h3 class="rui-cta-title' .
127
        $block21titlecolorclass .
128
        $block21titleweightclass .
129
        $block21titlesizeclass .
130
        '">' .
131
        $block21introtitle . '</h3>';
132
}
133
 
134
if (!empty($block21introcontent)) {
135
    echo '<div class="rui-cta-content' .
136
        $block21titlecolorclass .
137
        '">' .
138
        $block21introcontent .
139
        '</div>';
140
}
141
 
142
echo $block21html;
143
 
144
if (!empty($block21footer)) {
145
    echo '<div class="rui-cta-small">' . $block21footer . '</div>';
146
}
147
 
148
echo '</div>';
149
echo '</div>';
150
if (theme_universe_get_setting("displayhrblock21") == '1') {
151
    echo '<hr class="rui-block-hr" />';
152
}
153
echo '<!-- End Block 21 -->';