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

44 lines
776 B
PHTML

<?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>
.archive-img {
width: <?= $width ?>px;
}
<?php if ($zoom == true) { ?>
#<?= $id ?> {
cursor:crosshair;
}
<?php } ?>
</style>
<div class="archive-img">
<img id="<?= $id ?>"
src="<?= $image ?>"
/>
</div>
<?php if ($zoom == true) { ?>
<script>
$(document).ready(function(){
wheelzoom(document.querySelector('#<?= $id ?>'));
});
</script>
<?php } ?>
</div>