2021-04-17 22:18:36 +02:00
|
|
|
|
|
|
|
|
2021-04-19 16:21:37 +02:00
|
|
|
<?php
|
|
|
|
if ($zoom_type == "wheelzoom") {
|
|
|
|
$this->headScript()->appendFile($this->assetUrl('vendor/wheelzoom/wheelzoom.js',
|
|
|
|
'ImageViewer'));
|
|
|
|
}
|
|
|
|
if ($zoom_type == "zoom") {
|
2021-04-19 13:57:44 +02:00
|
|
|
$this->headScript()->appendFile($this->assetUrl('vendor/zoom/jquery.zoom.min.js',
|
|
|
|
'ImageViewer'));
|
2021-04-19 16:28:59 +02:00
|
|
|
}
|
|
|
|
if ($zoom_type == "zoom" || $zoom_type == "wheelzoom") {
|
2021-04-19 13:57:44 +02:00
|
|
|
$this->headLink()->appendStylesheet($this->assetUrl('css/zoom.css',
|
2021-04-17 22:18:36 +02:00
|
|
|
'ImageViewer'));
|
2021-04-19 16:21:37 +02:00
|
|
|
}
|
|
|
|
?>
|
2021-04-17 22:18:36 +02:00
|
|
|
|
2021-05-31 19:29:45 +02:00
|
|
|
<?php if ($renderSourceLink) { ?>
|
|
|
|
<div class="source-link">
|
|
|
|
<a href="<?= $item_url ?>">Source</a>
|
|
|
|
</div>
|
|
|
|
<?php } ?>
|
2021-04-17 22:18:36 +02:00
|
|
|
|
|
|
|
|
2021-04-19 16:21:37 +02:00
|
|
|
<?php if ($zoom_type == "zoom") { ?>
|
|
|
|
<div id='<?= $id ?>' class='zoom' style='width:<?= $width ?>%; cursor:grab'>
|
|
|
|
<img src='<?= $image ?>' alt='<?= $title ?>'/>
|
2021-04-18 12:12:26 +02:00
|
|
|
</div>
|
2021-04-19 16:21:37 +02:00
|
|
|
<?php } ?>
|
2021-04-17 22:18:36 +02:00
|
|
|
|
2021-04-19 16:21:37 +02:00
|
|
|
<?php if ($zoom_type == "wheelzoom") { ?>
|
|
|
|
<div class='zoom' style='display:block; width:<?= $width ?>%; cursor:crosshair'>
|
|
|
|
<img id="<?= $id ?>" src="<?= $image ?>" />
|
|
|
|
</div>
|
2021-04-19 13:57:44 +02:00
|
|
|
<?php } ?>
|
|
|
|
|
2021-04-19 16:21:37 +02:00
|
|
|
<?php if ($zoom_type == "") { ?>
|
|
|
|
<div class="archive-img">
|
|
|
|
<img id="<?= $id ?>"
|
|
|
|
style="width: <?= $width ?>%;"
|
|
|
|
src="<?= $image ?>"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<?php } ?>
|
2021-05-31 19:29:45 +02:00
|
|
|
|
|
|
|
<?php if ($title) { ?>
|
|
|
|
<div class="item_title">
|
|
|
|
<?= $title ?>
|
|
|
|
</div>
|
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php if ($zoom_type == "zoom") { ?>
|
|
|
|
<script>
|
|
|
|
$(document).ready(function(){
|
|
|
|
$('#<?= $id ?>').zoom({on:'grab', 'duration': 200, 'magnify': 1.5});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
<?php if ($zoom_type == "wheelzoom") { ?>
|
|
|
|
<script>
|
|
|
|
$(document).ready(function(){
|
|
|
|
wheelzoom(document.querySelector('#<?= $id ?>'));
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<?php } ?>
|