mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-24 22:38:09 -05:00
Move linkflair CSS classes up to cover the entire link.
This commit is contained in:
committed by
Neil Williams
parent
c515f17bdc
commit
63a917d5d5
@@ -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;
|
||||
|
||||
@@ -21,11 +21,10 @@
|
||||
################################################################################
|
||||
|
||||
<%def name="flair()">
|
||||
<span class="linkflair ${' '.join('linkflair-%s' % c for c in thing.flair_css_class.split())}">
|
||||
${thing.flair_text}
|
||||
</span>
|
||||
<span class="linkflairlabel">${thing.flair_text}</span>
|
||||
</%def>
|
||||
|
||||
<div class="linkflair ${' '.join('linkflair-%s' % c for c in thing.flair_css_class.split())}">
|
||||
%if thing.flair_position == 'left':
|
||||
${flair()}
|
||||
%endif
|
||||
@@ -34,7 +33,8 @@
|
||||
if len(title) > 10:
|
||||
title = title[:7] + '...'
|
||||
%>
|
||||
<a class="title" href="javascript://void(0)">${title}</a>
|
||||
<a class="title" href="javascript://void(0)">${title}</a>
|
||||
%if thing.flair_position == 'right':
|
||||
${flair()}
|
||||
%endif
|
||||
</div>
|
||||
|
||||
@@ -28,11 +28,7 @@ from r2.models import USER_FLAIR, LINK_FLAIR
|
||||
|
||||
<%def name="flair()">
|
||||
%if thing.flair_template.text or thing.flair_template.css_class:
|
||||
## TODO: clean this up
|
||||
<span class=
|
||||
"linkflair ${' '.join('linkflair-' + c for c in thing.flair_template.css_class.split())}">
|
||||
${thing.flair_template.text}
|
||||
</span>
|
||||
<span class="linkflairlabel">${thing.flair_template.text}</span>
|
||||
%endif
|
||||
</%def>
|
||||
|
||||
@@ -40,7 +36,7 @@ from r2.models import USER_FLAIR, LINK_FLAIR
|
||||
%if thing.flair_type == USER_FLAIR:
|
||||
${thing.wrapped_user}
|
||||
%elif thing.flair_type == LINK_FLAIR:
|
||||
<div class="thing">
|
||||
<div class="thing linkflair ${' '.join('linkflair-' + c for c in thing.flair_template.css_class.split())}">
|
||||
<p class="title">
|
||||
%if c.site.link_flair_position != 'right':
|
||||
<%call expr="flair()" />
|
||||
|
||||
@@ -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
|
||||
<span class="linkflair ${' '.join('linkflair-' + c for c in css.split())}">
|
||||
${thing.flair_text}
|
||||
</span>
|
||||
%if c.user.pref_show_link_flair and thing.flair_text:
|
||||
<span class="linkflairlabel">${thing.flair_text}</span>
|
||||
%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">
|
||||
|
||||
Reference in New Issue
Block a user