Skip to content

Commit

Permalink
Refactor - same search design everywhere - handle store delivery
Browse files Browse the repository at this point in the history
  • Loading branch information
livca-smile committed Mar 22, 2024
1 parent 113de3a commit d969278
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 31 deletions.
2 changes: 0 additions & 2 deletions Block/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ public function getJsLayout()
{
$jsLayout = $this->jsLayout;

$jsLayout['components']['store-locator-search']['storeLocatorHomeUrl'] = $this->storeLocatorHelper
->getHomeUrl();
$jsLayout['components']['store-locator-search']['provider'] = $this->map->getIdentifier();
$jsLayout['components']['store-locator-search']['markers'] = $this->getMarkers();
$jsLayout['components']['store-locator-search'] = array_merge(
Expand Down
62 changes: 39 additions & 23 deletions view/frontend/web/css/source/_module.less
Original file line number Diff line number Diff line change
Expand Up @@ -434,36 +434,52 @@
.fulltext-search-wrapper {
padding: 10px;
position: relative;
display: flex;
align-items: center;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;

div.geolocalize-container {
flex: 0 0 100%;
a {
width: 100%;
text-align: center;
}
}

.store-search-form {
display: flex;
margin-left: auto;
align-items: center;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;

div.geolocalize-container {
flex: 0 0 100%;
a {
width: 100%;
text-align: center;
}
flex: 0 0 100%;
margin-top: 5px;
.field {
flex: 5;
}
.actions {
flex:1;
button {
width: 100%;

.store-search-form {
display: flex;
margin-left: auto;
align-items: center;
flex: 0 0 100%;
margin-top: 5px;
.field {
flex: 2;
}
.actions {
flex:1;
button {
width: 100%;
&:before {
content: '\e615';
font-family: 'luma-icons';
font-size: 16px;
color: #FFFFFF;
margin: 0;
vertical-align: top;
display: inline-block;
font-weight: normal;
overflow: hidden;
speak: none;
text-align: center;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: antialiased;
}
}
}
}
}
}

Expand Down
9 changes: 3 additions & 6 deletions view/frontend/web/template/retailer/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
<span role="heading" aria-level="1" data-bind="i18n: 'Shop Search'">Shop Search</span>
</div>

<form data-bind="{submit: updateMap, attr: {action: storeLocatorHomeUrl}}"
id="shop-search-form"
>
<form data-bind="{submit: updateMap}"
id="shop-search-form">
<div class="store-search">
<div class="geolocalize-container" data-bind="scope: requestChild('geocoder')">
<div class="primary" data-bind="afterRender: initGeocoder">
Expand All @@ -29,9 +28,7 @@
</div>
<div class="actions">
<div class="primary">
<button type="submit" class="action primary">
<span data-bind="i18n: 'Search'">Search</span>
</button>
<button type="submit" class="action primary"></button>
</div>
</div>
</div>
Expand Down

0 comments on commit d969278

Please sign in to comment.