article.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 }} </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 %}<p>Tags:
  37. <ul>
  38. {% for tag in article.tags %}<li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a></li>{% endfor %}
  39. </ul>
  40. </p>{% endif %}
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. {% endblock content %}