From 38e79f206edf7a6ae80fb2beeb026eadff0a4e0c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 29 Jan 2008 04:44:05 -0500 Subject: [PATCH] more style improvements --- IkiWiki/Plugin/recentchanges.pm | 11 +++++--- doc/recentchanges.mdwn | 5 +++- doc/style.css | 48 ++++++++++++++++++++++++--------- templates/change.tmpl | 26 +++++++++++++----- templates/inlinechange.tmpl | 6 +---- 5 files changed, 68 insertions(+), 28 deletions(-) diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm index fb9841ffd..bdd386c7b 100644 --- a/IkiWiki/Plugin/recentchanges.pm +++ b/IkiWiki/Plugin/recentchanges.pm @@ -68,8 +68,9 @@ sub store ($$) { #{{{ push @{$change->{pages}}, { link => '...' } if $is_excess; # Take the first line of the commit message as a summary. - my $m=shift @{$change->{message}}; - $change->{summary}=$m->{line}; + #my $m=shift @{$change->{message}}; + #$change->{summary}=$m->{line}; + #delete $change->{message} unless @{$change->{message}}; # See if the committer is an openid. my $oiduser=IkiWiki::openiduser($change->{user}); @@ -85,7 +86,11 @@ sub store ($$) { #{{{ # Fill out a template with the change info. my $template=template("change.tmpl", blind_cache => 1); - $template->param(%$change); + $template->param( + %$change, + commitdate => displaytime($change->{when}, "%x %x"), + wikiname => $config{wikiname}, + ); $template->param(baseurl => "$config{url}/") if length $config{url}; IkiWiki::run_hooks(pagetemplate => sub { shift->(page => $page, destpage => $page, template => $template); diff --git a/doc/recentchanges.mdwn b/doc/recentchanges.mdwn index b2c7f5d07..4e9ee91ec 100644 --- a/doc/recentchanges.mdwn +++ b/doc/recentchanges.mdwn @@ -1,2 +1,5 @@ +Recent changes to this wiki: + [[recentchanges pages="*" num=100 template=change]] -[[inline pages="recentchanges/change_* and !*/Discussion" show=0]] +[[inline pages="recentchanges/change_* and !*/Discussion" +template=inlinechange show=0]] diff --git a/doc/style.css b/doc/style.css index 0fa15d2b1..026d2c881 100644 --- a/doc/style.css +++ b/doc/style.css @@ -70,27 +70,49 @@ img { border-style: none; } -/* Stuff for the RecentChanges table. */ -tr.changeheader { +div.recentchanges { + border-style: solid; + border-width: 1px; + overflow: auto; + width: 100%; background: #eee; color: black !important; } -tr.changeinfo { - background: #eee; +.recentchanges .metadata { + padding: 0px 0.5em; +} +.recentchanges .changelog { + font-style: italic; + clear: both; + display: block; + padding: 1px 2px; + background: white !important; color: black !important; } -th.changeheader { - padding: 1px .3em; +.recentchanges .desc { + display: none; +} +.recentchanges .committer { + float: left; + margin: 0; + width: 40%; } -td.changeinfo { - padding: 1px .3em; +.recentchanges .committype { + float: left; + margin: 0; + width: 5%; + font-size: small; } -td.changetime { - white-space: nowrap; - padding: 1px .3em; +.recentchanges .changedate { + float: left; + margin: 0; + width: 35%; + font-size: small; } -td.changelog { - font-style: italic; +.recentchanges .pagelinks { + float: right; + margin: 0; + width: 60%; } /* Used for adding a blog page. */ diff --git a/templates/change.tmpl b/templates/change.tmpl index f02b5eb19..6df365250 100644 --- a/templates/change.tmpl +++ b/templates/change.tmpl @@ -2,16 +2,17 @@ [[meta authorurl=""""""]] -[[meta title=""""""]] -

+[[meta title="""update of 's """]] +


-

-

- +

+ diff --git a/templates/inlinechange.tmpl b/templates/inlinechange.tmpl index 669911184..340a157d1 100644 --- a/templates/inlinechange.tmpl +++ b/templates/inlinechange.tmpl @@ -1,11 +1,7 @@ -
+
-
Date:
- - -
-- 2.32.0.93.g670b81a890