mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-25 23:08:22 -05:00
Prefix all link flair CSS classes with "linkflair" instead of "flair".
This commit is contained in:
@@ -2486,10 +2486,10 @@ class ApiController(RedditController):
|
||||
# Push some client-side updates back to the browser.
|
||||
|
||||
# TODO: move this to a template
|
||||
flair = '<span class="flair %s">%s</span>' % (
|
||||
' '.join('flair-' + c for c in css_class.split()), text)
|
||||
flair = '<span class="linkflair %s">%s</span>' % (
|
||||
' '.join('linkflair-' + c for c in css_class.split()), text)
|
||||
|
||||
jquery('.id-%s .entry .flair' % link._fullname).remove()
|
||||
jquery('.id-%s .entry .linkflair' % link._fullname).remove()
|
||||
title_path = '.id-%s .entry > .title > .title' % link._fullname
|
||||
if c.site.link_flair_position == 'left':
|
||||
jquery(title_path).before(flair)
|
||||
|
||||
@@ -664,7 +664,7 @@ ul.flat-vert {text-align: left;}
|
||||
|
||||
a.author { margin-right: 0.5em; }
|
||||
|
||||
.flair {
|
||||
.flair, .linkflair {
|
||||
display: inline-block;
|
||||
margin-right: .5em;
|
||||
padding: 0 2px;
|
||||
@@ -680,11 +680,10 @@ a.author { margin-right: 0.5em; }
|
||||
font-size: xx-small;
|
||||
}
|
||||
|
||||
.title .flair {
|
||||
font-size: x-small;
|
||||
}
|
||||
.linkflair { font-size: x-small; }
|
||||
|
||||
.link .tagline .flair {
|
||||
.link .flair {
|
||||
font-size: x-small;
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ from r2.models import USER_FLAIR, LINK_FLAIR
|
||||
%if thing.flair_template.text or thing.flair_template.css_class:
|
||||
## TODO: clean this up
|
||||
<span class=
|
||||
"flair ${' '.join('flair-' + c for c in thing.flair_template.css_class.split())}">
|
||||
"linkflair ${' '.join('linkflair-' + c for c in thing.flair_template.css_class.split())}">
|
||||
${thing.flair_template.text}
|
||||
</span>
|
||||
%endif
|
||||
|
||||
@@ -81,8 +81,7 @@
|
||||
<%def name="flair()">
|
||||
%if thing.flair_text or thing.flair_css_class:
|
||||
## TODO: clean this up
|
||||
<span class=
|
||||
"flair ${' '.join('flair-' + c for c in thing.flair_css_class.split())}">
|
||||
<span class="linkflair ${' '.join('linkflair-' + c for c in thing.flair_css_class.split())}">
|
||||
${thing.flair_text}
|
||||
</span>
|
||||
%endif
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
${optionalstyle("margin-left: 28px; min-height:32px;")}
|
||||
%endif
|
||||
>
|
||||
%if c.site.link_flair_position == 'left' and thing.flair_text:
|
||||
<span class="linkflair">${thing.flair_text}</span>
|
||||
%endif
|
||||
<a href="${thing.href_url}" class="reddit-link-title"
|
||||
${optionalstyle("text-decoration:none;color:#336699;font-size:small;")}
|
||||
%if thing.nofollow:
|
||||
@@ -61,6 +64,9 @@
|
||||
>
|
||||
${thing.title}
|
||||
</a>
|
||||
%if c.site.link_flair_position == 'right' and thing.flair_text:
|
||||
<span class="linkflair">${thing.flair_text}</span>
|
||||
%endif
|
||||
%if not expanded:
|
||||
<br />
|
||||
%endif
|
||||
|
||||
Reference in New Issue
Block a user