styling images
This commit is contained in:
parent
af5baf8a6d
commit
4f99781622
@ -145,12 +145,10 @@ abstract class Item
|
||||
|
||||
abstract public function printInfo();
|
||||
|
||||
public function printImage($bg_color = '#AAA',$border_color = '#EEE')
|
||||
public function printImage()
|
||||
{
|
||||
echo <<<IMG
|
||||
<img src="//{$_SERVER['SERVER_NAME']}/i/sh/{$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 src="//{$_SERVER['SERVER_NAME']}/i/sh/{$this->img}" class="item-wrap-normal">
|
||||
IMG;
|
||||
}
|
||||
|
||||
|
12
css/main.css
12
css/main.css
@ -1046,4 +1046,16 @@ img.item {
|
||||
hr {
|
||||
color: silver;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
img.item-wrap-normal {
|
||||
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: #AAA;
|
||||
background-image: radial-gradient(circle, #EEE, #AAA);
|
||||
}
|
Loading…
Reference in New Issue
Block a user