summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-10-20 19:22:22 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-10-20 19:22:22 -0400
commitee1ccfa863b9d56cf7ec987f7fee89c98c484b0b (patch)
tree5d4f1a56c91db78fd1b841a3fa3e4004439c2d24
parent99bf734963590005d457165665b0d8797c6a6221 (diff)
use relativedate as the css class for dates that should display relative
-rw-r--r--IkiWiki/Plugin/relativedate.pm2
-rw-r--r--doc/plugins/relativedate.mdwn6
-rw-r--r--underlays/javascript/relativedate.js4
3 files changed, 6 insertions, 6 deletions
diff --git a/IkiWiki/Plugin/relativedate.pm b/IkiWiki/Plugin/relativedate.pm
index d9d8f7776..f4dba61a4 100644
--- a/IkiWiki/Plugin/relativedate.pm
+++ b/IkiWiki/Plugin/relativedate.pm
@@ -53,7 +53,7 @@ sub display ($;$) { #{{{
my $gmtime=decode_utf8(POSIX::strftime("%a, %d %b %Y %H:%M:%S %z",
localtime($time)));
- return '<span class="date" title="'.$gmtime.'">'.
+ return '<span class="relativedate" title="'.$gmtime.'">'.
IkiWiki::formattime($time, $format).'</span>';
} #}}}
diff --git a/doc/plugins/relativedate.mdwn b/doc/plugins/relativedate.mdwn
index 121bce477..32f8c798b 100644
--- a/doc/plugins/relativedate.mdwn
+++ b/doc/plugins/relativedate.mdwn
@@ -10,7 +10,7 @@ show the absolute date instead. Also, this plugin can be used with other
plugins like [[prettydate]] that change how the absolute date is displayed.
If this plugin is enabled, you may also add relative dates to pages in the
-wiki, by using html elements in the "date" class. For example, this will
-display as a relative date:
+wiki, by using html elements in the "relativedate" class. For example, this
+will display as a relative date:
- <span class="date">Fri Oct 17 18:36:13 EDT 2008</span>
+ <span class="relativedate">Fri Oct 17 18:36:13 EDT 2008</span>
diff --git a/underlays/javascript/relativedate.js b/underlays/javascript/relativedate.js
index c5e62b3cc..8e05d4065 100644
--- a/underlays/javascript/relativedate.js
+++ b/underlays/javascript/relativedate.js
@@ -1,4 +1,4 @@
-// Causes html elements in the 'date' and 'pagedate' classes to be displayed
+// Causes html elements in the 'relativedate' class to be displayed
// as relative dates. The date is parsed from the title attribute, or from
// the element content.
@@ -7,7 +7,7 @@ var dateElements;
hook("onload", getDates);
function getDates() {
- dateElements = getElementsByClass('date');
+ dateElements = getElementsByClass('relativedate');
for (var i = 0; i < dateElements.length; i++) {
var elt = dateElements[i];
var title = elt.attributes.title;