Commit 9acae16e by lmf

优化主页最新产品模块

parent 2c319244
...@@ -34,7 +34,7 @@ if ($exist = ($block->getProductCollection() && $block->getProductCollection()-> ...@@ -34,7 +34,7 @@ if ($exist = ($block->getProductCollection() && $block->getProductCollection()->
<?php if ($exist) :?> <?php if ($exist) :?>
<div class="block widget block-new-products <?= /* @noEscape */ $mode ?>"> <div class="block widget block-new-products <?= /* @noEscape */ $mode ?>">
<div class="block-title"> <div class="block-title">
<strong role="heading" aria-level="2">NEW ARRIVALS</strong> <strong role="heading" aria-level="2" class="flashsale-title">NEW ARRIVALS</strong>
</div> </div>
<div class="block-content home-new-product"> <div class="block-content home-new-product">
<?= /* @noEscape */ '<!-- ' . $image . '-->' ?> <?= /* @noEscape */ '<!-- ' . $image . '-->' ?>
...@@ -143,6 +143,15 @@ if ($exist = ($block->getProductCollection() && $block->getProductCollection()-> ...@@ -143,6 +143,15 @@ if ($exist = ($block->getProductCollection() && $block->getProductCollection()->
text-align: center; text-align: center;
font-size: x-large; font-size: x-large;
} }
.product-item-name .product-item-link{
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
cursor: pointer;
width: 100%;
display: inline-block;
color: #222222;
}
.block-title > sto{ .block-title > sto{
background: #fff; background: #fff;
font-size: 24px; font-size: 24px;
...@@ -157,4 +166,19 @@ if ($exist = ($block->getProductCollection() && $block->getProductCollection()-> ...@@ -157,4 +166,19 @@ if ($exist = ($block->getProductCollection() && $block->getProductCollection()->
justify-content: space-around; justify-content: space-around;
align-items: flex-end; align-items: flex-end;
} }
strong.flashsale-title:hover {
text-decoration: underline;
}
strong.flashsale-title {
background: #fff;
font-size: 24px;
font-weight: bold;
color: #000000;
margin: 0px;
padding: 40px;
text-align: center;
}
button.tocart {
background: #000;
}
</style> </style>
...@@ -57,7 +57,6 @@ ...@@ -57,7 +57,6 @@
</div> </div>
<?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>
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(); ?> 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(); ?>
......
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