calendar styling
authorJoey Hess <joey@kitenet.net>
Thu, 10 Jun 2010 19:01:10 +0000 (15:01 -0400)
committerJoey Hess <joey@kitenet.net>
Thu, 10 Jun 2010 19:07:28 +0000 (15:07 -0400)
* calendar: Shorten day names, and improve styling of month calendar.
* style.css: Reduced sidebar width back to 20ex from 30; the month calendar
  will now fit in the smaller width, and 30 was feeling too large.

IkiWiki/Plugin/calendar.pm
debian/changelog
doc/style.css

index 0bf933dcda9db2aedc0ccbb65a5b3f92223079e9..359c9b86141541549a1f42a32fa0ef869ec08987 100644 (file)
@@ -123,6 +123,7 @@ sub format_month (@) {
        }
 
        # Find out month names for this, next, and previous months
+       my $monthabbrev=POSIX::strftime("%b", @monthstart);
        my $monthname=POSIX::strftime("%B", @monthstart);
        my $pmonthname=POSIX::strftime("%B", localtime(timelocal(0,0,0,1,$pmonth-1,$pyear-1900)));
        my $nmonthname=POSIX::strftime("%B", localtime(timelocal(0,0,0,1,$nmonth-1,$nyear-1900)));
@@ -137,7 +138,7 @@ sub format_month (@) {
                $url = htmllink($params{page}, $params{destpage}, 
                        "$archivebase/$params{year}/".$params{month},
                        noimageinline => 1,
-                       linktext => "$monthname $params{year}",
+                       linktext => "$monthabbrev $params{year}",
                        title => $monthname);
        }
        add_depends($params{page}, "$archivebase/$params{year}/$params{month}",
@@ -182,7 +183,7 @@ EOF
        for my $dow ($week_start_day..$week_start_day+6) {
                my @day=localtime(timelocal(0,0,0,$start_day++,$params{month}-1,$params{year}-1900));
                my $downame = POSIX::strftime("%A", @day);
-               my $dowabbr = POSIX::strftime("%a", @day);
+               my $dowabbr = substr($downame, 0, 1);
                $downame{$dow % 7}=$downame;
                $dowabbr{$dow % 7}=$dowabbr;
                $calendar.= qq{\t\t<th class="month-calendar-day-head $downame" title="$downame">$dowabbr</th>\n};
index f7810c66f7731b2040b8eb3ce979dda154d4271b..d66bcab2033ca6222f5539291067820af03589e2 100644 (file)
@@ -1,4 +1,4 @@
-ikiwiki (3.20100609) unstable; urgency=low
+ikiwiki (3.20100610) unstable; urgency=low
 
   * creation_day() etc use local time, not gmtime. To match calendars, which
     use local time.
@@ -11,10 +11,13 @@ ikiwiki (3.20100609) unstable; urgency=low
   * editpage: Avoid storing accidental state changes when previewing pages.
   * page.tmpl: Add a div around the sidebar, page content, and comments,
     to aide in styling.
-  * style.css: Improvements to make floating sidebar fit better on
+  * style.css: Improvements to make floating sidebar fit much better on
     pages with inlines.
+  * calendar: Shorten day names, and improve styling of month calendar.
+  * style.css: Reduced sidebar width back to 20ex from 30; the month calendar
+    will now fit in the smaller width, and 30 was feeling too large.
 
- -- Joey Hess <joeyh@debian.org>  Mon, 31 May 2010 20:44:17 -0400
+ -- Joey Hess <joeyh@debian.org>  Thu, 10 Jun 2010 14:24:05 -0400
 
 ikiwiki (3.20100518.2) unstable; urgency=low
 
index 154729721b6046a54b5b86d9f7238757c5456cde..2cc467b4f670d297c3cdde04a39c4a911d38a7df 100644 (file)
@@ -199,7 +199,7 @@ div.recentchanges {
 }
 
 .sidebar {
-       width: 30ex;
+       width: 20ex;
        float: right;
        margin-left: 4px;
        margin-bottom: 4px;
@@ -383,8 +383,17 @@ pre.hl { color:#000000; background-color:#ffffff; }
 .hl.kwd { color:#010181; }
 
 /* calendar plugin */
-.month-calendar-day-this-day { background-color: #eee; }
-.year-calendar-this-month { background-color: #eee; }
+.month-calendar-day-this-day,
+.year-calendar-this-month {
+       background-color: #eee;
+}
+.month-calendar-day-head,
+.month-calendar-day-nolink,
+.month-calendar-day-link,
+.month-calendar-day-this-day,
+.month-calendar-day-future {
+       text-align: right;
+}
 .month-calendar-arrow A:link,
 .year-calendar-arrow A:link,
 .month-calendar-arrow A:visited,