• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

コミットメタ情報

リビジョン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

  • Add list-indent1, 2 and 3: that is express indent-distance to parent list

* In default.ini.php, $_ul_margin, $_ol_margin and $_dl_margin must be 1

  • These are used as indent leaping level calclation source
  • $_list_pad_str = ' class="list%d list-indent%d"';
    • 2nd param of sprintf($_list_pad_str, $1, $2) is exactly indent-level.

* This replacement from PHP logic to CSS is completely compatible

with existing list logic that contains ls2 plugin
and PukiWiki core list logic.

変更サマリ

差分

--- a/default.ini.php
+++ b/default.ini.php
@@ -1,8 +1,8 @@
11 <?php
22 // 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
66 // 2001-2002 Originally written by yu-ji
77 // License: GPL v2 or (at your option) any later version
88 //
@@ -30,14 +30,15 @@ $search_word_color = 1;
3030 $list_index = 1;
3131
3232 /////////////////////////////////////////////////
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"';
4142
4243 /////////////////////////////////////////////////
4344 // テキストエリアのカラム数
@@ -178,5 +179,3 @@ $facemark_rules = array(
178179 '&amp;(phoneto);'=>'[phoneto]',
179180 '&amp;(faxto);' => '[faxto]',
180181 );
181-
182-?>
--- a/keitai.ini.php
+++ b/keitai.ini.php
@@ -1,8 +1,8 @@
11 <?php
22 // 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
66 // 2001-2002 Originally written by yu-ji
77 // License: GPL v2 or (at your option) any later version
88 //
@@ -30,13 +30,14 @@ $search_word_color = 0;
3030 $list_index = 0;
3131
3232 /////////////////////////////////////////////////
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
4041 $_list_pad_str = '';
4142
4243 /////////////////////////////////////////////////
@@ -383,5 +384,3 @@ switch ($ua_name) {
383384 }
384385
385386 unset($matches, $ua_name, $ua_vers, $ua_agent, $special_rules);
386-
387-?>
--- a/skin/pukiwiki.css
+++ b/skin/pukiwiki.css
@@ -2,8 +2,8 @@
22
33 /*!
44 * PukiWiki - Yet another WikiWikiWeb clone.
5- * Copyright (C)
6- * 2002-2016 PukiWiki Development Team
5+ * Copyright
6+ * 2002-2017 PukiWiki Development Team
77 * 2001-2002 Originally written by yu-ji
88 * License: GPL v2 or (at your option) any later version
99 *
@@ -168,6 +168,24 @@ ol.list1 { list-style-type:decimal; }
168168 ol.list2 { list-style-type:lower-roman; }
169169 ol.list3 { list-style-type:lower-alpha; }
170170
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+
171189 div.ie5 { text-align:center; }
172190
173191 span.noexists {
--- a/skin/tdiary.css
+++ b/skin/tdiary.css
@@ -2,8 +2,8 @@
22
33 /*!
44 * PukiWiki - Yet another WikiWikiWeb clone.
5- * Copyright (C)
6- * 2002-2016 PukiWiki Development Team
5+ * Copyright
6+ * 2002-2017 PukiWiki Development Team
77 * 2001-2002 Originally written by yu-ji
88 * License: GPL v2 or (at your option) any later version
99 *
@@ -70,6 +70,24 @@ ol.list1 { list-style-type:decimal; }
7070 ol.list2 { list-style-type:lower-roman; }
7171 ol.list3 { list-style-type:lower-alpha; }
7272
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+
7391 div.ie5 { text-align:center; }
7492
7593 /* NoSuchPage? */