Source

article / article / templates / post_detail.html

{% extends "theme_base.html" %}

{% block meta %}
    <meta name="keywords" content="Blog, Vegan, Vegetarian, Recipes, low fat" />
    <meta name="description" content="{% if post %}{{ post.post_content|striptags|truncatewords:50|safe|addslashes }}{% endif %}" />

  {% if post %}
    <meta property="og:title" content="{{ post.post_title }}"/>
    <meta property="og:type" content="article"/>
    {% if post.post_image %}
    <meta property="og:image" content="{{ post.post_image }}"/>
    {% else %}
    <meta property="og:image" content="http://photos.happyherbivore.com/logos/Big-Baby-Elephant.png"/>
    {% endif %}

    <meta property="og:description" content="{{ post.post_content|striptags|truncatewords:100 }}"/>
    
    <meta property="article:published_time" content="{{ post.published_on|date:"c" }}" />
    <meta property="article:author" content="http://happyherbivore.com/about/" />
    <meta property="article:tag" content="{{ post.post_author.get_full_name }}" />
    <meta property="article:tag" content="Happy Herbivore Blog" />
    {% if post.post_tags %}
    <meta property="article:section" content="{{ post.post_tags }}">
    {% else %}
    <meta property="article:section" content="Healthy Living">
    {% endif %}

  {% endif %}

{% endblock %}

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

{% block extra_head %}{% endblock %}

{% block head_title %}{{ post.post_title }}{% 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>
            </ul>
            <h2 class="page-title">Happy Herbivore Blog</h2>
          </div>
        </div>
      </div>

    <div id="outer-wrapper">

      <div class="container">

        <div class="wrapper-box">
          <!-- Content -->
          <div class="row">
            <div class="span7">
              {% if post %}
              <div class="post">
                <div class="arrow-box">
                  <p class="post-date">{{ post.published_on|naturalday:"N j, Y"|capfirst }}</p>
                </div>
                <h1 class="title">{{ post.post_title }}</h1>
                <p class="meta">Posted by: <a href="/get-started/">{{ post.post_author.get_full_name }}</a> | <a alt="link to {{ post.post_title }} Comments" href="#disqus_thread">{% disqus_num_replies %}</a> </p>
                {% if post.post_tags %}<p class="meta">Category: {% for p in post.get_tag_list %}<a href="{% url category p %}">{{ p }}</a> {% endfor %}{% endif %}</p>
                
                <div class="content">
                  {{ post.post_content|safe }}
                </div>

                {% include  "_blog_recipe.html" %}

                <div class="post-social">
                  {% include  "_social.html" %}
                </div>

			    {% ifequal post.post_enable_comments 1 %}
				    {% disqus_show_comments %}
			    {% endifequal %}


                <div class="nav-bar">
                  {% for i in previous %}
	                  <a alt="Previous blog post {{ i.post_title }}" href="{{ i.get_absolute_url }}">« Previous Post: {{ i.post_title }}</a> 
	              {% endfor %}
	              {% for i in next %}
	                  <a alt="Next blog post {{ i.post_title }}" href="{{ i.get_absolute_url }}">Next Post: {{ i.post_title }} »</a>
	              {% endfor %}
                </div>
              </div><!-- / post -->
              {% endif %}
            </div>

            <!-- sidebar -->
            <div class="span5">
              <div class="sidebar">

                {% gblock 6 for "gblocks.TitleAndText" into "FeedBurner" %}
                {{ FeedBurner.text|safe }}

                <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 %}
                  </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>

        </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 %}