This commit is contained in:
2026-09-15 10:35:56 +08:00
commit 782f8ea7aa
4086 changed files with 631288 additions and 0 deletions
@@ -0,0 +1,50 @@
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<css src="Esun_Homepage::css/catalog-rule-deal.css"/>
<css src="Esun_Homepage::css/hot-sale-filament.css"/>
<css src="Esun_Homepage::css/accessories.css"/>
<css src="Esun_Homepage::css/resin.css"/>
<css src="Esun_Homepage::css/create-anything.css"/>
<css src="Esun_Homepage::css/application.css"/>
<css src="Esun_Homepage::css/innovative-materials.css"/>
<css src="Esun_Homepage::css/landscape-video.css"/>
<css src="Esun_Homepage::css/awards-reviews.css"/>
<css src="Esun_Homepage::css/resources-downloads.css"/>
<css src="Esun_Homepage::css/news-room.css"/>
<css src="Esun_Homepage::css/new-product.css"/>
</head>
<body>
<referenceContainer name="content">
<block class="Esun\Homepage\Block\CatalogRuleDeal" name="esun.homepage.catalog.rule.deal" template="Esun_Homepage::catalog-rule-deal.phtml" after="cms_page" cacheable="true" ttl="600" />
<block class="Esun\Homepage\Block\NewProduct" name="esun.homepage.new.product" template="Esun_Homepage::new-product.phtml" after="esun.homepage.catalog.rule.deal" cacheable="true" ttl="600" />
<block class="Esun\Homepage\Block\HotSaleFilament" name="esun.homepage.hot.sale.filament" template="Esun_Homepage::hot-sale-filament.phtml" after="esun.homepage.new.product" cacheable="true" ttl="600" />
<block class="Esun\Homepage\Block\Accessories" name="esun.homepage.accessories" template="Esun_Homepage::accessories.phtml" after="esun.homepage.hot.sale.filament" cacheable="true" ttl="600" />
<block class="Esun\Homepage\Block\Resin" name="esun.homepage.resin" template="Esun_Homepage::resin.phtml" after="esun.homepage.accessories" cacheable="true" ttl="600" />
<container name="service-guarantee" as="service-guarantee" htmlTag="div" htmlClass="service-guarantee" after="esun.homepage.resin">
<block class="Magento\Cms\Block\Block" name="service_guarantee">
<arguments>
<argument name="block_id" xsi:type="string">service_guarantee</argument>
</arguments>
</block>
</container>
<block class="Esun\Homepage\Block\Application" name="esun.homepage.application" template="Esun_Homepage::application.phtml" after="service-guarantee" cacheable="true" ttl="600" />
<block class="Esun\Homepage\Block\CreateAnything" name="esun.homepage.create.anything" template="Esun_Homepage::create-anything.phtml" after="esun.homepage.application" cacheable="true" ttl="600" />
<block class="Esun\Homepage\Block\InnovativeMaterials" name="esun.homepage.innovative.materials" template="Esun_Homepage::innovative-materials.phtml" after="esun.homepage.create.anything" cacheable="true" ttl="600" />
<block class="Esun\Homepage\Block\LandscapeVideo" name="esun.homepage.landscape.video" template="Esun_Homepage::landscape-video.phtml" after="esun.homepage.innovative.materials" cacheable="true" ttl="600" />
<block class="Esun\Homepage\Block\AwardsReviews" name="esun.homepage.awards.reviews" template="Esun_Homepage::awards-reviews.phtml" after="esun.homepage.landscape.video" cacheable="true" ttl="600" />
<block class="Esun\Homepage\Block\ResourcesDownloads" name="esun.homepage.resources.downloads" template="Esun_Homepage::resources-downloads.phtml" after="esun.homepage.awards.reviews" cacheable="true" ttl="600" />
<block class="Esun\Homepage\Block\NewsRoom" name="esun.homepage.news.room" template="Esun_Homepage::news-room.phtml" after="esun.homepage.resources.downloads" cacheable="true" ttl="600" />
<container name="footer-esun_contactus" as="footer-esun_contactus" htmlTag="div" htmlClass="footer-esun_contactus" after="esun.homepage.news.room">
<block class="Magento\Cms\Block\Block" name="esun_contactus">
<arguments>
<argument name="block_id" xsi:type="string">esun_contactus</argument>
</arguments>
</block>
</container>
</referenceContainer>
</body>
</page>
@@ -0,0 +1,75 @@
<?php
/**
* @var \Esun\Homepage\Block\Accessories $block
* @var \Magento\Framework\Escaper $escaper
*/
$products = $block->getProducts();
if (!$products) {
return;
}
$backgroundImageUrl = $block->getBackgroundImageUrl();
$exploreAllUrl = $block->getExploreAllUrl();
?>
<section class="esun-accessories" aria-labelledby="esun-accessories-title">
<div class="esun-accessories__heading">
<h2 class="typo-section-title" id="esun-accessories-title"><?= $escaper->escapeHtml(__('Accessories')) ?></h2>
<a class="esun-accessories__explore"
href="<?= $exploreAllUrl ? $escaper->escapeUrl($exploreAllUrl) : '#' ?>"
<?= $exploreAllUrl ? '' : 'role="link" aria-disabled="true" onclick="return false;"' ?>>
<?= $escaper->escapeHtml(__('Explore All')) ?>
<span aria-hidden="true">&gt;</span>
</a>
</div>
<div class="esun-accessories__banner"
<?php if ($backgroundImageUrl): ?>
style="background-image: url('<?= $escaper->escapeUrl($backgroundImageUrl) ?>');background-repeat: no-repeat;"
<?php endif; ?>>
<ol class="esun-accessories__products">
<?php foreach ($products as $product): ?>
<li class="esun-accessories__item">
<article class="esun-accessories__card">
<a class="esun-accessories__image"
href="<?= $escaper->escapeUrl($product->getProductUrl()) ?>"
aria-label="<?= $escaper->escapeHtmlAttr($product->getName()) ?>">
<?= /* @noEscape */ $block->getImage($product, 'category_page_grid')->toHtml() ?>
</a>
<div class="esun-accessories__details">
<h3>
<a href="<?= $escaper->escapeUrl($product->getProductUrl()) ?>">
<?= $escaper->escapeHtml($product->getName()) ?>
</a>
</h3>
<div class="esun-accessories__price">
<span class="esun-accessories__final-price">
<?= $escaper->escapeHtml($block->getFormattedFinalPrice($product)) ?>
</span>
<?php if ($block->hasRegularPrice($product)): ?>
<span class="esun-accessories__regular-price">
<?= $escaper->escapeHtml($block->getFormattedRegularPrice($product)) ?>
</span>
<?php endif; ?>
</div>
<a class="esun-accessories__cart"
href="<?= $escaper->escapeUrl($product->getProductUrl()) ?>"
title="<?= $escaper->escapeHtmlAttr(__('View Product')) ?>">
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M3 4h2l2.2 10.2a2 2 0 0 0 2 1.6h7.7a2 2 0 0 0 2-1.6L20 8H7M10 20a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm8 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z" />
</svg>
<span class="esun-accessories__visually-hidden">
<?= $escaper->escapeHtml(__('View Product')) ?>
</span>
</a>
</div>
</article>
</li>
<?php endforeach; ?>
</ol>
</div>
</section>
@@ -0,0 +1,81 @@
<?php
/**
* @var \Esun\Homepage\Block\Application $block
* @var \Magento\Framework\Escaper $escaper
*/
$items = $block->getItems();
if (!$items) {
return;
}
$exploreAllUrl = $block->getExploreAllUrl();
?>
<section class="esun-application" aria-labelledby="esun-application-title">
<div class="esun-application__heading">
<h2 class="typo-section-title" id="esun-application-title"><?= $escaper->escapeHtml(__('Application')) ?></h2>
<div class="esun-application__heading-row">
<?php if ($block->getSubtitle()): ?>
<p class="typo-product-title"><?= $escaper->escapeHtml($block->getSubtitle()) ?></p>
<?php endif; ?>
<a class="esun-application__explore-all"
href="<?= $exploreAllUrl ? $escaper->escapeUrl($exploreAllUrl) : '#' ?>"
<?= $exploreAllUrl ? '' : 'role="link" aria-disabled="true" onclick="return false;"' ?>>
<?= $escaper->escapeHtml(__('Explore All Use Case')) ?>
<span aria-hidden="true">&gt;</span>
</a>
</div>
</div>
<div class="esun-application__items" data-role="esun-application-items">
<?php foreach ($items as $item): ?>
<?php
$thumbnailUrl = (string) ($item['thumbnail_url'] ?: $item['image_url']);
$hasHoverImage = (string) $item['image_url'] !== '';
$linkUrl = trim((string) $item['link_url']);
?>
<article class="esun-application__item<?= $hasHoverImage ? ' esun-application__item--interactive' : '' ?>"
<?= $hasHoverImage ? 'tabindex="0"' : '' ?>>
<?php if ($thumbnailUrl): ?>
<img class="esun-application__thumbnail"
src="<?= $escaper->escapeUrl($thumbnailUrl) ?>"
alt="<?= $escaper->escapeHtmlAttr($item['title']) ?>">
<?php endif; ?>
<?php if ($hasHoverImage): ?>
<img class="esun-application__hover-image"
src="<?= $escaper->escapeUrl($item['image_url']) ?>"
alt="">
<?php endif; ?>
<span class="esun-application__shade" aria-hidden="true"></span>
<div class="esun-application__default-copy">
<?php if ($item['icon_url']): ?>
<span class="esun-application__icon">
<img src="<?= $escaper->escapeUrl($item['icon_url']) ?>" alt="">
</span>
<?php endif; ?>
<h3><?= $escaper->escapeHtml($item['title']) ?></h3>
</div>
<?php if ($hasHoverImage): ?>
<div class="esun-application__hover-copy">
<h3><?= $escaper->escapeHtml($item['title']) ?></h3>
<a class="esun-application__explore"
href="<?= $linkUrl ? $escaper->escapeUrl($linkUrl) : '#' ?>"
<?= $linkUrl ? '' : 'aria-disabled="true" onclick="return false;"' ?>>
<?= $escaper->escapeHtml(__('Explore More')) ?>
</a>
</div>
<?php endif; ?>
</article>
<?php endforeach; ?>
</div>
</section>
<script type="text/x-magento-init">
{
"[data-role=esun-application-items]": {
"Esun_Homepage/js/application": {}
}
}
</script>
@@ -0,0 +1,75 @@
<?php
/**
* @var \Esun\Homepage\Block\AwardsReviews $block
* @var \Magento\Framework\Escaper $escaper
*/
$items = $block->getItems();
if (!$items) {
return;
}
$hasNavigation = count($items) > 1;
?>
<section class="esun-awards-reviews" aria-labelledby="esun-awards-reviews-title">
<div class="esun-awards-reviews__heading">
<h2 class="typo-section-title" id="esun-awards-reviews-title">
<?= $escaper->escapeHtml(__('Awards & Reviews')) ?>
</h2>
<?php if ($hasNavigation): ?>
<div class="esun-awards-reviews__navigation">
<button class="esun-awards-reviews__previous"
type="button"
aria-label="<?= $escaper->escapeHtmlAttr(__('Previous')) ?>">
<span class="arrow-left" aria-hidden="true"></span>
</button>
<button class="esun-awards-reviews__next"
type="button"
aria-label="<?= $escaper->escapeHtmlAttr(__('Next')) ?>">
<span class="arrow-right" aria-hidden="true"></span>
</button>
</div>
<?php endif; ?>
</div>
<div class="esun-awards-reviews__slider swiper-container"
data-role="esun-awards-reviews-slider"
data-has-navigation="<?= $hasNavigation ? 'true' : 'false' ?>">
<div class="swiper-wrapper">
<?php foreach ($items as $item): ?>
<?php $imageUrl = (string) ($item['image_url'] ?: $item['thumbnail_url']); ?>
<article class="esun-awards-reviews__slide swiper-slide">
<div class="esun-awards-reviews__card">
<img class="esun-awards-reviews__thumbnail"
src="<?= $escaper->escapeUrl($item['thumbnail_url']) ?>"
alt="<?= $escaper->escapeHtmlAttr($item['title']) ?>">
<img class="esun-awards-reviews__image"
src="<?= $escaper->escapeUrl($imageUrl) ?>"
alt="<?= $escaper->escapeHtmlAttr($item['title']) ?>">
<div class="esun-awards-reviews__copy">
<?php if ($item['title']): ?>
<h3><?= $escaper->escapeHtml($item['title']) ?></h3>
<?php endif; ?>
<?php if ($item['description']): ?>
<div class="esun-awards-reviews__description">
<?= /* @noEscape */ nl2br($escaper->escapeHtml($item['description'])) ?>
</div>
<?php endif; ?>
</div>
</div>
</article>
<?php endforeach; ?>
</div>
</div>
</section>
<script type="text/x-magento-init">
{
"[data-role=esun-awards-reviews-slider]": {
"Esun_Homepage/js/awards-reviews": {}
}
}
</script>
@@ -0,0 +1,156 @@
<?php
/**
* @var \Esun\Homepage\Block\CatalogRuleDeal $block
* @var \Magento\Framework\Escaper $escaper
*/
if (!$block->isAvailable()) {
return;
}
$products = $block->getProducts();
$maximumDiscount = $block->getMaximumDiscount();
$countdownEnd = $block->getCountdownEnd();
?>
<section class="esun-rule-deal" aria-labelledby="esun-rule-deal-title">
<div class="esun-rule-deal__header">
<div class="esun-rule-deal__tag" aria-hidden="true">
<span>%</span>
</div>
<h2 class="esun-rule-deal__title" id="esun-rule-deal-title">
<?= $escaper->escapeHtml($block->getHeading()) ?>
<?php if ($block->getAccentHeading()): ?>
<span><?= $escaper->escapeHtml($block->getAccentHeading()) ?></span>
<?php endif; ?>
</h2>
<?php if ($countdownEnd): ?>
<div class="esun-rule-deal__countdown"
data-role="esun-rule-countdown"
data-end="<?= $escaper->escapeHtmlAttr($countdownEnd) ?>">
<?php foreach (['days' => __('Days'), 'hours' => __('Hours'), 'minutes' => __('Minutes'), 'seconds' => __('Seconds')] as $unit => $label): ?>
<div class="esun-rule-deal__time">
<strong data-time="<?= $escaper->escapeHtmlAttr($unit) ?>">00</strong>
<span><?= $escaper->escapeHtml($label) ?></span>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php if ($maximumDiscount > 0): ?>
<div class="esun-rule-deal__maximum">
<strong><?= $escaper->escapeHtml($maximumDiscount) ?>%</strong>
<span><?= $escaper->escapeHtml(__('Save Max')) ?></span>
</div>
<?php endif; ?>
</div>
<ol class="esun-rule-deal__products">
<?php foreach ($products as $product): ?>
<?php
$discount = $block->getProductDiscount($product);
$colorSwatches = $block->getColorSwatches($product);
$visibleSwatches = array_slice($colorSwatches, 0, 3);
$remainingSwatches = max(0, count($colorSwatches) - count($visibleSwatches));
?>
<li class="esun-rule-deal__product" data-role="esun-product-card">
<div class="esun-rule-deal__image">
<?php if ($discount > 0): ?>
<span class="esun-rule-deal__discount">
<?= $escaper->escapeHtml(__('%1% OFF', $discount)) ?>
</span>
<?php endif; ?>
<a href="<?= $escaper->escapeUrl($product->getProductUrl()) ?>"
data-role="esun-product-image"
tabindex="-1"
aria-hidden="true">
<?= /* @noEscape */ $block->getImage($product, 'category_page_grid')->toHtml() ?>
</a>
</div>
<div class="esun-rule-deal__details">
<h3>
<a href="<?= $escaper->escapeUrl($product->getProductUrl()) ?>">
<?= $escaper->escapeHtml($product->getName()) ?>
</a>
</h3>
<div class="esun-rule-deal__price">
<span class="esun-rule-deal__final-price">
<?= $escaper->escapeHtml($block->getFormattedFinalPrice($product)) ?>
</span>
<?php if ($block->hasRegularPrice($product)): ?>
<span class="esun-rule-deal__regular-price">
<?= $escaper->escapeHtml($block->getFormattedRegularPrice($product)) ?>
</span>
<?php endif; ?>
</div>
<div class="color-swatches-cart">
<?php if ($colorSwatches): ?>
<div class="esun-rule-deal__swatches"
data-role="esun-product-swatches"
aria-label="<?= $escaper->escapeHtmlAttr(__('Available Colors')) ?>">
<?php foreach ($visibleSwatches as $swatch): ?>
<span class="esun-rule-deal__swatch"
data-product-sku="<?= $escaper->escapeHtmlAttr($swatch['sku']) ?>"
data-child-image="<?= $escaper->escapeUrl($swatch['product_image']) ?>"
title="<?= $escaper->escapeHtmlAttr($swatch['label']) ?>"
aria-label="<?= $escaper->escapeHtmlAttr($swatch['label']) ?>">
<?php if ($swatch['image']): ?>
<img src="<?= $escaper->escapeUrl($swatch['image']) ?>"
alt="<?= $escaper->escapeHtmlAttr($swatch['label']) ?>">
<?php elseif ($swatch['value']): ?>
<span style="background-color: <?= $escaper->escapeHtmlAttr($swatch['value']) ?>"></span>
<?php else: ?>
<span></span>
<?php endif; ?>
</span>
<?php endforeach; ?>
<?php if ($remainingSwatches > 0): ?>
<span class="esun-rule-deal__swatch-more">
+<?= (int) $remainingSwatches ?>
</span>
<?php endif; ?>
</div>
<?php endif; ?>
<div class="esun-rule-deal__actions">
<a class="action tocart primary"
href="<?= $escaper->escapeUrl($product->getProductUrl()) ?>"
title="<?= $escaper->escapeHtmlAttr(__('View Product')) ?>">
<svg class="icon"
viewBox="0 0 1024 1024"
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
aria-hidden="true">
<path d="M97.718857 109.714286a109.714286 109.714286 0 0 1 107.349333 87.064381L220.16 268.190476h0.24381l49.005714 234.666667L306.541714 682.666667h459.678476l70.460953-341.333334H285.500952l-15.286857-73.142857h566.491429a73.142857 73.142857 0 0 1 71.631238 87.942095l-70.460952 341.333334A73.142857 73.142857 0 0 1 766.22019 755.809524H306.541714a73.142857 73.142857 0 0 1-71.631238-58.343619l-69.241905-335.335619-0.463238 0.097524-31.695238-150.357334A36.571429 36.571429 0 0 0 97.718857 182.857143H35.157333v-73.142857zM304.761905 926.47619a60.952381 60.952381 0 1 0 0-121.904761 60.952381 60.952381 0 0 0 0 121.904761z m438.857143 0a60.952381 60.952381 0 1 0 0-121.904761 60.952381 60.952381 0 0 0 0 121.904761z"></path>
</svg>
<span class="esun-rule-deal__visually-hidden">
<?= $escaper->escapeHtml(__('View Product')) ?>
</span>
</a>
</div>
</div>
</div>
</li>
<?php endforeach; ?>
</ol>
</section>
<?php if ($countdownEnd): ?>
<script type="text/x-magento-init">
{
"[data-role=esun-rule-countdown]": {
"Esun_Homepage/js/countdown": {}
}
}
</script>
<?php endif; ?>
<script type="text/x-magento-init">
{
".esun-rule-deal": {
"Esun_Homepage/js/product-swatch-image": {}
}
}
</script>
@@ -0,0 +1,100 @@
<?php
/**
* @var \Esun\Homepage\Block\CreateAnything $block
* @var \Magento\Framework\Escaper $escaper
*/
$items = $block->getItems();
if (!$items) {
return;
}
$hasNavigation = count($items) > 4;
?>
<section class="esun-create-anything" aria-labelledby="esun-create-anything-title">
<h2 class="esun-create-anything__heading typo-section-title" id="esun-create-anything-title">
<?= $escaper->escapeHtml(__('Create Anything You Imagine')) ?>
</h2>
<div class="esun-create-anything__slider swiper-container"
data-role="esun-create-anything-slider"
data-has-navigation="<?= $hasNavigation ? 'true' : 'false' ?>">
<div class="swiper-wrapper">
<?php foreach ($items as $item): ?>
<?php /** @var \Magento\Catalog\Model\Product $product */ ?>
<?php $product = $item['product']; ?>
<article class="esun-create-anything__slide swiper-slide">
<div class="esun-create-anything__media"
data-role="esun-create-anything-video"
data-video-url="<?= $escaper->escapeUrl($item['video_url']) ?>">
<?php if ($item['cover_url']): ?>
<img class="esun-create-anything__cover"
src="<?= $escaper->escapeUrl($item['cover_url']) ?>"
alt="<?= $escaper->escapeHtmlAttr($item['title']) ?>">
<?php endif; ?>
<video class="esun-create-anything__video"
muted
playsinline
preload="auto"
src="<?= $escaper->escapeUrl($item['video_url']) ?>"></video>
<div class="esun-create-anything__copy">
<h3><?= $escaper->escapeHtml($item['title']) ?></h3>
<?php if ($item['subtitle']): ?>
<p><?= $escaper->escapeHtml($item['subtitle']) ?></p>
<?php endif; ?>
</div>
<a class="esun-create-anything__product"
href="<?= $escaper->escapeUrl($product->getProductUrl()) ?>">
<span class="esun-create-anything__product-image">
<?= /* @noEscape */ $block->getImage($product, 'category_page_grid')->toHtml() ?>
</span>
<span class="esun-create-anything__product-copy">
<strong><?= $escaper->escapeHtml($product->getName()) ?></strong>
<span class="esun-create-anything__price">
<span class="esun-create-anything__final-price">
<?= $escaper->escapeHtml($block->getFormattedFinalPrice($product)) ?>
</span>
<?php if ($block->hasRegularPrice($product)): ?>
<span class="esun-create-anything__regular-price">
<?= $escaper->escapeHtml($block->getFormattedRegularPrice($product)) ?>
</span>
<?php endif; ?>
</span>
</span>
</a>
</div>
</article>
<?php endforeach; ?>
</div>
<?php if ($hasNavigation): ?>
<div class="esun-create-anything__controls">
<button class="esun-create-anything__previous"
type="button"
aria-label="<?= $escaper->escapeHtmlAttr(__('Previous')) ?>">
<span aria-hidden="true">&lsaquo;</span>
</button>
<div class="esun-create-anything__pagination swiper-pagination"></div>
<button class="esun-create-anything__next"
type="button"
aria-label="<?= $escaper->escapeHtmlAttr(__('Next')) ?>">
<span aria-hidden="true">&rsaquo;</span>
</button>
</div>
<?php endif; ?>
</div>
</section>
<script type="text/x-magento-init">
{
"[data-role=esun-create-anything-slider]": {
"Esun_Homepage/js/create-anything": {}
},
"[data-role=esun-create-anything-video]": {
"Esun_Homepage/js/video-hover": {}
}
}
</script>
@@ -0,0 +1,157 @@
<?php
/**
* @var \Esun\Homepage\Block\HotSaleFilament $block
* @var \Magento\Framework\Escaper $escaper
*/
$products = $block->getProducts();
if (!$products) {
return;
}
$pages = [array_slice($products, 0, 7)];
$remainingProducts = array_slice($products, 7);
foreach (array_chunk($remainingProducts, 8) as $pageProducts) {
$pages[] = $pageProducts;
}
$hasPagination = count($pages) > 1;
$exploreAllUrl = $block->getExploreAllUrl();
?>
<?php if (count($products) > 0) : ?>
<section class="esun-hot-sale" aria-labelledby="esun-hot-sale-title">
<div class="esun-hot-sale__heading">
<h2 class="typo-section-title" id="esun-hot-sale-title"><?= $escaper->escapeHtml(__('Hot Sale Filaments')) ?></h2>
<div class="esun-hot-sale__heading-row">
<?php if ($block->getSubtitle()): ?>
<p class="typo-product-title"><?= $escaper->escapeHtml($block->getSubtitle()) ?></p>
<?php endif; ?>
<a class="esun-hot-sale__explore"
href="<?= $exploreAllUrl ? $escaper->escapeUrl($exploreAllUrl) : '#' ?>"
<?= $exploreAllUrl ? '' : 'role="link" aria-disabled="true" onclick="return false;"' ?>>
<?= $escaper->escapeHtml(__('Explore All')) ?>
<span aria-hidden="true">&gt;</span>
</a>
</div>
</div>
<div class="esun-hot-sale__slider swiper-container"
data-role="esun-hot-sale-slider"
data-has-pagination="<?= $hasPagination ? 'true' : 'false' ?>">
<div class="swiper-wrapper">
<?php foreach ($pages as $pageIndex => $pageProducts): ?>
<div class="esun-hot-sale__page swiper-slide">
<ol class="esun-hot-sale__grid">
<?php foreach ($pageProducts as $productIndex => $product): ?>
<?php
$isFeatured = $pageIndex === 0 && $productIndex === 0;
$colorSwatches = $block->getColorSwatches($product);
$visibleSwatches = array_slice($colorSwatches, 0, 11);
$remainingSwatches = max(0, count($colorSwatches) - count($visibleSwatches));
$shortDescription = $isFeatured ? $block->getShortDescription($product) : '';
?>
<li class="esun-hot-sale__item<?= $isFeatured ? ' esun-hot-sale__item--featured' : '' ?>">
<article class="esun-hot-sale__card" data-role="esun-product-card">
<a class="esun-hot-sale__image"
href="<?= $escaper->escapeUrl($product->getProductUrl()) ?>"
data-role="esun-product-image"
aria-label="<?= $escaper->escapeHtmlAttr($product->getName()) ?>">
<?= /* @noEscape */ $block->getImage(
$product,
$isFeatured ? 'product_page_image_large' : 'category_page_grid'
)->toHtml() ?>
</a>
<div class="esun-hot-sale__details">
<h3>
<a href="<?= $escaper->escapeUrl($product->getProductUrl()) ?>">
<?= $escaper->escapeHtml($product->getName()) ?>
</a>
</h3>
<?php if ($shortDescription): ?>
<p class="esun-hot-sale__description">
<?= $escaper->escapeHtml($shortDescription) ?>
</p>
<?php endif; ?>
<?php if ($colorSwatches): ?>
<div class="esun-hot-sale__swatches"
data-role="esun-product-swatches"
aria-label="<?= $escaper->escapeHtmlAttr(__('Available Colors')) ?>">
<?php foreach ($visibleSwatches as $swatch): ?>
<span class="esun-hot-sale__swatch"
data-child-image="<?= $escaper->escapeUrl($isFeatured ? $swatch['product_image_large'] : $swatch['product_image']) ?>"
title="<?= $escaper->escapeHtmlAttr($swatch['label']) ?>"
aria-label="<?= $escaper->escapeHtmlAttr($swatch['label']) ?>">
<?php if ($swatch['image']): ?>
<img src="<?= $escaper->escapeUrl($swatch['image']) ?>"
alt="<?= $escaper->escapeHtmlAttr($swatch['label']) ?>">
<?php elseif ($swatch['value']): ?>
<span style="background-color: <?= $escaper->escapeHtmlAttr($swatch['value']) ?>"></span>
<?php else: ?>
<span></span>
<?php endif; ?>
</span>
<?php endforeach; ?>
<?php if ($remainingSwatches > 0): ?>
<span class="esun-hot-sale__swatch-more">
+<?= (int) $remainingSwatches ?>
</span>
<?php endif; ?>
</div>
<?php endif; ?>
<div class="esun-hot-sale__footer">
<div class="esun-hot-sale__price">
<span class="esun-hot-sale__final-price">
<?= $escaper->escapeHtml($block->getFormattedFinalPrice($product)) ?>
</span>
<?php if ($block->hasRegularPrice($product)): ?>
<span class="esun-hot-sale__regular-price">
<?= $escaper->escapeHtml($block->getFormattedRegularPrice($product)) ?>
</span>
<?php endif; ?>
</div>
<a class="esun-hot-sale__cart"
href="<?= $escaper->escapeUrl($product->getProductUrl()) ?>"
title="<?= $escaper->escapeHtmlAttr(__('View Product')) ?>">
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M3 4h2l2.2 10.2a2 2 0 0 0 2 1.6h7.7a2 2 0 0 0 2-1.6L20 8H7M10 20a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm8 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z" />
</svg>
<span class="esun-hot-sale__visually-hidden">
<?= $escaper->escapeHtml(__('View Product')) ?>
</span>
</a>
</div>
</div>
</article>
</li>
<?php endforeach; ?>
</ol>
</div>
<?php endforeach; ?>
</div>
<?php if ($hasPagination): ?>
<div class="esun-hot-sale__pagination swiper-pagination"></div>
<?php endif; ?>
</div>
</section>
<?php if ($hasPagination): ?>
<script type="text/x-magento-init">
{
"[data-role=esun-hot-sale-slider]": {
"Esun_Homepage/js/hot-sale-filament": {}
}
}
</script>
<?php endif; ?>
<script type="text/x-magento-init">
{
".esun-hot-sale": {
"Esun_Homepage/js/product-swatch-image": {}
}
}
</script>
<?php endif; ?>
@@ -0,0 +1,53 @@
<?php
/**
* @var \Esun\Homepage\Block\InnovativeMaterials $block
* @var \Magento\Framework\Escaper $escaper
*/
$items = $block->getItems();
if (!$items) {
return;
}
?>
<section class="esun-innovative-materials" aria-labelledby="esun-innovative-materials-title">
<div class="esun-innovative-materials__inner">
<h2 id="esun-innovative-materials-title">
<?= $escaper->escapeHtml(__('Innovative Materials,')) ?><br>
<?= $escaper->escapeHtml(__('Creative Life')) ?>
</h2>
<div class="esun-innovative-materials__items"
data-role="esun-innovative-materials-items">
<?php foreach ($items as $item): ?>
<?php
$thumbnailUrl = trim((string) $item['thumbnail_url']);
$imageUrl = trim((string) $item['image_url']);
$hasHoverImage = $imageUrl !== '';
?>
<?php if ($thumbnailUrl): ?>
<article class="esun-innovative-materials__item<?= $hasHoverImage
? ' esun-innovative-materials__item--interactive'
: '' ?>"
<?= $hasHoverImage ? 'tabindex="0"' : '' ?>>
<img class="esun-innovative-materials__thumbnail"
src="<?= $escaper->escapeUrl($thumbnailUrl) ?>"
alt="<?= $escaper->escapeHtmlAttr($item['title']) ?>">
<?php if ($hasHoverImage): ?>
<img class="esun-innovative-materials__hover-image"
src="<?= $escaper->escapeUrl($imageUrl) ?>"
alt="<?= $escaper->escapeHtmlAttr($item['title']) ?>">
<?php endif; ?>
</article>
<?php endif; ?>
<?php endforeach; ?>
</div>
</div>
</section>
<script type="text/x-magento-init">
{
"[data-role=esun-innovative-materials-items]": {
"Esun_Homepage/js/innovative-materials": {}
}
}
</script>
@@ -0,0 +1,69 @@
<?php
/**
* @var \Esun\Homepage\Block\LandscapeVideo $block
* @var \Magento\Framework\Escaper $escaper
*/
$item = $block->getItem();
if (!$item) {
return;
}
/** @var \Magento\Catalog\Model\Product $product */
$product = $item['product'];
?>
<section class="esun-landscape-video">
<div class="esun-landscape-video__media"
data-role="esun-landscape-video"
data-video-url="<?= $escaper->escapeUrl($item['video_url']) ?>">
<img class="esun-landscape-video__cover"
src="<?= $escaper->escapeUrl($item['cover_url']) ?>"
alt="">
<video class="esun-landscape-video__video"
muted
playsinline
preload="auto"
src="<?= $escaper->escapeUrl($item['video_url']) ?>"></video>
<div class="esun-landscape-video__product">
<a class="esun-landscape-video__product-image"
href="<?= $escaper->escapeUrl($product->getProductUrl()) ?>">
<?= /* @noEscape */ $block->getImage($product, 'category_page_grid')->toHtml() ?>
</a>
<div class="esun-landscape-video__product-copy">
<a class="esun-landscape-video__product-name"
href="<?= $escaper->escapeUrl($product->getProductUrl()) ?>">
<?= $escaper->escapeHtml($product->getName()) ?>
</a>
<div class="esun-landscape-video__price">
<span class="esun-landscape-video__final-price">
<?= $escaper->escapeHtml($block->getFormattedFinalPrice($product)) ?>
</span>
<?php if ($block->hasRegularPrice($product)): ?>
<span class="esun-landscape-video__regular-price">
<?= $escaper->escapeHtml($block->getFormattedRegularPrice($product)) ?>
</span>
<?php endif; ?>
</div>
</div>
<a class="esun-landscape-video__cart"
href="<?= $escaper->escapeUrl($product->getProductUrl()) ?>"
title="<?= $escaper->escapeHtmlAttr(__('View Product')) ?>">
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M3 4h2l2.2 10.2a2 2 0 0 0 2 1.6h7.7a2 2 0 0 0 2-1.6L20 8H7M10 20a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm8 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"/>
</svg>
<span class="esun-landscape-video__visually-hidden">
<?= $escaper->escapeHtml(__('View Product')) ?>
</span>
</a>
</div>
</div>
</section>
<script type="text/x-magento-init">
{
"[data-role=esun-landscape-video]": {
"Esun_Homepage/js/video-hover": {}
}
}
</script>
@@ -0,0 +1,123 @@
<?php
/**
* @var \Esun\Homepage\Block\NewProduct $block
* @var \Magento\Framework\Escaper $escaper
*/
$products = $block->getProducts();
if (!$products) {
return;
}
?>
<section class="esun-new-product" aria-labelledby="esun-new-product-title">
<h2 class="esun-new-product__title typo-section-title" id="esun-new-product-title">
<?= $escaper->escapeHtml(__('New Product')) ?>
</h2>
<div class="esun-new-product__slider swiper-container" data-role="esun-new-product-slider">
<div class="swiper-wrapper">
<?php foreach ($products as $product): ?>
<?php
$canBuyFromList = $product->getTypeInstance()->isPossibleBuyFromList($product);
$featureContent = $block->getFeatureContent($product);
$galleryContent = $block->getGalleryContent($product);
?>
<article class="esun-new-product__slide swiper-slide">
<div class="esun-new-product__product-card">
<div class="esun-new-product__copy">
<div>
<span class="esun-new-product__series">
<?= $escaper->escapeHtml(__('Flagship Series')) ?>
</span>
<h3>
<a href="<?= $escaper->escapeUrl($product->getProductUrl()) ?>">
<?= $escaper->escapeHtml($product->getName()) ?>
</a>
</h3>
</div>
<div class="esun-new-product__actions">
<a class="esun-new-product__buy"
href="<?= $escaper->escapeUrl($product->getProductUrl()) ?>">
<?= $escaper->escapeHtml(__('Buy Now')) ?>
</a>
<?php if ($product->isSaleable()): ?>
<?php if ($canBuyFromList): ?>
<form data-role="tocart-form"
data-product-sku="<?= $escaper->escapeHtmlAttr($product->getSku()) ?>"
action="<?= $escaper->escapeUrl($block->getAddToCartUrl($product)) ?>"
method="post">
<input type="hidden" name="product" value="<?= (int) $product->getId() ?>">
<?= $block->getBlockHtml('formkey') ?>
<button class="esun-new-product__cart"
type="submit"
title="<?= $escaper->escapeHtmlAttr(__('Add to Cart')) ?>">
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M3 4h2l2.2 10.2a2 2 0 0 0 2 1.6h7.7a2 2 0 0 0 2-1.6L20 8H7M10 20a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm8 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z" />
</svg>
<span class="esun-new-product__visually-hidden">
<?= $escaper->escapeHtml(__('Add to Cart')) ?>
</span>
</button>
</form>
<?php else: ?>
<a class="esun-new-product__cart"
href="<?= $escaper->escapeUrl($product->getProductUrl()) ?>"
title="<?= $escaper->escapeHtmlAttr(__('Choose Options')) ?>">
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M3 4h2l2.2 10.2a2 2 0 0 0 2 1.6h7.7a2 2 0 0 0 2-1.6L20 8H7M10 20a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm8 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z" />
</svg>
<span class="esun-new-product__visually-hidden">
<?= $escaper->escapeHtml(__('Choose Options')) ?>
</span>
</a>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
<a class="esun-new-product__image"
href="<?= $escaper->escapeUrl($product->getProductUrl()) ?>"
tabindex="-1"
aria-hidden="true">
<?= /* @noEscape */ $block->getImage($product, 'product_page_image_large')->toHtml() ?>
</a>
</div>
<div class="esun-new-product__content">
<div class="esun-new-product__features">
<?= /* @noEscape */ $featureContent ?>
</div>
<div class="esun-new-product__gallery">
<?= /* @noEscape */ $galleryContent ?>
</div>
</div>
</article>
<?php endforeach; ?>
</div>
<button class="esun-new-product__previous"
type="button"
aria-label="<?= $escaper->escapeHtmlAttr(__('Previous')) ?>">
<span class="arrow-left" aria-hidden="true"></span>
</button>
<div class="esun-new-product__pagination swiper-pagination"></div>
<button class="esun-new-product__next"
type="button"
aria-label="<?= $escaper->escapeHtmlAttr(__('Next')) ?>">
<span class="arrow-right" aria-hidden="true"></span>
</button>
</div>
</section>
<script type="text/x-magento-init">
{
"[data-role=esun-new-product-slider]": {
"Esun_Homepage/js/new-product": {}
},
".esun-new-product [data-role=tocart-form]": {
"catalogAddToCart": {}
}
}
</script>
@@ -0,0 +1,88 @@
<?php
/**
* @var \Esun\Homepage\Block\NewsRoom $block
* @var \Magento\Framework\Escaper $escaper
*/
$items = $block->getItems();
if (!$items) {
return;
}
$pages = array_chunk($items, 4);
$hasNavigation = count($pages) > 1;
?>
<section class="esun-news-room" aria-labelledby="esun-news-room-title">
<div class="esun-news-room__heading">
<h2 class="typo-section-title" id="esun-news-room-title">
<?= $escaper->escapeHtml(__('News Room')) ?>
</h2>
<?php if ($hasNavigation): ?>
<div class="esun-news-room__navigation">
<button class="esun-news-room__previous"
type="button"
aria-label="<?= $escaper->escapeHtmlAttr(__('Previous')) ?>">
<span class="arrow-left" aria-hidden="true"></span>
</button>
<button class="esun-news-room__next"
type="button"
aria-label="<?= $escaper->escapeHtmlAttr(__('Next')) ?>">
<span class="arrow-right" aria-hidden="true"></span>
</button>
</div>
<?php endif; ?>
</div>
<div class="esun-news-room__slider swiper-container"
data-role="esun-news-room-slider"
data-has-navigation="<?= $hasNavigation ? 'true' : 'false' ?>">
<div class="swiper-wrapper">
<?php foreach ($pages as $pageItems): ?>
<div class="esun-news-room__page swiper-slide">
<div class="esun-news-room__grid">
<?php foreach ($pageItems as $item): ?>
<article class="esun-news-room__slide">
<a class="esun-news-room__card" href="<?= $escaper->escapeUrl($item['url']) ?>">
<span class="esun-news-room__image-wrap">
<img class="esun-news-room__image"
src="<?= $escaper->escapeUrl($item['image_url']) ?>"
alt="<?= $escaper->escapeHtmlAttr($item['title']) ?>">
</span>
<span class="esun-news-room__meta">
<?php if ($item['publish_date']): ?>
<time datetime="<?= $escaper->escapeHtmlAttr($item['publish_date_iso']) ?>">
<?= $escaper->escapeHtml($item['publish_date']) ?>
</time>
<?php endif; ?>
<?php if ($item['tag_name']): ?>
<span class="esun-news-room__category">
<?= $escaper->escapeHtml($item['tag_name']) ?>
</span>
<?php endif; ?>
</span>
<span class="esun-news-room__title">
<?= $escaper->escapeHtml($item['title']) ?>
</span>
</a>
</article>
<?php endforeach; ?>
</div>
</div>
<?php endforeach; ?>
</div>
<?php if ($hasNavigation): ?>
<div class="esun-news-room__pagination swiper-pagination"></div>
<?php endif; ?>
</div>
</section>
<script type="text/x-magento-init">
{
"[data-role=esun-news-room-slider]": {
"Esun_Homepage/js/news-room": {}
}
}
</script>
@@ -0,0 +1,125 @@
<?php
/**
* @var \Esun\Homepage\Block\Resin $block
* @var \Magento\Framework\Escaper $escaper
*/
$products = $block->getProducts();
if (!$products) {
return;
}
$backgroundImageUrl = $block->getBackgroundImageUrl();
$exploreAllUrl = $block->getExploreAllUrl();
?>
<section class="esun-resin" aria-labelledby="esun-resin-title">
<div class="esun-resin__heading">
<h2 class="typo-section-title" id="esun-resin-title"><?= $escaper->escapeHtml(__('3D Resin')) ?></h2>
<a class="esun-resin__explore"
href="<?= $exploreAllUrl ? $escaper->escapeUrl($exploreAllUrl) : '#' ?>"
<?= $exploreAllUrl ? '' : 'role="link" aria-disabled="true" onclick="return false;"' ?>>
<?= $escaper->escapeHtml(__('Explore All')) ?>
<span aria-hidden="true">&gt;</span>
</a>
</div>
<div class="esun-resin__banner"
<?php if ($backgroundImageUrl): ?>
style="background-image: url('<?= $escaper->escapeUrl($backgroundImageUrl) ?>');"
<?php endif; ?>>
<ol class="esun-resin__products">
<?php foreach ($products as $product): ?>
<?php
$colorSwatches = $block->getColorSwatches($product);
$visibleSwatches = array_slice($colorSwatches, 0, 3);
$remainingSwatches = max(0, count($colorSwatches) - count($visibleSwatches));
$shortDescription = $block->getShortDescription($product);
?>
<li class="esun-resin__item">
<article class="esun-resin__card" data-role="esun-product-card">
<a class="esun-resin__image"
href="<?= $escaper->escapeUrl($product->getProductUrl()) ?>"
data-role="esun-product-image"
aria-label="<?= $escaper->escapeHtmlAttr($product->getName()) ?>">
<?= /* @noEscape */ $block->getImage($product, 'category_page_grid')->toHtml() ?>
</a>
<div class="esun-resin__details">
<h3>
<a href="<?= $escaper->escapeUrl($product->getProductUrl()) ?>">
<?= $escaper->escapeHtml($product->getName()) ?>
</a>
</h3>
<?php if ($shortDescription): ?>
<p class="esun-resin__description">
<?= $escaper->escapeHtml($shortDescription) ?>
</p>
<?php endif; ?>
<div class="esun-resin__price">
<span class="esun-resin__final-price">
<?= $escaper->escapeHtml($block->getFormattedFinalPrice($product)) ?>
</span>
<?php if ($block->hasRegularPrice($product)): ?>
<span class="esun-resin__regular-price">
<?= $escaper->escapeHtml($block->getFormattedRegularPrice($product)) ?>
</span>
<?php endif; ?>
</div>
<div class="esun-resin__footer">
<?php if ($colorSwatches): ?>
<div class="esun-resin__swatches"
data-role="esun-product-swatches"
aria-label="<?= $escaper->escapeHtmlAttr(__('Available Colors')) ?>">
<?php foreach ($visibleSwatches as $swatch): ?>
<span class="esun-resin__swatch"
data-child-image="<?= $escaper->escapeUrl($swatch['product_image']) ?>"
title="<?= $escaper->escapeHtmlAttr($swatch['label']) ?>"
aria-label="<?= $escaper->escapeHtmlAttr($swatch['label']) ?>">
<?php if ($swatch['image']): ?>
<img src="<?= $escaper->escapeUrl($swatch['image']) ?>"
alt="<?= $escaper->escapeHtmlAttr($swatch['label']) ?>">
<?php elseif ($swatch['value']): ?>
<span style="background-color: <?= $escaper->escapeHtmlAttr($swatch['value']) ?>"></span>
<?php else: ?>
<span></span>
<?php endif; ?>
</span>
<?php endforeach; ?>
<?php if ($remainingSwatches > 0): ?>
<span class="esun-resin__swatch-more">
+<?= (int) $remainingSwatches ?>
</span>
<?php endif; ?>
</div>
<?php endif; ?>
<a class="esun-resin__cart"
href="<?= $escaper->escapeUrl($product->getProductUrl()) ?>"
title="<?= $escaper->escapeHtmlAttr(__('View Product')) ?>">
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M3 4h2l2.2 10.2a2 2 0 0 0 2 1.6h7.7a2 2 0 0 0 2-1.6L20 8H7M10 20a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm8 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z" />
</svg>
<span class="esun-resin__visually-hidden">
<?= $escaper->escapeHtml(__('View Product')) ?>
</span>
</a>
</div>
</div>
</article>
</li>
<?php endforeach; ?>
</ol>
</div>
</section>
<script type="text/x-magento-init">
{
".esun-resin": {
"Esun_Homepage/js/product-swatch-image": {}
}
}
</script>
@@ -0,0 +1,43 @@
<?php
/**
* @var \Esun\Homepage\Block\ResourcesDownloads $block
* @var \Magento\Framework\Escaper $escaper
*/
$items = $block->getItems();
if (!$items) {
return;
}
?>
<section class="esun-resources-downloads" aria-labelledby="esun-resources-downloads-title">
<h2 class="typo-section-title" id="esun-resources-downloads-title">
<?= $escaper->escapeHtml(__('Resources & Downloads')) ?>
</h2>
<div class="esun-resources-downloads__items">
<?php foreach ($items as $item): ?>
<?php $linkUrl = trim((string) $item['link_url']); ?>
<article class="esun-resources-downloads__item">
<?php if ($linkUrl): ?>
<a class="esun-resources-downloads__link"
href="<?= $escaper->escapeUrl($linkUrl) ?>"
aria-label="<?= $escaper->escapeHtmlAttr(__('Open %1', $item['title'])) ?>">
<span aria-hidden="true">↗</span>
</a>
<?php else: ?>
<span class="esun-resources-downloads__link esun-resources-downloads__link--disabled"
aria-hidden="true">↗</span>
<?php endif; ?>
<img class="esun-resources-downloads__image"
src="<?= $escaper->escapeUrl($item['thumbnail_url']) ?>"
alt="<?= $escaper->escapeHtmlAttr($item['title']) ?>">
<?php if ($item['title']): ?>
<h3><?= $escaper->escapeHtml($item['title']) ?></h3>
<?php endif; ?>
</article>
<?php endforeach; ?>
</div>
</section>
@@ -0,0 +1,288 @@
.esun-accessories {
--accessories-green: #12ad5c;
box-sizing: border-box;
margin: 76px auto 0;
max-width: 1360px;
padding: 0 20px;
position: relative;
}
.esun-accessories *,
.esun-accessories *::before,
.esun-accessories *::after {
box-sizing: border-box;
}
.esun-accessories__heading {
align-items: flex-start;
display: flex;
justify-content: space-between;
margin-bottom: 36px;
}
.esun-accessories__heading h2 {
color: #303030;
font-size: 36px;
font-weight: 700;
letter-spacing: 5px;
margin: 0;
position: relative;
text-transform: uppercase;
}
.esun-accessories__heading h2::after {
background: var(--accessories-green);
bottom: -20px;
content: "";
height: 2px;
left: 0;
position: absolute;
width: 56px;
}
.esun-accessories__explore {
align-items: center;
color: var(--accessories-green);
display: inline-flex;
flex: 0 0 auto;
font-size: 14px;
font-weight: 700;
gap: 12px;
margin-top: 35px;
text-decoration: none;
}
.esun-accessories__explore:hover,
.esun-accessories__explore:focus {
color: #0c914c;
text-decoration: none;
}
.esun-accessories__explore span {
font-size: 18px;
line-height: 1;
}
.esun-accessories__banner {
background-color: #d7e5eb;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
border-radius: 40px;
min-height: 240px;
overflow: hidden;
padding: 38px 42px 38px 42%;
}
.esun-accessories__products {
display: flex;
gap: 16px;
list-style: none;
margin: 0;
overflow-x: auto;
padding: 0 0 3px;
scrollbar-width: thin;
}
.esun-accessories__item {
flex: 0 0 calc((100% - 16px) / 2);
min-width: 330px;
margin: 0;
}
.esun-accessories__card {
background: #fff;
border-radius: 24px;
display: grid;
grid-template-columns: 130px minmax(0, 1fr);
min-height: 174px;
overflow: hidden;
padding: 22px 22px 22px 28px;
}
.esun-accessories__image {
align-self: center;
display: block;
height: 130px;
overflow: hidden;
border-radius: 10px;
position: relative;
}
.esun-accessories__image .product-image-container,
.esun-accessories__image .product-image-wrapper {
height: 100%;
width: 100% !important;
}
.esun-accessories__image .product-image-wrapper {
padding-bottom: 0 !important;
}
.esun-accessories__image .product-image-photo {
height: 100%;
inset: 0;
margin: auto;
max-height: none;
object-fit: cover;
position: absolute;
width: 100%;
}
.esun-accessories__details {
min-width: 0;
padding: 4px 0 0 22px;
position: relative;
}
.esun-accessories__details h3 {
font-size: 18px;
font-weight: 600;
margin: 0 0 15px;
padding-right: 4px;
}
.esun-accessories__details h3 a {
color: #333;
text-decoration: none;
}
.esun-accessories__details h3 a:hover,
.esun-accessories__details h3 a:focus {
color: var(--accessories-green);
text-decoration: none;
}
.esun-accessories__price {
align-items: baseline;
display: flex;
flex-wrap: wrap;
gap: 8px;
padding-right: 48px;
}
.esun-accessories__final-price {
color: var(--accessories-green);
font-size: 22px;
font-weight: 600;
}
.esun-accessories__regular-price {
color: #98a5ae;
font-size: 12px;
text-decoration: line-through;
}
.esun-accessories__cart {
align-items: center;
background: var(--accessories-green);
border-radius: 50%;
bottom: 0;
color: #fff;
display: inline-flex;
height: 40px;
justify-content: center;
position: absolute;
right: 0;
text-decoration: none;
width: 40px;
}
.esun-accessories__cart:hover,
.esun-accessories__cart:focus {
background: #0c914c;
color: #fff;
text-decoration: none;
}
.esun-accessories__cart svg {
fill: none;
height: 20px;
stroke: #fff;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 1.7;
width: 20px;
}
.esun-accessories__visually-hidden {
clip: rect(0, 0, 0, 0);
clip-path: inset(50%);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}
@media (max-width: 1199px) {
.esun-accessories__banner {
padding-left: 34%;
}
.esun-accessories__item {
flex-basis: 390px;
}
}
@media (max-width: 899px) {
.esun-accessories__banner {
background-position: left center;
padding-left: 28%;
}
.esun-accessories__item {
flex-basis: 360px;
}
}
@media (max-width: 639px) {
.esun-accessories {
margin-top: 48px;
padding: 0 15px;
}
.esun-accessories__heading {
margin-bottom: 42px;
}
.esun-accessories__heading h2 {
font-size: 28px;
letter-spacing: 3px;
}
.esun-accessories__explore {
font-size: 13px;
margin-top: 12px;
}
.esun-accessories__banner {
background-position: center left;
background-size: cover;
border-radius: 28px;
padding: 210px 16px 20px;
}
.esun-accessories__item {
flex-basis: min(330px, calc(100vw - 62px));
min-width: min(330px, calc(100vw - 62px));
}
.esun-accessories__card {
grid-template-columns: 105px minmax(0, 1fr);
min-height: 150px;
padding: 18px;
}
.esun-accessories__image {
height: 110px;
}
.esun-accessories__details {
padding-left: 16px;
}
.esun-accessories__details h3 {
font-size: 18px;
}
}
@@ -0,0 +1,328 @@
.esun-application {
--application-green: #12ad5c;
box-sizing: border-box;
margin: 84px auto 0;
max-width: 1360px;
padding: 0 20px;
}
.esun-application *,
.esun-application *::before,
.esun-application *::after {
box-sizing: border-box;
}
.esun-application__heading {
margin-bottom: 70px;
}
.esun-application__heading h2 {
color: #303030;
font-size: 36px;
font-weight: 700;
letter-spacing: 5px;
margin: 0 0 46px;
position: relative;
text-transform: uppercase;
}
.esun-application__heading h2::after {
background: var(--application-green);
bottom: -20px;
content: "";
height: 2px;
left: 0;
position: absolute;
width: 70px;
}
.esun-application__heading-row {
align-items: center;
display: flex;
gap: 24px;
justify-content: space-between;
}
.esun-application__heading p {
color: #94a8c3;
font-size: 17px;
font-weight: 600;
margin: 0;
}
.esun-application__explore-all {
align-items: center;
color: #18a957 !important;
display: inline-flex;
flex: 0 0 auto;
font-size: 14px;
font-weight: 700;
gap: 12px;
text-decoration: none;
}
.esun-application__explore-all:hover,
.esun-application__explore-all:focus {
color: #000 !important;
text-decoration: none;
}
.esun-application__items {
display: flex;
gap: 16px;
min-height: 590px;
overflow: hidden;
}
.esun-application__item {
background: #252525;
border-radius: 34px;
flex-basis: 0;
flex-grow: 1;
flex-shrink: 1;
min-width: 0;
overflow: hidden;
position: relative;
transition:
flex-basis 0.48s ease,
flex-grow 0.48s ease,
filter 0.4s ease,
opacity 0.4s ease;
}
.esun-application__thumbnail,
.esun-application__hover-image {
height: 100%;
inset: 0;
object-fit: cover;
position: absolute;
transition:
opacity 0.4s ease,
transform 0.65s ease;
width: 100%;
}
.esun-application__hover-image {
opacity: 0;
transform: scale(1.04);
}
.esun-application__shade {
background: linear-gradient(
180deg,
rgba(0, 0, 0, 0.08) 38%,
rgba(0, 0, 0, 0.78)
);
inset: 0;
position: absolute;
transition: background 0.4s ease;
}
.esun-application__default-copy {
align-items: center;
bottom: 38px;
color: #fff;
display: flex;
flex-direction: column;
left: 16px;
position: absolute;
right: 16px;
text-align: center;
transition:
opacity 0.25s ease,
transform 0.35s ease;
z-index: 2;
}
.esun-application__icon {
align-items: center;
background: rgba(45, 45, 45, 0.38);
border: 1px solid rgba(255, 255, 255, 0.35);
border-radius: 50%;
display: flex;
height: 78px;
justify-content: center;
margin-bottom: 22px;
padding: 17px;
width: 78px;
}
.esun-application__icon img {
height: 100%;
object-fit: contain;
width: 100%;
}
.esun-application__default-copy h3,
.esun-application__hover-copy h3 {
color: #fff;
font-size: 21px;
font-weight: 700;
line-height: 1.2;
margin: 0;
}
.esun-application__hover-copy {
bottom: 48px;
left: 48px;
opacity: 0;
position: absolute;
transform: translateY(18px);
transition:
opacity 0.3s ease 0.12s,
transform 0.4s ease 0.08s;
visibility: hidden;
z-index: 3;
}
.esun-application__hover-copy h3 {
font-size: 30px;
letter-spacing: 2px;
margin-bottom: 34px;
}
.esun-application__explore {
align-items: center;
background: var(--application-green);
border-radius: 26px;
color: #fff !important;
display: inline-flex;
font-size: 15px;
font-weight: 700;
height: 52px;
justify-content: center;
min-width: 160px;
padding: 0 28px;
text-decoration: none;
}
.esun-application__explore:hover,
.esun-application__explore:focus {
background: #0c914c;
color: #fff;
text-decoration: none;
}
.esun-application__items.has-active-item .esun-application__item {
flex-basis: 0;
flex-grow: 0.48;
flex-shrink: 1;
filter: blur(2px);
opacity: 0.8;
}
.esun-application__items .esun-application__item--interactive.is-active {
flex-basis: 0;
flex-grow: 3.2;
flex-shrink: 1;
filter: none;
opacity: 1;
outline: none;
}
.esun-application__item--interactive.is-active .esun-application__thumbnail,
.esun-application__item--interactive:hover .esun-application__thumbnail,
.esun-application__item--interactive:focus .esun-application__thumbnail {
opacity: 0;
}
.esun-application__item--interactive.is-active .esun-application__hover-image,
.esun-application__item--interactive:hover .esun-application__hover-image,
.esun-application__item--interactive:focus .esun-application__hover-image {
opacity: 1;
transform: scale(1);
}
.esun-application__item--interactive.is-active .esun-application__shade,
.esun-application__item--interactive:hover .esun-application__shade,
.esun-application__item--interactive:focus .esun-application__shade {
background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.65));
}
.esun-application__item--interactive.is-active .esun-application__default-copy,
.esun-application__item--interactive:hover .esun-application__default-copy,
.esun-application__item--interactive:focus .esun-application__default-copy {
opacity: 0;
transform: translateY(20px);
}
.esun-application__item--interactive.is-active .esun-application__hover-copy,
.esun-application__item--interactive:hover .esun-application__hover-copy,
.esun-application__item--interactive:focus .esun-application__hover-copy {
opacity: 1;
transform: translateY(0);
visibility: visible;
}
@media (max-width: 1023px) {
.esun-application__items {
min-height: 520px;
overflow-x: auto;
}
.esun-application__item {
flex: 0 0 260px;
}
.esun-application__items.has-active-item .esun-application__item {
flex: 0 0 180px;
}
.esun-application__items .esun-application__item--interactive.is-active {
flex-basis: 620px;
}
}
@media (max-width: 639px) {
.esun-application {
margin-top: 56px;
padding: 0 15px;
}
.esun-application__heading {
margin-bottom: 48px;
}
.esun-application__heading h2 {
font-size: 28px;
letter-spacing: 3px;
}
.esun-application__heading-row {
align-items: flex-start;
}
.esun-application__heading p {
font-size: 15px;
}
.esun-application__explore-all {
font-size: 12px;
text-align: right;
}
.esun-application__items {
min-height: 470px;
}
.esun-application__item,
.esun-application__items.has-active-item .esun-application__item {
flex: 0 0 min(78vw, 310px);
filter: none;
opacity: 1;
}
.esun-application__items .esun-application__item--interactive.is-active {
flex-basis: min(90vw, 410px);
}
.esun-application__hover-copy {
bottom: 34px;
left: 28px;
}
.esun-application__hover-copy h3 {
font-size: 24px;
margin-bottom: 24px;
}
}
@@ -0,0 +1,267 @@
.esun-awards-reviews {
--awards-green: #12ad5c;
box-sizing: border-box;
overflow: hidden;
padding: 0 0 74px;
max-width: 1920px;
margin: 90px auto 0;
}
/*.esun-awards-reviews *,*/
/*.esun-awards-reviews *::before,*/
/*.esun-awards-reviews *::after {*/
/* box-sizing: border-box;*/
/*}*/
.esun-awards-reviews__heading {
align-items: flex-start;
display: flex;
justify-content: space-between;
margin: 0 auto 58px;
max-width: 1440px;
padding: 0 24px;
}
.esun-awards-reviews__heading h2 {
color: #303030;
font-size: 38px;
font-weight: 700;
letter-spacing: 6px;
margin: 0;
position: relative;
text-transform: uppercase;
}
.esun-awards-reviews__heading h2::after {
background: var(--awards-green);
bottom: -24px;
content: "";
height: 2px;
left: 0;
position: absolute;
width: 70px;
}
.esun-awards-reviews__navigation {
display: flex;
gap: 16px;
}
.esun-awards-reviews__previous {
padding-right: 9px;
background: #fff;
}
.esun-awards-reviews__previous {
padding-right: 9px;
}
.esun-awards-reviews__next {
padding-left: 9px;
}
.esun-awards-reviews__previous:hover,
.esun-awards-reviews__next:hover {
background: #18a957;
color: #fff;
}
.esun-awards-reviews__previous:hover .arrow-left {
border-color: #fff;
}
.esun-awards-reviews__previous,
.esun-awards-reviews__next {
align-items: center;
border: 1px solid var(--awards-green);
border-radius: 50%;
box-shadow: none;
color: var(--awards-green);
display: flex;
font-size: 34px;
height: 52px;
justify-content: center;
line-height: 1;
width: 52px;
}
.esun-awards-reviews__next {
background: var(--awards-green);
color: #fff;
}
.esun-awards-reviews__slider {
overflow: visible;
padding: 28px 0 48px;
}
.esun-awards-reviews__slide {
align-items: center;
display: flex;
height: 450px;
opacity: 0.35;
transition: opacity 0.45s ease;
}
.esun-awards-reviews__slide.swiper-slide-active {
opacity: 1;
z-index: 2;
}
.esun-awards-reviews__card {
border-radius: 34px;
box-shadow: none;
height: 270px;
overflow: visible;
position: relative;
transition:
height 0.45s ease,
box-shadow 0.45s ease,
transform 0.45s ease;
width: 100%;
}
.esun-awards-reviews__slide.swiper-slide-active .esun-awards-reviews__card {
box-shadow: 0 24px 48px rgba(36, 68, 50, 0.2);
height: 450px;
transform: translateY(-12px);
}
.esun-awards-reviews__thumbnail,
.esun-awards-reviews__image {
border-radius: 34px;
height: 100%;
inset: 0;
object-fit: cover;
position: absolute;
transition: opacity 0.4s ease;
width: 100%;
}
.esun-awards-reviews__image {
opacity: 0;
}
.esun-awards-reviews__slide.swiper-slide-active
.esun-awards-reviews__thumbnail {
opacity: 0;
}
.esun-awards-reviews__slide.swiper-slide-active .esun-awards-reviews__image {
opacity: 1;
}
.esun-awards-reviews__copy {
background: rgba(255, 255, 255, 0.94);
border-radius: 34px;
box-shadow: 0 18px 44px rgba(0, 0, 0, 0.08);
opacity: 0;
padding: 38px 42px;
position: absolute;
right: -72px;
top: 50%;
transform: translate(20px, -50%);
transition:
opacity 0.35s ease 0.12s,
transform 0.4s ease 0.08s;
visibility: hidden;
width: min(450px, 48%);
z-index: 3;
}
.esun-awards-reviews__slide.swiper-slide-active .esun-awards-reviews__copy {
opacity: 1;
transform: translate(0, -50%);
visibility: visible;
}
.esun-awards-reviews__copy h3 {
color: #191919;
font-size: 24px;
font-weight: 700;
line-height: 1.15;
margin: 0 0 42px;
position: relative;
}
.esun-awards-reviews__copy h3::after {
background: var(--awards-green);
bottom: -22px;
content: "";
height: 2px;
left: 0;
position: absolute;
width: 58px;
}
.esun-awards-reviews__description {
color: #667084;
font-size: 16px;
}
@media (max-width: 767px) {
.esun-awards-reviews {
background: linear-gradient(180deg, #fff 35%, #f3faf5 100%);
margin-top: 56px;
padding-bottom: 90px;
}
.esun-awards-reviews__heading {
margin-bottom: 42px;
padding: 0 15px;
}
.esun-awards-reviews__heading h2 {
font-size: 27px;
letter-spacing: 3px;
}
.esun-awards-reviews__previous,
.esun-awards-reviews__next {
font-size: 28px;
height: 42px;
width: 42px;
}
.esun-awards-reviews__slide {
height: clamp(460px, 76vw, 550px);
}
.esun-awards-reviews__card {
height: clamp(300px, 52vw, 375px);
}
.esun-awards-reviews__slide.swiper-slide-active .esun-awards-reviews__card {
height: clamp(360px, 62vw, 450px);
transform: none;
}
.esun-awards-reviews__card,
.esun-awards-reviews__thumbnail,
.esun-awards-reviews__image {
border-radius: 24px;
}
.esun-awards-reviews__copy {
bottom: clamp(-100px, -14vw, -56px);
left: 7%;
padding: clamp(20px, 4vw, 28px);
right: 7%;
top: auto;
transform: translateY(18px);
width: auto;
}
.esun-awards-reviews__slide.swiper-slide-active .esun-awards-reviews__copy {
transform: translateY(0);
}
.esun-awards-reviews__copy h3 {
font-size: clamp(18px, 3.4vw, 24px);
line-height: 1.35;
margin-bottom: 34px;
}
.esun-awards-reviews__description {
-webkit-box-orient: vertical;
-webkit-line-clamp: 4;
display: -webkit-box;
font-size: clamp(13px, 2.2vw, 16px);
line-height: 1.45;
overflow: hidden;
}
}
@@ -0,0 +1,360 @@
.esun-create-anything {
--create-green: #12ad5c;
box-sizing: border-box;
margin: 84px auto 0;
max-width: 1360px;
padding: 0 20px;
}
.esun-create-anything *,
.esun-create-anything *::before,
.esun-create-anything *::after {
box-sizing: border-box;
}
.esun-create-anything__heading {
color: #303030;
font-size: 38px;
font-weight: 700;
letter-spacing: 7px;
margin: 0 0 72px;
position: relative;
text-align: center;
text-transform: uppercase;
}
.esun-create-anything__heading::after {
background: var(--create-green);
bottom: -22px;
content: "";
height: 2px;
left: 50%;
position: absolute;
transform: translateX(-50%);
width: 92px;
}
.esun-create-anything__slider {
padding-bottom: 76px;
}
.esun-create-anything__slide {
height: auto;
}
.esun-create-anything__media {
background: #101010;
border-radius: 34px;
height: 100%;
min-height: 560px;
overflow: hidden;
position: relative;
}
.esun-create-anything__cover,
.esun-create-anything__video {
height: 100%;
inset: 0;
object-fit: cover;
position: absolute;
width: 100%;
}
.esun-create-anything__media::after {
background: linear-gradient(
180deg,
rgba(0, 0, 0, 0.32),
transparent 28%,
transparent 58%,
rgba(0, 0, 0, 0.82)
);
content: "";
inset: 0;
pointer-events: none;
position: absolute;
z-index: 1;
}
.esun-create-anything__copy {
color: #fff;
left: 20px;
position: absolute;
right: 20px;
text-align: center;
top: 30px;
z-index: 2;
}
.esun-create-anything__copy h3 {
font-size: 23px;
font-weight: 700;
line-height: 1.2;
margin: 0 0 5px;
}
.esun-create-anything__copy p {
font-size: 14px;
letter-spacing: 1.5px;
margin: 0;
}
.esun-create-anything__product {
align-items: center;
bottom: 22px;
color: #fff;
display: flex;
left: 22px;
position: absolute;
right: 22px;
text-decoration: none;
z-index: 2;
}
.esun-create-anything__product:hover,
.esun-create-anything__product:focus {
color: #fff;
text-decoration: none;
}
.esun-create-anything__product-image {
background: #fff;
border-radius: 22px;
flex: 0 0 66px;
height: 66px;
overflow: hidden;
padding: 5px;
width: 66px;
position: relative;
}
.esun-create-anything__product-image .product-image-container,
.esun-create-anything__product-image .product-image-wrapper {
height: 100%;
width: 100% !important;
}
.esun-create-anything__product-image .product-image-wrapper {
padding-bottom: 0 !important;
}
.esun-create-anything__product-image .product-image-photo {
height: 100%;
inset: 0;
margin: auto;
object-fit: contain;
position: absolute;
width: 100%;
}
.esun-create-anything__product-copy {
display: flex;
flex-direction: column;
min-width: 0;
padding-left: 14px;
}
.esun-create-anything__product-copy strong {
font-size: 15px;
line-height: 1.2;
margin-bottom: 8px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.esun-create-anything__price {
align-items: baseline;
display: flex;
flex-wrap: wrap;
gap: 12px;
}
.esun-create-anything__final-price {
color: var(--create-green);
font-size: 17px;
font-weight: 700;
}
.esun-create-anything__regular-price {
color: #aaa;
font-size: 13px;
text-decoration: line-through;
}
.esun-create-anything__media.is-playing .esun-create-anything__cover {
display: none;
}
.esun-create-anything__video {
background: #000;
opacity: 0;
pointer-events: none;
z-index: 0;
}
.esun-create-anything__media.is-playing .esun-create-anything__video {
opacity: 1;
}
.esun-create-anything__controls {
align-items: center;
bottom: 0;
display: flex;
justify-content: center;
left: 50%;
position: absolute;
transform: translateX(-50%);
width: min(560px, 90%);
z-index: 5;
}
.esun-create-anything__previous,
.esun-create-anything__next {
align-items: center;
border: 1px solid var(--create-green);
border-radius: 50%;
box-shadow: none;
display: flex;
flex: 0 0 52px;
font-size: 36px;
height: 52px;
justify-content: center;
line-height: 1;
padding: 0 0 4px;
width: 52px;
}
.esun-create-anything__previous {
background: #fff;
color: var(--create-green);
}
.esun-create-anything__next {
background: var(--create-green);
color: #fff;
}
.esun-create-anything__pagination {
align-items: center;
bottom: auto !important;
display: flex;
flex: 1;
justify-content: center;
position: static;
}
.esun-create-anything__pagination .swiper-pagination-bullet {
background: #edf2f0;
border-radius: 2px;
height: 4px;
margin: 0 4px;
opacity: 1;
width: 42px;
}
.esun-create-anything__pagination .swiper-pagination-bullet-active {
background: var(--create-green);
}
.esun-create-anything .swiper-button-disabled {
opacity: 0.35;
}
@media (max-width: 1023px) {
.esun-create-anything__media {
min-height: 520px;
}
}
@media (max-width: 639px) {
.esun-create-anything {
margin-top: 56px;
padding: 0 15px;
}
.esun-create-anything__heading {
font-size: 27px;
letter-spacing: 4px;
line-height: 1.25;
margin-bottom: 58px;
text-align: left;
}
.esun-create-anything__heading::after {
left: 0;
transform: none;
width: 48px;
}
.esun-create-anything__media {
border-radius: 28px;
min-height: 500px;
}
.esun-create-anything__slider {
margin-right: 0;
overflow-x: auto;
padding-bottom: 0;
scrollbar-width: none;
scroll-snap-type: x mandatory;
}
.esun-create-anything__slider::-webkit-scrollbar {
display: none;
}
.esun-create-anything__slider .swiper-wrapper {
gap: 12px;
transform: none !important;
transition: none !important;
width: auto !important;
}
.esun-create-anything__slider .esun-create-anything__slide {
flex: 0 0 79%;
scroll-snap-align: start;
width: 79% !important;
}
.esun-create-anything__controls {
display: none;
}
.esun-create-anything__copy h3 {
font-size: 20px;
}
.esun-create-anything__product {
bottom: 16px;
left: 16px;
right: 16px;
}
.esun-create-anything__product-image {
border-radius: 12px;
flex-basis: 52px;
height: 52px;
width: 52px;
}
.esun-create-anything__product-copy {
padding-left: 10px;
}
.esun-create-anything__product-copy strong {
font-size: 14px;
margin-bottom: 5px;
}
.esun-create-anything__price {
gap: 8px;
}
.esun-create-anything__final-price {
font-size: 16px;
}
.esun-create-anything__regular-price {
font-size: 12px;
}
}
@@ -0,0 +1,517 @@
.cms-home .esun-hot-sale {
margin-top: 0 !important;
padding-top: 30px;
}
.esun-hot-sale {
--hot-sale-green: #12ad5c;
box-sizing: border-box;
margin: 76px auto 0;
max-width: 1360px;
padding: 0 20px;
}
.esun-hot-sale *,
.esun-hot-sale *::before,
.esun-hot-sale *::after {
box-sizing: border-box;
}
.esun-hot-sale__heading {
margin-bottom: 64px;
}
.esun-hot-sale__heading h2 {
color: #303030;
font-size: 36px;
font-weight: 700;
letter-spacing: 5px;
margin: 0 0 34px;
position: relative;
text-transform: uppercase;
}
.esun-hot-sale__heading h2::after {
background: var(--hot-sale-green);
bottom: -18px;
content: "";
height: 2px;
left: 0;
position: absolute;
width: 70px;
}
.esun-hot-sale__heading-row {
align-items: center;
display: flex;
gap: 24px;
justify-content: space-between;
}
.esun-hot-sale__heading p {
color: #666;
font-size: 17px;
font-weight: 600;
margin: 0;
}
.esun-hot-sale__explore {
align-items: center;
color: var(--hot-sale-green);
display: inline-flex;
flex: 0 0 auto;
font-size: 14px;
font-weight: 600;
gap: 12px;
text-decoration: none;
}
.esun-hot-sale__explore:hover,
.esun-hot-sale__explore:focus {
color: #0c914c;
text-decoration: none;
}
.esun-hot-sale__explore span {
font-size: 18px;
line-height: 1;
}
.esun-hot-sale__slider {
padding-bottom: 54px;
}
.esun-hot-sale__page {
height: auto;
}
.esun-hot-sale__grid {
display: grid;
gap: 28px;
grid-template-columns: repeat(4, minmax(0, 1fr));
list-style: none;
margin: 0;
padding: 0;
}
.esun-hot-sale__item {
min-width: 0;
}
.esun-hot-sale__item--featured {
grid-column: span 2;
}
.esun-hot-sale__card {
background: #fff;
border: 1px solid #f1f1f1;
border-radius: 30px;
box-shadow: 0 8px 28px rgba(23, 50, 36, 0.06);
display: flex;
flex-direction: column;
height: 100%;
min-height: 510px;
overflow: hidden;
}
.esun-hot-sale__image {
display: block;
height: 310px;
overflow: hidden;
padding: 18px 18px 0;
position: relative;
}
.esun-hot-sale__image .product-image-container,
.esun-hot-sale__image .product-image-wrapper {
height: 100%;
width: 100% !important;
}
.esun-hot-sale__image .product-image-wrapper {
padding-bottom: 0 !important;
}
.esun-hot-sale__image .product-image-photo {
height: 100%;
inset: 0;
margin: auto;
max-height: none;
object-fit: contain;
position: absolute;
width: 100%;
}
.esun-hot-sale__details {
display: flex;
flex: 1;
flex-direction: column;
min-width: 0;
padding: 22px 24px 20px;
}
.esun-hot-sale__details h3 {
font-size: 18px;
font-weight: 600;
margin: 0 0 16px;
}
.esun-hot-sale__details h3 a {
color: #242424;
text-decoration: none;
}
.esun-hot-sale__details h3 a:hover,
.esun-hot-sale__details h3 a:focus {
color: var(--hot-sale-green);
text-decoration: none;
}
.esun-hot-sale__description {
color: #747474;
display: -webkit-box;
font-size: 15px;
line-height: 1.45;
margin: 0 0 24px;
overflow: hidden;
-webkit-box-orient: vertical;
-webkit-line-clamp: 5;
}
.esun-hot-sale__swatches {
align-items: center;
display: flex;
flex-wrap: wrap;
gap: 9px;
margin-bottom: 20px;
min-height: 40px;
}
.esun-hot-sale__swatch {
background: #fff;
border: 1px solid #e1e1e1;
border-radius: 50%;
display: inline-flex;
height: 18px;
overflow: hidden;
padding: 2px;
width: 18px;
}
.esun-hot-sale__swatch > span,
.esun-hot-sale__swatch img {
border-radius: 50%;
height: 100%;
object-fit: cover;
width: 100%;
}
.esun-hot-sale__swatch-more {
color: #4b4b4b;
font-size: 13px;
line-height: 18px;
}
.esun-hot-sale__footer {
align-items: center;
border-top: 1px solid #f2f2f2;
display: flex;
justify-content: space-between;
margin-top: auto;
padding-top: 18px;
}
.esun-hot-sale__price {
align-items: baseline;
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.esun-hot-sale__final-price {
color: var(--hot-sale-green);
font-size: 24px;
font-weight: 600;
}
.esun-hot-sale__regular-price {
color: #a5a5a5;
font-size: 14px;
text-decoration: line-through;
}
.esun-hot-sale__cart {
align-items: center;
background: var(--hot-sale-green);
border-radius: 50%;
color: #fff;
display: inline-flex;
flex: 0 0 48px;
height: 48px;
justify-content: center;
text-decoration: none;
width: 48px;
}
.esun-hot-sale__cart:hover,
.esun-hot-sale__cart:focus {
background: #0c914c;
color: #fff;
text-decoration: none;
}
.esun-hot-sale__cart svg {
fill: none;
height: 23px;
stroke: #fff;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 1.7;
width: 23px;
}
.esun-hot-sale__item--featured .esun-hot-sale__card {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.esun-hot-sale__item--featured .esun-hot-sale__image {
height: 100%;
padding: 28px 0 28px 28px;
}
.esun-hot-sale__item--featured .esun-hot-sale__details {
padding: 48px 38px 28px;
}
.esun-hot-sale__item--featured .esun-hot-sale__details h3 {
font-size: 24px;
margin-bottom: 24px;
}
.esun-hot-sale__item--featured .esun-hot-sale__swatches {
margin-bottom: 24px;
}
.esun-hot-sale__pagination {
bottom: 0 !important;
}
.esun-hot-sale__pagination .swiper-pagination-bullet {
background: #bfe4ce;
height: 8px;
opacity: 1;
transition:
width 0.2s ease,
background 0.2s ease;
width: 8px;
}
.esun-hot-sale__pagination .swiper-pagination-bullet-active {
background: var(--hot-sale-green);
border-radius: 5px;
width: 26px;
}
.esun-hot-sale__visually-hidden {
clip: rect(0, 0, 0, 0);
clip-path: inset(50%);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}
@media (max-width: 1199px) {
.esun-hot-sale__grid {
gap: 20px;
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.esun-hot-sale__item--featured {
grid-column: span 2;
}
}
@media (max-width: 899px) {
.esun-hot-sale__grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.esun-hot-sale__item--featured {
grid-column: span 2;
}
}
@media (max-width: 639px) {
.esun-hot-sale__image .product-image-photo {
height: auto;
}
.esun-hot-sale {
margin-top: 48px;
padding: 0 15px;
}
.esun-hot-sale__heading {
margin-bottom: 30px;
}
.esun-hot-sale__heading h2 {
font-size: 28px;
letter-spacing: 3px;
margin-bottom: 28px;
}
.esun-hot-sale__heading h2::after {
bottom: -12px;
width: 48px;
}
.esun-hot-sale__heading-row {
align-items: center;
gap: 10px;
}
.esun-hot-sale__heading p {
flex: 1 1 auto;
font-size: 12px;
font-weight: 400;
line-height: 1.35;
}
.esun-hot-sale__explore {
font-size: 13px;
gap: 6px;
}
.esun-hot-sale__grid {
gap: 18px 12px;
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.esun-hot-sale__item--featured {
grid-column: 1 / -1;
}
.esun-hot-sale__card,
.esun-hot-sale__item--featured .esun-hot-sale__card {
display: flex;
min-height: 0;
}
.esun-hot-sale__card {
border-radius: 18px;
}
.esun-hot-sale__item--featured .esun-hot-sale__image {
height: clamp(290px, 72vw, 360px);
padding: 14px 14px 0;
}
.esun-hot-sale__item--featured .esun-hot-sale__details {
padding: 18px 20px 20px;
}
.esun-hot-sale__item--featured .esun-hot-sale__details h3 {
font-size: 20px;
margin-bottom: 10px;
}
.esun-hot-sale__item--featured .esun-hot-sale__description {
font-size: 14px;
margin-bottom: 14px;
-webkit-line-clamp: 2;
}
.esun-hot-sale__item--featured .esun-hot-sale__swatches {
margin-bottom: 14px;
}
.esun-hot-sale__item:not(.esun-hot-sale__item--featured)
.esun-hot-sale__image {
height: clamp(155px, 43vw, 210px);
padding: 8px 8px 0;
}
.esun-hot-sale__item:not(.esun-hot-sale__item--featured)
.esun-hot-sale__details {
padding: 12px 10px 14px;
}
.esun-hot-sale__item:not(.esun-hot-sale__item--featured)
.esun-hot-sale__details
h3 {
display: -webkit-box;
font-size: 16px;
line-height: 1.25;
margin-bottom: 8px;
min-height: 40px;
overflow: hidden;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.esun-hot-sale__item:not(.esun-hot-sale__item--featured)
.esun-hot-sale__swatches {
flex-wrap: nowrap;
gap: 6px;
margin-bottom: 12px;
min-height: 20px;
overflow: hidden;
}
.esun-hot-sale__item:not(.esun-hot-sale__item--featured)
.esun-hot-sale__swatch {
flex: 0 0 18px;
}
.esun-hot-sale__item:not(.esun-hot-sale__item--featured)
.esun-hot-sale__swatch-more {
flex: 0 0 auto;
font-size: 11px;
}
.esun-hot-sale__item:not(.esun-hot-sale__item--featured)
.esun-hot-sale__footer {
gap: 6px;
padding-top: 12px;
}
.esun-hot-sale__item:not(.esun-hot-sale__item--featured)
.esun-hot-sale__price {
gap: 4px;
min-width: 0;
}
.esun-hot-sale__item:not(.esun-hot-sale__item--featured)
.esun-hot-sale__final-price {
font-size: 18px;
}
.esun-hot-sale__item:not(.esun-hot-sale__item--featured)
.esun-hot-sale__regular-price {
font-size: 11px;
}
.esun-hot-sale__item:not(.esun-hot-sale__item--featured)
.esun-hot-sale__cart {
flex-basis: 40px;
height: 40px;
width: 40px;
}
.esun-hot-sale__item:not(.esun-hot-sale__item--featured)
.esun-hot-sale__cart
svg {
height: 19px;
width: 19px;
}
}
@media (max-width: 359px) {
.esun-hot-sale__item:not(.esun-hot-sale__item--featured)
.esun-hot-sale__regular-price {
display: none;
}
}
@@ -0,0 +1,175 @@
.esun-innovative-materials {
background:
radial-gradient(
circle at 22% 12%,
rgba(33, 189, 107, 0.07),
transparent 31%
),
linear-gradient(90deg, #fbfefb, #fff 52%, #fbfefb);
box-sizing: border-box;
margin-top: 10px;
overflow: hidden;
padding: 52px 24px 42px;
position: relative;
}
.esun-innovative-materials::before,
.esun-innovative-materials::after {
border: 2px solid rgba(34, 190, 108, 0.2);
border-bottom-color: transparent;
border-left-color: transparent;
border-radius: 50%;
content: "";
pointer-events: none;
position: absolute;
}
.esun-innovative-materials::before {
height: 620px;
left: -350px;
top: -375px;
transform: rotate(28deg);
width: 760px;
}
.esun-innovative-materials::after {
border-style: dashed;
height: 330px;
right: -90px;
top: 80px;
transform: rotate(-24deg);
width: 430px;
}
.esun-innovative-materials *,
.esun-innovative-materials *::before,
.esun-innovative-materials *::after {
box-sizing: border-box;
}
.esun-innovative-materials__inner {
margin: 0 auto;
position: relative;
z-index: 1;
max-width: 1360px;
padding: 0 20px;
}
.esun-innovative-materials h2 {
color: #13ad5c;
font-size: 50px;
font-style: italic;
font-weight: 400;
line-height: 1.12;
margin: 0 0 70px;
}
.esun-innovative-materials__items {
display: flex;
gap: 28px;
height: 360px;
}
.esun-innovative-materials__item {
border-radius: 22px;
flex-basis: 0;
flex-grow: 1;
flex-shrink: 1;
min-width: 0;
overflow: hidden;
position: relative;
transition:
flex-grow 0.48s ease,
filter 0.4s ease,
opacity 0.4s ease;
}
.esun-innovative-materials__thumbnail,
.esun-innovative-materials__hover-image {
height: 100%;
inset: 0;
object-fit: cover;
position: absolute;
transition:
opacity 0.4s ease,
transform 0.6s ease;
width: 100%;
}
.esun-innovative-materials__hover-image {
opacity: 0;
transform: scale(1.035);
}
.esun-innovative-materials__items.has-active-item
.esun-innovative-materials__item {
flex-grow: 0.72;
}
.esun-innovative-materials__items.has-active-item
.esun-innovative-materials__item--interactive.is-active {
flex-grow: 2.55;
outline: none;
}
.esun-innovative-materials__item--interactive.is-active
.esun-innovative-materials__thumbnail {
opacity: 0;
}
.esun-innovative-materials__item--interactive.is-active
.esun-innovative-materials__hover-image {
opacity: 1;
transform: scale(1);
}
@media (max-width: 1023px) {
.esun-innovative-materials h2 {
font-size: 38px;
margin-bottom: 52px;
}
.esun-innovative-materials__items {
gap: 18px;
height: 270px;
overflow-x: auto;
}
.esun-innovative-materials__item,
.esun-innovative-materials__items.has-active-item
.esun-innovative-materials__item {
flex: 0 0 260px;
}
.esun-innovative-materials__items.has-active-item
.esun-innovative-materials__item--interactive.is-active {
flex-basis: 560px;
}
}
@media (max-width: 639px) {
.esun-innovative-materials {
margin-top: 56px;
padding: 40px 15px 32px;
}
.esun-innovative-materials h2 {
font-size: 30px;
margin-bottom: 40px;
}
.esun-innovative-materials__items {
height: 240px;
}
.esun-innovative-materials__item,
.esun-innovative-materials__items.has-active-item
.esun-innovative-materials__item {
flex-basis: min(76vw, 290px);
}
.esun-innovative-materials__items.has-active-item
.esun-innovative-materials__item--interactive.is-active {
flex-basis: min(90vw, 390px);
}
}
@@ -0,0 +1,234 @@
.esun-landscape-video {
--landscape-green: #12ad5c;
box-sizing: border-box;
margin: 72px auto 0;
max-width: 1360px;
padding: 0 20px;
}
.esun-landscape-video *,
.esun-landscape-video *::before,
.esun-landscape-video *::after {
box-sizing: border-box;
}
.esun-landscape-video__media {
aspect-ratio: 16 / 9;
background: #151515;
border-radius: 38px;
overflow: hidden;
position: relative;
}
.esun-landscape-video__media::after {
background: linear-gradient(90deg, rgba(0, 0, 0, .58), transparent 56%);
content: "";
inset: 0;
pointer-events: none;
position: absolute;
z-index: 1;
}
.esun-landscape-video__cover,
.esun-landscape-video__video {
height: 100%;
inset: 0;
object-fit: cover;
position: absolute;
width: 100%;
}
.esun-landscape-video__video {
background: #000;
opacity: 0;
pointer-events: none;
z-index: 2;
}
.esun-landscape-video__media.is-playing .esun-landscape-video__video {
opacity: 1;
}
.esun-landscape-video__media.is-playing .esun-landscape-video__cover,
.esun-landscape-video__media.is-playing::after {
display: none;
}
.esun-landscape-video__product {
align-items: center;
backdrop-filter: blur(16px);
background: rgba(31, 34, 35, .72);
border: 1px solid rgba(255, 255, 255, .18);
border-radius: 22px;
bottom: 52px;
display: flex;
min-height: 112px;
padding: 14px 20px;
position: absolute;
right: 50px;
width: min(470px, calc(100% - 48px));
z-index: 4;
}
.esun-landscape-video__product-image {
background: #fff;
border-radius: 22px;
flex: 0 0 76px;
height: 76px;
overflow: hidden;
padding: 5px;
width: 76px;
position: relative;
}
.esun-landscape-video__product-image .product-image-container,
.esun-landscape-video__product-image .product-image-wrapper {
height: 100%;
width: 100% !important;
}
.esun-landscape-video__product-image .product-image-wrapper {
padding-bottom: 0 !important;
}
.esun-landscape-video__product-image .product-image-photo {
height: 100%;
inset: 0;
margin: auto;
object-fit: contain;
position: absolute;
width: 100%;
}
.esun-landscape-video__product-copy {
flex: 1 1 auto;
min-width: 0;
padding: 0 20px;
}
.esun-landscape-video__product-name {
color: #fff;
display: block;
font-size: 18px;
font-weight: 700;
margin-bottom: 12px;
overflow: hidden;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
}
.esun-landscape-video__product-name:hover,
.esun-landscape-video__product-name:focus {
color: #fff;
text-decoration: none;
}
.esun-landscape-video__price {
align-items: baseline;
display: flex;
flex-wrap: wrap;
gap: 16px;
}
.esun-landscape-video__final-price {
color: var(--landscape-green);
font-size: 20px;
font-weight: 700;
}
.esun-landscape-video__regular-price {
color: #aaa;
font-size: 15px;
text-decoration: line-through;
}
.esun-landscape-video__cart {
align-items: center;
background: var(--landscape-green);
border-radius: 50%;
color: #fff;
display: flex;
flex: 0 0 58px;
height: 58px;
justify-content: center;
text-decoration: none;
width: 58px;
}
.esun-landscape-video__cart:hover,
.esun-landscape-video__cart:focus {
background: #0c914c;
color: #fff;
text-decoration: none;
}
.esun-landscape-video__cart svg {
fill: none;
height: 27px;
stroke: currentColor;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 1.7;
width: 27px;
}
.esun-landscape-video__visually-hidden {
clip: rect(0, 0, 0, 0);
clip-path: inset(50%);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}
@media (max-width: 767px) {
.esun-landscape-video {
margin-top: 48px;
padding: 0 15px;
}
.esun-landscape-video__media {
aspect-ratio: 4 / 3;
border-radius: 24px;
}
.esun-landscape-video__product {
bottom: 18px;
min-height: 88px;
padding: 10px 12px;
right: 18px;
width: calc(100% - 36px);
}
.esun-landscape-video__product-image {
border-radius: 16px;
flex-basis: 62px;
height: 62px;
width: 62px;
}
.esun-landscape-video__product-copy {
padding: 0 12px;
}
.esun-landscape-video__product-name {
font-size: 14px;
margin-bottom: 7px;
}
.esun-landscape-video__final-price {
font-size: 16px;
}
.esun-landscape-video__regular-price {
font-size: 12px;
}
.esun-landscape-video__cart {
flex-basis: 46px;
height: 46px;
width: 46px;
}
}
@@ -0,0 +1,478 @@
.esun-new-product {
--esun-new-product-green: #28ad5f;
box-sizing: border-box;
margin: 76px auto 0;
max-width: 1360px;
padding: 0 20px;
}
.esun-new-product *,
.esun-new-product *::before,
.esun-new-product *::after {
box-sizing: border-box;
}
.esun-new-product__title {
padding-top: 50px;
color: #303030;
font-size: 36px;
font-weight: 700;
letter-spacing: 4px;
margin: 0 0 62px;
position: relative;
text-align: center;
text-transform: uppercase;
}
.esun-new-product__title::after {
background: var(--esun-new-product-green);
bottom: -20px;
content: "";
height: 2px;
left: 50%;
position: absolute;
transform: translateX(-50%);
width: 70px;
}
.esun-new-product__slider {
padding-bottom: 56px;
}
.esun-new-product__slide {
display: grid;
gap: 24px;
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
height: auto;
}
.esun-new-product__product-card,
.esun-new-product__features {
background: #fff;
border: 1px solid #e8e8e8;
border-radius: 34px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.esun-new-product__features table tr {
display: flex;
width: 280px;
align-items: center;
}
.esun-new-product__features table tr td:first-child {
width: 75px;
}
.esun-new-product__features table tr td:last-child {
width: 75%;
}
.esun-new-product__features table tr td h3 {
font-size: 18px;
font-weight: 600;
margin: 0;
color: #333;
}
.esun-new-product__features table tr td {
color: #999;
}
.esun-new-product__features table tr td p {
margin: 0 0 5px;
}
.esun-new-product__features table tr td img {
width: 48px;
height: 48px;
}
.esun-new-product__product-card {
display: grid;
grid-template-columns: 40% 60%;
min-height: 400px;
overflow: hidden;
position: relative;
}
.esun-new-product__copy {
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 40px 0 40px 40px;
position: relative;
z-index: 2;
}
.esun-new-product__series {
color: var(--esun-new-product-green);
display: block;
font-size: 14px;
font-weight: 700;
margin-bottom: 16px;
}
.esun-new-product__copy h3 {
font-size: 26px;
font-weight: 700;
line-height: 1.2;
margin: 0;
}
.esun-new-product__copy h3 a {
color: #080808;
text-decoration: none;
}
.esun-new-product__image {
align-items: center;
display: flex;
justify-content: center;
min-width: 0;
position: relative;
z-index: 1;
}
.esun-new-product__image .product-image-container,
.esun-new-product__image .product-image-wrapper {
height: 100%;
width: 100% !important;
}
.esun-new-product__image .product-image-wrapper {
padding-bottom: 0 !important;
}
.esun-new-product__image .product-image-photo {
height: 100%;
inset: 0;
margin: auto;
max-height: 500px;
max-width: none;
object-fit: contain;
position: absolute;
width: 100%;
}
.esun-new-product__actions {
align-items: center;
display: flex;
gap: 20px;
}
.esun-new-product__actions form {
margin: 0;
}
.esun-new-product__buy,
.esun-new-product__cart {
align-items: center;
background: var(--esun-new-product-green);
border: 0;
box-shadow: none;
color: #fff;
display: inline-flex;
justify-content: center;
text-decoration: none;
}
.esun-new-product__buy {
border-radius: 24px;
font-size: 16px;
font-weight: 600;
height: 48px;
letter-spacing: 2px;
min-width: 150px;
padding: 0 28px;
color: #fff !important;
}
.esun-new-product__cart {
border-radius: 50%;
cursor: pointer;
height: 48px;
padding: 0;
width: 48px;
}
.esun-new-product__buy:hover,
.esun-new-product__buy:focus,
.esun-new-product__cart:hover,
.esun-new-product__cart:focus {
background: #208f4e;
color: #fff;
text-decoration: none;
}
.esun-new-product__cart svg {
fill: none;
height: 23px;
stroke: currentColor;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 1.7;
width: 23px;
}
.esun-new-product__content {
display: grid;
gap: 20px;
grid-template-rows: minmax(185px, auto) 1fr;
min-width: 0;
}
.esun-new-product__features {
min-height: 175px;
overflow: hidden;
padding: 30px 20px;
}
.esun-new-product__gallery
[data-content-type="row"][data-appearance="contained"] {
width: 100%;
}
.esun-new-product__features [data-content-type="row"],
.esun-new-product__features [data-content-type="row"] > div,
.esun-new-product__features [data-content-type="columns"],
.esun-new-product__features .pagebuilder-column-line {
min-height: 100%;
}
.esun-new-product__features .pagebuilder-column-line {
align-items: center;
}
.esun-new-product__gallery {
min-height: auto;
overflow: hidden;
}
.esun-new-product__gallery p {
margin-bottom: 0;
}
.esun-new-product__gallery > [data-content-type="row"],
.esun-new-product__gallery > [data-content-type="row"] > div,
.esun-new-product__gallery [data-content-type="columns"],
.esun-new-product__gallery .pagebuilder-column-line {
height: 100%;
}
.esun-new-product__gallery .pagebuilder-column-line {
gap: 20px;
}
.esun-new-product__gallery .pagebuilder-column {
border-radius: 32px;
overflow: hidden;
}
.esun-new-product__gallery figure,
.esun-new-product__gallery [data-content-type="image"] {
height: 100%;
margin: 0;
}
.esun-new-product__gallery img {
height: 100%;
object-fit: cover;
width: 100%;
display: block;
}
.esun-new-product__pagination {
bottom: 0 !important;
}
.esun-new-product__pagination .swiper-pagination-bullet {
background: #bfe4ce;
height: 8px;
opacity: 1;
transition:
width 0.2s ease,
background 0.2s ease;
width: 8px;
}
.esun-new-product__pagination .swiper-pagination-bullet-active {
background: var(--esun-new-product-green);
border-radius: 5px;
width: 26px;
}
.esun-new-product__previous,
.esun-new-product__next {
display: none;
}
.esun-new-product__visually-hidden {
clip: rect(0, 0, 0, 0);
clip-path: inset(50%);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}
.esun-new-product .product-image-wrapper {
overflow: hidden;
display: block;
}
.esun-new-product .product-image-photo {
transition: all 0.35s ease;
}
.esun-new-product .product-image-container:hover .product-image-photo {
transform: scale(1.08) translateY(-5px);
}
@media (max-width: 1023px) {
.esun-new-product__slide {
grid-template-columns: 1fr;
}
.esun-new-product__product-card {
min-height: 460px;
}
}
@media (max-width: 639px) {
.esun-new-product {
margin-top: 48px;
padding: 0 15px;
}
.esun-new-product__title {
font-size: 28px;
padding-top: 10px;
margin-bottom: 48px;
}
.esun-new-product__product-card {
border-radius: 24px;
grid-template-columns: 40% 60%;
min-height: 350px;
}
.esun-new-product__copy {
padding: 34px 0 30px 34px;
}
.esun-new-product__image {
bottom: 0;
height: 285px;
position: absolute;
right: -4%;
width: 64%;
}
.esun-new-product__actions {
gap: 12px;
}
.esun-new-product__buy {
min-width: 130px;
font-size: 14px;
}
.esun-new-product__features {
border-radius: 24px;
min-height: auto;
padding: 20px 16px;
}
.esun-new-product__content {
gap: 24px;
grid-template-rows: minmax(130px, auto) 250px;
}
.esun-new-product__features .pagebuilder-column-line {
display: grid !important;
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.esun-new-product__features .pagebuilder-column {
min-width: 0;
width: 100% !important;
}
.esun-new-product__features table tr td {
padding: 4px 0;
}
.esun-new-product__features table tr td:first-child {
width: 42px;
}
.esun-new-product__features table tr td:last-child {
min-width: 0;
width: auto;
}
.esun-new-product__features table tr td img {
height: 34px !important;
width: 34px !important;
}
.esun-new-product__features table tr td h3 {
font-size: 15px;
line-height: 1.2;
}
.esun-new-product__features table tr td p {
font-size: 12px;
line-height: 1.2;
}
.esun-new-product__gallery {
min-height: 250px;
}
.esun-new-product__gallery .pagebuilder-column-line {
display: grid !important;
gap: 12px;
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.esun-new-product__gallery .pagebuilder-column {
border-radius: 24px;
min-height: 250px;
width: 100% !important;
}
.esun-new-product__slider {
padding-bottom: 70px;
}
.esun-new-product__pagination {
bottom: 11px !important;
}
.esun-new-product__previous {
padding-right: 9px;
}
.esun-new-product__next {
padding-left: 9px;
}
.esun-new-product__previous,
.esun-new-product__next {
align-items: center;
border: 1px solid var(--esun-new-product-green);
border-radius: 50%;
bottom: 0;
box-shadow: none;
display: flex;
font-size: 28px;
height: 42px;
justify-content: center;
line-height: 1;
position: absolute;
width: 42px;
z-index: 11;
}
.esun-new-product__previous {
background: #fff;
color: var(--esun-new-product-green);
left: calc(50% - 130px);
}
.esun-new-product__next {
background: var(--esun-new-product-green);
color: #fff;
right: calc(50% - 130px);
}
}
@@ -0,0 +1,313 @@
.esun-news-room {
--news-green: #12ad5c;
box-sizing: border-box;
margin: 88px auto 0;
max-width: 1360px;
padding: 0 20px 80px;
}
/*.esun-news-room *,*/
/*.esun-news-room *::before,*/
/*.esun-news-room *::after {*/
/* box-sizing: border-box;*/
/*}*/
.esun-news-room__heading {
align-items: flex-start;
display: flex;
justify-content: space-between;
margin-bottom: 68px;
}
.esun-news-room__heading h2 {
color: #303030;
font-size: 38px;
font-weight: 700;
letter-spacing: 6px;
line-height: 1.1;
margin: 0;
position: relative;
text-transform: uppercase;
}
.esun-news-room__heading h2::after {
background: var(--news-green);
bottom: -24px;
content: "";
height: 2px;
left: 0;
position: absolute;
width: 70px;
}
.esun-news-room__navigation {
display: flex;
gap: 16px;
}
.esun-news-room__previous {
padding-right: 9px;
}
.esun-news-room__next {
padding-left: 9px;
}
.esun-news-room__previous,
.esun-news-room__next {
align-items: center;
background: #fff;
border: 1px solid rgba(18, 173, 92, 0.55);
border-radius: 50%;
box-shadow: none;
color: var(--news-green);
display: flex;
font-size: 34px;
height: 52px;
justify-content: center;
line-height: 1;
transition:
background 0.25s ease,
color 0.25s ease,
border-color 0.25s ease;
width: 52px;
}
.esun-news-room__previous:hover .arrow-left {
border-color: #fff;
}
.esun-news-room__next,
.esun-news-room__previous:hover,
.esun-news-room__next:hover {
background: var(--news-green);
border-color: var(--news-green);
color: #fff;
}
.esun-news-room__slider {
overflow: hidden;
padding-bottom: 54px;
}
.esun-news-room__page {
height: auto;
}
.esun-news-room__grid {
display: grid;
gap: 36px;
grid-template-columns: repeat(4, minmax(0, 1fr));
}
.esun-news-room__card {
color: #1f1f1f;
display: block;
text-decoration: none;
}
.esun-news-room__card:visited,
.esun-news-room__card:hover,
.esun-news-room__card:focus,
.esun-news-room__card:active,
.esun-news-room__card:hover *,
.esun-news-room__card:focus *,
.esun-news-room__card:active * {
color: inherit;
text-decoration: none;
}
.esun-news-room__image-wrap {
border-radius: 22px;
display: block;
overflow: hidden;
position: relative;
}
.esun-news-room__image-wrap::before {
content: "";
display: block;
padding-top: 56.5%;
}
.esun-news-room__image {
height: 100%;
inset: 0;
object-fit: cover;
position: absolute;
transition: transform 0.35s ease;
width: 100%;
}
.esun-news-room__card:hover .esun-news-room__image {
transform: scale(1.04);
}
.esun-news-room__meta {
align-items: center;
display: grid;
gap: 14px;
grid-template-columns: auto minmax(0, 1fr);
margin: 20px 0 7px;
}
.esun-news-room__meta time {
color: var(--news-green);
font-size: 16px;
font-weight: 500;
letter-spacing: 0.5px;
}
.esun-news-room__category {
border: 1px solid #dfe7ef;
border-radius: 999px;
color: #738095;
display: inline-block;
font-size: 15px;
font-weight: 700;
justify-self: end;
letter-spacing: 2px;
line-height: 1.2;
max-width: 100%;
overflow: hidden;
padding: 3px 16px 4px;
text-overflow: ellipsis;
white-space: nowrap;
}
.esun-news-room__title {
color: #1f1f1f;
display: block;
font-size: 18px;
font-weight: 500;
line-height: 1.2;
}
.esun-news-room__pagination {
align-items: center;
bottom: 0;
display: flex;
gap: 18px;
justify-content: center;
position: absolute;
width: 100%;
}
.esun-news-room__pagination .swiper-pagination-bullet {
background: rgba(18, 173, 92, 0.25);
border-radius: 999px;
height: 8px;
margin: 0;
opacity: 1;
transition:
width 0.25s ease,
background 0.25s ease;
width: 8px;
}
.esun-news-room__pagination .swiper-pagination-bullet-active {
background: var(--news-green);
width: 32px;
}
@media (max-width: 1023px) {
.esun-news-room {
margin-top: 64px;
}
.esun-news-room__heading {
margin-bottom: 54px;
}
.esun-news-room__grid {
gap: 28px 22px;
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (max-width: 639px) {
.cms-home .esun-news-room {
margin-top: 56px;
padding: 0 0 56px;
}
.esun-news-room__heading {
align-items: center;
margin-bottom: 48px;
}
.esun-news-room__heading h2 {
font-size: 28px;
letter-spacing: 4px;
}
.esun-news-room__heading h2::after {
bottom: -16px;
width: 56px;
}
.esun-news-room__navigation {
display: flex;
gap: 12px;
}
.esun-news-room__previous,
.esun-news-room__next {
font-size: 28px;
height: 42px;
width: 42px;
}
.esun-news-room__slider {
padding-bottom: 46px;
}
.esun-news-room__grid {
gap: 28px;
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.esun-news-room__image-wrap {
border-radius: 24px;
}
.esun-news-room__meta {
align-items: flex-start;
display: flex;
flex-direction: column;
gap: 9px;
margin: 14px 7px 12px;
}
.esun-news-room__meta time {
font-size: 14px;
}
.esun-news-room__category {
font-size: 13px;
font-weight: 400;
justify-self: auto;
letter-spacing: 0;
padding: 3px 10px;
}
.esun-news-room__title {
display: -webkit-box;
font-size: 16px;
font-weight: 600;
line-height: 1.45;
margin: 0 7px;
min-height: 46px;
overflow: hidden;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.esun-news-room__pagination {
gap: 14px;
}
.esun-news-room__pagination .swiper-pagination-bullet {
height: 7px;
width: 7px;
}
.esun-news-room__pagination .swiper-pagination-bullet-active {
width: 27px;
}
}
@@ -0,0 +1,387 @@
.esun-resin {
--resin-green: #12ad5c;
box-sizing: border-box;
margin: 76px auto 0;
max-width: 1360px;
padding: 0 20px;
position: relative;
}
.esun-resin *,
.esun-resin *::before,
.esun-resin *::after {
box-sizing: border-box;
}
.esun-resin__heading {
align-items: flex-start;
display: flex;
justify-content: space-between;
margin-bottom: 36px;
}
.esun-resin__heading h2 {
color: #303030;
font-size: 36px;
font-weight: 700;
letter-spacing: 5px;
margin: 0;
position: relative;
text-transform: uppercase;
}
.esun-resin__heading h2::after {
background: var(--resin-green);
bottom: -20px;
content: "";
height: 2px;
left: 0;
position: absolute;
width: 56px;
}
.esun-resin__explore {
align-items: center;
color: var(--resin-green);
display: inline-flex;
flex: 0 0 auto;
font-size: 14px;
font-weight: 700;
gap: 12px;
margin-top: 35px;
text-decoration: none;
}
.esun-resin__explore:hover,
.esun-resin__explore:focus {
color: #0c914c;
text-decoration: none;
}
.esun-resin__explore span {
font-size: 18px;
line-height: 1;
}
.esun-resin__banner {
background-color: #e3f7fb;
background-position: left center;
background-repeat: no-repeat;
background-size: auto 100%;
border-radius: 40px;
min-height: 445px;
overflow: hidden;
padding: 42px 42px 42px 42%;
}
.esun-resin__products {
display: grid;
gap: 16px;
grid-template-columns: repeat(2, minmax(330px, 1fr));
list-style: none;
margin: 0;
overflow-x: auto;
padding: 0 0 3px;
}
.esun-resin__card {
background: #fff;
border-radius: 24px;
display: grid;
grid-template-columns: 130px minmax(0, 1fr);
min-height: 174px;
overflow: hidden;
padding: 22px 22px 22px 28px;
}
.esun-resin__image {
align-self: center;
display: block;
height: 130px;
overflow: hidden;
border-radius: 10px;
position: relative;
}
.esun-resin__image .product-image-container,
.esun-resin__image .product-image-wrapper {
height: 100%;
width: 100% !important;
}
.esun-resin__image .product-image-wrapper {
padding-bottom: 0 !important;
}
.esun-resin__image .product-image-photo {
height: 100%;
inset: 0;
margin: auto;
max-height: none;
object-fit: cover;
position: absolute;
width: 100%;
}
.esun-resin__details {
display: flex;
flex-direction: column;
min-width: 0;
padding: 2px 0 0 22px;
}
.esun-resin__details h3 {
font-size: 18px;
font-weight: 600;
margin: 0 0 10px;
}
.esun-resin__details h3 a {
color: #333;
text-decoration: none;
}
.esun-resin__details h3 a:hover,
.esun-resin__details h3 a:focus {
color: var(--resin-green);
text-decoration: none;
}
.esun-resin__description {
color: #252525;
display: -webkit-box;
font-size: 13px;
line-height: 1.25;
margin: 0 0 8px;
overflow: hidden;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
}
.esun-resin__price {
align-items: baseline;
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.esun-resin__final-price {
color: var(--resin-green);
font-size: 22px;
font-weight: 600;
}
.esun-resin__regular-price {
color: #98a5ae;
font-size: 14px;
text-decoration: line-through;
}
.esun-resin__footer {
align-items: center;
display: flex;
justify-content: space-between;
margin-top: auto;
min-height: 40px;
padding-top: 10px;
}
.esun-resin__swatches {
align-items: center;
display: flex;
flex-wrap: wrap;
gap: 8px;
min-width: 0;
}
.esun-resin__swatch {
background: #fff;
border: 1px solid #cfcfcf;
border-radius: 50%;
display: inline-flex;
height: 16px;
overflow: hidden;
padding: 1px;
width: 16px;
}
.esun-resin__swatch > span,
.esun-resin__swatch img {
border-radius: 50%;
height: 100%;
object-fit: cover;
width: 100%;
}
.esun-resin__swatch-more {
color: #a4a4a4;
font-size: 12px;
line-height: 16px;
}
.esun-resin__cart {
align-items: center;
background: var(--resin-green);
border-radius: 50%;
color: #fff !important;
display: inline-flex;
flex: 0 0 40px;
height: 40px;
justify-content: center;
margin-left: 12px;
text-decoration: none;
width: 40px;
}
.esun-resin__cart:hover,
.esun-resin__cart:focus {
background: #0c914c;
color: #fff;
text-decoration: none;
}
.esun-resin__cart svg {
fill: none;
height: 20px;
stroke: currentColor;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 1.7;
width: 20px;
}
.esun-resin__visually-hidden {
clip: rect(0, 0, 0, 0);
clip-path: inset(50%);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}
@media (max-width: 1199px) {
.esun-resin__banner {
padding-left: 34%;
}
.esun-resin__products {
grid-template-columns: repeat(2, minmax(360px, 1fr));
}
}
@media (max-width: 899px) {
.esun-resin__banner {
padding-left: 28%;
}
}
@media (max-width: 992px) {
.esun-resin {
margin-top: 48px;
padding: 0 15px;
}
.esun-resin__heading {
align-items: center;
margin-bottom: 42px;
}
.esun-resin__heading h2 {
font-size: 28px;
letter-spacing: 3px;
}
.esun-resin__explore {
font-size: 13px;
gap: 7px;
margin-top: 0;
}
.esun-resin__banner {
background-position: center left;
background-size: cover;
border-radius: 28px;
min-height: 0;
padding: clamp(170px, 30vw, 205px) 0 28px 30px;
}
.esun-resin__products {
display: grid;
gap: 28px;
grid-auto-columns: min(466px, calc(100vw - 90px));
grid-auto-flow: column;
grid-template-columns: none;
grid-template-rows: repeat(2, minmax(0, 1fr));
overscroll-behavior-inline: contain;
padding-right: 30px;
scrollbar-width: none;
scroll-snap-type: x proximity;
-webkit-overflow-scrolling: touch;
}
.esun-resin__products::-webkit-scrollbar {
display: none;
}
.esun-resin__item {
min-width: 0;
scroll-snap-align: start;
}
.esun-resin__card {
grid-template-columns: clamp(105px, 24vw, 155px) minmax(0, 1fr);
height: 100%;
min-height: clamp(160px, 30vw, 205px);
padding: clamp(16px, 3vw, 22px);
}
.esun-resin__image {
height: clamp(115px, 23vw, 155px);
}
.esun-resin__details {
padding-left: clamp(14px, 3vw, 22px);
}
.esun-resin__details h3 {
font-size: clamp(18px, 3.6vw, 24px);
margin-bottom: 5px;
}
.esun-resin__description {
font-size: clamp(13px, 2.5vw, 17px);
margin-bottom: 6px;
}
.esun-resin__final-price {
font-size: clamp(20px, 3.6vw, 24px);
}
.esun-resin__regular-price {
font-size: clamp(12px, 2.3vw, 15px);
}
.esun-resin__footer {
padding-top: 7px;
}
.esun-resin__swatches {
flex-wrap: nowrap;
gap: clamp(6px, 1.6vw, 10px);
overflow: hidden;
}
.esun-resin__swatch {
flex: 0 0 clamp(18px, 4.5vw, 32px);
height: clamp(18px, 4.5vw, 32px);
width: clamp(18px, 4.5vw, 32px);
}
.esun-resin__cart {
flex-basis: clamp(40px, 7.5vw, 54px);
height: clamp(40px, 7.5vw, 54px);
margin-left: 8px;
width: clamp(40px, 7.5vw, 54px);
}
}
@@ -0,0 +1,169 @@
@keyframes bounce {
0% {
transform: translateY(0);
}
30% {
transform: translateY(-10px);
}
50% {
transform: translateY(0);
}
70% {
transform: translateY(-5px);
}
100% {
transform: translateY(0);
}
}
.esun-resources-downloads {
--resources-green: #12ad5c;
box-sizing: border-box;
margin: 88px auto 0;
max-width: 1360px;
padding: 0 20px 70px;
}
.esun-resources-downloads *,
.esun-resources-downloads *::before,
.esun-resources-downloads *::after {
box-sizing: border-box;
}
.esun-resources-downloads h2 {
color: #303030;
font-size: 38px;
font-weight: 700;
letter-spacing: 6px;
margin: 0 0 96px;
position: relative;
text-transform: uppercase;
}
.esun-resources-downloads h2::after {
background: var(--resources-green);
bottom: -24px;
content: "";
height: 2px;
left: 0;
position: absolute;
width: 70px;
}
.esun-resources-downloads__items {
display: grid;
gap: 28px;
grid-template-columns: repeat(4, minmax(0, 1fr));
}
.esun-resources-downloads__item {
align-items: center;
background: #eff9f1;
border: 1px solid #d9ecdc;
border-radius: 12px;
display: flex;
flex-direction: column;
height: 250px;
justify-content: flex-end;
overflow: hidden;
padding: 28px 26px 34px;
position: relative;
}
.esun-resources-downloads__link {
align-items: center;
background: #fff;
border-radius: 50%;
color: #111;
display: flex;
font-size: 25px;
height: 48px;
justify-content: center;
line-height: 1;
position: absolute;
right: 18px;
text-decoration: none;
top: 18px;
width: 48px;
z-index: 2;
transition: all 0.5s ease-in-out;
}
.esun-resources-downloads__link:hover,
.esun-resources-downloads__link:focus {
text-decoration: none;
transform: rotate(45deg);
background-color: #18a957;
color: #fff;
}
.esun-resources-downloads__link--disabled {
cursor: default;
}
.esun-resources-downloads__image {
height: 145px;
margin-bottom: 10px;
max-width: 82%;
object-fit: contain;
width: auto;
}
img.esun-resources-downloads__image:hover {
animation: bounce 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) forwards;
}
.esun-resources-downloads__item h3 {
color: var(--resources-green);
font-size: 21px;
font-weight: 700;
line-height: 1.2;
margin: 0;
text-align: center;
}
@media (max-width: 1023px) {
.esun-resources-downloads__items {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (max-width: 639px) {
.esun-resources-downloads {
margin-top: 56px;
padding: 0 15px 48px;
}
.esun-resources-downloads h2 {
font-size: 27px;
letter-spacing: 3px;
margin-bottom: 68px;
}
.esun-resources-downloads__items {
gap: 12px;
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.esun-resources-downloads__item {
border-radius: 10px;
height: clamp(160px, 48vw, 190px);
padding: 18px 10px 20px;
}
.esun-resources-downloads__link {
font-size: 18px;
height: 34px;
right: 10px;
top: 10px;
width: 34px;
}
.esun-resources-downloads__image {
height: clamp(85px, 27vw, 120px);
margin-bottom: 6px;
max-width: 88%;
}
.esun-resources-downloads__item h3 {
font-size: clamp(13px, 3.5vw, 17px);
line-height: 1.15;
}
}
@@ -0,0 +1,50 @@
define([], function () {
'use strict';
return function (config, element) {
var activeItem = null;
var interactiveItems = element.querySelectorAll(
'.esun-application__item--interactive'
);
function activate(item) {
if (activeItem && activeItem !== item) {
activeItem.classList.remove('is-active');
}
activeItem = item;
element.classList.add('has-active-item');
item.classList.add('is-active');
}
function deactivate(item) {
if (activeItem !== item) {
return;
}
item.classList.remove('is-active');
element.classList.remove('has-active-item');
activeItem = null;
}
interactiveItems.forEach(function (item) {
item.addEventListener('mouseenter', function () {
activate(item);
});
item.addEventListener('mouseleave', function () {
deactivate(item);
});
item.addEventListener('focusin', function () {
activate(item);
});
item.addEventListener('focusout', function (event) {
if (!item.contains(event.relatedTarget)) {
deactivate(item);
}
});
});
};
});
@@ -0,0 +1,36 @@
define([
'Swiper'
], function (Swiper) {
'use strict';
return function (config, element) {
var hasNavigation = element.getAttribute('data-has-navigation') === 'true';
new Swiper(element, {
centeredSlides: true,
initialSlide: 0,
loop: hasNavigation,
slidesPerView: 1.12,
spaceBetween: 0,
observer: true,
observeParents: true,
watchOverflow: true,
breakpoints: {
640: {
slidesPerView: 1.35,
spaceBetween: 0
},
1024: {
slidesPerView: 1.72,
spaceBetween: 0
}
},
navigation: hasNavigation ? {
nextEl: element.closest('.esun-awards-reviews')
.querySelector('.esun-awards-reviews__next'),
prevEl: element.closest('.esun-awards-reviews')
.querySelector('.esun-awards-reviews__previous')
} : {}
});
};
});
@@ -0,0 +1,35 @@
define([], function () {
'use strict';
return function (config, element) {
var end = new Date(element.getAttribute('data-end')).getTime();
var timer;
function setValue(unit, value) {
var target = element.querySelector('[data-time="' + unit + '"]');
if (target) {
target.textContent = String(Math.max(0, value)).padStart(2, '0');
}
}
function update() {
var distance = Math.max(0, end - Date.now());
setValue('days', Math.floor(distance / 86400000));
setValue('hours', Math.floor((distance % 86400000) / 3600000));
setValue('minutes', Math.floor((distance % 3600000) / 60000));
setValue('seconds', Math.floor((distance % 60000) / 1000));
if (distance === 0 && timer) {
window.clearInterval(timer);
}
}
if (!Number.isFinite(end)) {
return;
}
update();
timer = window.setInterval(update, 1000);
};
});
@@ -0,0 +1,39 @@
define([
'Swiper'
], function (Swiper) {
'use strict';
return function (config, element) {
var hasNavigation = element.getAttribute('data-has-navigation') === 'true';
if (window.matchMedia('(max-width: 639px)').matches) {
return;
}
new Swiper(element, {
slidesPerView: 1.26,
spaceBetween: 12,
observer: true,
observeParents: true,
watchOverflow: true,
breakpoints: {
768: {
slidesPerView: 2,
spaceBetween: 20
},
1024: {
slidesPerView: 4,
spaceBetween: 28
}
},
navigation: hasNavigation ? {
nextEl: element.querySelector('.esun-create-anything__next'),
prevEl: element.querySelector('.esun-create-anything__previous')
} : {},
pagination: hasNavigation ? {
el: element.querySelector('.esun-create-anything__pagination'),
clickable: true
} : {}
});
};
});
@@ -0,0 +1,22 @@
define([
'Swiper'
], function (Swiper) {
'use strict';
return function (config, element) {
if (element.getAttribute('data-has-pagination') !== 'true') {
return;
}
new Swiper(element, {
autoHeight: true,
allowTouchMove: true,
observer: true,
observeParents: true,
pagination: {
el: element.querySelector('.esun-hot-sale__pagination'),
clickable: true
}
});
};
});
@@ -0,0 +1,50 @@
define([], function () {
'use strict';
return function (config, element) {
var activeItem = null;
var interactiveItems = element.querySelectorAll(
'.esun-innovative-materials__item--interactive'
);
function activate(item) {
if (activeItem && activeItem !== item) {
activeItem.classList.remove('is-active');
}
activeItem = item;
element.classList.add('has-active-item');
item.classList.add('is-active');
}
function deactivate(item) {
if (activeItem !== item) {
return;
}
item.classList.remove('is-active');
element.classList.remove('has-active-item');
activeItem = null;
}
interactiveItems.forEach(function (item) {
item.addEventListener('mouseenter', function () {
activate(item);
});
item.addEventListener('mouseleave', function () {
deactivate(item);
});
item.addEventListener('focusin', function () {
activate(item);
});
item.addEventListener('focusout', function (event) {
if (!item.contains(event.relatedTarget)) {
deactivate(item);
}
});
});
};
});
@@ -0,0 +1,40 @@
define([], function () {
'use strict';
return function (config, element) {
var video = element.querySelector('video');
if (!video) {
return;
}
function playVideo() {
try {
video.currentTime = 0;
} catch (error) {}
element.classList.add('is-playing');
video.play().catch(function () {});
}
function stopVideo() {
video.pause();
element.classList.remove('is-playing');
}
element.addEventListener('mouseenter', playVideo);
element.addEventListener('mouseleave', stopVideo);
element.addEventListener('click', function (event) {
if (event.target.closest('a')) {
return;
}
if (video.paused) {
playVideo();
} else {
stopVideo();
}
});
};
});
@@ -0,0 +1,22 @@
define([
'Swiper'
], function (Swiper) {
'use strict';
return function (config, element) {
new Swiper(element, {
autoHeight: true,
loop: element.querySelectorAll('.swiper-slide').length > 1,
observer: true,
observeParents: true,
navigation: {
nextEl: element.querySelector('.esun-new-product__next'),
prevEl: element.querySelector('.esun-new-product__previous')
},
pagination: {
el: element.querySelector('.esun-new-product__pagination'),
clickable: true
}
});
};
});
@@ -0,0 +1,27 @@
define([
'Swiper'
], function (Swiper) {
'use strict';
return function (config, element) {
var hasNavigation = element.getAttribute('data-has-navigation') === 'true';
var container = element.closest('.esun-news-room');
new Swiper(element, {
slidesPerView: 1,
slidesPerGroup: 1,
spaceBetween: 36,
observer: true,
observeParents: true,
watchOverflow: true,
navigation: hasNavigation ? {
nextEl: container.querySelector('.esun-news-room__next'),
prevEl: container.querySelector('.esun-news-room__previous')
} : {},
pagination: hasNavigation ? {
el: element.querySelector('.esun-news-room__pagination'),
clickable: true
} : {}
});
};
});
@@ -0,0 +1,125 @@
define([], function () {
'use strict';
function getImage(card) {
var imageWrap = card.querySelector('[data-role=esun-product-image]');
return imageWrap ? imageWrap.querySelector('img') : null;
}
function rememberDefaultImage(image) {
if (!image || image.getAttribute('data-default-src')) {
return;
}
image.setAttribute('data-default-src', image.getAttribute('src') || '');
image.setAttribute('data-default-srcset', image.getAttribute('srcset') || '');
}
function setImage(image, url) {
if (!image || !url) {
return;
}
rememberDefaultImage(image);
image.setAttribute('src', url);
image.removeAttribute('srcset');
}
function restoreImage(image) {
var defaultSrc;
var defaultSrcset;
if (!image) {
return;
}
defaultSrc = image.getAttribute('data-default-src') || '';
defaultSrcset = image.getAttribute('data-default-srcset') || '';
if (defaultSrc) {
image.setAttribute('src', defaultSrc);
}
if (defaultSrcset) {
image.setAttribute('srcset', defaultSrcset);
} else {
image.removeAttribute('srcset');
}
}
return function (config, element) {
element.querySelectorAll('[data-role=esun-product-card]').forEach(function (card) {
var image = getImage(card);
var handledSwatches = new WeakSet();
if (!image) {
return;
}
rememberDefaultImage(image);
card.querySelectorAll('[data-role=esun-product-swatches]').forEach(function (swatches) {
swatches.querySelectorAll('[data-child-image], [data-product-image]').forEach(function (swatch) {
handledSwatches.add(swatch);
swatch.addEventListener('mouseenter', function () {
setImage(
image,
swatch.getAttribute('data-child-image') ||
swatch.getAttribute('data-product-image')
);
});
swatch.addEventListener('focus', function () {
setImage(
image,
swatch.getAttribute('data-child-image') ||
swatch.getAttribute('data-product-image')
);
});
});
swatches.addEventListener('mouseleave', function () {
restoreImage(image);
});
swatches.addEventListener('focusout', function (event) {
if (!event.relatedTarget || !swatches.contains(event.relatedTarget)) {
restoreImage(image);
}
});
});
card.querySelectorAll('[data-child-image], [data-product-image]').forEach(function (swatch) {
if (handledSwatches.has(swatch)) {
return;
}
swatch.addEventListener('mouseenter', function () {
setImage(
image,
swatch.getAttribute('data-child-image') ||
swatch.getAttribute('data-product-image')
);
});
swatch.addEventListener('focus', function () {
setImage(
image,
swatch.getAttribute('data-child-image') ||
swatch.getAttribute('data-product-image')
);
});
swatch.addEventListener('mouseleave', function () {
restoreImage(image);
});
swatch.addEventListener('blur', function () {
restoreImage(image);
});
});
});
};
});
@@ -0,0 +1,74 @@
define([], function () {
'use strict';
return function (config, element) {
var video = element.querySelector('video');
var isPlaying = false;
if (!video || element.getAttribute('data-video-hover-bound') === 'true') {
return;
}
element.setAttribute('data-video-hover-bound', 'true');
video.muted = true;
video.playsInline = true;
video.setAttribute('muted', 'muted');
video.setAttribute('playsinline', 'playsinline');
function playVideo() {
if (isPlaying) {
return;
}
isPlaying = true;
try {
video.currentTime = 0;
} catch (error) {}
element.classList.add('is-playing');
video.play().catch(function () {
isPlaying = false;
element.classList.remove('is-playing');
});
}
function stopVideo() {
isPlaying = false;
video.pause();
try {
video.currentTime = 0;
} catch (error) {}
element.classList.remove('is-playing');
}
element.addEventListener('mouseover', function (event) {
if (element.contains(event.relatedTarget)) {
return;
}
playVideo();
});
element.addEventListener('mouseout', function (event) {
if (element.contains(event.relatedTarget)) {
return;
}
stopVideo();
});
element.addEventListener('pointerenter', playVideo);
element.addEventListener('pointerleave', stopVideo);
element.addEventListener('touchstart', function (event) {
if (event.target.closest('a')) {
return;
}
playVideo();
}, {passive: true});
};
});