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 2023 Marcin Czaja (https://rosea.io)
|
|
|
21 |
* @license Commercial https://themeforest.net/licenses
|
|
|
22 |
*
|
|
|
23 |
*/
|
|
|
24 |
|
|
|
25 |
|
|
|
26 |
defined('MOODLE_INTERNAL') || die();
|
|
|
27 |
|
|
|
28 |
$page = new admin_settingpage('theme_monocolor_block12', get_string('settingsblock12', 'theme_monocolor'));
|
|
|
29 |
|
|
|
30 |
$name = 'theme_monocolor/displayblock12';
|
|
|
31 |
$title = get_string('turnon', 'theme_monocolor');
|
|
|
32 |
$description = get_string('displayblock12_desc', 'theme_monocolor');
|
|
|
33 |
$default = 0;
|
|
|
34 |
$setting = new admin_setting_configcheckbox($name, $title .
|
|
|
35 |
'<span class="badge badge-sq badge-dark ml-2">Block #12</span>', $description, $default);
|
|
|
36 |
$page->add($setting);
|
|
|
37 |
|
|
|
38 |
$name = 'theme_monocolor/displayhrblock12';
|
|
|
39 |
$title = get_string('displayblockhr', 'theme_monocolor');
|
|
|
40 |
$description = get_string('displayblockhr_desc', 'theme_monocolor');
|
|
|
41 |
$default = 1;
|
|
|
42 |
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
|
|
|
43 |
$page->add($setting);
|
|
|
44 |
|
|
|
45 |
$name = 'theme_monocolor/block12id';
|
|
|
46 |
$title = get_string('additionalid', 'theme_monocolor');
|
|
|
47 |
$description = get_string('additionalid_desc', 'theme_monocolor');
|
|
|
48 |
$default = '';
|
|
|
49 |
$setting = new admin_setting_configtext($name, $title, $description, $default);
|
|
|
50 |
$page->add($setting);
|
|
|
51 |
|
|
|
52 |
$name = 'theme_monocolor/block12class';
|
|
|
53 |
$title = get_string('additionalclass', 'theme_monocolor');
|
|
|
54 |
$description = get_string('additionalclass_desc', 'theme_monocolor');
|
|
|
55 |
$default = '';
|
|
|
56 |
$setting = new admin_setting_configtext($name, $title, $description, $default);
|
|
|
57 |
$page->add($setting);
|
|
|
58 |
|
|
|
59 |
$name = 'theme_monocolor/block12introsubtitle';
|
|
|
60 |
$title = get_string('blockintrosubtitle', 'theme_monocolor');
|
|
|
61 |
$description = get_string('blockintrosubtitle_desc', 'theme_monocolor');
|
|
|
62 |
$default = '';
|
|
|
63 |
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
|
|
|
64 |
$page->add($setting);
|
|
|
65 |
|
|
|
66 |
$name = 'theme_monocolor/block12introtitle';
|
|
|
67 |
$title = get_string('blockintrotitle', 'theme_monocolor');
|
|
|
68 |
$description = get_string('blockintrotitle_desc', 'theme_monocolor');
|
|
|
69 |
$default = '';
|
|
|
70 |
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
|
|
|
71 |
$page->add($setting);
|
|
|
72 |
|
|
|
73 |
$name = 'theme_monocolor/block12introcontent';
|
|
|
74 |
$title = get_string('blockintrocontent', 'theme_monocolor');
|
|
|
75 |
$description = get_string('blockintrocontent_desc', 'theme_monocolor');
|
|
|
76 |
$default = '';
|
|
|
77 |
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
|
|
|
78 |
$page->add($setting);
|
|
|
79 |
|
|
|
80 |
$name = 'theme_monocolor/block12htmlcontent';
|
|
|
81 |
$title = get_string('blockhtmlcontent', 'theme_monocolor');
|
|
|
82 |
$description = get_string('blockhtmlcontent_desc', 'theme_monocolor');
|
|
|
83 |
$default = '<div class="row row-cols-1 row-cols-md-3 row-cols-lg-4 text-center text-md-left">
|
|
|
84 |
<!-- Start item -->
|
|
|
85 |
<div class="rui-card-item col mb-4">
|
|
|
86 |
<div class="rui-card-body d-inline-flex align-items-center">
|
|
|
87 |
<!-- icon -->
|
|
|
88 |
<div class="rui-rounded-icon mr-3" style="color: #000; background: #feedba;">
|
|
|
89 |
<svg width="32px" height="32px" stroke-width="1.5" viewBox="0 0 24 24"
|
|
|
90 |
fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor">
|
|
|
91 |
<path d="M2 5h7m7 0h-2.5M9 5h4.5M9 5V3m4.5 2c-.82 2.735-2.539 5.32-4.5
|
|
|
92 |
7.593M4 17.5c1.585-1.359 3.376-3.026 5-4.907m0 0C8 11.5 6.4 9.3 6 8.5m3
|
|
|
93 |
4.093l3 2.907M13.5 21l1.143-3m6.857 3l-1.143-3m-5.714 0l2.857-7.5 2.857
|
|
|
94 |
7.5m-5.714 0h5.714" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"
|
|
|
95 |
stroke-linejoin="round"></path>
|
|
|
96 |
</svg>
|
|
|
97 |
</div>
|
|
|
98 |
<!-- end icon -->
|
|
|
99 |
<h3 class="rui-card-title--light mb-0">Translation Ready</h3>
|
|
|
100 |
</div>
|
|
|
101 |
</div>
|
|
|
102 |
<!-- End item -->
|
|
|
103 |
<!-- Start item -->
|
|
|
104 |
<div class="rui-card-item col mb-4">
|
|
|
105 |
<div class="rui-card-body d-inline-flex align-items-center">
|
|
|
106 |
<!-- icon -->
|
|
|
107 |
<div class="rui-rounded-icon mr-3" style="color: #000; background: #feedba;">
|
|
|
108 |
<svg width="32px" stroke-width="1.5" height="32px" viewBox="0 0 24 24"
|
|
|
109 |
fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor">
|
|
|
110 |
<path d="M9 21H8c-1.105 0-2-.894-2-1.999V14c0-1-1.5-2-1.5-2S6 11 6 10V5a2 2
|
|
|
111 |
|
|
|
112 |
|
|
|
113 |
stroke-linejoin="round"></path>
|
|
|
114 |
</svg>
|
|
|
115 |
</div>
|
|
|
116 |
<!-- end icon -->
|
|
|
117 |
<h3 class="rui-card-title--light mb-0">Fully Customizable Blocks</h3>
|
|
|
118 |
</div>
|
|
|
119 |
</div>
|
|
|
120 |
<!-- End item -->
|
|
|
121 |
<!-- Start item -->
|
|
|
122 |
<div class="rui-card-item col mb-4">
|
|
|
123 |
<div class="rui-card-body d-inline-flex align-items-center">
|
|
|
124 |
<!-- icon -->
|
|
|
125 |
<div class="rui-rounded-icon mr-3" style="color: #000; background: #feedba;">
|
|
|
126 |
<svg width="32px" height="32px" stroke-width="1.5" viewBox="0 0 24 24"
|
|
|
127 |
fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor">
|
|
|
128 |
<path d="M13.848 13.317L9.505 18.28a2 2 0 01-3.01 0l-4.343-4.963a2 2 0
|
|
|
129 |
010-2.634L6.495 5.72a2 2 0 013.01 0l4.343 4.963a2 2 0 010 2.634z"
|
|
|
130 |
stroke="currentColor" stroke-width="1.5" stroke-linecap="round"
|
|
|
131 |
stroke-linejoin="round"></path>
|
|
|
132 |
<path d="M13 19l4.884-5.698a2 2 0 000-2.604L13 5" stroke="currentColor"
|
|
|
133 |
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
|
134 |
<path d="M17 19l4.884-5.698a2 2 0 000-2.604L17 5" stroke="currentColor"
|
|
|
135 |
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
|
136 |
</svg>
|
|
|
137 |
</div>
|
|
|
138 |
<!-- end icon -->
|
|
|
139 |
<h3 class="rui-card-title--light mb-0">Lifetime updates</h3>
|
|
|
140 |
</div>
|
|
|
141 |
</div>
|
|
|
142 |
<!-- End item -->
|
|
|
143 |
<!-- Start item -->
|
|
|
144 |
<div class="rui-card-item col mb-4">
|
|
|
145 |
<div class="rui-card-body d-inline-flex align-items-center">
|
|
|
146 |
<!-- icon -->
|
|
|
147 |
<div class="rui-rounded-icon mr-3" style="color: #000; background: #feedba;">
|
|
|
148 |
<svg width="32px" height="32px" stroke-width="1.5" viewBox="0 0 24 24"
|
|
|
149 |
fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor">
|
|
|
150 |
<path d="M8 12l3 3 5-5" stroke="currentColor" stroke-width="1.5"
|
|
|
151 |
stroke-linecap="round" stroke-linejoin="round"></path>
|
|
|
152 |
<path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12c0 1.821.487
|
|
|
153 |
3.53 1.338 5L2.5 21.5l4.5-.838A9.955 9.955 0 0012 22z" stroke="currentColor"
|
|
|
154 |
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
|
155 |
</svg>
|
|
|
156 |
</div>
|
|
|
157 |
<!-- end icon -->
|
|
|
158 |
<h3 class="rui-card-title--light mb-0">Super friendly support</h3>
|
|
|
159 |
</div>
|
|
|
160 |
</div>
|
|
|
161 |
<!-- End item -->
|
|
|
162 |
</div>';
|
|
|
163 |
$setting = new monocolor_setting_confightmleditor($name, $title, $description, $default);
|
|
|
164 |
$page->add($setting);
|
|
|
165 |
|
|
|
166 |
$name = 'theme_monocolor/block12footercontent';
|
|
|
167 |
$title = get_string('blockfootercontent', 'theme_monocolor');
|
|
|
168 |
$description = get_string('blockfootercontent_desc', 'theme_monocolor');
|
|
|
169 |
$default = '';
|
|
|
170 |
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
|
|
|
171 |
$page->add($setting);
|
|
|
172 |
|
|
|
173 |
$fileid = 'block12bg';
|
|
|
174 |
$name = 'theme_monocolor/block12bg';
|
|
|
175 |
$title = get_string('blockbg', 'theme_monocolor');
|
|
|
176 |
$description = get_string('blockbg_desc', 'theme_monocolor');
|
|
|
177 |
$opts = array('accepted_types' => array('.png', '.jpg', '.gif', '.webp', '.tiff', '.svg'), 'maxfiles' => 1);
|
|
|
178 |
$setting = new admin_setting_configstoredfile($name, $title, $description, $fileid, 0, $opts);
|
|
|
179 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
|
|
180 |
$page->add($setting);
|
|
|
181 |
|
|
|
182 |
$name = 'theme_monocolor/block12customcss';
|
|
|
183 |
$title = get_string('blockcustomcss', 'theme_monocolor');
|
|
|
184 |
$description = get_string('blockcustomcss_desc', 'theme_monocolor');
|
|
|
185 |
$default = '';
|
|
|
186 |
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
|
|
|
187 |
$page->add($setting);
|
|
|
188 |
|
|
|
189 |
$settings->add($page);
|