aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/calendar.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-06-10 15:01:10 -0400
committerJoey Hess <joey@kitenet.net>2010-06-10 15:07:28 -0400
commit04ff998c51b578017edf369e0dfc2dc7c63d8071 (patch)
tree19e6602d34dc679ad0d84f18ad44b370d5f5d688 /IkiWiki/Plugin/calendar.pm
parent685d10364fbebac69dfa925840528e695d37035f (diff)
downloadikiwiki-04ff998c51b578017edf369e0dfc2dc7c63d8071.tar
ikiwiki-04ff998c51b578017edf369e0dfc2dc7c63d8071.tar.gz
calendar styling
* 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.
Diffstat (limited to 'IkiWiki/Plugin/calendar.pm')
-rw-r--r--IkiWiki/Plugin/calendar.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/calendar.pm b/IkiWiki/Plugin/calendar.pm
index 0bf933dcd..359c9b861 100644
--- a/IkiWiki/Plugin/calendar.pm
+++ b/IkiWiki/Plugin/calendar.pm
@@ -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};