Skip to content

Commit

Permalink
WIP: Homepage content rewritten with pagebuilder. #2
Browse files Browse the repository at this point in the history
  • Loading branch information
vovayatsyuk committed Aug 17, 2021
1 parent 804bec5 commit 393ffb4
Show file tree
Hide file tree
Showing 14 changed files with 106 additions and 45 deletions.
13 changes: 0 additions & 13 deletions Magento_Theme/layout/cms_index_index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="sidebar.additional">
<block class="Magento\Cms\Block\Block" name="homepage_callout" before="-">
<arguments>
<argument name="block_id" xsi:type="string">homepage_callout</argument>
</arguments>
</block>
<block class="Magento\Newsletter\Block\Subscribe"
name="form.subscribe.right"
as="subscribe_right"
template="subscribe_right.phtml"
after="homepage_callout"
/>
</referenceContainer>
<referenceContainer name="page.bottom">
<block class="Magento\Cms\Block\Block" name="featured">
<arguments>
Expand Down
7 changes: 0 additions & 7 deletions etc/marketplace/commands/cms_block.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@
<param name="path" type="path">content/cms_block/slogan.html</param>
</item>
</item>
<item>
<item name="title">homepage_callout</item>
<item name="identifier">homepage_callout</item>
<item name="content" helper="Swissup\Marketplace\Installer\Helper\Renderer::render">
<param name="path" type="path">content/cms_block/home_callout.html</param>
</item>
</item>
<item>
<item name="title">footer_contacts</item>
<item name="identifier">footer_contacts</item>
Expand Down
2 changes: 1 addition & 1 deletion etc/marketplace/commands/cms_page.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<item>
<item name="title">Absolute Theme</item>
<item name="identifier">home</item>
<item name="page_layout">2columns-right</item>
<item name="page_layout">1column</item>
<item name="content" helper="Swissup\Marketplace\Installer\Helper\Renderer::render">
<param name="path" type="path">content/cms_page/home.html</param>
</item>
Expand Down
8 changes: 8 additions & 0 deletions etc/marketplace/commands/product.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<config>
<command class="Swissup\Marketplace\Installer\Command\ProductCollection">
<data>
<item name="featured">25</item>
</data>
</command>
</config>
8 changes: 8 additions & 0 deletions etc/marketplace/commands/resources.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<config>
<command class="Swissup\Marketplace\Installer\Command\CopyMediaDir">
<data>
<item type="path">content/media</item>
</data>
</command>
</config>
8 changes: 0 additions & 8 deletions etc/marketplace/content/cms_block/home_callout.html

This file was deleted.

101 changes: 86 additions & 15 deletions etc/marketplace/content/cms_page/home.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,92 @@
<div class="homepage-slider" >
<div class="swiper-container" data-mage-init='{"Swissup_Swiper/js/swiper" : {"lazy": true, "slidesPerView": 1, "autoplay": {"delay": 2500, "disableOnInteraction": false}, "navigation": {"nextEl": ".swiper-button-next", "prevEl": ".swiper-button-prev"}}}'>
<div class="swiper-wrapper">
<div class="swiper-slide">
<div class="swiper-lazy-preloader"></div>
<img class="swiper-lazy" data-src="{{view url='images/slider/slide1.jpg'}}" alt="" width="932" height="315"/>
<style>
#html-body [data-pb-style=G4NKY8P],#html-body [data-pb-style=U5VNY7J]{justify-content:flex-start;display:flex;flex-direction:column;background-position:left top;background-size:cover;background-repeat:no-repeat;background-attachment:scroll}#html-body [data-pb-style=G4NKY8P]{margin-bottom:20px}#html-body [data-pb-style=U5VNY7J]{width:81.25%;padding-right:15px;align-self:center}#html-body [data-pb-style=AR52GCF]{min-height:300px}#html-body [data-pb-style=MY82IQP]{background-position:center center;background-size:contain;background-repeat:no-repeat;min-height:300px}#html-body [data-pb-style=HSQJ4O6]{min-height:300px;background-color:transparent}#html-body [data-pb-style=L8V1JPY]{background-position:center center;background-size:contain;background-repeat:no-repeat}#html-body [data-pb-style=HTTCFH6]{background-color:transparent}#html-body [data-pb-style=B3TQ0S3]{background-position:center center;background-size:contain;background-repeat:no-repeat}#html-body [data-pb-style=BLNCX6V]{background-color:transparent}#html-body [data-pb-style=D3WB4EE]{justify-content:flex-start;display:flex;flex-direction:column;background-position:left top;background-size:cover;background-repeat:no-repeat;background-attachment:scroll;width:18.75%;align-self:stretch}#html-body [data-pb-style=DVYQUDH]{margin-bottom:10px}#html-body [data-pb-style=WH8AL50]{background-color:#3170b9;background-position:left center;background-size:contain;background-repeat:no-repeat;background-attachment:scroll;border-radius:6px}#html-body [data-pb-style=JB1D3OF]{border-radius:6px;min-height:113px;background-color:transparent}#html-body [data-pb-style=Y3Q6B3G]{margin-bottom:10px}#html-body [data-pb-style=XNRQG5S]{background-color:#82bb6a;background-position:left center;background-size:contain;background-repeat:no-repeat;background-attachment:scroll;border-radius:6px}#html-body [data-pb-style=VFFGMM1]{border-radius:6px;min-height:113px;background-color:transparent}#html-body [data-pb-style=AF1EENT]{justify-content:flex-start;display:flex;flex-direction:column;background-position:left top;background-size:cover;background-repeat:no-repeat;background-attachment:scroll}#html-body [data-pb-style=YGAFCAG]{border-style:solid;border-color:#f0f0f0;border-width:1px;border-radius:8px;margin-top:0;margin-bottom:10px;padding:10px 12px}@media only screen and (max-width: 768px) { #html-body [data-pb-style=AR52GCF]{min-height:250px} }
</style>
<div data-appearance="contained" data-content-type="row" data-element="main">
<div data-background-images="{}" data-background-type="image" data-element="inner" data-enable-parallax="0" data-parallax-speed="0.5" data-pb-style="G4NKY8P" data-video-fallback-src="" data-video-lazy-load="true" data-video-loop="true" data-video-play-only-visible="true">
<div class="pagebuilder-column-group" data-content-type="column-group" data-element="main" data-grid-size="16" style="display: flex;">
<div class="pagebuilder-column" data-appearance="align-center" data-background-images="{}" data-content-type="column" data-element="main" data-pb-style="U5VNY7J">
<div class="pagebuilder-slider" data-appearance="default" data-autoplay="true" data-autoplay-speed="4000" data-content-type="slider" data-element="main" data-fade="false" data-infinite-loop="true" data-pb-style="AR52GCF" data-show-arrows="true" data-show-dots="false">
<div data-appearance="poster" data-content-type="slide" data-element="main" data-show-button="never" data-show-overlay="never" data-slide-name="">
<div data-element="empty_link">
<div class="pagebuilder-slide-wrapper" data-background-images='{\"desktop_image\":\"{{media url=wysiwyg/absolute/slide1.jpg}}\"}' data-background-type="image" data-element="wrapper" data-pb-style="MY82IQP" data-video-fallback-src="" data-video-lazy-load="true" data-video-loop="true" data-video-play-only-visible="true">
<div class="pagebuilder-overlay pagebuilder-poster-overlay" data-element="overlay" data-overlay-color="" data-pb-style="HSQJ4O6">
<div class="pagebuilder-poster-content">
<div data-element="content">
</div>
</div>
</div>
</div>
</div>
</div>
<div data-appearance="poster" data-content-type="slide" data-element="main" data-show-button="never" data-show-overlay="never" data-slide-name="">
<div data-element="empty_link">
<div class="pagebuilder-slide-wrapper" data-background-images='{\"desktop_image\":\"{{media url=wysiwyg/absolute/slide2.jpg}}\"}' data-background-type="image" data-element="wrapper" data-pb-style="L8V1JPY" data-video-fallback-src="" data-video-lazy-load="true" data-video-loop="true" data-video-play-only-visible="true">
<div class="pagebuilder-overlay pagebuilder-poster-overlay" data-element="overlay" data-overlay-color="" data-pb-style="HTTCFH6">
<div class="pagebuilder-poster-content">
<div data-element="content">
</div>
</div>
</div>
</div>
</div>
</div>
<div data-appearance="poster" data-content-type="slide" data-element="main" data-show-button="never" data-show-overlay="never" data-slide-name="">
<div data-element="empty_link">
<div class="pagebuilder-slide-wrapper" data-background-images='{\"desktop_image\":\"{{media url=wysiwyg/absolute/slide3.jpg}}\"}' data-background-type="image" data-element="wrapper" data-pb-style="B3TQ0S3" data-video-fallback-src="" data-video-lazy-load="true" data-video-loop="true" data-video-play-only-visible="true">
<div class="pagebuilder-overlay pagebuilder-poster-overlay" data-element="overlay" data-overlay-color="" data-pb-style="BLNCX6V">
<div class="pagebuilder-poster-content">
<div data-element="content">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="swiper-slide">
<div class="swiper-lazy-preloader"></div>
<img class="swiper-lazy" data-src="{{view url='images/slider/slide2.jpg'}}" alt="" width="932" height="315"/>
<div class="pagebuilder-column" data-appearance="full-height" data-background-images="{}" data-content-type="column" data-element="main" data-pb-style="D3WB4EE">
<div data-appearance="poster" data-content-type="banner" data-element="main" data-pb-style="DVYQUDH" data-show-button="never" data-show-overlay="never">
<div data-element="empty_link">
<div class="pagebuilder-banner-wrapper" data-background-images='{\"desktop_image\":\"{{media url=wysiwyg/absolute/callout1.png}}\"}' data-background-type="image" data-element="wrapper" data-pb-style="WH8AL50" data-video-fallback-src="" data-video-lazy-load="true" data-video-loop="true" data-video-play-only-visible="true">
<div class="pagebuilder-overlay pagebuilder-poster-overlay" data-element="overlay" data-overlay-color="" data-pb-style="JB1D3OF">
<div class="pagebuilder-poster-content">
<div data-element="content">
</div>
</div>
</div>
</div>
</div>
</div>
<div data-appearance="poster" data-content-type="banner" data-element="main" data-pb-style="Y3Q6B3G" data-show-button="never" data-show-overlay="never">
<div data-element="empty_link">
<div class="pagebuilder-banner-wrapper" data-background-images='{\"desktop_image\":\"{{media url=wysiwyg/absolute/callout2.png}}\"}' data-background-type="image" data-element="wrapper" data-pb-style="XNRQG5S" data-video-fallback-src="" data-video-lazy-load="true" data-video-loop="true" data-video-play-only-visible="true">
<div class="pagebuilder-overlay pagebuilder-poster-overlay" data-element="overlay" data-overlay-color="" data-pb-style="VFFGMM1">
<div class="pagebuilder-poster-content">
<div data-element="content">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sidebar" data-appearance="default" data-content-type="html" data-element="main">
{{block class="Magento\Newsletter\Block\Subscribe" template="Magento_Newsletter::subscribe_right.phtml" name="form.subscribe.right"}}
</div>
</div>
<div class="swiper-slide">
<div class="swiper-lazy-preloader"></div>
<img class="swiper-lazy" data-src="{{view url='images/slider/slide3.jpg'}}" alt="" width="932" height="315"/>
</div>
</div>
</div>
<div data-appearance="contained" data-content-type="row" data-element="main">
<div data-background-images="{}" data-background-type="image" data-element="inner" data-enable-parallax="0" data-parallax-speed="0.5" data-pb-style="AF1EENT" data-video-fallback-src="" data-video-lazy-load="true" data-video-loop="true" data-video-play-only-visible="true">
<div data-appearance="default" data-content-type="text" data-element="main" data-pb-style="YGAFCAG">
<div>
<span id="GNXLNV1" style="font-size: 18px; color: #459b06;">
New Products
</span>
</div>
</div>
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
<div data-appearance="carousel" data-autoplay="false" data-autoplay-speed="4000" data-carousel-mode="continuous" data-center-padding="90px" data-content-type="products" data-element="main" data-infinite-loop="true" data-show-arrows="true" data-show-dots="false">
{{widget type="Magento\CatalogWidget\Block\Product\ProductsList" template="Magento_PageBuilder::catalog/product/widget/content/carousel.phtml" anchor_text="" id_path="" show_pager="0" products_count="5" condition_option="condition" condition_option_value="" type_name="Catalog Products Carousel" conditions_encoded="^[`1`:^[`type`:`Magento||CatalogWidget||Model||Rule||Condition||Combine`,`aggregator`:`all`,`value`:`1`,`new_child`:``^],`1--1`:^[`type`:`Magento||CatalogWidget||Model||Rule||Condition||Product`,`attribute`:`new`,`operator`:`==`,`value`:`1`^]^]" sort_order="date_newest_top"}}
</div>
</div>
</div>
{{widget type="Magento\Catalog\Block\Product\Widget\NewWidget" display_type="new_products" products_count="8" template="product/widget/new/content/new_grid.phtml"}}
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 2 additions & 0 deletions etc/marketplace/installer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@
<include path="commands/cms_page.xml"/>
<include path="commands/cms_block.xml"/>
<include path="commands/product_attribute.xml"/>
<include path="commands/product.xml"/>
<include path="commands/resources.xml"/>
</commands>
</config>
2 changes: 1 addition & 1 deletion web/css/source/_absolute.less
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@
width: auto;
max-width: none;
border: 0;
border-radius: 0;
border-radius: 6px;

color: @color-white;
background: #6194ae;
Expand Down

0 comments on commit 393ffb4

Please sign in to comment.