fix
This commit is contained in:
parent
6f42528428
commit
2a7b665f3d
@ -117,7 +117,7 @@ class MyParsedown extends ParsedownExtended {
|
|||||||
|
|
||||||
url: $image_url,
|
url: $image_url,
|
||||||
direct_url: $image->getDirectUrl(),
|
direct_url: $image->getDirectUrl(),
|
||||||
note: markup::markdownToHtml($this->lang !== null && $this->lang == PostLanguage::Russian ? $image->noteRu : $image->noteEn,
|
unsafe_note: markup::markdownToHtml($this->lang !== null && $this->lang == PostLanguage::Russian ? $image->noteRu : $image->noteEn,
|
||||||
no_paragraph: true)
|
no_paragraph: true)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ function image($ctx,
|
|||||||
// options
|
// options
|
||||||
$align, $nolabel, $w, $padding_top, $may_have_alpha,
|
$align, $nolabel, $w, $padding_top, $may_have_alpha,
|
||||||
// image data
|
// image data
|
||||||
$direct_url, $url, $note) {
|
$direct_url, $url, $unsafe_note) {
|
||||||
return <<<HTML
|
return <<<HTML
|
||||||
<div class="md-image align-{$align}">
|
<div class="md-image align-{$align}">
|
||||||
<div class="md-image-wrap" data-alpha="{$ctx->if_then_else($may_have_alpha, '1', '0')}">
|
<div class="md-image-wrap" data-alpha="{$ctx->if_then_else($may_have_alpha, '1', '0')}">
|
||||||
@ -24,8 +24,8 @@ return <<<HTML
|
|||||||
<div style="background: 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>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{$ctx->if_true($note != '' && !$nolabel,
|
{$ctx->if_true($unsafe_note != '' && !$nolabel,
|
||||||
fn() => '<div class="md-image-note">'.$note.'</div>')}
|
fn() => '<div class="md-image-note">'.$unsafe_note.'</div>')}
|
||||||
</div>
|
</div>
|
||||||
HTML;
|
HTML;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user