diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2010-04-15 20:12:03 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2010-04-15 20:12:03 -0400 |
commit | 142e025ae471c91e68a23476f700df0b8ad6b31d (patch) | |
tree | c802104d6d0ce345f034a0df0a87712b593b915e | |
parent | 425f6a8de2ed66b934c16c102456b15da4ff5a14 (diff) |
calendar: Improved display of arrows.
-rw-r--r-- | IkiWiki/Plugin/calendar.pm | 21 | ||||
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | doc/plugins/calendar.mdwn | 2 | ||||
-rw-r--r-- | doc/style.css | 8 |
4 files changed, 22 insertions, 10 deletions
diff --git a/IkiWiki/Plugin/calendar.pm b/IkiWiki/Plugin/calendar.pm index 0f0e9518a..aeb5f3d29 100644 --- a/IkiWiki/Plugin/calendar.pm +++ b/IkiWiki/Plugin/calendar.pm @@ -164,11 +164,11 @@ sub format_month (@) { # Start producing the month calendar $calendar=<<EOF; <table class="month-calendar"> - <caption class="month-calendar-head"> - $purl - $url - $nurl - </caption> + <tr> + <th class="month-calendar-arrow">$purl</th> + <th class="month-calendar-head" colspan="5">$url</th> + <th class="month-calendar-arrow">$nurl</th> + </tr> <tr> EOF @@ -312,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=<<EOF; <table class="year-calendar"> - <caption class="year-calendar-head"> - $purl - $url - $nurl - </caption> + <tr> + <th class="year-calendar-arrow">$purl</th> + <th class="year-calendar-head" colspan="$m">$url</th> + <th class="year-calendar-arrow">$nurl</th> + </tr> <tr> <th class="year-calendar-subhead" colspan="$params{months_per_row}">Months</th> </tr> diff --git a/debian/changelog b/debian/changelog index e4056fdc6..737d73655 100644 --- a/debian/changelog +++ b/debian/changelog @@ -43,6 +43,7 @@ ikiwiki (3.20100415) UNRELEASED; urgency=low * sidebar: Add global_sidebars setting. * conditional: Fix bug that forced "all" mode off by default. * calendarmonth.tmpl: The month calendar is now put in a sidebar. + * calendar: Improved display of arrows. -- Joey Hess <joeyh@debian.org> Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/doc/plugins/calendar.mdwn b/doc/plugins/calendar.mdwn index 49fd90627..76e718a3b 100644 --- a/doc/plugins/calendar.mdwn +++ b/doc/plugins/calendar.mdwn @@ -14,6 +14,7 @@ customization. * `month-calendar` - The month calendar as a whole. * `month-calendar-head` - The head of the month calendar (ie,"March"). +* `month-calendar-arrow` - Arrow pointing to previous/next month. * `month-calendar-day-head` - A column head in the month calendar (ie, a day-of-week abbreviation). * `month-calendar-day-noday`, `month-calendar-day-link`, @@ -27,6 +28,7 @@ customization. weekends. * `year-calendar` - The year calendar as a whole. * `year-calendar-head` - The head of the year calendar (ie, "2007"). +* `year-calendar-arrow` - Arrow pointing to previous/next year. * `year-calendar-subhead` - For example, "Months". * `year-calendar-month-link`, `year-calendar-month-nolink`, `year-calendar-month-future`, `year-calendar-this-month` - The month diff --git a/doc/style.css b/doc/style.css index 44e06ae4f..7ffcf9fe2 100644 --- a/doc/style.css +++ b/doc/style.css @@ -431,3 +431,11 @@ pre.hl { color:#000000; background-color:#ffffff; } /* For the calendar plugin. */ .month-calendar-day-this-day { background-color: #eee; } .year-calendar-this-month { background-color: #eee; } +.month-calendar-arrow A:link, +.year-calendar-arrow A:link, +.month-calendar-arrow A:visited, +.year-calendar-arrow A:visited { + text-decoration: none; + font-weight: normal; + font-size: 150%; +} |