ページの作成や編集にはユーザ登録が必要です。
カレンダーを横に並べる
- 投稿者: 紅猫
- カテゴリ: 修正
- 優先度: 低
- 状態: 提案
- 日時: 2003年11月10日 01時29分29秒
内容
calendarプラグインでカレンダーを横に並べるパッチです。
(おまけでcalendar-sunday、calendar-saturdayというクラスをCSSに追加するとカレンダーに色がつきます)
BBS-サポート掲示板/78で書かれているように、ユーザ定義スタイルシートに
div.plugin-calendar{ float:left; }
と追加した上で、下記の修正を入れてください。
diff -r wiki/plugin/calendar/Calendar.pm.org wiki/plugin/calendar/Calendar.pm
85c85 < # my $align = shift; --- > my $clearall = shift; 90c90,95 < undef $template if !$wiki->page_exists($template); --- > # undef $template if !$wiki->page_exists($template); > if (!$wiki->page_exists($template)) { > $clearall = $argmon; > $argmon = $template; > undef $template; > }; 123a129,130 > # 表示月指定がなくて回り込み指定があったと思うことにする > $clearall = $argmon; 133c140,147 < return &plugin::calendar::CalendarHandler::make_calendar($wiki,$year,$mon,$name,$template,$id); --- > # 回り込み指定の正規化 > if ($clearall eq "left"){ > $clearall = "floatleft"; > } else { > $clearall = "clearall"; > } > > return &plugin::calendar::CalendarHandler::make_calendar($wiki,$year,$mon,$name,$template,$id,$clearall);
diff -r wiki/plugin/calendar/CalendarHandler.pm.org wiki/plugin/calendar/CalendarHandler.pm
38a39 > my $clearall = shift; 118c119,127 < if ($is_today || $have_plan) { --- > # 今日は日曜 > if ($wday==0) { > push @class, "calendar-sunday"; > } > # 今日は土曜 > if ($wday==6) { > push @class, "calendar-saturday"; > } > if ($wday==0 || $wday==6 || $is_today || $have_plan) { 137a147,150 > $buf .= "</table>\n</div>\n"; > if ($clearall eq "clearall") { > $buf .= "<br clear=\"all\">\n"; > } 139c152,153 < return $buf."</table>\n</div>\n"; --- > # return $buf."</table>\n</div>\n"; > return $buf;
calendarプラグインの引数の最後に"left"を追加したときに、続くブロック要素が回り込むようになります。
コメント
- ヘルプは更新してません・・・ - 紅猫 (2003年11月10日 01時38分02秒)
最終更新時間:2003年11月10日 01時38分02秒