Skip to content

Commit

Permalink
Some tweaks for search form on search page.
Browse files Browse the repository at this point in the history
  • Loading branch information
rlr committed Mar 25, 2013
1 parent 5de3c93 commit ce2a717
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ <h2>{{ _('Try one of these articles:') }}</h2>
{%- endmacro %}

{% macro aaq_search_form(product, category, settings, host, request) -%}
<form id="ask-search-form" class="search-form cf" action="{% if settings.SESSION_COOKIE_SECURE %}https://{{ host }}{{ url('questions.aaq_step4', product_key=product.key, category_key=category.key) }}{% endif %}#summarize-question" method="get">
<form id="ask-search-form" class="simple-search-form cf" action="{% if settings.SESSION_COOKIE_SECURE %}https://{{ host }}{{ url('questions.aaq_step4', product_key=product.key, category_key=category.key) }}{% endif %}#summarize-question" method="get">
<input type="text" class="searchbox" name="search" value="{{ request.GET.search }}" required="required" maxlength="160" placeholder="{{ _('Summarize your question in a sentence') }}" />
<span data-type="submit" class="btn btn-important big">{{ _('Ask this') }}</span>
</form>
Expand Down
2 changes: 1 addition & 1 deletion apps/search/templates/search/includes/macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% macro basic_search_form(primary=False) -%}
{# Must be imported with context #}
<div {% if primary %}id="basic-search"{% endif %} class="search-refine">
<form class="search-form cf" role="search" method="get" action="search">
<form class="simple-search-form cf" role="search" method="get" action="search">
<input type="hidden" name="esab" value="{% if waffle.flag('search-ab') %}a{% else %}b{% endif %}">
{% for name, field in search_form.fields.items() if not name in ('q',) %}
{% set list = request.GET.getlist(name) %}
Expand Down
28 changes: 10 additions & 18 deletions media/less/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -693,14 +693,6 @@ input[type=button],
}
}

.search-form {
background: url('../img/grain.png') #eff2f4;
border: 1px solid #b9c9d1;
.border-radius(6px);
display: block;
padding: 12px;
}

.sidebar-nav {
font-family: @OpenSans;
font-size: 13px;
Expand Down Expand Up @@ -1233,7 +1225,7 @@ input[type=button],
top: 6px;
width: 17px;
}

.searchbox {
.linear-gradient-top(#8d969e, #8d969e, 0%, #a8b0b7, 100%, url('../img/grain.png'));
border: 0;
Expand All @@ -1243,19 +1235,19 @@ input[type=button],
font-size: 14px;
height: 18px;
padding: 6px 42px 6px 20px;

&:focus {
outline: none;
&::-webkit-input-placeholder {

&:-webkit-input-placeholder {
color: rgba(255, 255, 255, 0);
}
}
&::-webkit-input-placeholder {

&:-webkit-input-placeholder {
color: #fff;
}

&:-moz-placeholder {
color: #fff;
}
Expand All @@ -1266,13 +1258,13 @@ input[type=button],
#support-search {
float: left;
}

.simple-search-form {
.submit-button {
left: 12px;
right: auto;
}

.searchbox {
padding: 6px 20px 6px 42px;
}
Expand All @@ -1283,7 +1275,7 @@ input[type=button],
display: block;
float: right;
margin: 35px 0 0 0;

.searchbox {
width: 240px;
}
Expand Down
9 changes: 7 additions & 2 deletions media/less/search.less
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,13 @@
margin-top: 0;
}

.search-form {
.simple-search-form {
margin-bottom: 40px;
background: url('../img/grain.png') #eff2f4;
border: 1px solid #b9c9d1;
.border-radius(6px);
display: block;
padding: 12px;

.btn {
float: right;
Expand All @@ -136,7 +141,7 @@
top: 50%;
left: 20px;
margin-top: -15px;
width: 606px;
width: 585px;
}
}

Expand Down

0 comments on commit ce2a717

Please sign in to comment.