MDL-45641 event: Manually trigger event where needed.
[moodle.git] / install / css.php
blob6a30ceb6d6d7c4f6a48b1849c43f5f3b8011662e
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.
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/>.
17 /**
18 * This script prints basic CSS for the installer
20 * @package core
21 * @subpackage install
22 * @copyright 2011 Petr Skoda (http://skodak.org)
23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
26 if (file_exists(dirname(dirname(__FILE__)).'/config.php')) {
27 // already installed
28 die;
31 // include only the necessary stuff from themes, keep this small otherwise IE will complain...
33 // MDL-43839 IE9 cannot handle all of our css.
34 // Once IE9 is no longer supported we can include 'bootstrapbase/style/moodle.css'
35 // and remove some of the CSS in $content.
36 $files = array('');
38 $content = '';
40 foreach($files as $file) {
41 $content .= file_get_contents(dirname(dirname(__FILE__)).'/theme/'.$file) . "\n";
44 $content .= <<<EOF
46 body {
47 padding: 4px;
50 .headermain {
51 margin: 15px;
54 h2 {
55 text-align:center;
58 textarea, .uneditable-input {
59 width: 50%;
62 #installdiv {
63 width: 800px;
64 margin-left:auto;
65 margin-right:auto;
66 padding: 5px;
67 margin-bottom: 15px;
70 #installdiv dt {
71 font-weight: bold;
74 #installdiv dd {
75 padding-bottom: 0.5em;
78 .stage {
79 margin-top: 2em;
80 margin-bottom: 2em;
81 padding: 25px;
84 #installform {
85 width: 100%;
88 #envresult {
89 text-align:left;
90 width: auto;
91 margin-left:10em;
94 #envresult dd {
95 color: red;
98 fieldset {
99 text-align:center;
100 border:none;
103 fieldset .configphp,
104 fieldset .alert {
105 text-align: left;
108 .sitelink {
109 text-align: center;
113 MDL-43839 IE9 cannot handle all of our CSS.
114 Once IE9 is no longer supported we can include 'bootstrapbase/style/moodle.css' above
115 and remove the following.
118 #page-footer {
119 padding: 1em 0;
120 margin-top: 1em;
121 border-top: 2px solid #ddd;
124 .fitem {
125 clear:both;
126 text-align:left;
127 padding: 8px;
130 .fitemtitle {
131 float: left;
132 width: 245px;
133 text-align: right;
136 label {
137 font-weight: bold;
138 display: inline-block;
139 margin: 5px;
142 .fitemelement {
143 margin-left: 265px;
146 .alert, .alert h4 {
147 color: #c09853;
149 .alert {
150 padding: 8px 35px 8px 14px;
151 margin-bottom: 20px;
152 text-shadow: 0 1px 0 rgba(255,255,255,0.5);
153 background-color: #fcf8e3;
154 border: 1px solid #fbeed5;
155 -webkit-border-radius: 4px;
156 -moz-border-radius: 4px;
157 border-radius: 4px;
160 .alert-info {
161 color: #3a87ad;
162 background-color: #d9edf7;
163 border-color: #bce8f1;
166 .alert-success {
167 color: #468847;
168 background-color: #dff0d8;
169 border-color: #d6e9c6;
172 .alert-error {
173 color: #b94a48;
174 background-color: #f2dede;
175 border-color: #eed3d7;
178 pre {
179 display: block;
180 padding: 9.5px;
181 margin: 0 0 10px;
182 font-size: 13px;
183 line-height: 20px;
184 word-break: break-all;
185 word-wrap: break-word;
186 white-space: pre;
187 white-space: pre-wrap;
188 background-color: #f5f5f5;
189 border: 1px solid #ccc;
190 border: 1px solid rgba(0,0,0,0.15);
191 -webkit-border-radius: 4px;
192 -moz-border-radius: 4px;
193 border-radius: 4px;
196 .notifytiny {
197 font-size: 10.5px;
200 input[type="button"], input[type="submit"] {
201 margin: 0 0 10px 5px;
202 display: inline-block;
203 padding: 4px 12px;
204 font-size: 14px;
205 line-height: 20px;
206 color: #333;
207 text-align: center;
208 text-shadow: 0 1px 1px rgba(255,255,255,0.75);
209 vertical-align: middle;
210 cursor: pointer;
211 background-color: #f5f5f5;
212 background-image: -moz-linear-gradient(top,#fff,#e6e6e6);
213 background-image: -webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));
214 background-image: -webkit-linear-gradient(top,#fff,#e6e6e6);
215 background-image: -o-linear-gradient(top,#fff,#e6e6e6);
216 background-image: linear-gradient(to bottom,#fff,#e6e6e6);
217 background-repeat: repeat-x;
218 border: 1px solid #ccc;
219 border-color: #e6e6e6 #e6e6e6 #bfbfbf;
220 border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);
221 border-bottom-color: #b3b3b3;
222 -webkit-border-radius: 4px;
223 -moz-border-radius: 4px;
224 border-radius: 4px;
225 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);
226 filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
227 -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
228 -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
229 box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
232 input[type="button"]:hover, input[type="submit"]:hover, input[type="button"]:focus, input[type="submit"]:focus {
233 color: #333;
234 text-decoration: none;
235 background-position: 0 -15px;
236 -webkit-transition: background-position .1s linear;
237 -moz-transition: background-position .1s linear;
238 -o-transition: background-position .1s linear;
239 transition: background-position .1s linear;
242 input[type="button"]:hover, input[type="submit"]:hover, input[type="button"]:focus, input[type="submit"]:focus, input[type="button"]:active, input[type="submit"]:active, input[type="button"].active, input[type="submit"].active, input[type="button"].disabled, input[type="submit"].disabled, input[type="reset"].disabled, input[type="submit"][disabled], input[type="reset"][disabled] {
243 color: #333;
244 background-color: #e6e6e6;
247 button, input, select, textarea {
248 margin: 0;
251 select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"] {
252 display: inline-block;
253 height: 20px;
254 padding: 4px 6px;
255 margin-bottom: 10px;
256 font-size: 14px;
257 line-height: 20px;
258 color: #555;
259 vertical-align: middle;
260 -webkit-border-radius: 4px;
261 -moz-border-radius: 4px;
262 border-radius: 4px;
265 select {
266 background-color: #fff;
267 border: 1px solid #ccc;
270 label, select, button, input[type="button"], input[type="submit"], input[type="radio"], input[type="checkbox"] {
271 cursor: pointer;
275 select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"] {
276 display: inline-block;
277 height: 20px;
278 padding: 4px 6px;
279 margin-bottom: 10px;
280 font-size: 14px;
281 line-height: 20px;
282 color: #555;
283 vertical-align: middle;
284 -webkit-border-radius: 4px;
285 -moz-border-radius: 4px;
286 border-radius: 4px;
289 select, input[type="file"] {
290 height: 30px;
291 line-height: 30px;
294 textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"] {
295 background-color: #fff;
296 border: 1px solid #ccc;
297 -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
298 -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
299 box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
300 -webkit-transition: border linear .2s,box-shadow linear .2s;
301 -moz-transition: border linear .2s,box-shadow linear .2s;
302 -o-transition: border linear .2s,box-shadow linear .2s;
303 transition: border linear .2s,box-shadow linear .2s;
306 input[disabled], select[disabled], textarea[disabled], input[readonly], select[readonly], textarea[readonly] {
307 cursor: not-allowed;
308 background-color: #eee;
311 input.btn-primary {
312 color: #fff;
313 text-shadow: 0 -1px 0 rgba(0,0,0,0.25);
314 background-color: #005aa8;
315 background-image: -moz-linear-gradient(top,#0070a8,#0038a8);
316 background-image: -webkit-gradient(linear,0 0,0 100%,from(#0070a8),to(#0038a8));
317 background-image: -webkit-linear-gradient(top,#0070a8,#0038a8);
318 background-image: -o-linear-gradient(top,#0070a8,#0038a8);
319 background-image: linear-gradient(to bottom,#0070a8,#0038a8);
320 background-repeat: repeat-x;
321 border-color: #0038a8 #0038a8 #001e5c;
322 border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);
323 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0070a8',endColorstr='#ff0038a8',GradientType=0);
324 filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
327 input.btn-primary:hover,
328 input.btn-primary:active,
329 input.btn-primary:focus {
330 color: #fff;
331 background-color: #0038a8;
335 .breadcrumb {
336 background-color: #f5f5f5;
338 .breadcrumb {
339 padding: 8px 15px;
340 margin: 0 0 20px;
341 list-style: none;
342 background-color: #f5f5f5;
343 -webkit-border-radius: 4px;
344 -moz-border-radius: 4px;
345 border-radius: 4px;
348 .breadcrumb > li {
349 display: inline-block;
350 text-shadow: 0 1px 0 #fff;
351 line-height: 20px;
354 body {
355 font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
356 font-size: 14px;
357 line-height: 20px;
358 color: #333;
360 .breadcrumb {
361 background-color: rgb(245, 245, 245);
362 padding: 8px 15px;
365 End of MDL-43839 IE9 specific CSS.
368 EOF;
370 // fix used urls
371 $content = str_replace('[[pix:theme|hgradient]]', '../theme/standard/pix/hgradient.jpg', $content);
372 $content = str_replace('[[pix:theme|vgradient]]', '../theme/standard/pix/vgradient.jpg', $content);
374 @header('Content-Disposition: inline; filename="css.php"');
375 @header('Cache-Control: no-store, no-cache, must-revalidate');
376 @header('Cache-Control: post-check=0, pre-check=0', false);
377 @header('Pragma: no-cache');
378 @header('Expires: Mon, 20 Aug 1969 09:23:00 GMT');
379 @header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
380 @header('Accept-Ranges: none');
381 @header('Content-Type: text/css; charset=utf-8');
383 echo $content;