OSDN Git Service

Just cleanup: 'and' for boolean => '&&'
[pukiwiki/pukiwiki.git] / skin / tdiary.css.php
1 <?php
2 // PukiWiki - Yet another WikiWikiWeb clone.
3 // $Id: tdiary.css.php,v 1.6 2005/05/01 02:43:27 henoheno Exp $
4 // Copyright (C)
5 //   2002-2005 PukiWiki Developers Team
6 //   2001-2002 Originally written by yu-ji
7 // License: GPL v2 or (at your option) any later version
8 //
9 // tDiary-css-wrapper
10
11 // Send header
12 header('Content-Type: text/css');
13 $matches = array();
14 if(ini_get('zlib.output_compression') && preg_match('/\b(gzip|deflate)\b/i', $_SERVER['HTTP_ACCEPT_ENCODING'], $matches)) {
15         header('Content-Encoding: ' . $matches[1]);
16         header('Vary: Accept-Encoding');
17 }
18
19 // Default charset
20 $charset = isset($_GET['charset']) ? $_GET['charset']  : '';
21 switch ($charset) {
22         case 'Shift_JIS': break; /* this @charset is for Mozilla's bug */
23         default: $charset ='iso-8859-1';
24 }
25
26 // Media
27 $media = isset($_GET['media']) ? $_GET['media'] : '';
28 if ($media != 'print') $media = 'screen';
29
30 // Color theme
31 $color_theme = isset($_GET['color']) ? $_GET['color'] : '';
32
33 // Color theme: Design structure
34 $c_background = $c_background2 = $c_background3 = $c_background4 = '';
35 $c_line1 = $c_line2 = $c_preview = $c_color1 = $c_color2 = $c_color3 = $c_dangling = '';
36 $_COLOR['.style_table']      = & $c_line1;
37 $_COLOR['thead th.style_th'] = & $c_background4;
38 $_COLOR['thead td.style_td'] = & $c_background3;
39 $_COLOR['.style_th'   ]      = & $c_background2;
40 $_COLOR['.style_td'   ]      = & $c_background;
41 $_COLOR['span.noexists'] = & $c_dangling;
42 $_COLOR['div#preview']   = & $c_preview;
43 $_COLOR['.style_calendar' ] = & $c_line1;
44 $_COLOR['.style_td_caltop'] = & $c_background;
45 $_COLOR['.style_td_week'  ] = & $c_color1;
46 $_COLOR['.style_td_blank' ] = & $c_background;
47 $_COLOR['.style_td_day'   ] = & $c_background;
48 $_COLOR['.style_td_sat'   ] = & $c_color2; // NOTE: Blue flavour for Saturday
49 $_COLOR['.style_td_sun'   ] = & $c_color3; // NOTE: Red  flavour for Sunday
50 $_COLOR['.style_td_today' ] = & $c_dangling;
51 $_COLOR['hr.short_line'] = & $c_line1;
52 $_COLOR['td.vote_label'] = & $c_color1;
53 $_COLOR['td.vote_td1'  ] = & $c_color3;
54 $_COLOR['td.vote_td2'  ] = & $c_color2;
55 $color = & $_COLOR;
56
57 // Color theme: Theme selector
58 switch($color_theme){
59 case 'black':
60         // Beauty black
61         $c_background  = '111111'; //
62         $c_background2 = '333333'; ///
63         $c_background3 = '223333'; ////
64         $c_background4 = '332200'; /////
65         $c_line1       = '999999'; ///////////
66         $c_line2       = '999999';
67         $c_preview     = '222200'; ///
68         $c_color1      = '333333'; ////
69         $c_color2      = '223333'; /////
70         $c_color3      = '332200'; //////
71         $c_dangling    = '333355'; ///////
72         break;
73
74 default:
75         // Default skyblue
76         $c_background  = 'EEF5FF';
77         $c_background2 = 'EEEEEE';
78         $c_background3 = 'D0D8E0';
79         $c_background4 = 'E0E8F0';
80         $c_line1       = 'CCD5DD';
81         $c_line2       = '333333';
82         $c_preview     = 'F5F8FF';
83         $c_color1      = 'DDE5EE';
84         $c_color2      = 'DDE5FF';
85         $c_color3      = 'FFEEEE';
86         $c_dangling    = 'FFFACC';
87         $_td_today     = 'FFFFDD';
88         $_vote_label   = 'FFCCCC';
89         $_COLOR['.style_td_today' ] = & $_td_today;
90         $_COLOR['td.vote_label'   ] = & $_vote_label;
91         $_COLOR['td.vote_td1'     ] = & $c_color2;
92         $_COLOR['td.vote_td2'     ] = & $c_background;
93         break;
94 }
95
96 // Output CSS ----
97 ?>
98 @charset "<?php echo $charset ?>";
99
100 /* ------------------------------------------ */
101 /* PukiWiki abstruction CSS for tDiary themes */
102
103 /* <--> Expand textarea height (for editing only) */
104 /* <<-- textarea with not-so-long margin          */
105 form.update textarea {
106         height: 25em;
107         margin-left:   1em;
108         margin-bottom: 0;
109 }
110
111 /* >--< Shrink textarea width (for #memo, etc) */
112 form textarea { width: 30em }
113
114 /* Image border = 0 */
115 img { border: 0 }
116
117
118 /* --------------------- */
119 /* PukiWiki original CSS */
120
121 thead td.style_td,
122 tfoot td.style_td {
123         color:inherit;
124         background-color:#<?php echo $color['thead td.style_td'] ?>;
125 }
126 thead th.style_th,
127 tfoot th.style_th {
128         color:inherit;
129         background-color:#<?php echo $color['thead th.style_th'] ?>;
130 }
131 .style_table {
132         padding:0px;
133         border:0px;
134         margin:auto;
135         text-align:left;
136         color:inherit;
137         background-color:#<?php echo $color['.style_table'] ?>;
138 }
139 .style_th {
140         padding:5px;
141         margin:1px;
142         text-align:center;
143         color:inherit;
144         background-color:#<?php echo $color['.style_th'] ?>;
145 }
146 .style_td {
147         padding:5px;
148         margin:1px;
149         color:inherit;
150         background-color:#<?php echo $color['.style_td'] ?>;
151 }
152
153 ul.list1 { list-style-type:disc; }
154 ul.list2 { list-style-type:circle; }
155 ul.list3 { list-style-type:square; }
156 ol.list1 { list-style-type:decimal; }
157 ol.list2 { list-style-type:lower-roman; }
158 ol.list3 { list-style-type:lower-alpha; }
159
160 div.ie5 { text-align:center; }
161
162 /* NoSuchPage? */
163 span.noexists {
164         color:inherit;
165         background-color:#<?php echo $color['span.noexists'] ?>;
166 }
167
168 .small { font-size:80%; }
169
170 /* Not found, Remove? */
171 /*
172 .super_index {
173         color:#DD3333;
174         background-color:inherit;
175         font-weight:bold;
176         font-size:60%;
177         vertical-align:super;
178 }
179 */
180
181 /* for tDiary themes */
182 a.note_super {}
183
184 div.jumpmenu {
185         font-size:60%;
186         text-align:right;
187 }
188
189 /* for tDiary themes */
190 hr.full_hr {}
191 hr.note_hr { display:none }
192
193 span.size1 {
194         font-size:xx-small;
195         line-height:130%;
196         text-indent:0px;
197         display:inline;
198 }
199 span.size2 {
200         font-size:x-small;
201         line-height:130%;
202         text-indent:0px;
203         display:inline;
204 }
205 span.size3 {
206         font-size:small;
207         line-height:130%;
208         text-indent:0px;
209         display:inline;
210 }
211 span.size4 {
212         font-size:medium;
213         line-height:130%;
214         text-indent:0px;
215         display:inline;
216 }
217 span.size5 {
218         font-size:large;
219         line-height:130%;
220         text-indent:0px;
221         display:inline;
222 }
223 span.size6 {
224         font-size:x-large;
225         line-height:130%;
226         text-indent:0px;
227         display:inline;
228 }
229 span.size7 {
230         font-size:xx-large;
231         line-height:130%;
232         text-indent:0px;
233         display:inline;
234 }
235
236 /* html.php/catbody() */
237 strong.word0 {
238         background-color:#FFFF66;
239         color:black;
240 }
241 strong.word1 {
242         background-color:#A0FFFF;
243         color:black;
244 }
245 strong.word2 {
246         background-color:#99FF99;
247         color:black;
248 }
249 strong.word3 {
250         background-color:#FF9999;
251         color:black;
252 }
253 strong.word4 {
254         background-color:#FF66FF;
255         color:black;
256 }
257 strong.word5 {
258         background-color:#880000;
259         color:white;
260 }
261 strong.word6 {
262         background-color:#00AA00;
263         color:white;
264 }
265 strong.word7 {
266         background-color:#886800;
267         color:white;
268 }
269 strong.word8 {
270         background-color:#004699;
271         color:white;
272 }
273 strong.word9 {
274         background-color:#990099;
275         color:white;
276 }
277
278 /* html.php/edit_form() */
279 .edit_form { clear:both; }
280
281 /* pukiwiki.skin.php */
282 div#header {
283         padding:0px;
284         margin:0px;
285 }
286
287 div#navigator {
288 <?php   if ($media == 'print') { ?>
289         display:none;
290 <?php   } else { ?>
291         clear:both;
292         padding:4px 0px 0px 0px;
293         margin:0px;
294 <?php   } ?>
295 }
296
297 td.menubar {
298 <?php   if ($media == 'print') { ?>
299         display:none;
300 <?php   } else { ?>
301         width:9em;
302         vertical-align:top;
303 <?php   } ?>
304 }
305
306 div#menubar {
307 <?php   if ($media == 'print') { ?>
308         display:none;
309 <?php   } else { ?>
310         width:9em;
311         padding:0px;
312         margin:4px;
313         word-break:break-all;
314         font-size:90%;
315         overflow:hidden;
316 <?php   } ?>
317 }
318
319 div#menubar ul {
320         margin:0px 0px 0px .5em;
321         padding:0px 0px 0px .5em;
322 }
323
324 div#menubar ul li { line-height:110%; }
325
326 div#menubar h4 { font-size:110%; }
327
328 /* for tDiary themes */
329 div.pkwk_body { padding:0px; }
330
331 div#note {
332         clear:both;
333         padding:0px;
334         margin:0px;
335 }
336
337 div#attach {
338 <?php   if ($media == 'print') { ?>
339         display:none;
340 <?php   } else { ?>
341         clear:both;
342         padding:0px;
343         margin:0px;
344 <?php   } ?>
345 }
346
347 div#toolbar {
348 <?php   if ($media == 'print') { ?>
349         display:none;
350 <?php   } else { ?>
351         clear:both;
352         padding:0px;
353         margin:0px;
354         text-align:right;
355 <?php   } ?>
356 }
357
358 div#lastmodified {
359         font-size:80%;
360         padding:0px;
361         margin:0px;
362 }
363
364 /* for tDiary theme */
365 div#related {
366 <?php   if ($media == 'print') { ?>
367         display:none;
368 <?php   } else { ?>
369         font-size:80%;
370         padding:0px;
371         margin:0px 0px 0px 0px;
372 <?php   } ?>
373 }
374
375 div#footer {
376         font-size:70%;
377         padding:0px;
378         margin:16px 0px 0px 0px;
379 }
380
381 div#banner {
382         float:right;
383         margin-top:24px;
384 }
385
386 div#preview {
387         color:inherit;
388         background-color:#<?php echo $color['div#preview'] ?>;
389 }
390
391 img#logo {
392 <?php   if ($media == 'print') { ?>
393         display:none;
394 <?php   } else { ?>
395         float:left;
396         margin-right:20px;
397 <?php   } ?>
398 }
399
400 /* aname.inc.php */
401 .anchor {}
402 .anchor_super {
403         font-size:xx-small;
404         vertical-align:super;
405 }
406
407 /* br.inc.php */
408 br.spacer {}
409
410 /* calendar*.inc.php */
411 .style_calendar {
412         padding:0px;
413         border:0px;
414         margin:3px;
415         color:inherit;
416         background-color:#<?php echo $color['.style_calendar'] ?>;
417         text-align:center;
418 }
419 .style_td_caltop {
420         padding:5px;
421         margin:1px;
422         color:inherit;
423         background-color:#<?php echo $color['.style_td_caltop'] ?>;
424         font-size:80%;
425         text-align:center;
426 }
427 .style_td_today {
428         padding:5px;
429         margin:1px;
430         color:inherit;
431         background-color:#<?php echo $color['.style_td_today'] ?>;
432         text-align:center;
433 }
434 .style_td_sat {
435         padding:5px;
436         margin:1px;
437         color:inherit;
438         background-color:#<?php echo $color['.style_td_sat'] ?>;
439         text-align:center;
440 }
441 .style_td_sun {
442         padding:5px;
443         margin:1px;
444         color:inherit;
445         background-color:#<?php echo $color['.style_td_sun'] ?>;
446         text-align:center;
447 }
448 .style_td_blank {
449         padding:5px;
450         margin:1px;
451         color:inherit;
452         background-color:#<?php echo $color['.style_td_blank'] ?>;
453         text-align:center;
454 }
455 .style_td_day {
456         padding:5px;
457         margin:1px;
458         color:inherit;
459         background-color:#<?php echo $color['.style_td_day'] ?>;
460         text-align:center;
461 }
462 .style_td_week {
463         padding:5px;
464         margin:1px;
465         color:inherit;
466         background-color:#<?php echo $color['.style_td_week'] ?>;
467         font-size:80%;
468         font-weight:bold;
469         text-align:center;
470 }
471
472 /* calendar_viewer.inc.php */
473 div.calendar_viewer {
474         color:inherit;
475         background-color:inherit;
476         margin-top:20px;
477         margin-bottom:10px;
478         padding-bottom:10px;
479 }
480 span.calendar_viewer_left {
481         color:inherit;
482         background-color:inherit;
483         float:left;
484 }
485 span.calendar_viewer_right {
486         color:inherit;
487         background-color:inherit;
488         float:right;
489 }
490
491 /* clear.inc.php */
492 .clear {
493         margin:0px;
494         clear:both;
495 }
496
497 /* counter.inc.php */
498 div.counter { font-size:70%; }
499
500 /* diff.inc.php */
501 span.diff_added {
502         color:blue;
503         background-color:inherit;
504 }
505
506 span.diff_removed {
507         color:red;
508         background-color:inherit;
509 }
510
511 /* hr.inc.php */
512 hr.short_line {
513         text-align:center;
514         width:80%;
515         border-style:solid;
516         border-color:#<?php echo $color['hr.short_line'] ?>;
517         border-width:1px 0px;
518 }
519
520 /* include.inc.php */
521 h5.side_label { text-align:center; }
522
523 /* navi.inc.php */
524 ul.navi {
525         margin:0px;
526         padding:0px;
527         text-align:center;
528 }
529 li.navi_none {
530         display:inline;
531         float:none;
532 }
533 li.navi_left {
534         display:inline;
535         float:left;
536         text-align:left;
537 }
538 li.navi_right {
539         display:inline;
540         float:right;
541         text-align:right;
542 }
543
544 /* new.inc.php */
545 span.comment_date { font-size:x-small; }
546 span.new1 {
547         color:red;
548         background-color:transparent;
549         font-size:x-small;
550 }
551 span.new5 {
552         color:green;
553         background-color:transparent;
554         font-size:xx-small;
555 }
556
557 /* popular.inc.php */
558 span.counter { font-size:70%; }
559
560 /* recent.inc.php,showrss.inc.php */
561
562 /* ref.inc.php */
563 div.img_margin {
564         margin-left:32px;
565         margin-right:32px;
566 }
567
568 /* vote.inc.php */
569 td.vote_label {
570         color:inherit;
571         background-color:#<?php echo $color['td.vote_label'] ?>;
572 }
573 td.vote_td1 {
574         color:inherit;
575         background-color:#<?php echo $color['td.vote_td1'] ?>;
576 }
577 td.vote_td2 {
578         color:inherit;
579         background-color:#<?php echo $color['td.vote_td2'] ?>;
580 }