init
This commit is contained in:
+29
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0"?>
|
||||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
layout="1column"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
|
||||
<head>
|
||||
<css src="Magento_Catalog::css/category-list.css"/>
|
||||
<css src="Magento_CatalogSearch::css/search-results.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<attribute name="class" value="esun-search-results"/>
|
||||
|
||||
<referenceBlock name="catalogsearch.leftnav" remove="true"/>
|
||||
<referenceBlock name="catalog.compare.sidebar" remove="true"/>
|
||||
<referenceBlock name="wishlist_sidebar" remove="true"/>
|
||||
<referenceBlock name="catalogsearch.product.addto.compare" remove="true"/>
|
||||
|
||||
<referenceBlock name="search_result_list">
|
||||
<arguments>
|
||||
<argument name="cardViewModel" xsi:type="object">Esun\Catalog\ViewModel\Category\ProductCard</argument>
|
||||
</arguments>
|
||||
<action method="setTemplate">
|
||||
<argument name="template" xsi:type="string">Magento_Catalog::product/list.phtml</argument>
|
||||
</action>
|
||||
</referenceBlock>
|
||||
|
||||
<referenceBlock name="product_list_toolbar"
|
||||
template="Magento_CatalogSearch::product/list/toolbar.phtml"/>
|
||||
</body>
|
||||
</page>
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* Search result toolbar: result count above the grid and pagination below it.
|
||||
*
|
||||
* @var $block \Magento\Catalog\Block\Product\ProductList\Toolbar
|
||||
*/
|
||||
?>
|
||||
<?php if ($block->getCollection()->getSize()): ?>
|
||||
<div class="toolbar toolbar-products">
|
||||
<?php if ($block->getIsBottom()): ?>
|
||||
<?= /* @noEscape */ $block->getPagerHtml() ?>
|
||||
<?php else: ?>
|
||||
<div class="esun-category-toolbar__amount">
|
||||
<?= /* @noEscape */ $block->fetchView(
|
||||
$block->getTemplateFile('Magento_Catalog::product/list/toolbar/amount.phtml')
|
||||
) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,180 @@
|
||||
.catalogsearch-result-index {
|
||||
--esun-green: #12ad5c;
|
||||
--esun-green-dark: #0c914c;
|
||||
--esun-text: #242424;
|
||||
--esun-muted: #777;
|
||||
--esun-border: #edf1ee;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index.page-layout-1column .page-main {
|
||||
box-sizing: border-box;
|
||||
max-width: 1600px;
|
||||
width: 83.333333%;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index .column.main,
|
||||
.catalogsearch-result-index .search.results {
|
||||
min-width: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index .page-title-wrapper {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index .search.results dl.block {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index .toolbar-products {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 0 0 26px;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index .toolbar-products .toolbar-amount {
|
||||
color: #313131;
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index .toolbar-products .toolbar-number {
|
||||
color: var(--esun-green);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index .esun-category-products .product-items {
|
||||
display: grid;
|
||||
gap: 24px;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index .esun-category-products .product-item {
|
||||
margin: 0;
|
||||
min-width: 0;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index .toolbar-products:last-child {
|
||||
justify-content: center;
|
||||
margin: 42px 0 0;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index .pager {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index .pager .limiter {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index .pages {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index .pages .label {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index .pages .items {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
gap: 18px;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index .pages .item {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index .pages .page {
|
||||
background: var(--esun-green);
|
||||
border-radius: 50%;
|
||||
display: block;
|
||||
height: 6px;
|
||||
opacity: 0.75;
|
||||
overflow: hidden;
|
||||
text-indent: 30px;
|
||||
white-space: nowrap;
|
||||
width: 6px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index .pages .current .page {
|
||||
border-radius: 999px;
|
||||
opacity: 1;
|
||||
width: 28px;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index .pages .action {
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
border: 2px solid var(--esun-green);
|
||||
border-radius: 50%;
|
||||
color: var(--esun-green);
|
||||
display: inline-flex;
|
||||
height: 36px;
|
||||
justify-content: center;
|
||||
text-decoration: none;
|
||||
width: 36px;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index .pages .previous::before {
|
||||
content: "\2039";
|
||||
font-size: 28px;
|
||||
line-height: 1;
|
||||
margin: -2px 0 0;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index .pages .next::before {
|
||||
content: "\203a";
|
||||
font-size: 28px;
|
||||
line-height: 1;
|
||||
margin: -2px 0 0;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index .pages .action span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (max-width: 1199px) {
|
||||
.catalogsearch-result-index .esun-category-products .product-items {
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 899px) {
|
||||
.catalogsearch-result-index.page-layout-1column .page-main {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index .esun-category-products .product-items {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 639px) {
|
||||
.catalogsearch-result-index .page-main {
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
.catalogsearch-result-index .esun-category-products .product-items {
|
||||
gap: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 420px) {
|
||||
.catalogsearch-result-index .esun-category-products .product-items {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user