Source

homepage / templates / blog / post_detail.html

Full commit
{% extends "blog/base.html" %}
{% load i18n tagging_tags blog_tags disqus_tags %}

{% block title %}{{ object.title }}{% endblock %}
{% block keywords %}{% tags_for_object object as item_tags %}{{ item_tags|join:" " }}{% endblock %}
{% block description %}{% with object|to_html|striptags as description %}{{ description|slice:":150" }}{% if description|length > 150 %}...{% endif %}{% endwith %}{% endblock %}

{% block blog_content %}
{% tags_for_object object as item_tags %}
<div class="blog-post">
  <div class="post-header">
    <h1 itemprop="title"><a href="{{ object.get_absolute_url }}">{{ object.title }}</a></h1>
    <div class="post-date">{{ object.pub_date|date:"DATE_FORMAT" }}</div>
  </div>
  <div class="post-content">
    {{ object|to_html|default:"&nbsp;"|safe }}
  </div>
  <div class="post-footer">
    <div class="pull-right">
      <g:plusone size="medium" annotation="none" href="http://www.ianlewis.org{{ object.get_absolute_url }}"></g:plusone>
      <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="{{ object.title }}" data-via="IanMLewis" data-lang="{{ object.lang }}">Tweet</a>

      <a href="http://b.hatena.ne.jp/entry/{{ object.get_full_url }}" class="hatena-bookmark-button" data-hatena-bookmark-title="{{ object.title }}" data-hatena-bookmark-layout="standard" title="このエントリーをはてなブックマークに追加"><img src="http://b.st-hatena.com/images/entry-button/button-only.gif" alt="このエントリーをはてなブックマークに追加" width="20" height="20" style="border: none;" /></a>

    </div>
    <div class="post-tags">{% for tag in item_tags %}<i class="icon-tag"></i> <a href="{% url blog_tag_page locale tag.name %}">{{ tag.name }}</a> {% endfor %}</div>
  </div>
</div>

{% disqus_show_comments %}

{% endblock %}

{% block license %}
<p>
<a rel="license" href="http://creativecommons.org/licenses/by/2.1/jp/deed.en_US"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by/2.1/jp/80x15.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">{{ object.title }}</span> by <span xmlns:cc="http://creativecommons.org/ns#" property="cc:attributionName">Ian Lewis</span><br /> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/2.1/jp/deed.{% if object.lang = "ja" %}ja{% else %}en_US{% endif %}">Creative Commons Attribution 2.1 Japan License</a>.
</p>
{% endblock %}

{% block js_footer %}
{{ block.super }}
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
<script type="text/javascript" src="http://b.st-hatena.com/js/bookmark_button.js" charset="utf-8" async="async"></script>
<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>
{% endblock %}