move thumb class to link

This commit is contained in:
ccd0 2014-09-16 00:53:41 -07:00
parent 11067f01d3
commit a55daa2736
3 changed files with 12 additions and 12 deletions

View File

@ -329,9 +329,9 @@ Build =
imgClass = 'no-file'
thumb = if imgClass
<%= html('<img src="${src}" class="thumb ${imgClass}">') %>
<%= html('<img src="${src}" class="${imgClass}">') %>
else
<%= html('<img src="${src}" class="thumb" width="${imgWidth}" height="${imgHeight}">') %>
<%= html('<img src="${src}" width="${imgWidth}" height="${imgHeight}">') %>
postCount = data.replies + 1
fileCount = data.images + !!data.ext
@ -345,7 +345,7 @@ Build =
root = $.el 'div',
className: 'catalog-thread'
$.extend root, <%= html(
'<a href="/${thread.board}/thread/${thread.ID}">' +
'<a href="/${thread.board}/thread/${thread.ID}" class="thumb">' +
'&{thumb}' +
'</a>' +
'<div class="thread-stats" title="Post count / File count / Page count">' +

View File

@ -185,7 +185,7 @@ Index =
$.on @nodes.thumb, 'click', Index.onClick
onClick: (e) ->
return if e.button isnt 0
thread = g.threads[@parentNode.parentNode.dataset.fullID]
thread = g.threads[@parentNode.dataset.fullID]
if e.shiftKey
Index.toggleHide thread
else if e.altKey

View File

@ -516,30 +516,30 @@ hr + div.center:not(.ad-cnt):not(.topad):not(.middlead):not(.bottomad) {
word-break: break-word;
vertical-align: top;
}
.catalog-thread > a {
.thumb {
flex-shrink: 0;
position: relative;
}
.thumb {
.thumb > img {
max-width: 150px;
max-height: 150px;
border-radius: 2px;
box-shadow: 0 0 5px rgba(0, 0, 0, .25);
}
.thumb:not(.deleted-file):not(.no-file) {
.thumb:not(.deleted-file):not(.no-file) > img {
min-width: 30px;
min-height: 30px;
}
.thumb.spoiler-file {
.thumb.spoiler-file > img {
width: 100px;
height: 100px;
}
.thumb.deleted-file {
.thumb.deleted-file > img {
width: 127px;
height: 13px;
padding: 20px 11px;
}
.thumb.no-file {
.thumb.no-file > img {
width: 77px;
height: 13px;
padding: 20px 36px;
@ -851,8 +851,8 @@ span.hide-announcement {
.filter-highlight > .reply {
box-shadow: -5px 0 rgba(255, 0, 0, .5);
}
.pinned .thumb,
.filter-highlight .thumb {
.pinned .thumb > img,
.filter-highlight .thumb > img {
border: 2px solid rgba(255, 0, 0, .5);
}