This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/ext/handle_svg/theme.php

27 lines
582 B
PHP
Raw Normal View History

2021-12-14 18:32:47 +00:00
<?php
declare(strict_types=1);
namespace Shimmie2;
class SVGFileHandlerTheme extends Themelet
{
public function display_image(Image $image): void
{
2024-01-01 21:17:36 +00:00
global $page;
$ilink = make_link("get_svg/{$image->id}/{$image->id}.svg");
// $ilink = $image->get_image_link();
$html = "
2020-03-13 09:23:54 +00:00
<img
alt='main image'
src='$ilink'
id='main_image'
class='shm-main-image'
data-width='{$image->width}'
data-height='{$image->height}'
/>
";
$page->add_block(new Block("Image", $html, "main", 10));
}
}