diff --git a/r2/r2/models/account.py b/r2/r2/models/account.py index b8d9117f6..36359753a 100644 --- a/r2/r2/models/account.py +++ b/r2/r2/models/account.py @@ -129,7 +129,8 @@ class Account(Thing): karmas.append((sr_name, self._t.get(sr_name + link_suffix, 0), self._t.get(sr_name + comment_suffix, 0))) - karmas.sort(key = lambda x: x[1] + x[2]) + + karmas.sort(key = lambda x: abs(x[1] + x[2]), reverse=True) karmas.insert(0, ('total', self.karma('link'), diff --git a/r2/r2/public/static/css/reddit.css b/r2/r2/public/static/css/reddit.css index 533e01676..f3aae2084 100644 --- a/r2/r2/public/static/css/reddit.css +++ b/r2/r2/public/static/css/reddit.css @@ -654,15 +654,11 @@ before enabling */ font-size: small; } -.menuarea { - border-bottom: 1px dotted gray; - padding: 5px 10px; - margin: 5px 310px 5px 5px; - font-size: larger; +.infobar img { + display: inline; + vertical-align: middle; } -.menuarea .spacer {display: inline; margin-right: 15px} - /* markdown */ .md { max-width: 60em; overflow: auto; font-size: small; } .md p, .md h1 { margin: 5px 0} @@ -683,19 +679,6 @@ before enabling */ margin-right: 15px; } -.infobar { - background-color: #f6e69f; - padding: 5px 10px; - margin: 5px 310px 5px 0px; - border: 1px solid orange; - font-size: small; -} - -.infobar img { - display: inline; - vertical-align: middle; -} - .menuarea { border-bottom: 1px dotted gray; padding: 5px 10px; @@ -763,7 +746,7 @@ a.star { text-decoration: none; color: #ff8b60 } } /* compressed links */ -.linkcompressed { margin: 4px 0; overflow: hidden; margin-top: 5px; } +.linkcompressed { margin: 4px 0; overflow: hidden; margin-top: 6px; } .linkcompressed .title {margin-bottom: 1px; font-size:medium; font-weight: normal;} .linkcompressed .child h3 { margin: 15px; @@ -773,8 +756,8 @@ a.star { text-decoration: none; color: #ff8b60 } .linkcompressed .score.likes { color: #FF8B60; } .linkcompressed .score.dislikes { color: #9494FF; } -.linkcompressed .rank { - margin-top: 6px; +.linkcompressed .rank { + margin-top: 7px; float:left; color: #c6c6c6; font-family: arial; @@ -789,7 +772,7 @@ a.star { text-decoration: none; color: #ff8b60 } .linkcompressed .entry .buttons li.first {padding-left: .5em;} .linkcompressed .entry .buttons li a { padding: 0 2px; - background-color: #f5f5f5; + background-color: #f6f6f6; font-weight: bold } @@ -1001,6 +984,14 @@ textarea.gray { color: gray; } .footer .col:first-child {border: none;} +.notes-button { + margin-top: 3px; +} + +.notes-status { + font-size: larger; +} + .server-status { width: 300px; } .server-status table { font-size: xx-small; diff --git a/r2/r2/templates/comment.html b/r2/r2/templates/comment.html index 51769dd2e..fcd37e4c2 100644 --- a/r2/r2/templates/comment.html +++ b/r2/r2/templates/comment.html @@ -141,7 +141,7 @@ ${parent.midcol()} %endif %if c.user_is_loggedin and thing.author.name == c.user.name:
  • - ${parent.simple_button("edit", _("edit"), "editcomment")} + ${parent.simple_button(_("edit"), "editcomment")}
  • %endif %endif diff --git a/r2/r2/templates/message.html b/r2/r2/templates/message.html index 62f66cf3a..2086c890f 100644 --- a/r2/r2/templates/message.html +++ b/r2/r2/templates/message.html @@ -81,7 +81,7 @@ ${unsafe(safemarkdown(thing.body))} ${parent.buttons()} %if c.user_is_loggedin:
  • - ${parent.simple_button("reply", _("reply {verb}"), "reply")} + ${parent.simple_button(_("reply {verb}"), "reply")}
  • %endif %endif diff --git a/r2/r2/templates/printable.html b/r2/r2/templates/printable.html index 8bf11eecc..711eeb1e7 100644 --- a/r2/r2/templates/printable.html +++ b/r2/r2/templates/printable.html @@ -285,7 +285,7 @@ thing id-${what._fullname} -<%def name="simple_button(name, title, nameFunc)"> +<%def name="simple_button(title, nameFunc)"> ${title} diff --git a/r2/r2/templates/profilebar.html b/r2/r2/templates/profilebar.html index dce00f4c4..1256f659f 100644 --- a/r2/r2/templates/profilebar.html +++ b/r2/r2/templates/profilebar.html @@ -38,12 +38,18 @@ %endif
  • - <% + <% karmas = thing.user.all_karmas() - ##karmas.sort(lambda x,y: x[2] - y[2]) %> - %for label, lc, cc in karmas: - + %for i, (label, lc, cc) in enumerate(karmas): + @@ -51,6 +57,12 @@ %endfor
    ${label}: ${lc} /
    + %if i >= 5: + + show karma for all ${len(karmas)} reddits + + %endif
  • %else: