mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-05 03:00:15 -04:00
Tweak minimum spotlight box heights.
This adds specific heights for compressed and non-compressed links.
This commit is contained in:
committed by
Neil Williams
parent
3e699d5253
commit
5f7576a718
@@ -141,6 +141,7 @@ class SpotlightListing(Listing):
|
||||
self.show_nums = True
|
||||
self._parent_max_num = kw.get('max_num', 0)
|
||||
self._parent_max_score = kw.get('max_score', 0)
|
||||
self.compress_display = c.user_is_loggedin and c.user.pref_compress
|
||||
self.interestbar = kw.get('interestbar')
|
||||
self.interestbar_prob = kw.get('interestbar_prob', 0.)
|
||||
self.show_promo = kw.get('show_promo', False)
|
||||
|
||||
@@ -1159,29 +1159,48 @@ a.author { margin-right: 0.5em; }
|
||||
}
|
||||
|
||||
/* organic listing */
|
||||
@min-uncompressed-height: 82px;
|
||||
@min-compressed-height: 51px;
|
||||
|
||||
.organic-listing {
|
||||
border: solid 1px gray;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
min-height: 90px;
|
||||
margin-bottom: 7px;
|
||||
|
||||
&.loading {
|
||||
height: 90px;
|
||||
height: @min-uncompressed-height;
|
||||
&.compressed {
|
||||
height: @min-compressed-height;
|
||||
}
|
||||
opacity: .5;
|
||||
|
||||
& .help, & .throbber {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.link {
|
||||
background-color: #F8F8F8;
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
// subtract padding from min heights
|
||||
min-height: @min-uncompressed-height - 10px;
|
||||
}
|
||||
|
||||
&.compressed .link {
|
||||
padding-top: 7px;
|
||||
padding-bottom: 7px;
|
||||
min-height: @min-compressed-height - 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.organic-listing .link {
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
.organic-listing .link,
|
||||
.organic-listing .link.compressed,
|
||||
.organic-listing .link.promotedlink {
|
||||
padding: 5px 7em 10px 2px;
|
||||
padding-right: 7em;
|
||||
padding-left: 2px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
from r2.lib.wrapped import Templated
|
||||
%>
|
||||
|
||||
<div id="siteTable_organic" class="organic-listing loading">
|
||||
<div id="siteTable_organic" class="organic-listing loading${' compressed' if thing.compress_display else ''}">
|
||||
%if thing.things:
|
||||
%for link in thing.things:
|
||||
${unsafe(link.render(display=False))}
|
||||
|
||||
Reference in New Issue
Block a user