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
 *
19
 * @package   theme_universe
20
 * @copyright 2222 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
$block22introsubtitle = format_text(theme_universe_get_setting('block22introsubtitle'), FORMAT_HTML, array('noclean' => true));
30
$block22titlecolor = theme_universe_get_setting('block22titlecolor');
31
$block22titlesize = theme_universe_get_setting('block22titlesize');
32
$block22titleweight = theme_universe_get_setting('block22titleweight');
33
 
34
$block22introtitle = format_text(theme_universe_get_setting('block22introtitle'), FORMAT_HTML, array('noclean' => true));
35
$block22introcontent = format_text(theme_universe_get_setting('block22introcontent'), FORMAT_HTML, array('noclean' => true));
36
$block22html = format_text(theme_universe_get_setting('block22htmlcontent'), FORMAT_HTML, array('noclean' => true));
37
$block22footer = format_text(theme_universe_get_setting('block22footercontent'), FORMAT_HTML, array('noclean' => true));
38
$block22css = theme_universe_get_setting('block22customcss');
39
$block22img = $PAGE->theme->setting_file_url("block22bg", "block22bg");
40
$block22textalign = theme_universe_get_setting('block22textalign');
41
$block22class = theme_universe_get_setting('block22class');
42
 
43
// Start Title - Color.
44
$block22titlecolorclass = null;
45
if ($block22titlecolor == 0) {
46
    $block22titlecolorclass = ' rui-text--white';
47
}
48
 
49
if ($block22titlecolor == 1) {
50
    $block22titlecolorclass = ' rui-text--black';
51
}
52
 
53
if ($block22titlecolor == 2) {
54
    $block22titlecolorclass = ' rui-text--gradient';
55
}
56
// End.
57
 
58
// Start Title - Weight.
59
$block22titleweightclass = null;
60
if ($block22titleweight == 0) {
61
    $block22titleweightclass = ' rui-text--weight-normal';
62
}
63
 
64
if ($block22titleweight == 1) {
65
    $block22titleweightclass = ' rui-text--weight-medium';
66
}
67
 
68
if ($block22titleweight == 2) {
69
    $block22titleweightclass = ' rui-text--weight-bold';
70
}
71
// End.
72
 
73
// Start Title - Size.
74
$block22titlesizeclass = null;
75
if ($block22titlesize == 1) {
76
    $block22titlesizeclass = '';
77
}
78
 
79
if ($block22titlesize == 1) {
80
    $block22titlesizeclass = ' rui-hero-title-lg';
81
}
82
 
83
if ($block22titlesize == 2) {
84
    $block22titlesizeclass = ' rui-hero-title-xl';
85
}
86
// End.
87
 
88
$block22customcss = '';
89
$custombg = '';
90
 
91
if (!empty($block22css)) {
92
    $block22customcss = $block22css;
93
}
94
 
95
// Customm ID for the block.
96
$block22customid = theme_universe_get_setting('block22id');
97
$fpblockid22 = 'block22';
98
if (!empty($block22customid)) {
99
    $fpblockid22 = $block22customid;
100
}
101
// End.
102
 
103
if (!empty($block22img)) {
104
    $custombg = ' background-image: url(' . $block22img . '); ';
105
}
106
 
107
echo '<!-- Start Block 22 -->';
108
echo '<div id="' . $fpblockid22 . '" class="wrapper-lg rui-block-margin-top rui-fp-block--22 rui-rounded--lg d-flex align-items-center ' .
109
        $block22class . '" style="' . $block22customcss . $custombg .'">';
110
echo '<div class="rui-cta-wrapper--' .
111
            $block22textalign .
112
            ' text-' .
113
            $block22textalign .
114
            '">';
115
 
116
if (!empty($block22introtitle)) {
117
    echo '<h4 class="rui-cta-subtitle' .
118
        $block22titlecolorclass .
119
        $block22titleweightclass .
120
        '">' .
121
        $block22introsubtitle .
122
        '</h4>';
123
}
124
 
125
if (!empty($block22introtitle)) {
126
    echo '<h3 class="rui-cta-title' .
127
        $block22titlecolorclass .
128
        $block22titleweightclass .
129
        $block22titlesizeclass .
130
        '">' .
131
        $block22introtitle .
132
        '</h3>';
133
}
134
 
135
if (!empty($block22introcontent)) {
136
    echo '<div class="rui-cta-content' .
137
        $block22titlecolorclass .
138
        '">' .
139
        $block22introcontent .
140
        '</div>';
141
}
142
 
143
echo $block22html;
144
 
145
if (!empty($block22footer)) {
146
    echo '<div class="rui-cta-small">' . $block22footer . '</div>';
147
}
148
 
149
echo '</div>';
150
echo '</div>';
151
if (theme_universe_get_setting("displayhrblock22") == '1') {
152
    echo '<hr class="rui-block-hr" />';
153
}
154
echo '<!-- End Block 22 -->';