summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-01-29 04:44:05 -0500
committerJoey Hess <joey@kodama.kitenet.net>2008-01-29 04:44:05 -0500
commit38e79f206edf7a6ae80fb2beeb026eadff0a4e0c (patch)
tree9082b7cfd72cef0a626d8092f986e810167836fa
parenta6a300f675737f2628e8e4e1845a363aad17a656 (diff)
more style improvements
-rw-r--r--IkiWiki/Plugin/recentchanges.pm11
-rw-r--r--doc/recentchanges.mdwn5
-rw-r--r--doc/style.css48
-rw-r--r--templates/change.tmpl26
-rw-r--r--templates/inlinechange.tmpl6
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 @@
<TMPL_IF AUTHORURL>
[[meta authorurl="""<TMPL_VAR AUTHORURL>"""]]
</TMPL_IF>
-[[meta title="""<TMPL_VAR SUMMARY>"""]]
-<p class=changelog>
+[[meta title="""update of <TMPL_VAR WIKINAME>'s <TMPL_LOOP NAME="PAGES"> <TMPL_VAR PAGE></TMPL_LOOP>"""]]
+<div class=changelog>
<TMPL_LOOP NAME="MESSAGE">
<TMPL_IF NAME="LINE">
<TMPL_VAR NAME="LINE" ESCAPE="HTML"><br />
</TMPL_IF>
</TMPL_LOOP>
-</p>
-<p>
-<span class="changeinfo">
+</div>
+<div class="metadata">
+<span class="desc"><br />Changed pages:</span>
+<span class="pagelinks">
<TMPL_LOOP NAME="PAGES">
<TMPL_IF NAME="DIFFURL">
<a href="<TMPL_VAR NAME="DIFFURL">">
@@ -20,5 +21,18 @@
</TMPL_IF>
<TMPL_VAR LINK>
</TMPL_LOOP>
-changed via <TMPL_VAR NAME="COMMITTYPE">
+</span>
+<span class="desc"><br />Changed by:</span>
+<span class="committer">
+<TMPL_IF NAME="AUTHORURL">
+<a href="<TMPL_VAR NAME=AUTHORURL>"><TMPL_VAR NAME=USER></a>
+<TMPL_ELSE>
+<TMPL_VAR NAME=USER>
+</TMPL_IF>
+</span>
+<span class="desc"><br />Commit type:</span>
+<span class="committype"><TMPL_VAR COMMITTYPE></span>
+<span class="desc"><br />Date:</span>
+<span class="changedate"><TMPL_VAR COMMITDATE></span>
+</div>
<!-- <TMPL_VAR NAME="REV"> -->
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 @@
<TMPL_IF FIRST>
-<div class="inlinechange">
+<div class="recentchanges">
</TMPL_IF>
<TMPL_VAR CONTENT>
-<span class="desc"><br />Date:</span>
-<span class="changedate">
-<TMPL_VAR CTIME>
-</span>
<TMPL_IF LAST>
</div>
</TMPL_IF>