article.html 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. {% extends "base.html" %}
  2. {% block title %}
  3. hell {{ article.title }} - {{ super() }}
  4. {% endblock title %}
  5. {% block content %}
  6. <div class="row-fluid">
  7. <header class="page_header span7 offset2">
  8. <h1> {{ article.title }} <small> {%if article.subtext %} {{ article.subtext }} {% endif %} </small></h1>
  9. </header>
  10. </div>
  11. <div class="row-fluid">
  12. <div class="span7 offset2">
  13. {{ article.content }}
  14. </div>
  15. <div class="span3">
  16. <div class="row-fluid">
  17. <div class="span12">
  18. <p>
  19. {% set day = article.date.strftime('%d')|int %}
  20. {% set suffix = ['st', 'nd', 'rd', 'th'] %}
  21. {{ article.date.strftime('%b %d') }}
  22. {%- if 4 <= day <= 20 or 24 <= day <= 30 -%} {{ suffix[3] }}
  23. {%- elif day % 10 - 1 == 0 -%} {{ suffix[0] }}
  24. {%- elif day % 10 - 1 == 1 -%} {{ suffix[1] }}
  25. {%- elif day % 10 - 1 == 2 -%} {{ suffix[2] }}
  26. {%- endif -%}
  27. {{ article.date.strftime(', %Y') }}
  28. </p>
  29. <p>
  30. Published by <a href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a> in <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
  31. </p>
  32. </div>
  33. </div>
  34. <div class="row-fluid">
  35. <div class="span12">
  36. {% if article.tags %}
  37. <p>Tags:
  38. <ul>
  39. {% for tag in article.tags %}
  40. <li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}
  41. {% for aTag, tagged_articles in tags if aTag == tag %}
  42. {{ tagged_articles|count }}
  43. {% endfor %}</a></li>
  44. {% endfor %}
  45. </ul>
  46. </p>
  47. {% endif %}
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. {% endblock content %}