diff --git a/Block/Adminhtml/System/Config/Form/InfoTheme.php b/Block/Adminhtml/System/Config/Form/InfoTheme.php index 37d8b85..2decf4f 100644 --- a/Block/Adminhtml/System/Config/Form/InfoTheme.php +++ b/Block/Adminhtml/System/Config/Form/InfoTheme.php @@ -45,7 +45,7 @@ protected function rightCustomBlocks($data = []) $supportExpired = isset($license->notices->support); $notice = []; if ($status) { - $notice[] = '
' . __('Support') . ''; + $notice[] = '
' . __('Support') . ''; if ($supportExpired) { $notice[] = '' . __('Renew') . ''; } else { diff --git a/Model/Feed.php b/Model/Feed.php index 78138dc..91ddd26 100644 --- a/Model/Feed.php +++ b/Model/Feed.php @@ -11,7 +11,6 @@ use Exception; use Magento\AdminNotification\Model\InboxFactory; use Magento\Framework\App\DeploymentConfig; -use Magento\Framework\App\ObjectManager; use Magento\Framework\App\ProductMetadataInterface; use Magento\Framework\Component\ComponentRegistrar; use Magento\Framework\Component\ComponentRegistrarInterface; @@ -24,7 +23,7 @@ use Magento\Framework\Module\ModuleListInterface; use Magento\Framework\Notification\MessageInterface; use Magento\Store\Model\StoreManagerInterface; -use Olegnax\Core\Helper\Helper; +use Olegnax\Core\Helper\Helper as CoreHelper; use Olegnax\Core\Model\ResourceModel\Inbox\Collection\ExistsFactory; use Olegnax\Core\Model\ResourceModel\Inbox\Collection\ExpiredFactory; use Olegnax\Core\Model\ResourceModel\Inbox\Collection\OxContent; @@ -49,18 +48,53 @@ class Feed extends AbstractModel */ const REMOVE_FREQUENCY = 6; - /** - * - * @var ObjectManager - */ - public $_objectManager; /** * Feed url * * @var string */ + protected $expiredFactory; + protected $productMetadata; + protected $storeManagerInterface; + protected $moduleListInterface; + protected $componentRegistrarInterface; + protected $readFactory; + protected $oxFactory; + protected $existsFactory; + protected $deploymentConfig; + protected $inboxFactory; + protected $coreHelper; + protected $curlFactory; protected $_feedUrl; + public function __construct( + ExpiredFactory $expiredFactory, + ProductMetadataInterface $productMetadata, + StoreManagerInterface $storeManagerInterface, + ModuleListInterface $moduleListInterface, + ComponentRegistrarInterface $componentRegistrarInterface, + ReadFactory $readFactory, + OXFactory $oxFactory, + ExistsFactory $existsFactory, + DeploymentConfig $deploymentConfig, + InboxFactory $inboxFactory, + coreHelper $coreHelper, + CurlFactory $curlFactory + ) { + $this->expiredFactory = $expiredFactory; + $this->productMetadata = $productMetadata; + $this->storeManagerInterface = $storeManagerInterface; + $this->moduleListInterface = $moduleListInterface; + $this->componentRegistrarInterface = $componentRegistrarInterface; + $this->readFactory = $readFactory; + $this->oxFactory = $oxFactory; + $this->existsFactory = $existsFactory; + $this->deploymentConfig = $deploymentConfig; + $this->inboxFactory = $inboxFactory; + $this->coreHelper = $coreHelper; + $this->curlFactory = $curlFactory; + } + /** * @return $this */ @@ -74,7 +108,7 @@ public function checkUpdate() $feedXml = $this->getFeedXml(); - $installDate = strtotime($this->_loadObject(DeploymentConfig::class)->get(ConfigOptionsListConstants::CONFIG_PATH_INSTALL_DATE)); + $installDate = strtotime($this->deploymentConfig->get(ConfigOptionsListConstants::CONFIG_PATH_INSTALL_DATE)); $types = []; if ($feedXml && $feedXml->channel && $feedXml->channel->item) { @@ -152,7 +186,7 @@ public function checkUpdate() if (!empty($types)) { $this->removeOXType($types); } - $this->_loadObject(InboxFactory::class)->create()->parse(array_reverse($feedData)); + $this->inboxFactory->create()->parse(array_reverse($feedData)); } } $this->setLastUpdate(); @@ -168,19 +202,12 @@ public function getFrequency() return self::FREQUENCY * 3600; } - /** - * @return Helper - */ - protected function helper(){ - return $this->_loadObject( Helper::class); - } - /** * @return int */ public function getLastUpdate() { - return (int)$this->helper()->getModuleConfig('admin_notifications/lastcheck'); + return (int)$this->coreHelper->getModuleConfig('admin_notifications/lastcheck'); } /** @@ -203,7 +230,7 @@ public function getFeedXml() */ public function getFeedData() { - $curl = $this->_loadObject(CurlFactory::class)->create(); + $curl = $this->curlFactory->create(); $curl->setConfig( [ 'timeout' => 2, @@ -225,43 +252,13 @@ public function getFeedData() return $data; } - - /** - * @param string $object - * @return mixed - */ - protected function _loadObject($object) - { - return $this->_getObjectManager()->get($object); - } - - /** - * @return ObjectManager - */ - protected function _getObjectManager() - { - if (!$this->_objectManager) { - $this->_objectManager = ObjectManager::getInstance(); - } - - return $this->_objectManager; - } - /** * @return string */ protected function getUserAgent() { - return sprintf("Olegnax: %s/%s (%s)", $this->getProductMetadata()->getName(), - $this->getProductMetadata()->getVersion(), $this->getProductMetadata()->getEdition()); - } - - /** - * @return ProductMetadataInterface - */ - protected function getProductMetadata() - { - return $this->_loadObject(ProductMetadataInterface::class); + return sprintf("Olegnax: %s/%s (%s)", $this->productMetadata->getName(), + $this->productMetadata->getVersion(), $this->productMetadata->getEdition()); } /** @@ -269,7 +266,7 @@ protected function getProductMetadata() */ public function getCurrentUrl() { - return $this->_loadObject(StoreManagerInterface::class)->getStore()->getBaseUrl(); + return $this->storeManagerInterface->getStore()->getBaseUrl(); } /** @@ -290,13 +287,6 @@ public function getFeedUrl() private function getScheme() { return 'https://'; -// $url = $this->_loadObject(StoreManagerInterface::class)->getStore()->getBaseUrl(); -// $scheme = parse_url($url, PHP_URL_SCHEME); -// if (empty($scheme)) { -// $scheme = 'http'; -// } -// -// return $scheme . '://'; } /** @@ -391,7 +381,7 @@ protected function prepareExtValue($extension) */ protected function getInstalledExt($vendor = '') { - $modules = $this->_loadObject(ModuleListInterface::class)->getNames(); + $modules = $this->moduleListInterface->getNames(); $dispatchResult = new DataObject($modules); $modules = $dispatchResult->toArray(); @@ -435,10 +425,10 @@ protected function validateVersion($moduleName, $version) */ protected function getComposerVersion($moduleName, $type = ComponentRegistrar::MODULE) { - $path = $this->_loadObject(ComponentRegistrarInterface::class)->getPath($type, $moduleName); + $path = $this->componentRegistrarInterface->getPath($type, $moduleName); if ($path) { - $dirReader = $this->_loadObject(ReadFactory::class)->create($path); + $dirReader = $this->readFactory->create($path); if ($dirReader->isExist('composer.json')) { $data = $dirReader->readFile('composer.json'); @@ -491,7 +481,7 @@ public function removeOXType($types = []) $types = array_unique($types); /** @var OXFactory $collection */ - $collection = $this->_loadObject(OXFactory::class)->create()->addFieldToFilter('ox_type', + $collection = $this->oxFactory->create()->addFieldToFilter('ox_type', array('in' => $types)); foreach ($collection as $model) { $model->setIsRemove(1)->save()->delete(); @@ -505,7 +495,7 @@ public function removeOXType($types = []) */ public function setLastUpdate() { - $this->helper()->setModuleConfig('admin_notifications/lastcheck', time()); + $this->coreHelper->setModuleConfig('admin_notifications/lastcheck', time()); return $this; } @@ -519,7 +509,7 @@ public function removeExpiredItems() } /** @var ExpiredFactory $collection */ - $collection = $this->_loadObject(ExpiredFactory::class)->create(); + $collection = $this->expiredFactory->create(); foreach ($collection as $model) { $model->setIsRemove(1)->save()->delete(); } @@ -534,7 +524,7 @@ public function removeExpiredItems() */ public function getLastRemove() { - return (int)$this->helper()->getModuleConfig('admin_notifications/lastremove'); + return (int)$this->coreHelper->getModuleConfig('admin_notifications/lastremove'); } /** @@ -542,7 +532,7 @@ public function getLastRemove() */ public function setLastRemove() { - $this->helper()->setModuleConfig('admin_notifications/lastremove', time()); + $this->coreHelper->setModuleConfig('admin_notifications/lastremove', time()); return $this; } @@ -552,7 +542,7 @@ public function setLastRemove() */ private function isItemExists($link) { - return $this->_loadObject(ExistsFactory::class)->create()->execute($this->escapeString($link)); + return $this->existsFactory->create()->execute($this->escapeString($link)); } } diff --git a/composer.json b/composer.json index 9a64971..0b831fd 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "olegnax/module-core", "description": "Olegnax Core. Required by all Olegnax extensions and themes.", - "version": "1.3.4", + "version": "1.3.4.2", "type": "magento2-module", "license": [ "OSL-3.0" diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml index 0932407..2f75fdc 100644 --- a/etc/adminhtml/system.xml +++ b/etc/adminhtml/system.xml @@ -1,9 +1,9 @@ - - - + + +
olegnax @@ -26,6 +26,12 @@ on-off-trigger Magento\Config\Model\Config\Source\Yesno + + + on-off-trigger + Magento\Config\Model\Config\Source\Yesno +
diff --git a/etc/config.xml b/etc/config.xml index 4b01fa1..3f9ae91 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -4,8 +4,9 @@ 1 - 1 + 1 + 1 - +
\ No newline at end of file diff --git a/etc/module.xml b/etc/module.xml index a803f4c..a692a9f 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,6 +1,6 @@ - + diff --git a/view/frontend/layout/checkout_index_index.xml b/view/frontend/layout/checkout_index_index.xml new file mode 100644 index 0000000..6c11c04 --- /dev/null +++ b/view/frontend/layout/checkout_index_index.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/view/frontend/layout/default.xml b/view/frontend/layout/default.xml index 0bc4f15..5fec29a 100644 --- a/view/frontend/layout/default.xml +++ b/view/frontend/layout/default.xml @@ -7,11 +7,12 @@ --> - - - + + + + diff --git a/view/frontend/templates/assets.phtml b/view/frontend/templates/assets.phtml index 2c6e60e..db1d40d 100644 --- a/view/frontend/templates/assets.phtml +++ b/view/frontend/templates/assets.phtml @@ -1,5 +1,4 @@ -getConfig('olegnax_core_settings/general/owlcarousel')) { ?> - - - +getConfig('olegnax_core_settings/general/owlcarousel')) : ?> + getConfig('olegnax_core_settings/general/defer_assets'); ?> + rel="stylesheet" type="text/css" media="" > + \ No newline at end of file diff --git a/view/frontend/templates/lazy.phtml b/view/frontend/templates/lazy.phtml index 617421d..dd4a91f 100644 --- a/view/frontend/templates/lazy.phtml +++ b/view/frontend/templates/lazy.phtml @@ -35,36 +35,6 @@ this.destroy = () => { this.observer.disconnect() } - this.oldLoadImages = () => { - if (!this.settings) { - return - } - let debouncer = function (func, timeout) { - var timeoutID - return function () { - var scope = this, - args = arguments - clearTimeout(timeoutID) - timeoutID = setTimeout(function () { - func.apply(scope, Array.prototype.slice.call(args)) - }, timeout) - } - } - window.addEventListener('scroll', debouncer(self.oldInit, self.settings.debouncer)) - window.addEventListener('resize', debouncer(self.oldInit, self.settings.debouncer)) - self.oldInit() - } - this.oldInit = () => { - let height = window.visualViewport ? window.visualViewport.height : window.innerHeight - Array.prototype.forEach.call(this.images, function (image) { - if (image.classList.contains(self.settings.selectorClass)) { - let bounding = image.getBoundingClientRect() - if (bounding.top != bounding.bottom && 0 < bounding.bottom && height > bounding.top) { - self.applyImage(image) - } - } - }) - } this.applyImage = (image) => { let src = image.getAttribute(self.settings.src), srcset = image.getAttribute(self.settings.srcset) @@ -82,7 +52,6 @@ } this.init = () => { if (!window.IntersectionObserver) { - this.oldLoadImages() return } try { @@ -101,7 +70,6 @@ }) } catch (e) { console.info(e) - this.oldLoadImages() } } this.init() diff --git a/view/frontend/templates/lazy_min.phtml b/view/frontend/templates/lazy_min.phtml index fd88532..d4e6e91 100644 --- a/view/frontend/templates/lazy_min.phtml +++ b/view/frontend/templates/lazy_min.phtml @@ -1 +1,10 @@ - \ No newline at end of file +{let b=e.target,c=b.parentElement;if(b.src==b.getAttribute(this.settings.src)){b.classList.remove(a.settings.selectorClass),c.classList.remove(a.settings.loadClass);let d=c.closest(".product-item-photo");d&&d.classList.remove(a.settings.loadClass),b.dispatchEvent(new Event(a.settings.loadEvent)),this.observer&&this.observer.unobserve(b)}},this.destroy=()=>{this.observer.disconnect()},this.oldLoadImages=()=>{if(!this.settings)return;let b=function(a,b){var c;return function(){var d=this,e=arguments;clearTimeout(c),c=setTimeout(function(){a.apply(d,Array.prototype.slice.call(e))},b)}};window.addEventListener("scroll",b(a.oldInit,a.settings.debouncer)),window.addEventListener("resize",b(a.oldInit,a.settings.debouncer)),a.oldInit()},this.oldInit=()=>{let b=window.visualViewport?window.visualViewport.height:window.innerHeight;Array.prototype.forEach.call(this.images,function(d){if(d.classList.contains(a.settings.selectorClass)){let c=d.getBoundingClientRect();c.top!=c.bottom&&0c.top&&a.applyImage(d)}})},this.applyImage=b=>{let c=b.getAttribute(a.settings.src),d=b.getAttribute(a.settings.srcset);"img"===b.tagName.toLowerCase()?(b.onload=a.load,c&&(b.src=c),d&&(b.srcset=d)):b.style.backgroundImage="url('"+c+"')"},this.init=()=>{if(!window.IntersectionObserver){this.oldLoadImages();return}try{this.observer=new IntersectionObserver(function(b,c){Array.prototype.forEach.call(b,function(b){b.isIntersecting&&a.applyImage(b.target)})},{rootMargin:this.settings.rootMargin,threshold:[this.settings.threshold]}),Array.prototype.forEach.call(this.images,function(b){a.observer.observe(b)})}catch(b){console.info(b),this.oldLoadImages()}},this.init()}window.lazyLoad=function(){return new a}}(),document.addEventListener("DOMContentLoaded",function(){lazyLoad()},!1),require(["jquery"],function(a){a(document.body).on("contentUpdated contentUpdated.oxlazy",lazyLoad)}) +script; +?> +renderTag('script', [], $scriptString, false); +} else{ + echo /* @noEscape */ ''; +} diff --git a/view/frontend/templates/onloadcss.phtml b/view/frontend/templates/onloadcss.phtml new file mode 100644 index 0000000..6a310e4 --- /dev/null +++ b/view/frontend/templates/onloadcss.phtml @@ -0,0 +1,10 @@ + {oxOnloadLink.sheet ? (() => {try {oxOnloadLink.sheet.cssRules.length > 0 && (oxOnloadLink.media = "all");} catch (error) {oxOnloadLink.media = "all"}})() : oxOnloadLink.addEventListener("load", () => (oxOnloadLink.media = "all"));}); +SCRIPT; +?> + + renderTag('script', [], $scriptString, false); ?> + + +getData('helper'); $mobile = $helper->isMobileTheme(); -?> - +$scriptString = 'var OX_MOBILE = ' . ($mobile ? 1 : 0 ) .', +OX_PHOTOSWIPE = 1, +OX_CATALOG_AJAX = ' . (!$helper->getSystemValue('athlete2_settings/products_listing/catalog_ajax_add_to_cart') ? 1 : 0) .', +OX_WAYPOINTS = ' . ($helper->getSystemValue('athlete2_settings/general/waypoints') ? 1 : 0) .', +OX_OWL_DISABLE = ' . (!$helper->getModuleConfig('general/owlcarousel') ? 1 : 0) .', +OX_OWL_OBS_DISABLE = false;'; +if (isset($secureRenderer)){ + echo /* @noEscape */ $secureRenderer->renderTag('script', ['type' => 'text/javascript'], $scriptString, false); +} else{ + echo /* @noEscape */ ''; +} \ No newline at end of file diff --git a/view/frontend/web/owl.carousel/assets/owl.carousel.css b/view/frontend/web/owl.carousel/assets/owl.carousel.css index 816231d..5f2aad4 100644 --- a/view/frontend/web/owl.carousel/assets/owl.carousel.css +++ b/view/frontend/web/owl.carousel/assets/owl.carousel.css @@ -11,155 +11,203 @@ -webkit-tap-highlight-color: transparent; /* position relative and z-index fix webkit rendering fonts issue */ position: relative; - z-index: 1; } -.owl-carousel:not(.owl-loaded){ - display: flex!important; - overflow: hidden; + z-index: 1; +} + +.owl-carousel:not(.owl-loaded) { + display: flex !important; + contain: paint; opacity: 0; visibility: hidden; } -.owl-carousel:not(.owl-loaded) > *{ - display: block!important; + +.owl-carousel:not(.owl-loaded)>* { + display: block !important; opacity: 0; visibility: hidden; } - .owl-carousel .owl-stage { - position: relative; - -ms-touch-action: pan-Y; - touch-action: manipulation; - -moz-backface-visibility: hidden; - /* fix firefox animation glitch */ } - .owl-carousel .owl-stage:after { - content: "."; - display: block; - clear: both; - visibility: hidden; - line-height: 0; - height: 0; } - .owl-carousel .owl-stage-outer { - position: relative; - overflow: hidden; - /* fix for flashing background */ - -webkit-transform: translate3d(0px, 0px, 0px); } - .owl-carousel .owl-wrapper, - .owl-carousel .product-item, - .owl-carousel .owl-item { - -webkit-backface-visibility: hidden; - -moz-backface-visibility: hidden; - -ms-backface-visibility: hidden; - -webkit-transform: translate3d(0, 0, 0); - -moz-transform: translate3d(0, 0, 0); - -ms-transform: translate3d(0, 0, 0); } - .owl-carousel .product-item, - .owl-carousel .owl-item { - position: relative; - min-height: 1px; - float: left; - -webkit-backface-visibility: hidden; - -webkit-tap-highlight-color: transparent; - -webkit-touch-callout: none; } - .owl-carousel .product-item img, - .owl-carousel .owl-item img { - display: block; - width: 100%; } - .owl-carousel .owl-nav.disabled, - .owl-carousel .owl-dots.disabled { - display: none; } - .owl-carousel .owl-nav .owl-prev, - .owl-carousel .owl-nav .owl-next, - .owl-carousel .owl-dot { - cursor: pointer; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; } - .owl-carousel .owl-nav button.owl-prev, - .owl-carousel .owl-nav button.owl-next, - .owl-carousel button.owl-dot { - background: none; - color: inherit; - border: none; - padding: 0 !important; - font: inherit; } - .owl-carousel.owl-loaded { - display: block; } - .owl-carousel.owl-loading { - opacity: 0; - display: block; } - .owl-carousel.owl-hidden { - opacity: 0; } - .owl-carousel.owl-refresh .product-item, - .owl-carousel.owl-refresh .owl-item { - visibility: hidden; } - .owl-carousel.owl-drag .product-item, - .owl-carousel.owl-drag .owl-item { - -ms-touch-action: pan-y; - touch-action: pan-y; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; } - .owl-carousel.owl-grab { - cursor: move; - cursor: grab; } - .owl-carousel.owl-rtl { - direction: rtl; } - .owl-carousel.owl-rtl .product-item, - .owl-carousel.owl-rtl .owl-item { - float: right; } + +.owl-carousel .owl-stage { + position: relative; + -ms-touch-action: pan-Y; + touch-action: manipulation; + -moz-backface-visibility: hidden; + /* fix firefox animation glitch */ +} + +.owl-carousel .owl-stage:after { + content: "."; + display: block; + clear: both; + visibility: hidden; + line-height: 0; + height: 0; +} + +.owl-carousel .owl-stage-outer { + position: relative; + contain: paint; + /* fix for flashing background */ + -webkit-transform: translate3d(0px, 0px, 0px); +} + +.owl-carousel .owl-wrapper, +.owl-carousel .product-item, +.owl-carousel .owl-item { + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + -ms-backface-visibility: hidden; + -webkit-transform: translate3d(0, 0, 0); + -moz-transform: translate3d(0, 0, 0); + -ms-transform: translate3d(0, 0, 0); +} + +.owl-carousel .product-item, +.owl-carousel .owl-item { + position: relative; + min-height: 1px; + float: left; + -webkit-backface-visibility: hidden; + -webkit-tap-highlight-color: transparent; + -webkit-touch-callout: none; +} + +.owl-carousel .product-item img, +.owl-carousel .owl-item img { + display: block; + width: 100%; +} + +.owl-carousel .owl-nav.disabled, +.owl-carousel .owl-dots.disabled { + display: none; +} + +.owl-carousel .owl-nav .owl-prev, +.owl-carousel .owl-nav .owl-next, +.owl-carousel .owl-dot { + cursor: pointer; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.owl-carousel .owl-nav button.owl-prev, +.owl-carousel .owl-nav button.owl-next, +.owl-carousel button.owl-dot { + background: none; + color: inherit; + border: none; + padding: 0 !important; + font: inherit; +} + +.owl-carousel.owl-loaded { + display: block; +} + +.owl-carousel.owl-loading { + opacity: 0; + display: block; +} + +.owl-carousel.owl-hidden { + opacity: 0; +} + +.owl-carousel.owl-refresh .product-item, +.owl-carousel.owl-refresh .owl-item { + visibility: hidden; +} + +.owl-carousel.owl-drag .product-item, +.owl-carousel.owl-drag .owl-item { + -ms-touch-action: pan-y; + touch-action: pan-y; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.owl-carousel.owl-grab { + cursor: move; + cursor: grab; +} + +.owl-carousel.owl-rtl { + direction: rtl; +} + +.owl-carousel.owl-rtl .product-item, +.owl-carousel.owl-rtl .owl-item { + float: right; +} /* No Js */ .no-js .owl-carousel { - display: block; } + display: block; +} /* * Owl Carousel - Animate Plugin */ .owl-carousel .animated { animation-duration: 1000ms; - animation-fill-mode: both; } + animation-fill-mode: both; +} .owl-carousel .owl-animated-in { - z-index: 0; } + z-index: 0; +} .owl-carousel .owl-animated-out { - z-index: 1; } + z-index: 1; +} .owl-carousel .fadeOut { - animation-name: fadeOut; } + animation-name: fadeOut; +} @keyframes fadeOut { 0% { - opacity: 1; } + opacity: 1; + } + 100% { - opacity: 0; } } + opacity: 0; + } +} /* * Owl Carousel - Auto Height Plugin */ .owl-height { - transition: height 500ms ease-in-out; } + transition: height 500ms ease-in-out; +} /* * Owl Carousel - Lazy Load Plugin */ -.owl-carousel .product-item, -.owl-carousel .owl-item { - /** - This is introduced due to a bug in IE11 where lazy loading combined with autoheight plugin causes a wrong - calculation of the height of the owl-item that breaks page layouts - */ } - .owl-carousel .product-item .owl-lazy, - .owl-carousel .owl-item .owl-lazy { - opacity: 0; - transition: opacity 400ms ease; } - .owl-carousel .product-item .owl-lazy[src^=""], .owl-carousel .product-item .owl-lazy:not([src]), - .owl-carousel .owl-item .owl-lazy[src^=""], .owl-carousel .owl-item .owl-lazy:not([src]) { - max-height: 0; } - .owl-carousel .product-item img.owl-lazy, - .owl-carousel .owl-item img.owl-lazy { - transform-style: preserve-3d; } +.owl-carousel .product-item .owl-lazy, +.owl-carousel .owl-item .owl-lazy { + opacity: 0; + transition: opacity 400ms ease; +} + +.owl-carousel .product-item .owl-lazy[src^=""], +.owl-carousel .product-item .owl-lazy:not([src]), +.owl-carousel .owl-item .owl-lazy[src^=""], +.owl-carousel .owl-item .owl-lazy:not([src]) { + max-height: 0; +} + +.owl-carousel .product-item img.owl-lazy, +.owl-carousel .owl-item img.owl-lazy { + transform-style: preserve-3d; +} /* * Owl Carousel - Video Plugin @@ -167,7 +215,8 @@ .owl-carousel .owl-video-wrapper { position: relative; height: 100%; - background: #000; } + background: #000; +} .owl-carousel .owl-video-play-icon { position: absolute; @@ -181,15 +230,18 @@ cursor: pointer; z-index: 1; -webkit-backface-visibility: hidden; - transition: transform 100ms ease; } + transition: transform 100ms ease; +} .owl-carousel .owl-video-play-icon:hover { -ms-transform: scale(1.3, 1.3); - transform: scale(1.3, 1.3); } + transform: scale(1.3, 1.3); +} .owl-carousel .owl-video-playing .owl-video-tn, .owl-carousel .owl-video-playing .owl-video-play-icon { - display: none; } + display: none; +} .owl-carousel .owl-video-tn { opacity: 0; @@ -197,10 +249,12 @@ background-position: center center; background-repeat: no-repeat; background-size: contain; - transition: opacity 400ms ease; } + transition: opacity 400ms ease; +} .owl-carousel .owl-video-frame { position: relative; z-index: 1; height: 100%; - width: 100%; } + width: 100%; +} \ No newline at end of file diff --git a/view/frontend/web/owl.carousel/assets/owl.carousel.min.css b/view/frontend/web/owl.carousel/assets/owl.carousel.min.css index 7cf9b76..104d00c 100644 --- a/view/frontend/web/owl.carousel/assets/owl.carousel.min.css +++ b/view/frontend/web/owl.carousel/assets/owl.carousel.min.css @@ -3,4 +3,4 @@ * Copyright 2013-2018 David Deutsch * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE */ -.owl-carousel{width:100%;-webkit-tap-highlight-color:transparent;position:relative;z-index:1}.owl-carousel:not(.owl-loaded){ display: flex!important; overflow: hidden; opacity: 0; visibility: hidden; } .owl-carousel:not(.owl-loaded) > *{ display: block!important; opacity: 0; visibility: hidden; }.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y;touch-action:manipulation;-moz-backface-visibility:hidden}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-item,.owl-carousel .owl-wrapper,.owl-carousel .product-item{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.owl-carousel .owl-item,.owl-carousel .product-item{position:relative;min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}.owl-carousel .owl-item img,.owl-carousel .product-item img{display:block;width:100%}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.no-js .owl-carousel,.owl-carousel.owl-loaded{display:block}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel .owl-nav button.owl-next,.owl-carousel .owl-nav button.owl-prev,.owl-carousel button.owl-dot{background:0 0;color:inherit;border:none;padding:0!important;font:inherit}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item,.owl-carousel.owl-refresh .product-item{visibility:hidden}.owl-carousel.owl-drag .owl-item,.owl-carousel.owl-drag .product-item{-ms-touch-action:pan-y;touch-action:pan-y;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item,.owl-carousel.owl-rtl .product-item{float:right}.owl-carousel .animated{animation-duration:1s;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{animation-name:fadeOut}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{transition:height .5s ease-in-out}.owl-carousel .owl-item .owl-lazy,.owl-carousel .product-item .owl-lazy{opacity:0;transition:opacity .4s ease}.owl-carousel .owl-item .owl-lazy:not([src]),.owl-carousel .owl-item .owl-lazy[src^=""],.owl-carousel .product-item .owl-lazy:not([src]),.owl-carousel .product-item .owl-lazy[src^=""]{max-height:0}.owl-carousel .owl-item img.owl-lazy,.owl-carousel .product-item img.owl-lazy{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:transform .1s ease}.owl-carousel .owl-video-play-icon:hover{-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%} \ No newline at end of file +.owl-carousel{width:100%;-webkit-tap-highlight-color:transparent;position:relative;z-index:1}.owl-carousel:not(.owl-loaded){display:flex!important;contain:paint;opacity:0;visibility:hidden;}.owl-carousel:not(.owl-loaded) > *{ display: block!important; opacity: 0; visibility: hidden; }.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y;touch-action:manipulation;-moz-backface-visibility:hidden}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;contain:paint;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-item,.owl-carousel .owl-wrapper,.owl-carousel .product-item{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.owl-carousel .owl-item,.owl-carousel .product-item{position:relative;min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}.owl-carousel .owl-item img,.owl-carousel .product-item img{display:block;width:100%}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.no-js .owl-carousel,.owl-carousel.owl-loaded{display:block}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel .owl-nav button.owl-next,.owl-carousel .owl-nav button.owl-prev,.owl-carousel button.owl-dot{background:0 0;color:inherit;border:none;padding:0!important;font:inherit}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item,.owl-carousel.owl-refresh .product-item{visibility:hidden}.owl-carousel.owl-drag .owl-item,.owl-carousel.owl-drag .product-item{-ms-touch-action:pan-y;touch-action:pan-y;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item,.owl-carousel.owl-rtl .product-item{float:right}.owl-carousel .animated{animation-duration:1s;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{animation-name:fadeOut}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{transition:height .5s ease-in-out}.owl-carousel .owl-item .owl-lazy,.owl-carousel .product-item .owl-lazy{opacity:0;transition:opacity .4s ease}.owl-carousel .owl-item .owl-lazy:not([src]),.owl-carousel .owl-item .owl-lazy[src^=""],.owl-carousel .product-item .owl-lazy:not([src]),.owl-carousel .product-item .owl-lazy[src^=""]{max-height:0}.owl-carousel .owl-item img.owl-lazy,.owl-carousel .product-item img.owl-lazy{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:transform .1s ease}.owl-carousel .owl-video-play-icon:hover{-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%} \ No newline at end of file