Varia's website, varia.zone or vvvvvvaria.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

article.html 3.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. {% extends "base.html" %}
  2. {% block head %}
  3. {{ super() }}
  4. {% if article.description %}
  5. <meta name="description" content="{{article.description}}" />
  6. {% endif %}
  7. {% if article.tags or article.category or article.keywords %}
  8. <meta name="keywords" content="{{ [article.tags|join(', '), article.category, article.keywords]|join(', ') }}" />
  9. {% endif %}
  10. {% endblock %}
  11. {% block content %}
  12. <header id="banner">
  13. {% for p in pages %}
  14. {% if p.title == 'header' %}
  15. <div id="title">{{ p.content }}</div>
  16. {% endif %}
  17. {% endfor %}
  18. </header>
  19. <section id="content" class="body h-entry">
  20. <div class="entry-title p-name">
  21. {{ article.title }}
  22. </div>
  23. <div class="article-info">
  24. <div class="featured-image u-photo">
  25. {% if article.featured_image %}
  26. {% set thumb_size ='/thumb'%}
  27. <a href="{{ article.featured_image }}">
  28. {% if article.featured_image.endswith('.gif') %}
  29. {% set thumb_size =''%}
  30. {% endif %}
  31. <img src="{{ article.featured_image | replace('images','images'+thumb_size) }}">
  32. </a>
  33. {% endif %}
  34. </div>
  35. <div class="event-details">
  36. {% if article.event_start %}
  37. <div>{{ article.event_start }}</div>
  38. {% else %}
  39. <div>Published: {{ article.date | strftime('%d %B %Y') }}</div>
  40. {% endif %}
  41. </div>
  42. <div class="post-info">
  43. <a style="visibility:hidden;" rel="author" class="p-author h-card">{{article.author}}</a>
  44. <time class="dt-published" datetime="{{article.date}}"></time>
  45. <a class="u-url" href="{{article.url}}"></a>
  46. {% if article.category %}
  47. <div class="categories">
  48. <span itemprop="articleSection">
  49. <a href="{{ article.category.url }}" rel="category">{{ article.category }}</a>
  50. </span>
  51. </div>
  52. {% endif %}
  53. {% if article.translations %}
  54. <span class="article-translation">
  55. {% for translation in article.translations %}
  56. {% if translation.lang == 'nl' %}<a href="{{ translation.url }}">Lees dit artikel in het Nederlands</a>
  57. {% endif %}
  58. {% if translation.lang == 'en' %}<a href="{{ translation.url }}">Read this article in English</a>
  59. {% endif %}
  60. {% endfor %}
  61. </span>
  62. {% endif %}
  63. {% if article.tags %}
  64. <span class="tags">
  65. relating to {% for tag in article.tags %}
  66. <span itemprop="keywords">
  67. <a href="/{{ tag.url }}" rel="tag">{{ tag }}</a>
  68. </span> {% endfor %}
  69. </span>
  70. {% endif %}
  71. </div>
  72. </div>
  73. <div class="entry-content-container">
  74. <div class="entry-content e-content">
  75. {{ article.content }}
  76. <div class="separator"><hr></div>
  77. </div><!-- /.entry-content -->
  78. </div><!-- /.entry-content-container -->
  79. </section>
  80. <script type="text/javascript">
  81. var footnotes = document.querySelectorAll('[id^="fnref-"]');
  82. for(var i in footnotes){
  83. if(i < footnotes.length){
  84. console.log(footnotes[i]);
  85. var id = footnotes[i].id.replace('fnref-','fn-');
  86. footnotes[i].innerHTML = footnotes[i].innerHTML + '<span>['+ parseInt(Number(i)+1) + '] '+ document.getElementById(id).innerHTML +'</span>';
  87. }
  88. }
  89. document.getElementsByClassName('footnote')[0].remove();
  90. </script>
  91. {% endblock %}