article.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. {% extends "base.html" %}
  2. {% block title %}
  3. {{ article.title }} - {{ super() }}
  4. {% endblock title %}
  5. {% block head_description %}
  6. {% if article.summary %}
  7. {{ article.summary|striptags }}
  8. {% endif %}
  9. {% endblock head_description %}
  10. {% block content %}
  11. <article>
  12. <div class="row-fluid">
  13. <header class="page_header span10 offset2">
  14. <h1><a href="/{{ article.url }}"> {{ article.title }} {%if article.subtext %} <small> {{ article.subtext }} </small> {% endif %} </a></h1>
  15. </header>
  16. </div>
  17. <div class="row-fluid">
  18. <div class="span8 offset2 article-content">
  19. {{ article.content }}
  20. <aside>
  21. {% for an_artcile in dates %}
  22. {% if an_artcile.url == article.url %}
  23. {% set index = loop.index0 %}
  24. {% if not loop.first %}
  25. {% set next_article = dates[index-1] %}
  26. {% endif %}
  27. {% if not loop.last %}
  28. {% set previous_article = dates[index+1] %}
  29. {% endif %}
  30. <nav>
  31. <ul class="articles_timeline">
  32. {% if previous_article %}
  33. <li class="previous_article">« <a href="/{{ previous_article.url }}" title="Previous: {{ previous_article.title }}">{{ previous_article.title }}</a></li>
  34. {% endif %}
  35. {% if next_article %}
  36. <li class="next_article"><a href="/{{ next_article.url }}" title="Next: {{ next_article.title }}">{{ next_article.title }}</a> »</li>
  37. {% endif %}
  38. </ul>
  39. </nav>
  40. {% endif %}
  41. {% endfor %}
  42. </aside>
  43. {% include 'comments.html' %}
  44. </div>
  45. <section>
  46. <div class="span2" style="float:right">
  47. {% if article.date %}
  48. <h4>Published</h4>
  49. {% set day = article.date.strftime('%d')|int %}
  50. <time pubdate="pubdate" datetime="{{ article.date.isoformat() }}">{{ article.date.strftime('%b') }} {{ day }} {{- article.date.strftime(', %Y') }}</time>
  51. {% endif %}
  52. {% if article.modified %}
  53. <h4>Last Updated</h4>
  54. {{ article.modified }}
  55. {% endif %}
  56. {% if article.category %}
  57. <h4>Category</h4>
  58. <a class="category-link" href="/categories.html#{{ category|replace(' ', '-')|e }}-ref">{{ article.category }}</a>
  59. {% endif %}
  60. {% if article.tags %}
  61. <h4>Tags</h4>
  62. <ul class="list-of-tags tags-in-article">
  63. {% for tag in article.tags %}
  64. <li><a href="/tags.html#{{ tag|replace(' ', '-')|e }}-ref">{{ tag }}
  65. {% for aTag, tagged_articles in tags if aTag == tag %}
  66. <span>{{ tagged_articles|count }}</span>
  67. {% endfor %}</a></li>
  68. {% endfor %}
  69. </ul>
  70. {% endif %}
  71. </div>
  72. </section>
  73. </div>
  74. </article>
  75. {% endblock content %}
  76. {% block script %}
  77. {{ super() }}
  78. {% include 'disqus_script_count.html' %}
  79. {% endblock script %}