diff options
author | Jonathan DeMasi <jon.demasi@colorado.edu> | 2020-03-05 16:27:50 -0700 |
---|---|---|
committer | Jonathan DeMasi <jon.demasi@colorado.edu> | 2020-03-05 16:27:50 -0700 |
commit | 520c0a0b6b39732382387b8610f8910f8657cf7a (patch) | |
tree | 9331672fc37682ce156fd08b71f1108f828dcdcb /search | |
parent | 6a2022a18da024a41d6d583cec45b275b85a09c2 (diff) | |
download | jthanio-520c0a0b6b39732382387b8610f8910f8657cf7a.tar jthanio-520c0a0b6b39732382387b8610f8910f8657cf7a.tar.gz jthanio-520c0a0b6b39732382387b8610f8910f8657cf7a.tar.bz2 jthanio-520c0a0b6b39732382387b8610f8910f8657cf7a.tar.lz jthanio-520c0a0b6b39732382387b8610f8910f8657cf7a.tar.xz jthanio-520c0a0b6b39732382387b8610f8910f8657cf7a.tar.zst jthanio-520c0a0b6b39732382387b8610f8910f8657cf7a.zip |
search formatted, consistency across site
Diffstat (limited to 'search')
-rw-r--r-- | search/templates/search/search.html | 45 |
1 files changed, 39 insertions, 6 deletions
diff --git a/search/templates/search/search.html b/search/templates/search/search.html index 5f222e5..e91c0d8 100644 --- a/search/templates/search/search.html +++ b/search/templates/search/search.html @@ -6,13 +6,43 @@ {% block title %}Search{% endblock %} {% block content %} - <h1>Search</h1> +<div class="container"> - <form action="{% url 'search' %}" method="get"> - <input type="text" name="query"{% if search_query %} value="{{ search_query }}"{% endif %}> - <input type="submit" value="Search" class="button"> - </form> + <div class="row"> + <!-- Blog Entries Column --> + <div class="col-md-8"> + + {% if search_results %} + <h1 class="my-4">Showing search results for "{{ search_query }}"</h1> + {% for result in search_results %} + {% with post=result.specific %} + <!-- Blog Post --> + <div class="card mb-4"> + <div class="card-body"> + <h2 class="card-title">{{ post.title }}</h2> + <p class="card-text">{{ post.intro }}</p> + <a href="{% pageurl post %}">Read Post</a> + </div> + <div class="card-footer text-muted"> + Posted on {{ post.date }} + </div> + </div> + {% endwith %} + {% endfor %} + {% elif search_query %} + <h1 class="my-4">No results found</h1> + {% endif %} + <!-- end of results --> + <p><a href="{{ request.META.HTTP_REFERER }}">Return to previous page</a></p> + </div> + <!-- Sidebar Widgets Column --> + <div class="col-md-4"> + {% include "search.html" %} + </div> + + + <!-- {% if search_results %} <ul> {% for result in search_results %} @@ -34,5 +64,8 @@ {% endif %} {% elif search_query %} No results found - {% endif %} + {% endif %} --> +</div> +</div> +</div> {% endblock %} |