calendar: Improved display of arrows.
authorJoey Hess <joey@gnu.kitenet.net>
Fri, 16 Apr 2010 00:12:03 +0000 (20:12 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Fri, 16 Apr 2010 00:12:03 +0000 (20:12 -0400)
IkiWiki/Plugin/calendar.pm
debian/changelog
doc/plugins/calendar.mdwn
doc/style.css

index 0f0e9518adf27b0ca3f912622d89b71ea13f5aa6..aeb5f3d294693b93285fac9da87ab2564bd89add 100644 (file)
@@ -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>
index e4056fdc66bcfde892188e7a6946b6016f5b7e95..737d736556fe718cfb41f8e2182fb9b8757b3b4b 100644 (file)
@@ -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
 
index 49fd90627fe50a278c07de996aa639cba264b545..76e718a3b231d70c3e1b8c28d608c49be225e4fc 100644 (file)
@@ -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
index 44e06ae4f67453fbc45d69fe88568d0385fab39e..7ffcf9fe27d32eb18307c68e0d1419e006d250fa 100644 (file)
@@ -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%;
+}