styling images

This commit is contained in:
lopar 2019-01-12 21:51:08 +02:00
parent 15a3dae559
commit 372ded439f

View File

@ -145,9 +145,13 @@ abstract class Item
abstract public function printInfo(); abstract public function printInfo();
public function printImage() public function printImage($bg_color = '#AAA',$border_color = '#EEE')
{ {
echo "<img src='/i/sh/{$this->img}'>"; echo <<<IMG
<img src="{$this->img}" style="width: 48px; height: 48px; border-radius: 5px; border: 1px solid rgba(0, 0, 0, 0.25);
padding: 7px; display: inline-block; background-repeat: no-repeat;
background-color: ' . $bg_color . '; background-image: radial-gradient(circle, ' . $border_color . ', ' . $bg_color . ');">
IMG;
} }
protected function wrap($number) protected function wrap($number)