Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 1 | {% extends "base.html" %} |
Giulio Fidente | 663537a | 2013-04-17 16:48:53 +0200 | [diff] [blame] | 2 | {% block head %} |
| 3 | <meta name="keywords" content="{{ article.tags|join(', ') }}"> |
| 4 | {% endblock %} |
Giulio Fidente | da4d95b | 2013-04-29 15:59:35 +0200 | [diff] [blame] | 5 | |
Giulio Fidente | 663537a | 2013-04-17 16:48:53 +0200 | [diff] [blame] | 6 | {% block title %}{{ article.title }}{% endblock %} |
Giulio Fidente | da4d95b | 2013-04-29 15:59:35 +0200 | [diff] [blame] | 7 | |
Giulio Fidente | a329665 | 2013-03-28 11:30:46 +0100 | [diff] [blame] | 8 | {% block header %} |
Giulio Fidente | da4d95b | 2013-04-29 15:59:35 +0200 | [diff] [blame] | 9 | <p>Posted on {{ article.locale_date }}</p> |
Giulio Fidente | a329665 | 2013-03-28 11:30:46 +0100 | [diff] [blame] | 10 | {% endblock %} |
| 11 | |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 12 | {% block content %} |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 13 | <article> |
Giulio Fidente | 0bc1f0e | 2013-11-05 16:23:23 +0100 | [diff] [blame^] | 14 | <div class="article_title"> |
Giulio Fidente | 35812c2 | 2013-04-30 02:01:40 +0200 | [diff] [blame] | 15 | <h3><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h3> |
Giulio Fidente | 5dba477 | 2013-03-27 01:00:02 +0100 | [diff] [blame] | 16 | </div> |
Giulio Fidente | 0bc1f0e | 2013-11-05 16:23:23 +0100 | [diff] [blame^] | 17 | <div class="article_text"> |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 18 | {{ article.content }} |
| 19 | </div> |
Giulio Fidente | 0bc1f0e | 2013-11-05 16:23:23 +0100 | [diff] [blame^] | 20 | <div class="article_meta"> |
Giulio Fidente | 8305e74 | 2013-03-22 23:17:45 +0100 | [diff] [blame] | 21 | <p>Category: <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a></p> |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 22 | {% if article.tags %} |
Giulio Fidente | 8305e74 | 2013-03-22 23:17:45 +0100 | [diff] [blame] | 23 | <p>Tags: |
| 24 | {% for tag in article.tags %} |
Giulio Fidente | 91c1d45 | 2013-03-22 15:15:17 +0100 | [diff] [blame] | 25 | <a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% if not loop.last %},{% endif %} |
Giulio Fidente | 8305e74 | 2013-03-22 23:17:45 +0100 | [diff] [blame] | 26 | {% endfor %} |
| 27 | </p> |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 28 | {% endif %} |
Victor Choueiri | 79840b1 | 2013-08-20 18:00:26 +0300 | [diff] [blame] | 29 | {% if DISQUS_SITENAME %} |
Victor Choueiri | 2c25ad4 | 2013-08-21 20:04:39 +0300 | [diff] [blame] | 30 | <p>Comments: <a href="#" onclick="javascript:toggleComments();return false;">toggle</a></p> |
Victor Choueiri | 79840b1 | 2013-08-20 18:00:26 +0300 | [diff] [blame] | 31 | {% endif %} |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 32 | </div> |
Victor Choueiri | d54283f | 2013-08-13 13:54:32 +0300 | [diff] [blame] | 33 | |
| 34 | {% if DISQUS_SITENAME %} |
Victor Choueiri | 79840b1 | 2013-08-20 18:00:26 +0300 | [diff] [blame] | 35 | <div id="article_comments" style="display:{%if COLLAPSE_COMMENTS %}none{% else %}block{% endif %}"> |
Victor Choueiri | d54283f | 2013-08-13 13:54:32 +0300 | [diff] [blame] | 36 | <div id="disqus_thread"></div> |
| 37 | <script type="text/javascript"> |
| 38 | var disqus_identifier = "{{ article.url }}"; |
| 39 | (function() { |
| 40 | var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; |
| 41 | dsq.src = 'http://{{ DISQUS_SITENAME }}.disqus.com/embed.js'; |
| 42 | (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); |
| 43 | })(); |
| 44 | </script> |
| 45 | </div> |
| 46 | {% endif %} |
| 47 | |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 48 | </article> |
Giulio Fidente | a329665 | 2013-03-28 11:30:46 +0100 | [diff] [blame] | 49 | {% endblock %} |
| 50 | |
| 51 | {% block footer %} |
Giulio Fidente | da4d95b | 2013-04-29 15:59:35 +0200 | [diff] [blame] | 52 | <p><a href="{{ SITEURL }}/" class="button_accent">← Back to Index</a></p> |
Victor Choueiri | 79840b1 | 2013-08-20 18:00:26 +0300 | [diff] [blame] | 53 | <script language="javascript"> |
| 54 | function toggleComments() { |
| 55 | var commentDiv = document.getElementById("article_comments"); |
| 56 | (commentDiv.style.display == "none") ? commentDiv.style.display = "block" : commentDiv.style.display = "none"; |
| 57 | return false; |
| 58 | } |
| 59 | </script> |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 60 | {% endblock %} |