Skip to content

Commit

Permalink
Merge pull request #98 from devgeniem/PIEN-8034
Browse files Browse the repository at this point in the history
Pien-8034: Fix search in hamburger-menu
  • Loading branch information
eebbi authored Dec 27, 2022
2 parents c4d3132 + c8ecd94 commit 9106893
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## 0.3.4 2022-12-27

### Fixed
- PIEN-8034: Remove single search-button and add a working search-form to hamburger-menu

## 0.3.3 2022-09-07

### Fixed
Expand Down
1 change: 1 addition & 0 deletions assets/styles/ui-components/header/_fly-out-nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@

&__actions {
display: flex;
flex-wrap: wrap;
justify-content: center;
margin-top: 2rem;

Expand Down
6 changes: 1 addition & 5 deletions partials/ui/menu/fly-out-nav.dust
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@
{>"ui/menu/language-nav" links=Header.language_nav.links /}

{^Header.hide_search}
<a href="{Header.search_action|s}?s="
class="{Header.colors.search_button|s} button is-primary button--icon">
{Strings.s.header.search|s}
{>"ui/icon" icon="search" class="icon--large is-primary-invert" /}
</a>
{>"ui/search-form-small" button_class=Header.colors.search_button /}
{/Header.hide_search}
</div>

Expand Down
16 changes: 16 additions & 0 deletions partials/ui/search-form-small.dust
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<form role="search" method="get" class="search-form is-flex is-flex-direction-row is-align-items-center mt-5 has-width-100"
action="{Header.search_action|url}">
<div class="mr-2 is-flex-grow-1">
<label>
<span class="is-sr-only">{Strings.s.header.search_input_label|html}</span>
<input type="search"
class="search-form__input has-background-white p-3 has-width-100"
placeholder="{Strings.s.header.search_input_placeholder|s}" value="{search_query|attr}" name="s">
</label>
</div>

<button type="submit" class="search-form__button button is-secondary button--icon {button_class|attr}">
{Strings.s.header.search|html}
{>"ui/icon" icon="search" class="icon--medium" /}
</button>
</form>
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Theme Name: TMS Theme Vesi
* Description: Tampere Multisite Vesi Theme
* Version: 0.3.1
* Version: 0.3.4
* Author: Geniem
* Author URI: https://geniem.fi
* Template: tms-theme-base
Expand Down

0 comments on commit 9106893

Please sign in to comment.