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 %} |
pR0Ps | 2d69892 | 2014-09-25 20:47:11 -0400 | [diff] [blame] | 12 | {% 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] | 13 | |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 14 | {% block content %} |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 15 | <article> |
Giulio Fidente | 0bc1f0e | 2013-11-05 16:23:23 +0100 | [diff] [blame] | 16 | <div class="article_title"> |
pR0Ps | 41bf7d3 | 2013-12-05 16:33:55 -0500 | [diff] [blame] | 17 | <h1><a href="{{ SITEURL }}/{{ article.url }}" class="nohover">{{ article.title }}</a></h1> |
Luigi Santivetti | c6a6a56 | 2020-02-17 23:17:11 +0000 | [diff] [blame] | 18 | {% if DISPLAY_SUBTITLE %} |
| 19 | <h4>{{ article.subtitle }}</a></h4> |
| 20 | {% endif %} |
Giulio Fidente | 5dba477 | 2013-03-27 01:00:02 +0100 | [diff] [blame] | 21 | </div> |
Giulio Fidente | 0bc1f0e | 2013-11-05 16:23:23 +0100 | [diff] [blame] | 22 | <div class="article_text"> |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 23 | {{ article.content }} |
| 24 | </div> |
Luigi Santivetti | c6a6a56 | 2020-02-17 23:17:11 +0000 | [diff] [blame] | 25 | {% if article.photo_gallery %} |
| 26 | <div class="gallery"> |
| 27 | {% for title, gallery in article.photo_gallery %} |
| 28 | <h1>{{ title }}</h1> |
| 29 | {% for name, photo, thumb, exif, caption in gallery %} |
| 30 | <a href="{{ SITEURL }}/{{ photo }}" title="{{ name }}" exif="{{ exif }}" caption="{{ caption }}"><img src="{{ SITEURL }}/{{ thumb }}"></a> |
| 31 | {% endfor %} |
| 32 | {% endfor %} |
| 33 | </div> |
| 34 | {% endif %} |
Luigi Santivetti | 8c54919 | 2020-10-05 23:19:50 +0100 | [diff] [blame] | 35 | {% if article.video_gallery %} |
| 36 | <div class="gallery"> |
| 37 | {% for title, gallery in article.video_gallery %} |
| 38 | <h1>{{ title }}</h1> |
| 39 | {% for video, width, height, format in gallery %} |
| 40 | <video width="{{ width }}" height="{{ height }}" controls> |
| 41 | <source src="{{ SITEURL }}/{{ video }}" type="video/{{ format }}"> |
| 42 | Your browser does not support the video tag. |
| 43 | </video> |
| 44 | {% endfor %} |
| 45 | {% endfor %} |
| 46 | </div> |
| 47 | {% endif %} |
| 48 | {% if not DISPLAY_META_ABOVE_ARTICLE %} |
| 49 | {% include "modules/article_meta.html" %} |
| 50 | {% endif %} |
Victor Choueiri | d54283f | 2013-08-13 13:54:32 +0300 | [diff] [blame] | 51 | |
| 52 | {% if DISQUS_SITENAME %} |
pR0Ps | 032e7d8 | 2015-02-07 01:43:51 -0500 | [diff] [blame] | 53 | <div id="article_comments"> |
| 54 | <div id="disqus_thread"> |
| 55 | {% if DISQUS_COLLAPSED %} |
Carey Metcalfe | efe7193 | 2016-03-12 15:30:01 -0500 | [diff] [blame] | 56 | <a href="javascript:loadDisqus()"><i class="fa fa-comments fa-lg"></i>Click to load <span class="disqus-comment-count" data-disqus-identifier="{{ article.url }}">comments</span></a> |
pR0Ps | 032e7d8 | 2015-02-07 01:43:51 -0500 | [diff] [blame] | 57 | {% endif %} |
Victor Choueiri | d54283f | 2013-08-13 13:54:32 +0300 | [diff] [blame] | 58 | </div> |
pR0Ps | 032e7d8 | 2015-02-07 01:43:51 -0500 | [diff] [blame] | 59 | </div> |
| 60 | |
Carey Metcalfe | efe7193 | 2016-03-12 15:30:01 -0500 | [diff] [blame] | 61 | <script id="dsq-count-scr" src="https://{{ DISQUS_SITENAME }}.disqus.com/count.js" async></script> |
pR0Ps | 032e7d8 | 2015-02-07 01:43:51 -0500 | [diff] [blame] | 62 | <script type="text/javascript"> |
Carey Metcalfe | ef1e0cb | 2016-03-12 14:15:42 -0500 | [diff] [blame] | 63 | var disqus_config = function () { |
| 64 | this.page.identifier = "{{ article.url }}"; |
| 65 | this.page.title = "{{ article.title }}"; |
| 66 | }; |
| 67 | loadDisqus = function(sitename) { |
| 68 | var d = document, s = d.createElement('script'); |
| 69 | s.src = 'https://{{ DISQUS_SITENAME }}.disqus.com/embed.js'; |
| 70 | s.setAttribute('data-timestamp', +new Date()); |
| 71 | (d.head || d.body).appendChild(s); |
pR0Ps | 032e7d8 | 2015-02-07 01:43:51 -0500 | [diff] [blame] | 72 | }; |
| 73 | {% if not DISQUS_COLLAPSED %} |
| 74 | loadDisqus(); |
| 75 | {% endif %} |
| 76 | </script> |
pR0Ps | 2fd9300 | 2015-01-11 13:46:27 -0500 | [diff] [blame] | 77 | {% endif %} |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 78 | </article> |
Giulio Fidente | a329665 | 2013-03-28 11:30:46 +0100 | [diff] [blame] | 79 | {% endblock %} |
| 80 | |
pR0Ps | 095ba34 | 2015-02-04 01:38:57 -0500 | [diff] [blame] | 81 | {% block scripts %} |
| 82 | {{ super() }} |
| 83 | {% if FUZZY_DATES %} |
| 84 | <script type="text/javascript">window.addEventListener("load", lw_timeago);</script> |
| 85 | {% endif %} |
| 86 | {% endblock %} |