From d7e54511f0b549e56a53df6f7c12f865b007837d Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Tue, 17 Aug 2010 09:00:00 +0200 Subject: [PATCH] deadfoxjunction: Use custom formatting for recentchangens entries. --- plugin/theme/deadfoxjunction.py | 51 +++++++++++++++++++++++++++ static/deadfoxjunction/css/common.css | 10 +++--- 2 files changed, 57 insertions(+), 4 deletions(-) diff --git a/plugin/theme/deadfoxjunction.py b/plugin/theme/deadfoxjunction.py index 13929c7..4a36333 100644 --- a/plugin/theme/deadfoxjunction.py +++ b/plugin/theme/deadfoxjunction.py @@ -22,3 +22,54 @@ class Theme(SiteTheme): html = SiteTheme.endPage(self, d) html += u'\n' return html + + def recentchanges_entry(self, d): + """ + Assemble a single recentchanges entry (table row) + + Based on the same function from ThemeBase, but with the comment + on a second table row, since the available horizontal space in + this theme is fairly limited. + + @param d: parameter dictionary + @rtype: string + @return: recentchanges entry html + """ + _ = self.request.getText + html = [] + html.append('\n') + + html.append('%(icon_html)s\n' % d) + + html.append('%(pagelink_html)s\n' % d) + + html.append('') + if d['time_html']: + html.append("%(time_html)s" % d) + html.append('\n') + + html.append('%(info_html)s\n' % d) + + html.append('') + if d['editors']: + html.append('
'.join(d['editors'])) + html.append('\n') + html.append('\n') + html.append('\n') + + html.append('') + if d['comments']: + if d['changecount'] > 1: + notfirst = 0 + for comment in d['comments']: + html.append('%s#%02d %s' % ( + notfirst and '
' or '', comment[0], comment[1])) + notfirst = 1 + else: + comment = d['comments'][0] + html.append('%s' % comment[1]) + html.append('\n') + + html.append('\n') + + return ''.join(html) diff --git a/static/deadfoxjunction/css/common.css b/static/deadfoxjunction/css/common.css index 8e9ae43..d391c37 100644 --- a/static/deadfoxjunction/css/common.css +++ b/static/deadfoxjunction/css/common.css @@ -192,12 +192,15 @@ strong.highlight .recentchanges td { vertical-align: top; border: none; - border-bottom: 1pt solid #E6EAF0; - background: #F2F4F7; +} + +.recentchanges td.rccomment { + border: none; + border-bottom: 1pt solid #824900; } .rcdaybreak td { - background: #B8C5D9; + background: #633500; border: none; } @@ -225,7 +228,6 @@ strong.highlight .rccomment { width: 50%; - color: gray; font-size: 0.88em; } -- 2.30.2