Commit | Line | Data |
---|---|---|
e5d2c577 PS |
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 | * This script prints basic CSS for the installer | |
19 | * | |
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 | |
24 | */ | |
25 | ||
26 | if (file_exists(dirname(dirname(__FILE__)).'/config.php')) { | |
27 | // already installed | |
28 | die; | |
29 | } | |
30 | ||
31 | // include only the necessary stuff from themes, keep this small otherwise IE will complain... | |
e5d2c577 | 32 | |
7d1f086f AD |
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(''); | |
e5d2c577 PS |
37 | |
38 | $content = ''; | |
39 | ||
40 | foreach($files as $file) { | |
41 | $content .= file_get_contents(dirname(dirname(__FILE__)).'/theme/'.$file) . "\n"; | |
42 | } | |
43 | ||
44 | $content .= " | |
45 | ||
7d1f086f AD |
46 | body { |
47 | padding: 4px; | |
48 | } | |
49 | ||
50 | .headermain { | |
51 | margin: 15px; | |
52 | } | |
53 | ||
e5d2c577 PS |
54 | h2 { |
55 | text-align:center; | |
56 | } | |
57 | ||
7d1f086f AD |
58 | input, textarea, .uneditable-input { |
59 | width: 50%; | |
60 | } | |
61 | ||
2e168281 AD |
62 | input[type=submit] { |
63 | width: 30%; | |
64 | } | |
65 | ||
e5d2c577 PS |
66 | #installdiv { |
67 | width: 800px; | |
68 | margin-left:auto; | |
69 | margin-right:auto; | |
70 | } | |
71 | ||
72 | #installdiv dt { | |
73 | font-weight: bold; | |
74 | } | |
75 | ||
76 | #installdiv dd { | |
77 | padding-bottom: 0.5em; | |
78 | } | |
79 | ||
80 | .stage { | |
81 | margin-top: 2em; | |
82 | margin-bottom: 2em; | |
83 | width: 100%; | |
84 | padding:25px; | |
85 | } | |
86 | ||
87 | #installform { | |
88 | width: 100%; | |
89 | } | |
90 | ||
91 | #nav_buttons input { | |
92 | margin: 5px; | |
93 | } | |
94 | ||
95 | #envresult { | |
96 | text-align:left; | |
97 | width: auto; | |
98 | margin-left:10em; | |
99 | } | |
100 | ||
101 | #envresult dd { | |
102 | color: red; | |
103 | } | |
104 | ||
105 | .formrow { | |
106 | clear:both; | |
107 | text-align:left; | |
108 | padding: 8px; | |
109 | } | |
110 | ||
111 | .formrow label.formlabel { | |
112 | display:block; | |
113 | float:left; | |
8231a0ca | 114 | width: 160px; |
e5d2c577 PS |
115 | margin-right:5px; |
116 | text-align:right; | |
117 | } | |
118 | ||
119 | .formrow .forminput { | |
120 | display:block; | |
121 | float:left; | |
122 | } | |
123 | ||
124 | fieldset { | |
125 | text-align:center; | |
126 | border:none; | |
127 | } | |
128 | ||
129 | .hint { | |
130 | display:block; | |
131 | clear:both; | |
132 | padding-left: 265px; | |
133 | color: red; | |
134 | } | |
135 | ||
136 | .configphp { | |
137 | text-align:left; | |
138 | background-color:white; | |
139 | padding:1em; | |
140 | width:95%; | |
141 | } | |
142 | ||
143 | .stage6 .stage { | |
144 | font-weight: bold; | |
145 | color: red; | |
146 | } | |
147 | ||
7d1f086f AD |
148 | /* |
149 | MDL-43839 IE9 cannot handle all of our CSS. | |
150 | Once IE9 is no longer supported we can include 'bootstrapbase/style/moodle.css' above | |
151 | and remove the following. | |
152 | */ | |
153 | body { | |
e911dc86 SH |
154 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; |
155 | font-size: 14px; | |
7d1f086f AD |
156 | } |
157 | .breadcrumb { | |
e911dc86 SH |
158 | background-color: rgb(245, 245, 245); |
159 | padding: 8px 15px; | |
7d1f086f AD |
160 | } |
161 | /* | |
162 | End of MDL-43839 IE9 specific CSS. | |
163 | */ | |
164 | ||
e5d2c577 PS |
165 | "; |
166 | ||
167 | // fix used urls | |
168 | $content = str_replace('[[pix:theme|hgradient]]', '../theme/standard/pix/hgradient.jpg', $content); | |
169 | $content = str_replace('[[pix:theme|vgradient]]', '../theme/standard/pix/vgradient.jpg', $content); | |
170 | ||
171 | @header('Content-Disposition: inline; filename="css.php"'); | |
172 | @header('Cache-Control: no-store, no-cache, must-revalidate'); | |
173 | @header('Cache-Control: post-check=0, pre-check=0', false); | |
174 | @header('Pragma: no-cache'); | |
175 | @header('Expires: Mon, 20 Aug 1969 09:23:00 GMT'); | |
176 | @header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); | |
177 | @header('Accept-Ranges: none'); | |
178 | @header('Content-Type: text/css; charset=utf-8'); | |
179 | ||
180 | echo $content; |