diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2022-07-11 15:01:02 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2022-07-11 15:01:02 +0300 |
commit | c2f382aba86aaebb9806ff1b43c1af69992e9a10 (patch) | |
tree | aee205721fd675926c5e7163eec0dddc448f7813 /skin/markdown.skin.php | |
parent | 24982a48f570b89e537850dda4a4d1ac33ea919f (diff) |
support dark mode for images with alpha channel
Diffstat (limited to 'skin/markdown.skin.php')
-rw-r--r-- | skin/markdown.skin.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/skin/markdown.skin.php b/skin/markdown.skin.php index 02d3a0f..58801f5 100644 --- a/skin/markdown.skin.php +++ b/skin/markdown.skin.php @@ -14,14 +14,14 @@ HTML; function image($ctx, // options - $align, $nolabel, $w, $padding_top, + $align, $nolabel, $w, $padding_top, $may_have_alpha, // image data $direct_url, $url, $note) { return <<<HTML <div class="md-image align-{$align}"> - <div class="md-image-wrap"> + <div class="md-image-wrap" data-alpha="{$ctx->if_then_else($may_have_alpha, '1', '0')}"> <a href="{$direct_url}"> - <div style="background: #f2f2f2 url('{$url}') no-repeat; background-size: contain; width: {$w}px; padding-top: {$padding_top}%;"></div> + <div style="background: url('{$url}') no-repeat; background-size: contain; width: {$w}px; padding-top: {$padding_top}%;"></div> </a> {$ctx->if_true( $note != '' && !$nolabel, |