X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/10356b51f95050d0aec0cd1807d5ba1ec46d475a..ea491f36c7f81ed231444ed5e4a76c52b03434ac:/widget/doclist.php diff --git a/widget/doclist.php b/widget/doclist.php index 5c11c68..589c8d6 100644 --- a/widget/doclist.php +++ b/widget/doclist.php @@ -16,14 +16,17 @@ foreach (glob("$Page$Args/2*") as $url) { } $year = 3600 * 24 * 365; # seconds per year -$scale = 8; # em width per year -$mindate = strtotime($date) + ($year / $scale * 3); # first point plus about 3em for centered text +$scale = 7; # em width per year +$mindate = max(time(), strtotime($date) + ($year / $scale * 3)); # at least last entry plus 3em for centered text +$length = ($mindate - strtotime(key(current($cal)))) / $year * $scale; # earliest entry position -print '