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

45 lines
868 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;
}
</style>
<div class="archive-img">
<img id="<?= $id ?>"
src="<?= $image ?>"
/>
<?php if ($zoom == true) { ?>
<div
style="font-size: 0.75em; color:white; background-color: gray; padding-left: 1em">
You can zoom this image
</div>
<?php } ?>
</div>
<?php if ($zoom == true) { ?>
<script>
$(document).ready(function(){
wheelzoom(document.querySelector('#<?= $id ?>'));
});
</script>
<?php } ?>
</div>