# HG changeset patch # User Steve Losh # Date 1257814540 18000 # Node ID f3002e91ff73c913fdb4e5f0a23a30536b0a9114 # Parent c5debb47527343edb734f69beb16bdb49f3da82f Update some styles. diff -r c5debb475273 -r f3002e91ff73 review/web_media/style.css --- a/review/web_media/style.css Thu Oct 22 19:54:20 2009 -0400 +++ b/review/web_media/style.css Mon Nov 09 19:55:40 2009 -0500 @@ -1,6 +1,6 @@ /* Basic layout and typography. */ body { - background: #f5f5f5; + background: #fafafa; } div#main-wrap { width: 65em; @@ -10,8 +10,12 @@ div#head-wrap { text-align: center; padding: 1.5em 0em .5em; - background-color: #ccc; - border-bottom: 1px solid #bbb; + color: #fff; + background-color: #111; + border-bottom: 6px solid #3C659A; +} +div#head-wrap h1 a, div#head-wrap h1 { + font-weight: normal; } div#footer { color: #666; @@ -23,7 +27,7 @@ a { text-decoration: none; font-weight: bold; - color: #297E00; + color: #3C659A; } a:hover { color: #EA0076; diff -r c5debb475273 -r f3002e91ff73 review/web_templates/base.html --- a/review/web_templates/base.html Thu Oct 22 19:54:20 2009 -0400 +++ b/review/web_templates/base.html Mon Nov 09 19:55:40 2009 -0500 @@ -1,4 +1,4 @@ -$def with (rd, content) +$def with (rd, content, title) @@ -15,7 +15,7 @@
-

${ basename(rd.target.root) }

+

${ basename(rd.target.root) } $:{ title }

$:{ content } diff -r c5debb475273 -r f3002e91ff73 review/web_ui.py --- a/review/web_ui.py Thu Oct 22 19:54:20 2009 -0400 +++ b/review/web_ui.py Mon Nov 09 19:55:40 2009 -0500 @@ -40,8 +40,8 @@ def render_in_base(fn): def _fn(*args, **kwargs): - content = fn(*args, **kwargs) - return render.base(_rd, content) + title, content = fn(*args, **kwargs) + return render.base(_rd, content, title) return _fn class index: @@ -50,13 +50,17 @@ rev_max = _rd.target['tip'].rev() rev_min = rev_max - LOG_PAGE_LEN if rev_max >= LOG_PAGE_LEN else 0 revs = (_rd.target[r] for r in xrange(rev_max, rev_min, -1)) - return render.index(_rd, revs) + return ('', render.index(_rd, revs)) class review: @render_in_base def GET(self, node_short): - return render.review(_rd, _rd[node_short]) + title = '/ %s:%s – %s' % ( + _rd[node_short].target[node_short].rev(), + node_short, + _rd[node_short].target[node_short].description().splitlines()[0]) + return (title, render.review(_rd, _rd[node_short])) def POST(self, node_short): i = web.input()