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