ImageViewer-omeka-module/view/common/block-layout/imageViewer.phtml

37 lines
651 B
PHTML
Raw Normal View History

2021-04-17 22:18:36 +02:00
<?php if ($zoom == true) {
$this->headScript()->appendFile($this->assetUrl('vendor/wheelzoom/wheelzoom.js',
'ImageViewer'));
} ?>
<div class="wheelzoom-wrap" style="position:relative;">
<?php
if ($title !== false && $title !== "") {
$title = sprintf('<p id="wheelzoom-title">%s</p>', $title);
} else {
$title = false;
}
?>
<style>
#<?= $id ?> {
width: <?= $width ?>px;
}
</style>
<img id="<?= $id ?>"
src="<?= $image ?>"
/>
<?php if ($zoom == true) { ?>
<script>
$(document).ready(function(){
wheelzoom(document.querySelector('#<?= $id ?>'));
});
</script>
<?php } ?>
</div>