preserve sort field and direction in header search box

This commit is contained in:
byte[] 2019-12-12 21:19:07 -05:00
parent 47cd24e506
commit 51d5bede72

View file

@ -14,6 +14,11 @@ header.header
form.header__search.flex.flex--no-wrap.flex--centered action="/search" method="get" form.header__search.flex.flex--no-wrap.flex--centered action="/search" method="get"
input.input.header__input.header__input--search#q name="q" title="For terms all required, separate with ',' or 'AND'; also supports 'OR' for optional terms and '-' or 'NOT' for negation. Search with a blank query for more options or click the ? for syntax help." value=(assigns[:search_query] || @conn.params["q"]) placeholder="Search" autocapitalize="none" input.input.header__input.header__input--search#q name="q" title="For terms all required, separate with ',' or 'AND'; also supports 'OR' for optional terms and '-' or 'NOT' for negation. Search with a blank query for more options or click the ? for syntax help." value=(assigns[:search_query] || @conn.params["q"]) placeholder="Search" autocapitalize="none"
= if present?(@conn.params["sf"]) do
input type="hidden" name="sf" value=@conn.params["sf"]
= if present?(@conn.params["sd"]) do
input type="hidden" name="sd" value=@conn.params["sd"]
button.header__search__button type="submit" title='Search' button.header__search__button type="submit" title='Search'
i.fa-embedded--search i.fa-embedded--search
a.header__search__button href="/search/reverse" title="Search using an image" a.header__search__button href="/search/reverse" title="Search using an image"