Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add search form template to header

weronkace3d3d1cbabb
diff --git a/saleor/static/scss/demo/components/_header.scss b/saleor/static/scss/demo/components/_header.scss
index 99cdaca781..e84cf142ed 100644
--- a/saleor/static/scss/demo/components/_header.scss
+++ b/saleor/static/scss/demo/components/_header.scss
@@ -72,6 +72,25 @@
padding-right: $global-padding * 1.5;
padding-left: $global-padding;
}
+ &__search {
+ max-width: 50%;
+ width: 40%;
+ position: relative;
+ margin-right: 10%;
+ margin-top: $global-margin / 2;
+ .form-control {
+ width: 100%;
+ border-color: $body-color;
+ }
+ .btn {
+ position: absolute;
+ top: 0.25rem;
+ right: 0.25rem;
+ img {
+ max-height: 1.5rem;
+ }
+ }
+ }
}
&__menu {
ul {
diff --git a/templates/base.html b/templates/base.html
index 13b493a0c5..79f7da08c9 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -62,6 +62,10 @@
</div>
</div>
</div>
+ <form class="form-inline float-xs-right navbar__brand__search hidden-sm-down">
+ <input class="form-control" type="text" placeholder="Search">
+ <button class="btn btn-link" type="submit"><img src="{% static "img/search-icon.svg" %}"></button>
+ </form>
</div>
</div>
<div class="navbar__menu">