-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from thelia/feat/search-result
search template
- Loading branch information
Showing
7 changed files
with
114 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
components/Layout/CategoryProduct/CategoryProduct.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{% set products = products|default([]) %} | ||
{% set totalProducts = totalProducts|default("") %} | ||
|
||
<section class="px-6 lg:px-[120px] py-6 lg:flex lg:gap-[115px] lg:justify-between"> | ||
<div class="w-[310px] lg:block hidden mt-[44px] sticky top-20"> | ||
<div class="h4 mb-[22px]">{{ 'Filter'|trans }}</div> | ||
|
||
<div> | ||
{% include '@components/Molecules/Accordion/Accordion.twig' with { | ||
title: "Size" | trans, | ||
content: "" | ||
} %} | ||
{% include '@components/Molecules/Accordion/Accordion.twig' with { | ||
title: "Color" | trans, | ||
content: "test" | ||
} %} | ||
{% include '@components/Molecules/Accordion/Accordion.twig' with { | ||
title: "Material" | trans, | ||
content: "test" | ||
} %} | ||
</div> | ||
</div> | ||
|
||
<div> | ||
<div class="lg:justify-between lg:items-center mb-[29px] hidden lg:flex"> | ||
<span>{{ products|length }} | ||
{{ 'item(s)'|trans }}</span> | ||
|
||
<div class="w-[250px]"> | ||
{% include '@components/Molecules/Fields/FieldSelect/FieldSelect.twig' with { | ||
label: "Sort by" | trans, | ||
tooltip: "Sort the products" | trans, | ||
placeholder: "Sort by" | trans, | ||
options: [{ | ||
value: "priceASC", | ||
label: "Price ascending" | trans | ||
}, { | ||
value: "priceDESC", | ||
label: "Price descending" | trans | ||
}, { | ||
value: "newness", | ||
label: "New arrivals" | trans | ||
}, { | ||
value: "promo", | ||
label: "Promotions" | trans | ||
}], | ||
} %} | ||
</div> | ||
|
||
</div> | ||
|
||
<div class="grid grid-cols-2 lg:grid-cols-3 gap-4 lg:gap-8 mb-[40px]"> | ||
{% for product in products %} | ||
{% include '@components/Organisms/ProductCard/ProductCard.twig' with product|merge({displayWishButton: true}) %} | ||
{% endfor %} | ||
</div> | ||
|
||
<div class='mx-auto lg:mx-0 lg:ml-auto w-max'> | ||
{% include '@components/Molecules/Pagination/Pagination.twig' with { | ||
prevText: 'Previous' | trans, | ||
nextText: 'Next' | trans, | ||
currentPage: page, | ||
totalPages: 3 | ||
} %} | ||
</div> | ||
|
||
<p class="paragraph-4 lg:paragraph-2 lg:pt-[56px] lg:pb-[96px] max-w-[664px] pt-[102px] pb-[52px] mx-auto"> | ||
{{ attr('category', 'description') }} | ||
</p> | ||
</div> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{% extends 'base.html.twig' %} | ||
{% set page = app.request.get('page')|default(1) %} | ||
{% set searchString = app.request.get('query')|default("") %} | ||
|
||
{% block title %}{{ 'Search'|trans }} | ||
{% endblock %} | ||
|
||
{% block body %} | ||
{% set products = resources('/api/front/products', {itemsPerPage:9, page: page}) %} | ||
{% set totalProducts = resources('/api/front/products', {itemsPerPage:9, page: page}) %} | ||
|
||
{% include '@components/Layout/Subheader/SearchResult/SubheaderSearch.twig' with {title: "Search results" | trans, } %} | ||
{% include '@components/Layout/CategoryProduct/CategoryProduct.html.twig' with {products: products, totalProducts:totalProducts} %} | ||
|
||
{% include '@components/Layout/Reinsurance/Reinsurance.twig' with { data: [ | ||
{ | ||
strongText: 'Free delivery' | trans, | ||
text: 'For any order over €100' | trans, | ||
linkLabel: 'See conditions' | trans, | ||
link: '#', | ||
icon: 'reinsurance-delivery' | ||
}, | ||
{ | ||
strongText: 'Secure payment' | trans, | ||
text: 'Credit card, Paypal' | trans, | ||
linkLabel: 'See conditions' | trans, | ||
link: '#', | ||
icon: 'reinsurance-payment' | ||
}, | ||
{ | ||
strongText: 'Satisfied or refunded' | trans, | ||
text: 'Exchange or refund offered within 30 days' | trans, | ||
linkLabel: 'See conditions' | trans, | ||
link: '#', | ||
icon: 'reinsurance-satisfied' | ||
} | ||
] } %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters