リビジョン | 3b574739a7a05f735ed65496f20801b9300334a2 (tree) |
---|---|
日時 | 2017-08-17 01:04:56 |
作者 | umorigu <umorigu@gmai...> |
コミッター | umorigu |
BugTrack/2188 Define List layout by CSS instead of ini file
* Define List styles by CSS instead of default.ini file
* In default.ini.php, $_ul_margin, $_ol_margin and $_dl_margin must be 1
* This replacement from PHP logic to CSS is completely compatible
@@ -1,8 +1,8 @@ | ||
1 | 1 | <?php |
2 | 2 | // PukiWiki - Yet another WikiWikiWeb clone. |
3 | -// $Id: default.ini.php,v 1.25 2005/12/20 14:04:40 henoheno Exp $ | |
4 | -// Copyright (C) | |
5 | -// 2003-2005 PukiWiki Developers Team | |
3 | +// default.ini.php | |
4 | +// Copyright | |
5 | +// 2003-2017 PukiWiki Development Team | |
6 | 6 | // 2001-2002 Originally written by yu-ji |
7 | 7 | // License: GPL v2 or (at your option) any later version |
8 | 8 | // |
@@ -30,14 +30,15 @@ $search_word_color = 1; | ||
30 | 30 | $list_index = 1; |
31 | 31 | |
32 | 32 | ///////////////////////////////////////////////// |
33 | -// リスト構造の左マージン | |
34 | -$_ul_left_margin = 0; // リストと画面左端との間隔(px) | |
35 | -$_ul_margin = 16; // リストの階層間の間隔(px) | |
36 | -$_ol_left_margin = 0; // リストと画面左端との間隔(px) | |
37 | -$_ol_margin = 16; // リストの階層間の間隔(px) | |
38 | -$_dl_left_margin = 0; // リストと画面左端との間隔(px) | |
39 | -$_dl_margin = 16; // リストの階層間の間隔(px) | |
40 | -$_list_pad_str = ' class="list%d" style="padding-left:%dpx;margin-left:%dpx"'; | |
33 | +// Obsolete: リスト構造の左マージン (Leaves for compatibility of plugins) | |
34 | +// Use list-indent1 CSS class instead | |
35 | +$_ul_left_margin = 0; // Must be 0 (Plugin backward compatibility) | |
36 | +$_ul_margin = 1; // Must be 1 (Plugin backward compatibility) | |
37 | +$_ol_left_margin = 0; // Must be 0 | |
38 | +$_ol_margin = 1; // Must be 1 | |
39 | +$_dl_left_margin = 0; // Must be 0 | |
40 | +$_dl_margin = 1; // Must be 1 | |
41 | +$_list_pad_str = ' class="list%d list-indent%d"'; | |
41 | 42 | |
42 | 43 | ///////////////////////////////////////////////// |
43 | 44 | // テキストエリアのカラム数 |
@@ -178,5 +179,3 @@ $facemark_rules = array( | ||
178 | 179 | '&(phoneto);'=>'[phoneto]', |
179 | 180 | '&(faxto);' => '[faxto]', |
180 | 181 | ); |
181 | - | |
182 | -?> |
@@ -1,8 +1,8 @@ | ||
1 | 1 | <?php |
2 | 2 | // PukiWiki - Yet another WikiWikiWeb clone. |
3 | -// $Id: keitai.ini.php,v 1.25 2005/12/10 07:57:30 henoheno Exp $ | |
4 | -// Copyright (C) | |
5 | -// 2002-2005 PukiWiki Developers Team | |
3 | +// keitai.ini.php | |
4 | +// Copyright | |
5 | +// 2002-2017 PukiWiki Development Team | |
6 | 6 | // 2001-2002 Originally written by yu-ji |
7 | 7 | // License: GPL v2 or (at your option) any later version |
8 | 8 | // |
@@ -30,13 +30,14 @@ $search_word_color = 0; | ||
30 | 30 | $list_index = 0; |
31 | 31 | |
32 | 32 | ///////////////////////////////////////////////// |
33 | -// リスト構造の左マージン | |
34 | -$_ul_left_margin = 0; // リストと画面左端との間隔(px) | |
35 | -$_ul_margin = 16; // リストの階層間の間隔(px) | |
36 | -$_ol_left_margin = 0; // リストと画面左端との間隔(px) | |
37 | -$_ol_margin = 16; // リストの階層間の間隔(px) | |
38 | -$_dl_left_margin = 0; // リストと画面左端との間隔(px) | |
39 | -$_dl_margin = 16; // リストの階層間の間隔(px) | |
33 | +// Obsolete: リスト構造の左マージン (Leaves for compatibility of plugins) | |
34 | +// Use list-indent1 CSS class instead | |
35 | +$_ul_left_margin = 0; // Must be 0 (Plugin backward compatibility) | |
36 | +$_ul_margin = 1; // Must be 1 (Plugin backward compatibility) | |
37 | +$_ol_left_margin = 0; // Must be 0 | |
38 | +$_ol_margin = 1; // Must be 1 | |
39 | +$_dl_left_margin = 0; // Must be 0 | |
40 | +$_dl_margin = 1; // Must be 1 | |
40 | 41 | $_list_pad_str = ''; |
41 | 42 | |
42 | 43 | ///////////////////////////////////////////////// |
@@ -383,5 +384,3 @@ switch ($ua_name) { | ||
383 | 384 | } |
384 | 385 | |
385 | 386 | unset($matches, $ua_name, $ua_vers, $ua_agent, $special_rules); |
386 | - | |
387 | -?> |
@@ -2,8 +2,8 @@ | ||
2 | 2 | |
3 | 3 | /*! |
4 | 4 | * PukiWiki - Yet another WikiWikiWeb clone. |
5 | - * Copyright (C) | |
6 | - * 2002-2016 PukiWiki Development Team | |
5 | + * Copyright | |
6 | + * 2002-2017 PukiWiki Development Team | |
7 | 7 | * 2001-2002 Originally written by yu-ji |
8 | 8 | * License: GPL v2 or (at your option) any later version |
9 | 9 | * |
@@ -168,6 +168,24 @@ ol.list1 { list-style-type:decimal; } | ||
168 | 168 | ol.list2 { list-style-type:lower-roman; } |
169 | 169 | ol.list3 { list-style-type:lower-alpha; } |
170 | 170 | |
171 | +.list-indent1 { | |
172 | + padding-left: 16px; | |
173 | + margin-left: 16px | |
174 | +} | |
175 | +/* list-indent2,3,4 are used for leaping list level indentation */ | |
176 | +.list-indent2 { | |
177 | + padding-left: 32px; | |
178 | + margin-left: 32px | |
179 | +} | |
180 | +.list-indent3 { | |
181 | + padding-left: 48px; | |
182 | + margin-left: 48px | |
183 | +} | |
184 | +.list-indent4 { | |
185 | + padding-left: 64px; | |
186 | + margin-left: 64px | |
187 | +} | |
188 | + | |
171 | 189 | div.ie5 { text-align:center; } |
172 | 190 | |
173 | 191 | span.noexists { |
@@ -2,8 +2,8 @@ | ||
2 | 2 | |
3 | 3 | /*! |
4 | 4 | * PukiWiki - Yet another WikiWikiWeb clone. |
5 | - * Copyright (C) | |
6 | - * 2002-2016 PukiWiki Development Team | |
5 | + * Copyright | |
6 | + * 2002-2017 PukiWiki Development Team | |
7 | 7 | * 2001-2002 Originally written by yu-ji |
8 | 8 | * License: GPL v2 or (at your option) any later version |
9 | 9 | * |
@@ -70,6 +70,24 @@ ol.list1 { list-style-type:decimal; } | ||
70 | 70 | ol.list2 { list-style-type:lower-roman; } |
71 | 71 | ol.list3 { list-style-type:lower-alpha; } |
72 | 72 | |
73 | +.list-indent1 { | |
74 | + padding-left: 16px; | |
75 | + margin-left: 16px | |
76 | +} | |
77 | +/* list-indent2,3,4 are used for leaping list level indentation */ | |
78 | +.list-indent2 { | |
79 | + padding-left: 32px; | |
80 | + margin-left: 32px | |
81 | +} | |
82 | +.list-indent3 { | |
83 | + padding-left: 48px; | |
84 | + margin-left: 48px | |
85 | +} | |
86 | +.list-indent4 { | |
87 | + padding-left: 64px; | |
88 | + margin-left: 64px | |
89 | +} | |
90 | + | |
73 | 91 | div.ie5 { text-align:center; } |
74 | 92 | |
75 | 93 | /* NoSuchPage? */ |