Changeset View
Changeset View
Standalone View
Standalone View
css_new.php
- This file was added.
1 | <?php | ||||
---|---|---|---|---|---|
2 | header("Content-type: text/css"); | ||||
3 | | ||||
4 | // This script accepts the following URL parameters: | ||||
5 | // ?color=<colorname> or ?color=%23<hexadecimal> - Text color | ||||
6 | // ?background=<colorname> or ?background=%23<hexadecimal> - Background color | ||||
7 | // ?link=<colorname> or ?link=%23<hexadecimal> - link color | ||||
8 | // ?color&background&link - use browser colors only | ||||
9 | // ?mode=print - print stylesheet | ||||
10 | // ?mode=flat - show menu at the bottom, not at the left | ||||
11 | // ?site-image=<URL> - use a customised image in the header | ||||
12 | | ||||
13 | // New-web-style colors: | ||||
14 | $white = '#ffffff'; | ||||
15 | $grey_f = '#f9f9f9'; | ||||
16 | $orange = '#f7800a'; | ||||
17 | $light_grey = '#eeeeee'; | ||||
18 | $grey_d = '#bcbcbc'; | ||||
19 | $dark_orange ='#cf4913'; | ||||
20 | $grey_c = '#cccccc'; | ||||
21 | $mid_grey = '#888888'; | ||||
22 | $middle_red = '#800000'; | ||||
23 | $dark_grey = '#535353'; | ||||
24 | $light_blue = '#4d88c3'; | ||||
25 | $blue_grey = '#2f6fab'; | ||||
26 | $blue = '#0057ae'; | ||||
27 | $grape_violet3 = '#644A9B'; | ||||
28 | $black = '#000000'; | ||||
29 | | ||||
30 | ?> | ||||
31 | /* | ||||
32 | ** HTML elements | ||||
33 | */ | ||||
34 | | ||||
35 | body { | ||||
36 | background: url("http://cdn.kde.org/img/bg.png") repeat; | ||||
37 | margin: 0; | ||||
38 | padding: 0; | ||||
39 | font-size: 13px; | ||||
40 | font-family: "DejaVu Sans",Verdana, Geneva, Arial, sans-serif; | ||||
41 | line-height: 1.3; | ||||
42 | } | ||||
43 | | ||||
44 | | ||||
45 | /* | ||||
46 | ** HTML Tags | ||||
47 | */ | ||||
48 | | ||||
49 | h1, h2, h3, h4 | ||||
50 | { | ||||
51 | padding: 0; | ||||
52 | text-align: left; | ||||
53 | <?php color ( $orange )?> | ||||
54 | <?php background ('transparent')?> | ||||
55 | } | ||||
56 | h1 { | ||||
57 | font-size: 1.7em; | ||||
58 | } | ||||
59 | | ||||
60 | h2 { | ||||
61 | font-size: 1.5em; | ||||
62 | } | ||||
63 | | ||||
64 | h3 { | ||||
65 | font-size: 1.4em; | ||||
66 | } | ||||
67 | | ||||
68 | h4 { | ||||
69 | font-size: 1.3em; | ||||
70 | font-weight: bold; | ||||
71 | } | ||||
72 | | ||||
73 | h5 { | ||||
74 | font-size: 1.2em; | ||||
75 | } | ||||
76 | | ||||
77 | a:link { | ||||
78 | padding-bottom: 0; | ||||
79 | text-decoration: none; | ||||
80 | <?php linkcolor ( $blue )?> | ||||
81 | } | ||||
82 | | ||||
83 | a:visited { | ||||
84 | padding-bottom: 0; | ||||
85 | text-decoration: none; | ||||
86 | <?php linkcolor ( $grape_violet3 )?> | ||||
87 | } | ||||
88 | | ||||
89 | | ||||
90 | a[href]:hover { | ||||
91 | text-decoration: underline; | ||||
92 | } | ||||
93 | | ||||
94 | hr { | ||||
95 | margin: 0.3em 1em 0.3em 1em; | ||||
96 | height: 1px; | ||||
97 | <?php border ( $grey_d, 'dashed')?> | ||||
98 | border-width: 0 0 1px 0; | ||||
99 | } | ||||
100 | | ||||
101 | pre { | ||||
102 | display: block; | ||||
103 | margin: 0.3em; | ||||
104 | padding: 0.3em; | ||||
105 | font-size: 1em; | ||||
106 | <?php color ( $black )?> | ||||
107 | <?php background ( $grey_f )?> | ||||
108 | <?php border( $blue_grey, 'dashed' )?> | ||||
109 | border-width: 1px; | ||||
110 | overflow: auto; | ||||
111 | line-height: 1.1em; | ||||
112 | } | ||||
113 | | ||||
114 | input, textarea, select { | ||||
115 | margin: 0.2em; | ||||
116 | padding: 0.1em; | ||||
117 | <?php color ( $mid_grey )?> | ||||
118 | <?php background ( $white )?> | ||||
119 | border: 1px solid; | ||||
120 | } | ||||
121 | | ||||
122 | blockquote { | ||||
123 | margin: 0.3em; | ||||
124 | padding-left: 2.5em; | ||||
125 | <?php background ('transparent')?> | ||||
126 | } | ||||
127 | | ||||
128 | del { | ||||
129 | <?php color ( $middle_red ) ?> | ||||
130 | text-decoration: line-through; | ||||
131 | } | ||||
132 | | ||||
133 | dt { | ||||
134 | font-weight: bold; | ||||
135 | font-size: 1.05em; | ||||
136 | <?php color ( $blue )?> | ||||
137 | } | ||||
138 | | ||||
139 | dd { | ||||
140 | margin-left: 1em; | ||||
141 | } | ||||
142 | | ||||
143 | p { | ||||
144 | margin-top: 0.5em; | ||||
145 | margin-bottom: 0.9em; | ||||
146 | text-align: justify; | ||||
147 | } | ||||
148 | fieldset { | ||||
149 | <?php border ( $grey_c, '1px solid')?> | ||||
150 | } | ||||
151 | | ||||
152 | li { | ||||
153 | text-align: left; | ||||
154 | } | ||||
155 | | ||||
156 | fieldset { | ||||
157 | margin-bottom: 1em; | ||||
158 | padding: .5em; | ||||
159 | } | ||||
160 | | ||||
161 | form { | ||||
162 | margin: 0; | ||||
163 | padding: 0; | ||||
164 | } | ||||
165 | | ||||
166 | hr { | ||||
167 | height: 1px; | ||||
168 | <?php border ( $mid_grey, '1px solid')?> | ||||
169 | <?php background ( $mid_grey )?> | ||||
170 | margin: 0.5em 0 0.5em 0 ; | ||||
171 | } | ||||
172 | | ||||
173 | img { | ||||
174 | border: 0; | ||||
175 | } | ||||
176 | table { | ||||
177 | border-collapse: collapse; | ||||
178 | font-size: 1em; | ||||
179 | } | ||||
180 | th { | ||||
181 | text-align: left; | ||||
182 | padding-right: 1em; | ||||
183 | <?php border ( $grey_c, 'solid')?> | ||||
184 | border-width: 0 0 3px 0; | ||||
185 | } | ||||
186 | | ||||
187 | | ||||
188 | /* | ||||
189 | ** Header | ||||
190 | */ | ||||
191 | #header { | ||||
192 | <?php width ('100%')?> | ||||
193 | <?php color ( $dark_gray )?>:wq | ||||
194 | } | ||||
195 | | ||||
196 | #header_top { | ||||
197 | margin: 0 auto; | ||||
198 | padding: 0; | ||||
199 | <?php width ('100%')?> | ||||
200 | vertical-align: middle; | ||||
201 | <?php color ( $white )?> | ||||
202 | <?php background ( $blue )?> | ||||
203 | } | ||||
204 | | ||||
205 | #header_top div { | ||||
206 | margin: 0 auto; | ||||
207 | padding: 0; | ||||
208 | } | ||||
209 | | ||||
210 | #header_top div div { | ||||
211 | margin: 0 auto; | ||||
212 | padding: 0; | ||||
213 | vertical-align: middle; | ||||
214 | text-align: left; | ||||
215 | font-size: 1.7em; | ||||
216 | font-weight: bold; | ||||
217 | } | ||||
218 | | ||||
219 | #header_top div div img { | ||||
220 | margin:8px 0px 9px 18px; | ||||
221 | vertical-align: middle; | ||||
222 | } | ||||
223 | | ||||
224 | #header_bottom { | ||||
225 | <?php noprint()?> | ||||
226 | margin: 0 auto; | ||||
227 | padding: 0.1em 0em 0.3em 0; | ||||
228 | <?php width ('95%')?> | ||||
229 | vertical-align: middle; | ||||
230 | text-align: right; | ||||
231 | } | ||||
232 | | ||||
233 | #location { | ||||
234 | padding: 0 0 0 1.5em; | ||||
235 | text-align: left; | ||||
236 | line-height: normal; | ||||
237 | font-size: 1.1em; | ||||
238 | <?php float ('left')?> | ||||
239 | } | ||||
240 | | ||||
241 | #location ul { | ||||
242 | display: inline; | ||||
243 | margin: 0; | ||||
244 | padding: 0; | ||||
245 | list-style: none; | ||||
246 | } | ||||
247 | | ||||
248 | #location ul li { | ||||
249 | display: inline; | ||||
250 | white-space : nowrap; | ||||
251 | margin: 0; | ||||
252 | padding: 0 1em 0 0; | ||||
253 | } | ||||
254 | | ||||
255 | #menu { | ||||
256 | margin: 0 1.5em 0 0; | ||||
257 | text-align: right; | ||||
258 | line-height: normal; | ||||
259 | font-size: 1.1em; | ||||
260 | font-weight: bold; | ||||
261 | } | ||||
262 | | ||||
263 | #menu ul { | ||||
264 | display: inline; | ||||
265 | list-style: none; | ||||
266 | margin: 0; | ||||
267 | padding: 0; | ||||
268 | text-align: right; | ||||
269 | } | ||||
270 | | ||||
271 | #menu ul li { | ||||
272 | display: inline; | ||||
273 | white-space : nowrap; | ||||
274 | margin: 0; | ||||
275 | padding: 0 0 0 1em; | ||||
276 | text-align: right; | ||||
277 | } | ||||
278 | | ||||
279 | .here a:link, .here a:visited { | ||||
280 | text-decoration:underline; | ||||
281 | } | ||||
282 | | ||||
283 | .here ul a:link, .here ul a:visited { | ||||
284 | text-decoration:none; | ||||
285 | } | ||||
286 | | ||||
287 | #menu ul li a { | ||||
288 | font-weight: bold; | ||||
289 | } | ||||
290 | | ||||
291 | | ||||
292 | /* | ||||
293 | ** Content | ||||
294 | */ | ||||
295 | | ||||
296 | #content { | ||||
297 | <?php width ('100%')?> | ||||
298 | } | ||||
299 | | ||||
300 | #main { | ||||
301 | /* padding in px not ex because IE messes up 100% width tables otherwise */ | ||||
302 | padding-left: 10px; | ||||
303 | text-align: left; | ||||
304 | } | ||||
305 | | ||||
306 | #body_wrapper { | ||||
307 | margin: 0 auto; | ||||
308 | <?php width ('95%')?> | ||||
309 | } | ||||
310 | | ||||
311 | #right { | ||||
312 | <?php float ('right')?> | ||||
313 | margin: 0; | ||||
314 | padding: 0; | ||||
315 | <?php width ('73%')?> | ||||
316 | } | ||||
317 | | ||||
318 | /* These are date cells on the front page. */ | ||||
319 | td.cell_date { | ||||
320 | <?php width('8em') ?> | ||||
321 | <?php minWidth('8em') ?> | ||||
322 | } | ||||
323 | | ||||
324 | #hotspot, .sideimage { | ||||
325 | <?php float ('right')?> | ||||
326 | margin: 1ex 1em; | ||||
327 | clear: right; | ||||
328 | } | ||||
329 | | ||||
330 | .belowimage, h1, h2, h3, h4, h5 { | ||||
331 | clear: right; | ||||
332 | } | ||||
333 | | ||||
334 | | ||||
335 | /* | ||||
336 | ** Left Menu | ||||
337 | */ | ||||
338 | | ||||
339 | #left { | ||||
340 | <?php noprint()?> | ||||
341 | <?php float ('left')?> | ||||
342 | margin: 0; | ||||
343 | padding: 0; | ||||
344 | <?php width ('25%')?> | ||||
345 | } | ||||
346 | | ||||
347 | .menu_box { | ||||
348 | padding: 0.7em 0 0 0; | ||||
349 | } | ||||
350 | | ||||
351 | .menu_box ul { | ||||
352 | text-align: left; | ||||
353 | } | ||||
354 | | ||||
355 | .menu_box li { | ||||
356 | list-style-type: none; | ||||
357 | text-align: left; | ||||
358 | margin-left: -1.5em; | ||||
359 | } | ||||
360 | | ||||
361 | .menu_box ul ul { | ||||
362 | margin: 0; | ||||
363 | padding-left: 0; | ||||
364 | } | ||||
365 | | ||||
366 | .menu_box li li { | ||||
367 | margin-left: 1em; | ||||
368 | } | ||||
369 | | ||||
370 | .menu_box .active{ | ||||
371 | <?php color ( $dark_orange )?> | ||||
372 | } | ||||
373 | | ||||
374 | .menutitle { | ||||
375 | margin: 0.6em 0 1.2em 0; | ||||
376 | padding:0; | ||||
377 | <?php color ( $white )?> | ||||
378 | <?php background ( $blue )?> | ||||
379 | } | ||||
380 | .menutitle div { | ||||
381 | margin: 0; | ||||
382 | padding:0; | ||||
383 | } | ||||
384 | .menutitle div h2 { | ||||
385 | margin: 0; | ||||
386 | padding: 0.2em 0 0.3em 1.3em; | ||||
387 | line-height:1.2em; | ||||
388 | font-size: 120%; | ||||
389 | font-weight: normal; | ||||
390 | <?php color ( $white )?> | ||||
391 | } | ||||
392 | .menutitle div h2 a { | ||||
393 | <?php color ( $white )?> | ||||
394 | } | ||||
395 | .clearer { | ||||
396 | clear: both; | ||||
397 | height: 1px; | ||||
398 | } | ||||
399 | | ||||
400 | | ||||
401 | /* | ||||
402 | ** Footer | ||||
403 | */ | ||||
404 | #footer { | ||||
405 | <?php noprint()?> | ||||
406 | <?php width ('100%')?> | ||||
407 | <?php background ( $blue )?> | ||||
408 | } | ||||
409 | | ||||
410 | #footer_text { | ||||
411 | margin: 0 auto; | ||||
412 | padding: 1em 0 1em 3.5em; | ||||
413 | <?php width ('51.5em')?> | ||||
414 | text-align: left; | ||||
415 | <?php color ( $light_grey )?> | ||||
416 | } | ||||
417 | | ||||
418 | #footer a:link, #footer a:visited { | ||||
419 | <?php linkcolor ( $white )?> | ||||
420 | font-weight: bold; | ||||
421 | } | ||||
422 | | ||||
423 | #quicklinks { | ||||
424 | font-size: 1em; | ||||
425 | padding: 1em; | ||||
426 | text-align: center; | ||||
427 | margin-top: 0.5em; | ||||
428 | margin-left: 0.2em; | ||||
429 | margin-bottom: 0.5em; | ||||
430 | margin-right: 0.2em; | ||||
431 | } | ||||
432 | | ||||
433 | .content .contents { | ||||
434 | text-align: left; | ||||
435 | } | ||||
436 | | ||||
437 | /* | ||||
438 | ** Credits | ||||
439 | */ | ||||
440 | table.credit tr { | ||||
441 | vertical-align:top; | ||||
442 | } | ||||
443 | | ||||
444 | table.credit td { | ||||
445 | border-bottom: 1px solid #cccccc; | ||||
446 | } | ||||
447 | | ||||
448 | <?php | ||||
449 | | ||||
450 | if (file_exists ($_SERVER ['DOCUMENT_ROOT'].'/css.inc')) { | ||||
451 | include $_SERVER ['DOCUMENT_ROOT'].'/css.inc'; | ||||
452 | } | ||||
453 | | ||||
454 | function color ($color) { | ||||
455 | if (! isset ($_GET ['color'])) | ||||
456 | echo "color: ".$color.";\n"; | ||||
457 | elseif ($_GET ['color']) | ||||
458 | echo "color: ".$_GET ['color'].";\n"; | ||||
459 | else | ||||
460 | echo "color: WindowText;\n"; | ||||
461 | } | ||||
462 | | ||||
463 | function background ($background, $color = false) { | ||||
464 | if (! isset ($_GET ['background'])) { | ||||
465 | echo "background: ".$background.";\n"; | ||||
466 | if ($color) | ||||
467 | echo "background-color: ".$color.";\n"; | ||||
468 | } | ||||
469 | elseif ($_GET ['background']) | ||||
470 | echo "background-color: ".$_GET ['background'].";\n"; | ||||
471 | else | ||||
472 | echo "background: Window;\n"; | ||||
473 | } | ||||
474 | | ||||
475 | function border ($color, $other = '') { | ||||
476 | if (! isset ($_GET ['color'])) | ||||
477 | echo "border: ".$color." ".$other.";\n"; | ||||
478 | else | ||||
479 | echo "border: ".$_GET ['color']." ".$other.";\n"; | ||||
480 | } | ||||
481 | | ||||
482 | function linkcolor ($color) { | ||||
483 | if (! isset ($_GET ['link'])) | ||||
484 | echo "color: ".$color.";\n"; | ||||
485 | elseif ($_GET ['link']) | ||||
486 | echo "color: ".$_GET ['link'].";\n"; | ||||
487 | } | ||||
488 | | ||||
489 | function noprint () { | ||||
490 | if (isset ($_GET ['mode']) && $_GET ['mode'] == "print") | ||||
491 | echo "display: none;\n"; | ||||
492 | } | ||||
493 | | ||||
494 | function noflat () { | ||||
495 | if (isset ($_GET ['mode']) && $_GET ['mode'] == "flat") | ||||
496 | echo "display: none;\n"; | ||||
497 | } | ||||
498 | | ||||
499 | function float ($float) { | ||||
500 | if (! isset ($_GET ['mode']) || $_GET ['mode'] != "flat") | ||||
501 | echo "float: ".$float.";\n"; | ||||
502 | } | ||||
503 | | ||||
504 | function width ($width) { | ||||
505 | if (! isset ($_GET ['mode']) || $_GET ['mode'] == "normal") | ||||
506 | echo "width: ".$width.";\n"; | ||||
507 | } | ||||
508 | | ||||
509 | function minWidth ($minwidth) { | ||||
510 | if (! isset ($_GET ['mode']) || $_GET ['mode'] == "normal") | ||||
511 | echo "min-width: ".$minwidth.";\n"; | ||||
512 | } | ||||
513 | | ||||
514 | function maxWidth ($maxwidth) { | ||||
515 | if (! isset ($_GET ['mode']) || $_GET ['mode'] == "normal") | ||||
516 | echo "max-width: ".$maxwidth.";\n"; | ||||
517 | } | ||||
518 | | ||||
519 | function minHeight ($minHeight) { | ||||
520 | if (! isset ($_GET ['mode']) || $_GET ['mode'] == "normal") | ||||
521 | echo "min-height: ".$minHeight.";\n"; | ||||
522 | } | ||||
523 | | ||||
524 | ?> |