PanoramaViewer-omeka-module/view/common/block-layout/panorama-viewer.phtml

37 lines
880 B
PHTML

<div style="position:relative;">
<?php
$this->headLink()->appendStylesheet($this->assetUrl('vendor/pannellum/pannellum.css', 'PanoramaViewer'));
$this->headScript()->appendFile($this->assetUrl('vendor/pannellum/pannellum.js', 'PanoramaViewer'));
if ($title !== false && $title !== "") {
$title = sprintf('<p id="panorama-viewer-title">%s</p>', $title);
} else {
$title = false;
}
?>
<style>
.panorama-viewer { height: <?= $height ?>; }
.pannellum-img { width: 100%; }
</style>
<div class="pannellum">
<div id="<?= $pannellum_ids[0] ?>" class="panorama-viewer"></div>
</div>
<script>
pannellum.viewer("<?= $pannellum_ids[0] ?>", {
type: "<?= $panorama_type ?>",
autoLoad: true,
panorama: "<?= $urls[0]; ?>",
});
<?php if ($title !== false): ?>
$('#pannellum-ui').append('<?= $title ?>');
<?php endif ?>
</script>
</div>