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 %} |
pR0Ps | 02550b7 | 2013-12-17 17:03:38 -0500 | [diff] [blame] | 3 | <meta name="keywords" content=" |
| 4 | {%- if GLOBAL_KEYWORDS -%} |
| 5 | {{ GLOBAL_KEYWORDS|join(', ') }} |
pR0Ps | 86b8086 | 2014-09-25 02:41:07 -0400 | [diff] [blame^] | 6 | {%- if article.tags -%}{{', '}}{%- endif -%} |
pR0Ps | 02550b7 | 2013-12-17 17:03:38 -0500 | [diff] [blame] | 7 | {%- endif -%} |
| 8 | {{article.tags|join(', ') }}"> |
Giulio Fidente | 663537a | 2013-04-17 16:48:53 +0200 | [diff] [blame] | 9 | {% endblock %} |
Giulio Fidente | da4d95b | 2013-04-29 15:59:35 +0200 | [diff] [blame] | 10 | |
pR0Ps | 86b8086 | 2014-09-25 02:41:07 -0400 | [diff] [blame^] | 11 | {% block title %}{{ article.title|striptags|escape }} | {{ SITENAME }}{% endblock %} |
| 12 | {% block description %}{{ article.title|striptags|escape }} | {{ article.content|striptags|truncate(250)|escape }}{% endblock %} |
Giulio Fidente | da4d95b | 2013-04-29 15:59:35 +0200 | [diff] [blame] | 13 | |
pR0Ps | 09af9c4 | 2013-12-06 04:51:29 -0500 | [diff] [blame] | 14 | {% block subheader %} |
pR0Ps | 589f9bd | 2013-12-06 17:00:07 -0500 | [diff] [blame] | 15 | <p>Posted |
| 16 | {% if article.author %} |
| 17 | by{% if AUTHORS_URL %} |
| 18 | <a href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a> |
| 19 | {% else %} |
| 20 | {{ article.author}} |
| 21 | {% endif %} |
| 22 | {% endif %} |
| 23 | on {{ article.locale_date }}</p> |
Giulio Fidente | a329665 | 2013-03-28 11:30:46 +0100 | [diff] [blame] | 24 | {% endblock %} |
| 25 | |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 26 | {% block content %} |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 27 | <article> |
Giulio Fidente | 0bc1f0e | 2013-11-05 16:23:23 +0100 | [diff] [blame] | 28 | <div class="article_title"> |
pR0Ps | 41bf7d3 | 2013-12-05 16:33:55 -0500 | [diff] [blame] | 29 | <h1><a href="{{ SITEURL }}/{{ article.url }}" class="nohover">{{ article.title }}</a></h1> |
Giulio Fidente | 5dba477 | 2013-03-27 01:00:02 +0100 | [diff] [blame] | 30 | </div> |
Giulio Fidente | 0bc1f0e | 2013-11-05 16:23:23 +0100 | [diff] [blame] | 31 | <div class="article_text"> |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 32 | {{ article.content }} |
| 33 | </div> |
Giulio Fidente | 0bc1f0e | 2013-11-05 16:23:23 +0100 | [diff] [blame] | 34 | <div class="article_meta"> |
pR0Ps | 589f9bd | 2013-12-06 17:00:07 -0500 | [diff] [blame] | 35 | {% if CATEGORY_URL %} |
Giulio Fidente | 8305e74 | 2013-03-22 23:17:45 +0100 | [diff] [blame] | 36 | <p>Category: <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a></p> |
pR0Ps | 589f9bd | 2013-12-06 17:00:07 -0500 | [diff] [blame] | 37 | {% endif %} |
| 38 | {% if TAG_URL and article.tags %} |
Giulio Fidente | 8305e74 | 2013-03-22 23:17:45 +0100 | [diff] [blame] | 39 | <p>Tags: |
| 40 | {% for tag in article.tags %} |
Giulio Fidente | 91c1d45 | 2013-03-22 15:15:17 +0100 | [diff] [blame] | 41 | <a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% if not loop.last %},{% endif %} |
Giulio Fidente | 8305e74 | 2013-03-22 23:17:45 +0100 | [diff] [blame] | 42 | {% endfor %} |
| 43 | </p> |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 44 | {% endif %} |
Victor Choueiri | 79840b1 | 2013-08-20 18:00:26 +0300 | [diff] [blame] | 45 | {% if DISQUS_SITENAME %} |
Vincent Cheng | 5ab7dde | 2014-02-21 02:08:50 -0800 | [diff] [blame] | 46 | {% if COLLAPSE_COMMENTS %} |
| 47 | <p>Comments: <a href="#" onclick="javascript:toggleComments();return false;">toggle</a></p> |
| 48 | {% endif %} |
Victor Choueiri | 79840b1 | 2013-08-20 18:00:26 +0300 | [diff] [blame] | 49 | {% endif %} |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 50 | </div> |
Victor Choueiri | d54283f | 2013-08-13 13:54:32 +0300 | [diff] [blame] | 51 | |
| 52 | {% if DISQUS_SITENAME %} |
pR0Ps | 721949b | 2013-12-11 13:09:22 -0500 | [diff] [blame] | 53 | |
| 54 | {% if COLLAPSE_COMMENTS %} |
| 55 | <script language="javascript"> |
| 56 | function toggleComments() { |
| 57 | var commentDiv = document.getElementById("article_comments"); |
| 58 | (commentDiv.style.display == "none") ? commentDiv.style.display = "block" : commentDiv.style.display = "none"; |
| 59 | return false; |
| 60 | } |
| 61 | </script> |
| 62 | {% endif %} |
Victor Choueiri | 79840b1 | 2013-08-20 18:00:26 +0300 | [diff] [blame] | 63 | <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] | 64 | <div id="disqus_thread"></div> |
| 65 | <script type="text/javascript"> |
| 66 | var disqus_identifier = "{{ article.url }}"; |
| 67 | (function() { |
| 68 | var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; |
Vincent Cheng | 8d10ff2 | 2014-04-30 19:12:51 -0700 | [diff] [blame] | 69 | dsq.src = '//{{ DISQUS_SITENAME }}.disqus.com/embed.js'; |
Victor Choueiri | d54283f | 2013-08-13 13:54:32 +0300 | [diff] [blame] | 70 | (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); |
| 71 | })(); |
| 72 | </script> |
Vincent Cheng | b0ee873 | 2014-02-21 22:52:06 -0800 | [diff] [blame] | 73 | <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> |
Victor Choueiri | d54283f | 2013-08-13 13:54:32 +0300 | [diff] [blame] | 74 | </div> |
| 75 | {% endif %} |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 76 | </article> |
Giulio Fidente | a329665 | 2013-03-28 11:30:46 +0100 | [diff] [blame] | 77 | {% endblock %} |
| 78 | |