Added and styled search form
This commit is contained in:
parent
e5f3f63950
commit
8b9df7194f
4 changed files with 54 additions and 9 deletions
|
@ -6,12 +6,16 @@
|
||||||
{% block title %}Search{% endblock %}
|
{% block title %}Search{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>Search</h1>
|
<section id="search-page">
|
||||||
|
<div class="container">
|
||||||
<form action="{% url 'search' %}" method="get">
|
<center>
|
||||||
|
<form action="{% url 'search' %}" method="get">
|
||||||
<input type="text" name="query"{% if search_query %} value="{{ search_query }}{% endif %}">
|
<input type="text" name="query"{% if search_query %} value="{{ search_query }}{% endif %}">
|
||||||
<input type="submit" value="Search">
|
<button type="submit" title="Search">
|
||||||
</form>
|
<span class="glyphicon glyphicon-search" aria-hidden="false"></span>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</center>
|
||||||
|
|
||||||
{% get_search_promotions search_query as search_picks %}
|
{% get_search_promotions search_query as search_picks %}
|
||||||
{% if search_picks %}
|
{% if search_picks %}
|
||||||
|
@ -38,13 +42,20 @@
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{% if search_results.has_previous %}
|
{% if search_results.has_previous %}
|
||||||
<a href="{% url 'search' %}?query={{ search_query|urlencode }}&page={{ search_results.previous_page_number }}">Previous</a>
|
<a href="{% url 'search' %}?query={{ search_query|urlencode }}&page={{ search_results.previous_page_number }}">
|
||||||
|
{{ search_results.previous_page_number }}
|
||||||
|
<<</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if search_results.has_next %}
|
{% if search_results.has_next %}
|
||||||
<a href="{% url 'search' %}?query={{ search_query|urlencode }}&page={{ search_results.next_page_number }}">Next</a>
|
<a href="{% url 'search' %}?query={{ search_query|urlencode }}&page={{ search_results.next_page_number }}">
|
||||||
|
>>
|
||||||
|
{{ search_results.next_page_number }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif search_query %}
|
{% elif search_query %}
|
||||||
No results found
|
<b>Leider keine Ergebnisse / Désolé, aucun résultat n'a été trouvé</b>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// Contact form
|
// Contact page
|
||||||
#contact-page {
|
#contact-page {
|
||||||
|
|
||||||
form {
|
form {
|
||||||
|
@ -10,3 +10,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Footer search form
|
||||||
|
#search-form {
|
||||||
|
|
||||||
|
input {
|
||||||
|
float: left;
|
||||||
|
width: auto;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
background: none; border: none;
|
||||||
|
padding-top: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -8529,6 +8529,17 @@ footer#footer a {
|
||||||
line-height: 155%;
|
line-height: 155%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#search-form input {
|
||||||
|
float: left;
|
||||||
|
width: auto;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
#search-form button {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
padding-top: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
margin-top: 104px;
|
margin-top: 104px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,14 @@
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<!-- Bottom Menu -->
|
<!-- Bottom Menu -->
|
||||||
{% footer_menu parent=site_root calling_page=self %}
|
{% footer_menu parent=site_root calling_page=self %}
|
||||||
|
|
||||||
|
<!-- Search form -->
|
||||||
|
<form action="/search/" method="get" id="search-form">
|
||||||
|
<input type="text" name="query" value="" class="form-control">
|
||||||
|
<button type="submit" title="Search">
|
||||||
|
<span class="glyphicon glyphicon-search" aria-hidden="false"></span>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4" id="contact-info">
|
<div class="col-md-4" id="contact-info">
|
||||||
{% contact_info %}
|
{% contact_info %}
|
||||||
|
|
Loading…
Reference in a new issue