gergelypolonkai-web-django/blog/templates/blog/post.html

40 lines
1.8 KiB
HTML

{% load code_chunks %}
{% load get_post_relative_link from blog_link %}
<div class="post">
<h3>{% if title_links %}<a href="{% url 'blog:read' post.created_at.year post.created_at.month post.created_at.day post.slug %}">{% endif %}{{ post.title }}{% if title_links %}</a>{% else %}<div class="plusone-container"><div class="g-plusone" data-annotation="inline" data-size="small" data-width="300"></div></div>{% endif %}</h3>
<p class="article-date">{{ post.created_at|date:'m-d-Y :: H:i' }} by {{ post.user.first_name }} {{ post.user.last_name }}</p>
{{ post.content|insert_code_chunks }}
{% if post.tags.all %}
<p class="article-tags">Tags:
{% for tag in post.tags.all %}
<a href="{% url 'blog:taglist' tag.slug %}">{{ tag.name }}</a>
{% endfor %}
</p>
{% endif %}
{% if not title_links %}
<div class="g-plus" data-action="share" data-height="15"></div>
{% endif %}
</div>
{% if not title_links %}
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = 'gergelypolonkai';
(function() {
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
{% if prev_post %}
Previous: <a href="{% get_post_relative_link prev_post %}">{{ prev_post.title }}</a>
{% endif %}
{% if next_post %}
Next: <a href="{% get_post_relative_link next_post %}">{{ next_post.title }}</a>
{% endif %}
{% endif %}