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(', ') }}"> |
pR0Ps | fc48ff8 | 2015-01-15 01:32:41 -0500 | [diff] [blame] | 9 | |
| 10 | {% if FUZZY_DATES %} |
pR0Ps | 19fac82 | 2015-03-11 22:07:12 -0400 | [diff] [blame^] | 11 | {% assets filters="slimit", output="js/lw-timeago.%(version)s.min.js", "js/lw-timeago/lw-timeago.js" %} |
pR0Ps | a9f8203 | 2015-03-11 21:36:35 -0400 | [diff] [blame] | 12 | <script src="{{ SITEURL }}/{{ ASSET_URL }}" type="text/javascript"></script> |
| 13 | {% endassets%} |
pR0Ps | fc48ff8 | 2015-01-15 01:32:41 -0500 | [diff] [blame] | 14 | {% endif %} |
Giulio Fidente | 663537a | 2013-04-17 16:48:53 +0200 | [diff] [blame] | 15 | {% endblock %} |
Giulio Fidente | da4d95b | 2013-04-29 15:59:35 +0200 | [diff] [blame] | 16 | |
pR0Ps | 86b8086 | 2014-09-25 02:41:07 -0400 | [diff] [blame] | 17 | {% block title %}{{ article.title|striptags|escape }} | {{ SITENAME }}{% endblock %} |
pR0Ps | 2d69892 | 2014-09-25 20:47:11 -0400 | [diff] [blame] | 18 | {% block description %}{{ article.title|striptags|escape }} | {{ article.content|striptags|truncate(154-article.title|length)|escape }}{% endblock %} |
Giulio Fidente | da4d95b | 2013-04-29 15:59:35 +0200 | [diff] [blame] | 19 | |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 20 | {% block content %} |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 21 | <article> |
Giulio Fidente | 0bc1f0e | 2013-11-05 16:23:23 +0100 | [diff] [blame] | 22 | <div class="article_title"> |
pR0Ps | 41bf7d3 | 2013-12-05 16:33:55 -0500 | [diff] [blame] | 23 | <h1><a href="{{ SITEURL }}/{{ article.url }}" class="nohover">{{ article.title }}</a></h1> |
Giulio Fidente | 5dba477 | 2013-03-27 01:00:02 +0100 | [diff] [blame] | 24 | </div> |
Giulio Fidente | 0bc1f0e | 2013-11-05 16:23:23 +0100 | [diff] [blame] | 25 | <div class="article_text"> |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 26 | {{ article.content }} |
| 27 | </div> |
Giulio Fidente | 0bc1f0e | 2013-11-05 16:23:23 +0100 | [diff] [blame] | 28 | <div class="article_meta"> |
pR0Ps | fc48ff8 | 2015-01-15 01:32:41 -0500 | [diff] [blame] | 29 | <p>Posted <time data-timeago datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time> |
pR0Ps | aeaf5f5 | 2014-09-30 21:41:06 -0400 | [diff] [blame] | 30 | {% if article.author %} |
| 31 | by {% if AUTHORS_URL %} <a href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a>{% else %}{{ article.author}}{% endif %} |
| 32 | {% endif %} |
pR0Ps | 6d64832 | 2015-01-15 01:34:55 -0500 | [diff] [blame] | 33 | </p> |
pR0Ps | 441bfd2 | 2014-12-17 22:08:21 -0500 | [diff] [blame] | 34 | {% if article.modified %} |
pR0Ps | fc48ff8 | 2015-01-15 01:32:41 -0500 | [diff] [blame] | 35 | <p>Last updated <time data-timeago datetime="{{ article.modified.isoformat() }}">{{ article.locale_modified }}</time></p> |
pR0Ps | 441bfd2 | 2014-12-17 22:08:21 -0500 | [diff] [blame] | 36 | {% endif %} |
pR0Ps | cc0f61e | 2014-09-25 02:58:23 -0400 | [diff] [blame] | 37 | <p> |
pR0Ps | 589f9bd | 2013-12-06 17:00:07 -0500 | [diff] [blame] | 38 | {% if CATEGORY_URL %} |
pR0Ps | cc0f61e | 2014-09-25 02:58:23 -0400 | [diff] [blame] | 39 | Category: <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a> |
| 40 | {% if TAG_URL and article.tags %}––{% endif %} |
pR0Ps | 589f9bd | 2013-12-06 17:00:07 -0500 | [diff] [blame] | 41 | {% endif %} |
| 42 | {% if TAG_URL and article.tags %} |
pR0Ps | cc0f61e | 2014-09-25 02:58:23 -0400 | [diff] [blame] | 43 | Tags: |
Giulio Fidente | 8305e74 | 2013-03-22 23:17:45 +0100 | [diff] [blame] | 44 | {% for tag in article.tags %} |
Giulio Fidente | 91c1d45 | 2013-03-22 15:15:17 +0100 | [diff] [blame] | 45 | <a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% if not loop.last %},{% endif %} |
Giulio Fidente | 8305e74 | 2013-03-22 23:17:45 +0100 | [diff] [blame] | 46 | {% endfor %} |
| 47 | </p> |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 48 | {% endif %} |
| 49 | </div> |
Victor Choueiri | d54283f | 2013-08-13 13:54:32 +0300 | [diff] [blame] | 50 | |
| 51 | {% if DISQUS_SITENAME %} |
pR0Ps | 032e7d8 | 2015-02-07 01:43:51 -0500 | [diff] [blame] | 52 | <div id="article_comments"> |
| 53 | <div id="disqus_thread"> |
| 54 | {% if DISQUS_COLLAPSED %} |
| 55 | <a href="javascript:loadDisqus()"><i class="fa fa-comments fa-lg"></i>Click to load comments</a> |
| 56 | {% endif %} |
Victor Choueiri | d54283f | 2013-08-13 13:54:32 +0300 | [diff] [blame] | 57 | </div> |
pR0Ps | 032e7d8 | 2015-02-07 01:43:51 -0500 | [diff] [blame] | 58 | </div> |
| 59 | |
| 60 | <script type="text/javascript"> |
| 61 | var disqus_identifier = "{{ article.url }}"; |
| 62 | loadDisqus = function() { |
| 63 | var dsq = document.createElement('script'); |
| 64 | dsq.type = 'text/javascript'; |
| 65 | dsq.async = true; |
| 66 | dsq.src = '//{{ DISQUS_SITENAME }}.disqus.com/embed.js'; |
| 67 | (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); |
| 68 | }; |
| 69 | {% if not DISQUS_COLLAPSED %} |
| 70 | loadDisqus(); |
| 71 | {% endif %} |
| 72 | </script> |
pR0Ps | 2fd9300 | 2015-01-11 13:46:27 -0500 | [diff] [blame] | 73 | {% endif %} |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 74 | </article> |
Giulio Fidente | a329665 | 2013-03-28 11:30:46 +0100 | [diff] [blame] | 75 | {% endblock %} |
| 76 | |
pR0Ps | 095ba34 | 2015-02-04 01:38:57 -0500 | [diff] [blame] | 77 | {% block scripts %} |
| 78 | {{ super() }} |
| 79 | {% if FUZZY_DATES %} |
| 80 | <script type="text/javascript">window.addEventListener("load", lw_timeago);</script> |
| 81 | {% endif %} |
| 82 | {% endblock %} |