15 <div
class=
"gallery-placeholder _block-content-loading" data-gallery-role=
"gallery-placeholder">
16 <div data-role=
"loader" class=
"loading-mask">
18 <img src=
"<?= /* @escapeNotVerified */ $block->getViewFileUrl('images/loader-1.gif') ?>" 19 alt=
"<?= /* @escapeNotVerified */ __('Loading...') ?>">
23 <!--Fix
for jumping content. Loader must be the same size as gallery.-->
26 "width": <?=
$block->getImageAttribute(
'product_page_image_medium',
'width') ?>,
27 "thumbheight": <?php echo
$block->getImageAttribute(
'product_page_image_small',
'height')
28 ?:
$block->getImageAttribute(
'product_page_image_small',
'width'); ?>,
29 "navtype":
"<?= /* @escapeNotVerified */ $block->getVar("gallery/navtype
") ?>",
30 "height": <?=
$block->getImageAttribute(
'product_page_image_medium',
'height') ?>
33 loader = document.querySelectorAll(
'[data-gallery-role="gallery-placeholder"] [data-role="loader"]')[0];
35 if (config.navtype ===
'horizontal') {
36 thumbBarHeight = config.thumbheight;
39 loader.style.paddingBottom = ( config.height / config.width * 100) +
"%";
41 <script type=
"text/x-magento-init">
43 "[data-gallery-role=gallery-placeholder]": {
44 "mage/gallery/gallery": {
45 "mixins":[
"magnifier/magnify"],
46 "magnifierOpts": <?=
$block->getMagnifier() ?>,
47 "data": <?=
$block->getGalleryImagesJson() ?>,
49 "nav":
"<?= /* @escapeNotVerified */ $block->getVar("gallery/nav
") ?>",
50 "loop": <?=
$block->getVar(
"gallery/loop") ?
'true' :
'false' ?>,
51 "keyboard": <?=
$block->getVar(
"gallery/keyboard") ?
'true' :
'false' ?>,
52 "arrows": <?=
$block->getVar(
"gallery/arrows") ?
'true' :
'false' ?>,
53 "allowfullscreen": <?=
$block->getVar(
"gallery/allowfullscreen") ?
'true' :
'false' ?>,
54 "showCaption": <?=
$block->getVar(
"gallery/caption") ?
'true' :
'false' ?>,
55 "width":
"<?= /* @escapeNotVerified */ $block->getImageAttribute('product_page_image_medium', 'width') ?>",
56 "thumbwidth":
"<?= /* @escapeNotVerified */ $block->getImageAttribute('product_page_image_small', 'width') ?>",
57 <?php
if (
$block->getImageAttribute(
'product_page_image_small',
'height') ||
$block->getImageAttribute(
'product_page_image_small',
'width')): ?>
58 "thumbheight": <?php echo
$block->getImageAttribute(
'product_page_image_small',
'height')
59 ?:
$block->getImageAttribute(
'product_page_image_small',
'width'); ?>,
61 <?php
if (
$block->getImageAttribute(
'product_page_image_medium',
'height') ||
$block->getImageAttribute(
'product_page_image_medium',
'width')): ?>
62 "height": <?php echo
$block->getImageAttribute(
'product_page_image_medium',
'height')
63 ?:
$block->getImageAttribute(
'product_page_image_medium',
'width'); ?>,
65 <?php
if (
$block->getVar(
"gallery/transition/duration")): ?>
66 "transitionduration": <?=
$block->getVar(
"gallery/transition/duration") ?>,
68 "transition":
"<?= /* @escapeNotVerified */ $block->getVar("gallery/transition/effect
") ?>",
69 "navarrows": <?=
$block->getVar(
"gallery/navarrows") ?
'true' :
'false' ?>,
70 "navtype":
"<?= /* @escapeNotVerified */ $block->getVar("gallery/navtype
") ?>",
71 "navdir":
"<?= /* @escapeNotVerified */ $block->getVar("gallery/navdir
") ?>" 74 "nav":
"<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/nav
") ?>",
75 "loop": <?=
$block->getVar(
"gallery/fullscreen/loop") ?
'true' :
'false' ?>,
76 "navdir":
"<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navdir
") ?>",
77 "navarrows": <?=
$block->getVar(
"gallery/fullscreen/navarrows") ?
'true' :
'false' ?>,
78 "navtype":
"<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navtype
") ?>",
79 "arrows": <?=
$block->getVar(
"gallery/fullscreen/arrows") ?
'true' :
'false' ?>,
80 "showCaption": <?=
$block->getVar(
"gallery/fullscreen/caption") ?
'true' :
'false' ?>,
81 <?php
if (
$block->getVar(
"gallery/fullscreen/transition/duration")): ?>
82 "transitionduration": <?=
$block->getVar(
"gallery/fullscreen/transition/duration") ?>,
84 "transition":
"<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/transition/effect
") ?>" 86 "breakpoints": <?=
$block->getBreakpoints() ?>