MACHIDA Hideki
h****@match*****
2004年 8月 7日 (土) 00:20:47 JST
町田です。 たびたびすみません。 Fri, Aug 06, 2004 at 11:05:54PM +0900 の Message-Id: <20040806140554.GA3301%h****@match*****>において MACHIDA Hideki さん曰く: > とりあえず「サイドバー専用 recent」を作ってみましたので添付 > します。 よく考えたら1項目が2行にわたるとわけわからなくなるので、 tDiary の recent_xxx にならって通番をふるようにしました。 申訳ありませんがさきほどの添付ファイルは破棄してこちらをご参 照下さい。 > テンプレートの「<div class="recentsubtitles">〜</div>」は削 > 除するということにしたほうがテーマの再現性が高いと思うのです ついでにテンプレートへのパッチも添付します。 以上、よろしくご検討下さい。 -- 町田 秀企 http://www.matchy.net/ mailto:h****@match***** 携帯:hk****@match***** PGP fingerprint : FC05 7475 B836 5334 DF7C 9D18 9B26 CB64 95C2 0CC6 PGP public key : http://www.matchy.net/data/pgp_publickey.asc -------------- next part -------------- #===== recent def side_recent( n = 20 ) n = n > 0 ? n : 0 l =****@db*****_info.sort do |a, b| b[b.keys[0]][:last_modified] <=> a[a.keys[0]][:last_modified] end s = '' c = 0 ddd = nil index = 0 l.each do |a| break if (c += 1) > n name = a.keys[0] p = a[name] tm = p[:last_modified ] cur_date = tm.strftime( msg_date_format ) if ddd != cur_date index = 0 s << "</div>\n" if ddd s << "<p class=\"recentitem\">#{cur_date}\n</p>\n" s << "<div class=\"recentsubtitles\">\n" ddd = cur_date end t = page_name(name) an = hiki_anchor(name.escape, t) index+=1 s << " #{index}. #{an}<br>\n" end s << "</div>\n" s end -------------- next part -------------- Index: en/diff.html =================================================================== RCS file: /cvsroot/hiki/hiki/template/en/diff.html,v retrieving revision 1.4 diff -u -r1.4 diff.html --- en/diff.html 9 Mar 2004 14:55:23 -0000 1.4 +++ en/diff.html 6 Aug 2004 15:17:05 -0000 @@ -25,7 +25,7 @@ </div> <div class="@sidebar_class" id="sidebar"> - <div id="menu" class="recentsubtitles"></div> + <span id="menu"></span> </div> <div class="footer" id="footer"></div> Index: en/form.html =================================================================== RCS file: /cvsroot/hiki/hiki/template/en/form.html,v retrieving revision 1.5 diff -u -r1.5 form.html --- en/form.html 9 Mar 2004 14:55:23 -0000 1.5 +++ en/form.html 6 Aug 2004 15:17:05 -0000 @@ -28,7 +28,7 @@ </div> <div class="@sidebar_class" id="sidebar"> - <div id="menu" class="recentsubtitles"></div> + <span id="menu"></span> </div> <div class="footer" id="footer"></div> Index: en/list.html =================================================================== RCS file: /cvsroot/hiki/hiki/template/en/list.html,v retrieving revision 1.4 diff -u -r1.4 list.html --- en/list.html 9 Mar 2004 14:55:23 -0000 1.4 +++ en/list.html 6 Aug 2004 15:17:05 -0000 @@ -22,7 +22,7 @@ </div> <div class="@sidebar_class" id="sidebar"> - <div id="menu" class="recentsubtitles"></div> + <span id="menu"></span> </div> <div class="footer" id="footer"></div> Index: en/success.html =================================================================== RCS file: /cvsroot/hiki/hiki/template/en/success.html,v retrieving revision 1.4 diff -u -r1.4 success.html --- en/success.html 9 Mar 2004 14:55:23 -0000 1.4 +++ en/success.html 6 Aug 2004 15:17:05 -0000 @@ -25,7 +25,7 @@ </div> <div class="@sidebar_class" id="sidebar"> - <div id="menu" class="recentsubtitles"></div> + <span id="menu"></span> </div> <div class="footer" id="footer"></div> Index: en/view.html =================================================================== RCS file: /cvsroot/hiki/hiki/template/en/view.html,v retrieving revision 1.5 diff -u -r1.5 view.html --- en/view.html 9 Mar 2004 14:55:23 -0000 1.5 +++ en/view.html 6 Aug 2004 15:17:05 -0000 @@ -28,7 +28,7 @@ </div> <div class="@sidebar_class" id="sidebar"> - <div id="menu" class="recentsubtitles"></div> + <span id="menu"></span> </div> <div class="footer" id="footer"></div> Index: fr/diff.html =================================================================== RCS file: /cvsroot/hiki/hiki/template/fr/diff.html,v retrieving revision 1.3 diff -u -r1.3 diff.html --- fr/diff.html 9 Mar 2004 14:55:23 -0000 1.3 +++ fr/diff.html 6 Aug 2004 15:17:05 -0000 @@ -25,7 +25,7 @@ </div> <div class="@sidebar_class" id="sidebar"> - <div id="menu" class="recentsubtitles"></div> + <span id="menu"></span> </div> <div class="footer" id="footer"></div> Index: fr/form.html =================================================================== RCS file: /cvsroot/hiki/hiki/template/fr/form.html,v retrieving revision 1.3 diff -u -r1.3 form.html --- fr/form.html 9 Mar 2004 14:55:23 -0000 1.3 +++ fr/form.html 6 Aug 2004 15:17:05 -0000 @@ -28,7 +28,7 @@ </div> <div class="@sidebar_class" id="sidebar"> - <div id="menu" class="recentsubtitles"></div> + <span id="menu"></span> </div> <div class="footer" id="footer"></div> Index: fr/list.html =================================================================== RCS file: /cvsroot/hiki/hiki/template/fr/list.html,v retrieving revision 1.3 diff -u -r1.3 list.html --- fr/list.html 9 Mar 2004 14:55:23 -0000 1.3 +++ fr/list.html 6 Aug 2004 15:17:05 -0000 @@ -22,7 +22,7 @@ </div> <div class="@sidebar_class" id="sidebar"> - <div id="menu" class="recentsubtitles"></div> + <span id="menu"></span> </div> <div class="footer" id="footer"></div> Index: fr/success.html =================================================================== RCS file: /cvsroot/hiki/hiki/template/fr/success.html,v retrieving revision 1.3 diff -u -r1.3 success.html --- fr/success.html 9 Mar 2004 14:55:23 -0000 1.3 +++ fr/success.html 6 Aug 2004 15:17:05 -0000 @@ -25,7 +25,7 @@ </div> <div class="@sidebar_class" id="sidebar"> - <div id="menu" class="recentsubtitles"></div> + <span id="menu"></span> </div> <div class="footer" id="footer"></div> Index: fr/view.html =================================================================== RCS file: /cvsroot/hiki/hiki/template/fr/view.html,v retrieving revision 1.4 diff -u -r1.4 view.html --- fr/view.html 9 Mar 2004 14:55:23 -0000 1.4 +++ fr/view.html 6 Aug 2004 15:17:05 -0000 @@ -28,7 +28,7 @@ </div> <div class="@sidebar_class" id="sidebar"> - <div id="menu" class="recentsubtitles"></div> + <span id="menu"></span> </div> <div class="footer" id="footer"></div> Index: it/diff.html =================================================================== RCS file: /cvsroot/hiki/hiki/template/it/diff.html,v retrieving revision 1.3 diff -u -r1.3 diff.html --- it/diff.html 9 Mar 2004 14:55:24 -0000 1.3 +++ it/diff.html 6 Aug 2004 15:17:05 -0000 @@ -25,7 +25,7 @@ </div> <div class="@sidebar_class" id="sidebar"> - <div id="menu" class="recentsubtitles"></div> + <span id="menu"></span> </div> <div class="footer" id="footer"></div> Index: it/form.html =================================================================== RCS file: /cvsroot/hiki/hiki/template/it/form.html,v retrieving revision 1.3 diff -u -r1.3 form.html --- it/form.html 9 Mar 2004 14:55:24 -0000 1.3 +++ it/form.html 6 Aug 2004 15:17:05 -0000 @@ -28,7 +28,7 @@ </div> <div class="@sidebar_class" id="sidebar"> - <div id="menu" class="recentsubtitles"></div> + <span id="menu"></span> </div> <div class="footer" id="footer"></div> Index: it/list.html =================================================================== RCS file: /cvsroot/hiki/hiki/template/it/list.html,v retrieving revision 1.3 diff -u -r1.3 list.html --- it/list.html 9 Mar 2004 14:55:24 -0000 1.3 +++ it/list.html 6 Aug 2004 15:17:05 -0000 @@ -22,7 +22,7 @@ </div> <div class="@sidebar_class" id="sidebar"> - <div id="menu" class="recentsubtitles"></div> + <span id="menu"></span> </div> <div class="footer" id="footer"></div> Index: it/success.html =================================================================== RCS file: /cvsroot/hiki/hiki/template/it/success.html,v retrieving revision 1.3 diff -u -r1.3 success.html --- it/success.html 9 Mar 2004 14:55:24 -0000 1.3 +++ it/success.html 6 Aug 2004 15:17:05 -0000 @@ -25,7 +25,7 @@ </div> <div class="@sidebar_class" id="sidebar"> - <div id="menu" class="recentsubtitles"></div> + <span id="menu"></span> </div> <div class="footer" id="footer"></div> Index: it/view.html =================================================================== RCS file: /cvsroot/hiki/hiki/template/it/view.html,v retrieving revision 1.4 diff -u -r1.4 view.html --- it/view.html 9 Mar 2004 14:55:24 -0000 1.4 +++ it/view.html 6 Aug 2004 15:17:05 -0000 @@ -28,7 +28,7 @@ </div> <div class="@sidebar_class" id="sidebar"> - <div id="menu" class="recentsubtitles"></div> + <span id="menu"></span> </div> <div class="footer" id="footer"></div> Index: ja/diff.html =================================================================== RCS file: /cvsroot/hiki/hiki/template/ja/diff.html,v retrieving revision 1.5 diff -u -r1.5 diff.html --- ja/diff.html 9 Mar 2004 14:55:24 -0000 1.5 +++ ja/diff.html 6 Aug 2004 15:17:05 -0000 @@ -25,7 +25,7 @@ </div> <div class="@sidebar_class" id="sidebar"> - <div id="menu" class="recentsubtitles"></div> + <span id="menu"></span> </div> <div class="footer" id="footer"></div> Index: ja/form.html =================================================================== RCS file: /cvsroot/hiki/hiki/template/ja/form.html,v retrieving revision 1.5 diff -u -r1.5 form.html --- ja/form.html 9 Mar 2004 14:55:24 -0000 1.5 +++ ja/form.html 6 Aug 2004 15:17:05 -0000 @@ -28,7 +28,7 @@ </div> <div class="@sidebar_class" id="sidebar"> - <div id="menu" class="recentsubtitles"></div> + <span id="menu"></span> </div> <div class="footer" id="footer"></div> Index: ja/list.html =================================================================== RCS file: /cvsroot/hiki/hiki/template/ja/list.html,v retrieving revision 1.5 diff -u -r1.5 list.html --- ja/list.html 9 Mar 2004 14:55:24 -0000 1.5 +++ ja/list.html 6 Aug 2004 15:17:05 -0000 @@ -22,7 +22,7 @@ </div> <div class="@sidebar_class" id="sidebar"> - <div id="menu" class="recentsubtitles"></div> + <span id="menu"></span> </div> <div class="footer" id="footer"></div> Index: ja/success.html =================================================================== RCS file: /cvsroot/hiki/hiki/template/ja/success.html,v retrieving revision 1.5 diff -u -r1.5 success.html --- ja/success.html 9 Mar 2004 14:55:24 -0000 1.5 +++ ja/success.html 6 Aug 2004 15:17:05 -0000 @@ -25,7 +25,7 @@ </div> <div class="@sidebar_class" id="sidebar"> - <div id="menu" class="recentsubtitles"></div> + <span id="menu"></span> </div> <div class="footer" id="footer"></div> Index: ja/view.html =================================================================== RCS file: /cvsroot/hiki/hiki/template/ja/view.html,v retrieving revision 1.4 diff -u -r1.4 view.html --- ja/view.html 9 Mar 2004 14:55:24 -0000 1.4 +++ ja/view.html 6 Aug 2004 15:17:05 -0000 @@ -28,7 +28,7 @@ </div> <div class="@sidebar_class" id="sidebar"> - <div id="menu" class="recentsubtitles"></div> + <span id="menu"></span> </div> <div class="footer" id="footer"></div>