Merge branch 'MDL-47990_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE
[moodle.git] / install / css.php
blob0228dff37d712c1a03fe1c6a11d1172e1c4d5666
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;
135 html[dir=rtl] .fitemtitle {
136 float: right;
138 label {
139 font-weight: bold;
140 display: inline-block;
141 margin: 5px;
144 .fitemelement {
145 margin-left: 265px;
147 html[dir=rtl] .fitemelement {
148 margin-right: 265px;
149 margin-left: 0;
150 direction: ltr;
152 .alert, .alert h4 {
153 color: #c09853;
155 .alert {
156 padding: 8px 35px 8px 14px;
157 margin-bottom: 20px;
158 text-shadow: 0 1px 0 rgba(255,255,255,0.5);
159 background-color: #fcf8e3;
160 border: 1px solid #fbeed5;
161 -webkit-border-radius: 4px;
162 -moz-border-radius: 4px;
163 border-radius: 4px;
166 .alert-info {
167 color: #3a87ad;
168 background-color: #d9edf7;
169 border-color: #bce8f1;
172 .alert-success {
173 color: #468847;
174 background-color: #dff0d8;
175 border-color: #d6e9c6;
178 .alert-error {
179 color: #b94a48;
180 background-color: #f2dede;
181 border-color: #eed3d7;
184 pre {
185 display: block;
186 padding: 9.5px;
187 margin: 0 0 10px;
188 font-size: 13px;
189 line-height: 20px;
190 word-break: break-all;
191 word-wrap: break-word;
192 white-space: pre;
193 white-space: pre-wrap;
194 background-color: #f5f5f5;
195 border: 1px solid #ccc;
196 border: 1px solid rgba(0,0,0,0.15);
197 -webkit-border-radius: 4px;
198 -moz-border-radius: 4px;
199 border-radius: 4px;
202 .notifytiny {
203 font-size: 10.5px;
206 input[type="button"], input[type="submit"] {
207 margin: 0 0 10px 5px;
208 display: inline-block;
209 padding: 4px 12px;
210 font-size: 14px;
211 line-height: 20px;
212 color: #333;
213 text-align: center;
214 text-shadow: 0 1px 1px rgba(255,255,255,0.75);
215 vertical-align: middle;
216 cursor: pointer;
217 background-color: #f5f5f5;
218 background-image: -moz-linear-gradient(top,#fff,#e6e6e6);
219 background-image: -webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));
220 background-image: -webkit-linear-gradient(top,#fff,#e6e6e6);
221 background-image: -o-linear-gradient(top,#fff,#e6e6e6);
222 background-image: linear-gradient(to bottom,#fff,#e6e6e6);
223 background-repeat: repeat-x;
224 border: 1px solid #ccc;
225 border-color: #e6e6e6 #e6e6e6 #bfbfbf;
226 border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);
227 border-bottom-color: #b3b3b3;
228 -webkit-border-radius: 4px;
229 -moz-border-radius: 4px;
230 border-radius: 4px;
231 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);
232 filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
233 -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
234 -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
235 box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
238 input[type="button"]:hover, input[type="submit"]:hover, input[type="button"]:focus, input[type="submit"]:focus {
239 color: #333;
240 text-decoration: none;
241 background-position: 0 -15px;
242 -webkit-transition: background-position .1s linear;
243 -moz-transition: background-position .1s linear;
244 -o-transition: background-position .1s linear;
245 transition: background-position .1s linear;
248 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] {
249 color: #333;
250 background-color: #e6e6e6;
253 button, input, select, textarea {
254 margin: 0;
257 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"] {
258 display: inline-block;
259 height: 20px;
260 padding: 4px 6px;
261 margin-bottom: 10px;
262 font-size: 14px;
263 line-height: 20px;
264 color: #555;
265 vertical-align: middle;
266 -webkit-border-radius: 4px;
267 -moz-border-radius: 4px;
268 border-radius: 4px;
271 select {
272 background-color: #fff;
273 border: 1px solid #ccc;
276 label, select, button, input[type="button"], input[type="submit"], input[type="radio"], input[type="checkbox"] {
277 cursor: pointer;
281 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"] {
282 display: inline-block;
283 height: 20px;
284 padding: 4px 6px;
285 margin-bottom: 10px;
286 font-size: 14px;
287 line-height: 20px;
288 color: #555;
289 vertical-align: middle;
290 -webkit-border-radius: 4px;
291 -moz-border-radius: 4px;
292 border-radius: 4px;
295 select, input[type="file"] {
296 height: 30px;
297 line-height: 30px;
300 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"] {
301 background-color: #fff;
302 border: 1px solid #ccc;
303 -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
304 -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
305 box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
306 -webkit-transition: border linear .2s,box-shadow linear .2s;
307 -moz-transition: border linear .2s,box-shadow linear .2s;
308 -o-transition: border linear .2s,box-shadow linear .2s;
309 transition: border linear .2s,box-shadow linear .2s;
312 input[disabled], select[disabled], textarea[disabled], input[readonly], select[readonly], textarea[readonly] {
313 cursor: not-allowed;
314 background-color: #eee;
317 input.btn-primary {
318 color: #fff;
319 text-shadow: 0 -1px 0 rgba(0,0,0,0.25);
320 background-color: #005aa8;
321 background-image: -moz-linear-gradient(top,#0070a8,#0038a8);
322 background-image: -webkit-gradient(linear,0 0,0 100%,from(#0070a8),to(#0038a8));
323 background-image: -webkit-linear-gradient(top,#0070a8,#0038a8);
324 background-image: -o-linear-gradient(top,#0070a8,#0038a8);
325 background-image: linear-gradient(to bottom,#0070a8,#0038a8);
326 background-repeat: repeat-x;
327 border-color: #0038a8 #0038a8 #001e5c;
328 border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);
329 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0070a8',endColorstr='#ff0038a8',GradientType=0);
330 filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
333 input.btn-primary:hover,
334 input.btn-primary:active,
335 input.btn-primary:focus {
336 color: #fff;
337 background-color: #0038a8;
341 .breadcrumb {
342 background-color: #f5f5f5;
344 .breadcrumb {
345 padding: 8px 15px;
346 margin: 0 0 20px;
347 list-style: none;
348 background-color: #f5f5f5;
349 -webkit-border-radius: 4px;
350 -moz-border-radius: 4px;
351 border-radius: 4px;
354 .breadcrumb > li {
355 display: inline-block;
356 text-shadow: 0 1px 0 #fff;
357 line-height: 20px;
360 body {
361 font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
362 font-size: 14px;
363 line-height: 20px;
364 color: #333;
366 .breadcrumb {
367 background-color: rgb(245, 245, 245);
368 padding: 8px 15px;
371 End of MDL-43839 IE9 specific CSS.
374 EOF;
376 // fix used urls
377 $content = str_replace('[[pix:theme|hgradient]]', '../theme/standard/pix/hgradient.jpg', $content);
378 $content = str_replace('[[pix:theme|vgradient]]', '../theme/standard/pix/vgradient.jpg', $content);
380 @header('Content-Disposition: inline; filename="css.php"');
381 @header('Cache-Control: no-store, no-cache, must-revalidate');
382 @header('Cache-Control: post-check=0, pre-check=0', false);
383 @header('Pragma: no-cache');
384 @header('Expires: Mon, 20 Aug 1969 09:23:00 GMT');
385 @header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
386 @header('Accept-Ranges: none');
387 @header('Content-Type: text/css; charset=utf-8');
389 echo $content;