8889841cShadowImage/ShadowImageFrontend.php000064400000004111150515632730013341 0ustar00addToPlacement($this->key . 'position-', array( $this, 'render' )); } public function render($attributes = array()) { $slider = $this->slider; $id = $this->slider->elementId; $params = $this->params; $shadow = $params->get($this->key . 'shadow-image'); if (empty($shadow)) { $shadow = $params->get($this->key . 'shadow'); if ($shadow == -1) { $shadow = null; } else { $shadow = self::getAssetsUri() . '/shadow/' . basename($shadow); } } if (!$shadow) { return ''; } $slider->addLess(self::getAssetsPath() . '/style.n2less', array( "sliderid" => $slider->elementId )); $displayAttributes = $this->getDisplayAttributes($params, $this->key); $slider->features->addInitCallback("new _N2.SmartSliderWidget(this, 'shadow', '.nextend-shadow');"); $slider->sliderType->addJSDependency('SmartSliderWidget'); $sizeAttributes = array(); FastImageSize::initAttributes(ResourceTranslator::urlToResource($shadow), $sizeAttributes); return Html::tag('div', Html::mergeAttributes($displayAttributes, array( 'class' => "nextend-shadow n2-ow-all" )), Html::image(ResourceTranslator::toUrl($shadow), 'Shadow', $sizeAttributes + Html::addExcludeLazyLoadAttributes(array( 'style' => 'display: block; width:100%;max-width:none;', 'class' => 'nextend-shadow-image', 'loading' => 'lazy' )))); } }ShadowImage/ShadowImage.php000064400000002567150515632730011656 0ustar00 'simple', 'widget-shadow-position-area' => 12, 'widget-shadow-position-stack' => 3, 'widget-shadow-shadow-image' => '', 'widget-shadow-shadow' => '$ss$/plugins/widgetshadow/shadow/shadow/shadow/dark.png' ); public function renderFields($container) { $row1 = new FieldsetRow($container, 'widget-shadow-row-1'); $fieldShadow = new ImageListFromFolder($row1, 'widget-shadow-shadow', n2_('Shadow'), '', array( 'folder' => self::getAssetsPath() . '/shadow/', 'width' => 582, 'column' => 1, 'hasDisabled' => false )); } public function prepareExport($export, $params) { $export->addImage($params->get($this->key . 'shadow-image', '')); } public function prepareImport($import, $params) { $params->set($this->key . 'shadow-image', $import->fixImage($params->get($this->key . 'shadow-image', ''))); } }AbstractWidgetShadow.php000064400000000320150515632730011334 0ustar00