set max-width / max-height for random and featured image blocks
This commit is contained in:
@ -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()
|
||||
])
|
||||
)
|
||||
|
Reference in New Issue
Block a user