Commit 4d4ea770 by lmf

优化首页最新产品模块样式

parent c01849b4
...@@ -36,7 +36,7 @@ if ($exist = ($block->getProductCollection() && $block->getProductCollection()-> ...@@ -36,7 +36,7 @@ if ($exist = ($block->getProductCollection() && $block->getProductCollection()->
<div class="block-title"> <div class="block-title">
<strong role="heading" aria-level="2">NEW ARRIVALS</strong> <strong role="heading" aria-level="2">NEW ARRIVALS</strong>
</div> </div>
<div class="block-content"> <div class="block-content home-new-product">
<?= /* @noEscape */ '<!-- ' . $image . '-->' ?> <?= /* @noEscape */ '<!-- ' . $image . '-->' ?>
<div class="products-<?= /* @noEscape */ $mode ?> <?= /* @noEscape */ $mode ?>"> <div class="products-<?= /* @noEscape */ $mode ?> <?= /* @noEscape */ $mode ?>">
<ol class="product-items <?= /* @noEscape */ $type ?>"> <ol class="product-items <?= /* @noEscape */ $type ?>">
...@@ -134,3 +134,27 @@ if ($exist = ($block->getProductCollection() && $block->getProductCollection()-> ...@@ -134,3 +134,27 @@ if ($exist = ($block->getProductCollection() && $block->getProductCollection()->
</div> </div>
</div> </div>
<?php endif;?> <?php endif;?>
<style>
.home-new-product{
width: 80%;
display: contents;
}
.block-title {
text-align: center;
font-size: x-large;
}
.block-title > sto{
background: #fff;
font-size: 24px;
font-weight: bold;
color: #000000;
margin: 0px;
padding: 40px;
text-align: center;
}
.products-grid .product-items {
display: flex;
justify-content: space-around;
align-items: flex-end;
}
</style>
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<?php <?php
//<p>{{widget type="Magento\Catalog\Block\Product\Widget\NewWidget" display_type="new_products" show_pager="0" products_count="3" template="product/widget/new/content/new_list.phtml"}}</p> //<p>{{widget type="Magento\Catalog\Block\Product\Widget\NewWidget" display_type="new_products" show_pager="0" products_count="3" template="product/widget/new/content/new_list.phtml"}}</p>
echo $this->getLayout()->createBlock("Magento\Catalog\Block\Product\Widget\NewWidget")->setDisplayType("all_products")->setProductsCount("3")->setTemplate("product/widget/new/content/home_news_product.phtml")->toHtml(); ?> echo $this->getLayout()->createBlock("Magento\Catalog\Block\Product\Widget\NewWidget")->setDisplayType("all_products")->setProductsCount("4")->setTemplate("product/widget/new/content/home_news_product.phtml")->toHtml(); ?>
<div class="flash_sale"> <div class="flash_sale">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment