X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/e417e7a66e9109ac510e4b9a7747224d60dba85e..adc196a8b53c0b0b4f9ec4cbcea85ba37e421b59:/IkiWiki/Plugin/calendar.pm?ds=inline diff --git a/IkiWiki/Plugin/calendar.pm b/IkiWiki/Plugin/calendar.pm index 77fd50827..aeb5f3d29 100644 --- a/IkiWiki/Plugin/calendar.pm +++ b/IkiWiki/Plugin/calendar.pm @@ -22,7 +22,7 @@ use warnings; use strict; use IkiWiki 3.00; use Time::Local; -use POSIX; +use POSIX (); my $time=time; my @now=localtime($time); @@ -38,6 +38,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => undef, + section => "widget", }, archivebase => { type => "string", @@ -46,6 +47,14 @@ sub getsetup () { safe => 1, rebuild => 1, }, + archive_pagespec => { + type => "pagespec", + example => "posts/* and !*/Discussion", + description => "PageSpec of pages to include in the archives; used by ikiwiki-calendar command", + link => 'ikiwiki/PageSpec', + safe => 1, + rebuild => 0, + }, } sub is_leap_year (@) { @@ -137,7 +146,7 @@ sub format_month (@) { $purl = htmllink($params{page}, $params{destpage}, "$archivebase/$pyear/$pmonth", noimageinline => 1, - linktext => "\&larr", + linktext => "\←", title => $pmonthname); } add_depends($params{page}, "$archivebase/$pyear/$pmonth", @@ -146,7 +155,7 @@ sub format_month (@) { $nurl = htmllink($params{page}, $params{destpage}, "$archivebase/$nyear/$nmonth", noimageinline => 1, - linktext => "\&rarr", + linktext => "\→", title => $nmonthname); } add_depends($params{page}, "$archivebase/$nyear/$nmonth", @@ -155,11 +164,11 @@ sub format_month (@) { # Start producing the month calendar $calendar=< - - $purl - $url - $nurl - + + $purl + $url + $nurl + EOF @@ -303,13 +312,14 @@ sub format_year (@) { add_depends($params{page}, "$archivebase/$nyear", deptype("presence")); # Start producing the year calendar + my $m=$params{months_per_row}-2; $calendar=< - - $purl - $url - $nurl - + + $purl + $url + $nurl + Months