Move timestamp live-timestamp class for less whitespace

This commit is contained in:
Jack Lawson
2014-04-24 11:56:52 -07:00
committed by Max Goodman
parent 73609acab7
commit 7744fc7283

View File

@@ -549,13 +549,12 @@ ${unsafe(txt)}
<%def name="timestamp(date, since=None, live=False, include_tense=False)">
## todo: use pubdate attribute once things are <article> tags.
## note: comment and link templates will pass a CachedVariable stub as since.
<% now = date.now(g.tz) %>
<%
now = date.now(g.tz)
timestamp_class = unsafe(' class="live-timestamp"') if live else ''
%>
<time title="${long_datetime(date)}" datetime="${html_datetime(date)}"
%if live:
class="live-timestamp"
%endif
>
<time title="${long_datetime(date)}" datetime="${html_datetime(date)}"${timestamp_class}>
${unsafe(since or timesince(date))}
%if include_tense and date < now:
${_("ago")}