diff --git a/r2/r2/public/static/css/reddit.css b/r2/r2/public/static/css/reddit.css index 3f88e803c..c8d0ebcae 100644 --- a/r2/r2/public/static/css/reddit.css +++ b/r2/r2/public/static/css/reddit.css @@ -668,7 +668,7 @@ ul.flat-vert {text-align: left;} a.author { margin-right: 0.5em; } -.flair, .linkflair { +.flair, .linkflairlabel { display: inline-block; margin-right: .5em; padding: 0 2px; @@ -684,7 +684,7 @@ a.author { margin-right: 0.5em; } font-size: xx-small; } -.linkflair { +.linkflairlabel { font-size: x-small; max-width: 10em; overflow: hidden; diff --git a/r2/r2/templates/flairselectorlinksample.html b/r2/r2/templates/flairselectorlinksample.html index 978a551e1..451cb99c3 100644 --- a/r2/r2/templates/flairselectorlinksample.html +++ b/r2/r2/templates/flairselectorlinksample.html @@ -21,11 +21,10 @@ ################################################################################ <%def name="flair()"> - - ${thing.flair_text} - + ${thing.flair_text} %def> +
%if c.site.link_flair_position != 'right': <%call expr="flair()" /> diff --git a/r2/r2/templates/link.html b/r2/r2/templates/link.html index f7e323482..0c23e9c20 100644 --- a/r2/r2/templates/link.html +++ b/r2/r2/templates/link.html @@ -79,12 +79,8 @@ %def> <%def name="flair()"> - <% css = thing.flair_css_class or '' %> - %if c.user.pref_show_link_flair and (thing.flair_text or css): - ## TODO: clean this up - - ${thing.flair_text} - + %if c.user.pref_show_link_flair and thing.flair_text: + ${thing.flair_text} %endif %def> @@ -170,6 +166,10 @@ <%def name="thing_css_class(what)" buffered="True"> ${parent.thing_css_class(what)} ${"over18" if thing.over_18 else ""} +%if c.user.pref_show_link_flair and (thing.flair_text or thing.flair_css_class): + <% css = thing.flair_css_class or '' %> + linkflair ${' '.join('linkflair-' + c for c in css.split())} +%endif %def> <%def name="thing_data_attributes(what)" buffered="True">