Shift hats into same position as on index.
This commit is contained in:
parent
8c4e33d40b
commit
d671e88ac9
@ -194,6 +194,7 @@ Build =
|
||||
|
||||
catalogThread: (thread, data, pageCount) ->
|
||||
{staticPath, gifIcon} = Build
|
||||
{tn_w, tn_h} = data
|
||||
|
||||
if data.spoiler and !Conf['Reveal Spoiler Thumbnails']
|
||||
src = "#{staticPath}spoiler"
|
||||
@ -202,11 +203,14 @@ Build =
|
||||
src += ("-#{thread.board}") + Math.floor 1 + spoilerRange * Math.random()
|
||||
src += '.png'
|
||||
imgClass = 'spoiler-file'
|
||||
cssText = "--tn-w: 100; --tn-h: 100;"
|
||||
else if data.filedeleted
|
||||
src = "#{staticPath}filedeleted-res#{gifIcon}"
|
||||
imgClass = 'deleted-file'
|
||||
else if thread.OP.file
|
||||
src = thread.OP.file.thumbURL
|
||||
ratio = 250 / Math.max(tn_w, tn_h)
|
||||
cssText = "--tn-w: #{tn_w * ratio}; --tn-h: #{tn_h * ratio};"
|
||||
else
|
||||
src = "#{staticPath}nofile.png"
|
||||
imgClass = 'no-file'
|
||||
@ -222,6 +226,7 @@ Build =
|
||||
id: "t#{thread}"
|
||||
$.addClass root, thread.OP.highlights... if thread.OP.highlights
|
||||
$.addClass root, 'noFile' unless thread.OP.file
|
||||
root.style.cssText = cssText or ''
|
||||
|
||||
root
|
||||
|
||||
|
||||
@ -940,12 +940,18 @@ div[data-checked="false"] > .suboption-list {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
}
|
||||
:root.hats-enabled:not(.werkTyme) .catalog-small > .catalog-thread:not(.noFile)::after {
|
||||
left: calc(67px - .3px * var(--tn-w));
|
||||
}
|
||||
:root.hats-enabled .catalog-large > .catalog-thread::after {
|
||||
left: -15px;
|
||||
top: -98px;
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
}
|
||||
:root.hats-enabled:not(.werkTyme) .catalog-large > .catalog-thread:not(.noFile)::after {
|
||||
left: calc(110px - .5px * var(--tn-w));
|
||||
}
|
||||
|
||||
/* Announcement Hiding */
|
||||
:root.hide-announcement #globalMessage {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user