article.html 2.7 KB

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