set max-width / max-height for random and featured image blocks

This commit is contained in:
Shish
2020-03-28 00:23:29 +00:00
parent b60e8ac5b4
commit 866b77ab19
3 changed files with 19 additions and 15 deletions

View File

@ -17,16 +17,13 @@ class RandomImageTheme extends Themelet
return (string)DIV(
["style"=>"text-align: center;"],
A(
[
"href"=>make_link("post/view/{$image->id}", $query),
"style"=>"position: relative; height: {$tsize[1]}px; width: {$tsize[0]}px;"
],
["href"=>make_link("post/view/{$image->id}", $query)],
IMG([
"id"=>"thumb_rand_{$image->id}",
"title"=>$image->get_tooltip(),
"alt"=>$image->get_tooltip(),
"class"=>'highlighted',
"style"=>"height: {$tsize[1]}px; width: {$tsize[0]}px;",
"style"=>"max-height: {$tsize[1]}px; max-width: 100%;",
"src"=>$image->get_thumb_link()
])
)