diff --git a/r2/r2/public/static/css/mobile.css b/r2/r2/public/static/css/mobile.css index b2b54eea4..1c02bd01a 100644 --- a/r2/r2/public/static/css/mobile.css +++ b/r2/r2/public/static/css/mobile.css @@ -147,3 +147,4 @@ ul { .md img { display: none } .md ol, .md ul { margin: 10px 2em; } .md pre { margin: 10px; } +.flair { color: #545454; background-color: #F5F5F5; border: 1px solid #DEDEDE; } diff --git a/r2/r2/templates/comment.mobile b/r2/r2/templates/comment.mobile index 8d0f1aea4..6a2edb76d 100644 --- a/r2/r2/templates/comment.mobile +++ b/r2/r2/templates/comment.mobile @@ -23,6 +23,7 @@ <%! from pylons.i18n import _, ungettext from r2.lib.filters import safemarkdown + from r2.lib.pages import WrappedUser %> <%inherit file="printable.mobile" /> @@ -47,8 +48,22 @@ %else:

+ <% + author = thing.author + if WrappedUser(author).has_flair and WrappedUser(author).flair_enabled: + flair = WrappedUser(author).flair_text + flair_left = WrappedUser(author).flair_position == 'left' + else: + flair = False + %> + %if flair and flair_left: + ${flair} + %endif ${thing.author.name} + %if flair and not flair_left: + ${flair} + %endif  |${thing.score} ${ungettext("point", "points", thing.score)} ${_("written")} ${thing.timesince} ${_("ago")}

diff --git a/r2/r2/templates/printable.mobile b/r2/r2/templates/printable.mobile index 956282189..4ddae9409 100644 --- a/r2/r2/templates/printable.mobile +++ b/r2/r2/templates/printable.mobile @@ -59,8 +59,19 @@ name = websafe(author.name) href = unsafe('href="/user/%s.mobile"' % name) if c.user_is_admin: name += " (%d)" % (author.link_karma) + if WrappedUser(author).has_flair and WrappedUser(author).flair_enabled: + flair = WrappedUser(author).flair_text + flair_left = WrappedUser(author).flair_position == 'left' + else: + flair = False %> + %if flair and flair_left: + ${flair} + %endif ${name} + %if flair and not flair_left: + ${flair} + %endif %endif