Skip to content

Commit

Permalink
Apply new style to 404 & search page
Browse files Browse the repository at this point in the history
  • Loading branch information
Knut Hühne committed Jun 27, 2016
1 parent bc1d75c commit 5c1f7bb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
40 changes: 20 additions & 20 deletions foundation/search/templates/search/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
{% load i18n %}

{% block title %}{% trans 'Search' %}{% endblock %}
{% block body-class %}search{% endblock %}
{% block body-class %}page-template{% endblock %}

{% block pagebanner-inner %}
<h2>{% trans 'Search' %}</h2>
{% if query %}
{% blocktrans with num=page.object_list|length %}
Your search for: "{{ query }}" returned {{ num }} results.
{% endblocktrans %}
{% endif %}
<h2>{% trans 'Search' %}</h2>
{% if query %}
{% blocktrans with num=page.object_list|length %}
Your search for: "{{ query }}" returned {{ num }} results.
{% endblocktrans %}
{% endif %}
{% endblock %}

{% block body %}
<div class="row">
<div class="col-md-3">
<nav>
<form method="get" action=".">
<div class="input-group">
<input type="text" name="q" class="form-control" value="{{ query }}" placeholder="Search">
Expand All @@ -29,27 +29,27 @@ <h2>{% trans 'Search' %}</h2>
</div>
</form>
<hr/>
</div>
<div class="main col-md-9">
{% if query %}
</nav>
<article>
{% if query %}
<h3>{% trans 'Results' %}</h3>
{% for search_result in page.object_list %}
{% include "search/results.html" %}
<hr/>
{% empty %}
<p>{% trans 'No results found.' %}</p>
<p>{% trans 'No results found.' %}</p>
{% endfor %}

{% if page.has_previous or page.has_next %}
{% trans 'Previous' as previous %}
{% trans 'Next' as next %}
<div>
{% if page.has_previous %}<a href="?q={{ query }}&amp;page={{ page.previous_page_number }}">{% endif %}&laquo; {{ previous }}{% if page.has_previous %}</a>{% endif %}
|
{% if page.has_next %}<a href="?q={{ query }}&amp;page={{ page.next_page_number }}">{% endif %}{{ next }} &raquo;{% if page.has_next %}</a>{% endif %}
</div>
{% trans 'Previous' as previous %}
{% trans 'Next' as next %}
<div>
{% if page.has_previous %}<a href="?q={{ query }}&amp;page={{ page.previous_page_number }}">{% endif %}&laquo; {{ previous }}{% if page.has_previous %}</a>{% endif %}
|
{% if page.has_next %}<a href="?q={{ query }}&amp;page={{ page.next_page_number }}">{% endif %}{{ next }} &raquo;{% if page.has_next %}</a>{% endif %}
</div>
{% endif %}
{% endif %}
</div>
</article>
</div>
{% endblock %}
5 changes: 3 additions & 2 deletions templates/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
{% load i18n %}

{% block title %}{% trans 'Page not found' %}{% endblock %}
{% block body-class %}page-template{% endblock %}

{% block pagebanner %}
<div id='page-banner'>
<div class='banner'>
<div class='container'>
<h2>404: {% trans 'Page not found' %}</h2>
</div>
Expand All @@ -13,7 +14,7 @@ <h2>404: {% trans 'Page not found' %}</h2>

{% block body %}
<div class='row'>
<div class='col-md-8'>
<div class='main col-md-12'>
<form action="{% url 'haystack_search' %}" method="get" role="search">
<p>
{% blocktrans %}
Expand Down

0 comments on commit 5c1f7bb

Please sign in to comment.