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