Permalink
Browse files

Add section list/nav

  • Loading branch information...
paltman committed May 24, 2015
1 parent f1f6b58 commit e30791b55382625e83393a2a0b1cf0b989be12c7
@@ -1,6 +1,7 @@
{% extends "site_base.html" %}
{% load staticfiles %}
{% load pinax_blog_tags %}
{% block body_class %}blog{% endblock %}
@@ -21,13 +22,33 @@
</div>
<div class="search">
<form class="form-inline" action="{% url "blog" %}">
{% if section_slug %}
{% url "blog_section" section_slug as search_url %}
{% else %}
{% url "blog" as search_url %}
{% endif %}
<form class="form-inline" action="{{ search_url }}">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-search"></i></span>
<input class="form-control" type="search" placeholder="Search blog..." name="q" value="{{ request.GET.q }}">
<input class="form-control" type="search" placeholder="Search blog..." name="q" value="{{ search_term|default:"" }}">
</div>
</form>
</div>
<br />
<ul class="sections list-group">
{% blog_sections as sections %}
{% for section in sections %}
{% if section.0 == "all" %}
{% url "blog" as section_url %}
{% else %}
{% url "blog_section" section.0 as section_url %}
{% endif %}
<li class="list-group-item {% if section_slug == section.0 %}active{% else %}{% if not section_slug and section.0 == "all" %}active{% endif %}{% endif %}">
<a href="{{ section_url }}">{{ section.1 }}</a>
</li>
{% endfor %}
</ul>
</div>
</aside>
{% endblock %}
@@ -3,6 +3,9 @@
{% block head_title %}{{ SITE_NAME }}{% endblock %}
{% block content %}
{% if section_name %}
<h1>{{ section_name }}</h1>
{% endif %}
{% if posts %}
<div class="post-list">
{% for post in posts %}

This file was deleted.

Oops, something went wrong.

0 comments on commit e30791b

Please sign in to comment.