Source

article / article / templates / category_list.html

Full commit
Scott Nixon c27bf61 



Scott Nixon f66ef8d 
Scott Nixon c27bf61 
Scott Nixon f66ef8d 


Scott Nixon c27bf61 
Scott Nixon f66ef8d 
Scott Nixon c27bf61 






























Scott Nixon 638ccc0 
Scott Nixon c27bf61 


















Scott Nixon 509d169 
Scott Nixon c27bf61 
Scott Nixon 509d169 
Scott Nixon c27bf61 

Scott Nixon 62258f0 
Scott Nixon c27bf61 
























































Scott Nixon 638ccc0 
Scott Nixon c27bf61 



Scott Nixon 62258f0 
Scott Nixon c27bf61 
























































{% extends "theme_base.html" %}

{% block meta %}
    <meta name="keywords" content="Vegan, Vegetarian, Recipes, low fat, Blog" />
    <meta name="description" content="Lindsay S. Nixon's cookbooks will save you money by using 'everyday' inexpensive ingredients, save you time with easy, no fuss recipes and improve your health with each nutritional bite." />

    <meta property="og:title" content="Blog Category: {{ tag_obj }} | Happy Herbivore"/>
    <meta property="og:type" content="website"/>
    <meta property="og:image" content="//photos.happyherbivore.com/logos/Big-Baby-Elephant.png"/>
    <meta property="og:description"
          content="Lindsay S. Nixon's cookbooks will save you money by using 'everyday' inexpensive ingredients, save you time with easy, no fuss recipes and improve your health with each nutritional bite. "/>
    <link rel="alternate" type="application/rss+xml" title="Public Feeds" href="http://feeds.feedburner.com/HappyHerbivore-Blog">
{% endblock %}

{% block css %}
{% endblock %}
   
{% block js %}
    <script src="/media/js/hh.js" type="text/javascript"></script> 
{% endblock %}

{% block extra_head %}{% endblock %}

{% block head_title %}Category: {{ tag_obj }}{% endblock %}

{% block body %}

    {% load generic_flatblocks %}
    {% load disqus_tags %}
    {% load humanize %}	

  <div id="content">

      <!-- breadcrumb -->
      <div class="container">
        <div class="row">
          <div class="span15">
            <ul class="breadc clearfix">
              <li><a href="/">Home</a></li>
              <li><a href="/blog/">Blog</a></li>
              <li><a href="{% url category tag_obj %}">{{ tag_obj }}</a></li>
            </ul>
            <h1 class="page-title">Blog Topic: {{ tag_obj }}</h1>
          </div>
        </div>
      </div>

    <div id="outer-wrapper">

      <div class="container">

        <div class="wrapper-box">

        <!-- Content -->
        <div class="row">
          <div class="span7">

            {% for post in posts.object_list %}
            <div class="post">

                <h2 class="title">
                  <a alt="permanent link to {{ post.post_title }}" href="{{ post.get_absolute_url }}">
			        {{ post.post_title }}</a>
                </h2>
                <p class="meta">Category: {% for p in post.get_tag_list %}<a href="{% url category p %}">{{ p }}</a> {% endfor %} | <a alt="permanent link to {{ post.post_title }}" href="{{ post.get_absolute_url }}#disqus_thread">{% disqus_num_replies %}</a>{%if request.user.is_staff and not debug %}| <span><a href="/admin/article/post/{{ post.pk }}/">Edit</a></span>{%endif%}</p>

                <div>
                  {{ post.post_content|safe|truncatewords_html:65 }}
                </div>
                  
                <div>
                  <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://happyherbivore.com{{ post.get_absolute_url }}" data-text="{{ post.post_title }}" data-via="happyherbivore" data-related="Engine2Diet, ForksOverKnives, JohnMcDougallMD">Tweet</a>
                  <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

                  <div class="fb-like" data-href="http://happyherbivore.com{{ post.get_absolute_url }}" data-send="false" data-layout="button_count" data-width="90" data-show-faces="false"></div>
                </div>

                  <hr>

            </div><!-- / post -->
            {% endfor %}

            <div class="pagination">
			{% if posts.has_previous %}
				<a class="prev" href="?page={{ posts.previous_page_number }}">« Prev</a>
			{% endif %}
                <a href="?page={{ posts.number }}" class="current">{{ posts.number }}</a> 


            {% if posts.number !=  posts.paginator.num_pages %}
              {% if posts.number|add:"4" <  posts.paginator.num_pages %}
                <a href="?page={{ posts.next_page_number }}">{{ posts.next_page_number }}</a> 
                <a href="?page={{ posts.next_page_number|add:"1" }}">{{ posts.next_page_number|add:"1" }}</a> 
                <a href="?page={{ posts.next_page_number|add:"2" }}">{{ posts.next_page_number|add:"2" }}</a> 
                <a href="?page={{ posts.next_page_number|add:"3" }}">{{ posts.next_page_number|add:"3" }}</a> 
                <a href="?page={{ posts.next_page_number|add:"4" }}">{{ posts.next_page_number|add:"4" }}</a>
              {% endif %}
            {% endif%}
                ...
                <a href="?page={{ posts.paginator.num_pages }}">{{ posts.paginator.num_pages }}</a> 
			{% if posts.has_next %}
				<a class="next" href="?page={{ posts.next_page_number }}">Next »</a>
			{% endif %}             
            </div><!-- pagination -->

          </div><!--  -->




            <!-- sidebar -->
            <div class="span5">
              <div class="sidebar">
                <div class="subscribe-box">
                  <h4>Subscribe to the blog!</h4>
                  <h5>Get HH post right to your email!</h5>
                  <label for="email">Your email address</label>
                  <input type="text" id="email" />
                  <input type="submit" value="Join" class="button-orange-big-round" /> 
                </div><!-- / subscribe-box -->
                <div class="subscribe-box-bottom">
                  <a href="http://feeds.feedburner.com/HappyHerbivore-Blog" rel="nofollow">Or go grab our RSS feed! >></a> 
                </div>

                <div class="categories-box">
                  <h4>Topics</h4>
                  <ul>
                    {% load tagging_tags %}
                    {% tags_for_model article.Post as tag_list %}
                    {% for t in tag_list %}
                        <li><a {% if tag_obj == t.name %}class="label-green"{% else %}class="label-orange"{% endif %} href="{% url category t.name %}">{{t.name}}</a></li>
                    {% endfor %}
                    <!-- <li><a href="#" class="label-green">Herbie Lifestyle</a></li>-->
                  </ul>
                </div><!-- / categories-box -->

                <hr class="separator" />

                {% gblock 8 for "gblocks.TitleAndText" into "BlogFavorites" %}
                {{ BlogFavorites.text|safe }}

                {% gblock 7 for "gblocks.TitleAndText" into "latestbookbox" %}
                {{ latestbookbox.text|safe }}

                {% gblock 1 for "gblocks.TitleAndText" into "mealplansad" %}
                {{ mealplansad.text|safe }}
            
                {% gblock 2 for "gblocks.TitleAndText" into "fblike" %}
                {{ fblike.text|safe }}

              </div><!-- / sidebar -->

        </div></div><!-- /row -->
        </div><!-- /wrapper-box -->
      </div> <!-- /container -->

    </div><!-- / outer-wrapper -->
  </div><!-- / content -->   
{% endblock %}

{% block extra_body %}
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>

<script type="text/javascript">
(function() {
    window.PinIt = window.PinIt || { loaded:false };
    if (window.PinIt.loaded) return;
    window.PinIt.loaded = true;
    function async_load(){
        var s = document.createElement("script");
        s.type = "text/javascript";
        s.async = true;
        s.src = "http://assets.pinterest.com/js/pinit.js";
        var x = document.getElementsByTagName("script")[0];
        x.parentNode.insertBefore(s, x);
    }
    if (window.attachEvent)
        window.attachEvent("onload", async_load);
    else
        window.addEventListener("load", async_load, false);
})();
</script>
{% endblock %}