Mercurial > kallithea
changeset 5097:4539d652ab08
Merge with stable
author | Andrew Shadura <andrew@shadura.me> |
---|---|
date | Thu, 07 May 2015 13:30:17 +0200 |
parents | 0c58b6dc5512 (current diff) fe3c9c048740 (diff) |
children | 6101e27a7799 |
files | kallithea/public/css/style.css |
diffstat | 3 files changed, 46 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/diffs.py Mon May 04 18:47:16 2015 +0200 +++ b/kallithea/lib/diffs.py Thu May 07 13:30:17 2015 +0200 @@ -642,6 +642,7 @@ def as_html(self, table_class='code-difftable', line_class='line', old_lineno_class='lineno old', new_lineno_class='lineno new', + no_lineno_class='lineno', code_class='code', enable_comments=False, parsed_lines=None): """ Return given diff as html table with customized css classes @@ -693,6 +694,8 @@ change['old_lineno']) cond_new = (change['new_lineno'] != '...' and change['new_lineno']) + no_lineno = (change['old_lineno'] == '...' and + change['new_lineno'] == '...') if cond_old: anchor_old_id = 'id="%s"' % anchor_old if cond_new: @@ -700,9 +703,10 @@ ########################################################### # OLD LINE NUMBER ########################################################### - _html.append('''\t<td %(a_id)s class="%(olc)s">''' % { + _html.append('''\t<td %(a_id)s class="%(olc)s" %(colspan)s>''' % { 'a_id': anchor_old_id, - 'olc': old_lineno_class + 'olc': no_lineno_class if no_lineno else old_lineno_class, + 'colspan': 'colspan="2"' if no_lineno else '' }) _html.append('''%(link)s''' % { @@ -714,16 +718,17 @@ # NEW LINE NUMBER ########################################################### - _html.append('''\t<td %(a_id)s class="%(nlc)s">''' % { - 'a_id': anchor_new_id, - 'nlc': new_lineno_class - }) + if not no_lineno: + _html.append('''\t<td %(a_id)s class="%(nlc)s">''' % { + 'a_id': anchor_new_id, + 'nlc': new_lineno_class + }) - _html.append('''%(link)s''' % { - 'link': _link_to_if(True, change['new_lineno'], - '#%s' % anchor_new) - }) - _html.append('''</td>\n''') + _html.append('''%(link)s''' % { + 'link': _link_to_if(True, change['new_lineno'], + '#%s' % anchor_new) + }) + _html.append('''</td>\n''') ########################################################### # CODE ###########################################################
--- a/kallithea/lib/markup_renderer.py Mon May 04 18:47:16 2015 +0200 +++ b/kallithea/lib/markup_renderer.py Thu May 07 13:30:17 2015 +0200 @@ -193,6 +193,6 @@ def wrapp(match_obj): uname = match_obj.groups()[0] - return ' **@%(uname)s** ' % {'uname': uname} + return '\ **@%(uname)s**\ ' % {'uname': uname} mention_hl = mention_pat.sub(wrapp, source).strip() return cls.rst(mention_hl)
--- a/kallithea/public/css/style.css Mon May 04 18:47:16 2015 +0200 +++ b/kallithea/public/css/style.css Thu May 07 13:30:17 2015 +0200 @@ -4363,11 +4363,6 @@ margin-top: 20px; } -.comment-form strong { - display: block; - margin-bottom: 15px; -} - .comment-form textarea { width: 100%; height: 100px; @@ -4383,6 +4378,8 @@ .comment-form .comment-block-ta { border: 1px solid #ccc; border-radius: 3px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; box-sizing: border-box; } @@ -4464,11 +4461,6 @@ padding: 4px 0px 6px 0px; } -.comment-inline-form strong { - display: block; - margin-bottom: 15px; -} - .comment-inline-form textarea { width: 100%; height: 100px; @@ -4916,7 +4908,6 @@ table.code-difftable .lineno { padding-left: 2px; padding-right: 2px !important; - text-align: right; width: 30px; -moz-user-select: none; -webkit-user-select: none; @@ -4925,20 +4916,26 @@ border-top: 0px solid #CCC !important; border-bottom: none !important; vertical-align: middle !important; + text-align: center; } table.code-difftable .lineno.new { + text-align: right; } table.code-difftable .lineno.old { + text-align: right; } table.code-difftable .lineno a { color: #aaa !important; font: 11px Consolas, Monaco, Inconsolata, Liberation Mono, monospace !important; letter-spacing: -1px; - text-align: right; + padding-left: 10px; padding-right: 8px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; cursor: pointer; display: block; - width: 30px; + width: 100%; } table.code-difftable .lineno-inline { @@ -4970,16 +4967,28 @@ table.code-difftable .del .code pre:before { content: "-"; - color: #550000; + color: #800; + float: left; + left: -1em; + position: relative; + width: 0; } table.code-difftable .add .code pre:before { content: "+"; - color: #005500; + color: #080; + float: left; + left: -1em; + position: relative; + width: 0; } table.code-difftable .unmod .code pre:before { content: " "; + float: left; + left: -1em; + position: relative; + width: 0; } .add-bubble { @@ -4989,6 +4998,8 @@ width: 0px; height: 0px; left: -8px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; box-sizing: border-box; } @@ -4996,6 +5007,7 @@ tr.line.del:hover td .add-bubble, tr.line.unmod:hover td .add-bubble { display: block; + z-index: 1; } .add-bubble div { @@ -5006,6 +5018,8 @@ padding: 0 2px 2px 0.5px; border: 1px solid #577632; border-radius: 3px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; box-sizing: border-box; }