123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- {% extends "base.html" %}
- {% block title %}
- {{ article.title }} - {{ super() }}
- {% endblock title %}
- {% block content %}
- <script language="javascript" type="text/javascript">
- function moveTOC() {
- var table_of_contents = document.getElementById('contents');
- var toc_sidebar = document.getElementById('toc_sidebar');
- if (table_of_contents && toc_sidebar)
- toc_sidebar.appendChild(table_of_contents);
- }
- </script>
- <div class="row-fluid">
- <header class="page_header span7 offset3">
- <h1> {{ article.title }} <small> {%if article.subtext %} {{ article.subtext }} {% endif %} </small></h1>
- </header>
- </div>
- <div class="row-fluid">
- <div class="span3" id="toc_sidebar">
- </div>
- <div class="span7">
- {{ article.content }}
- </div>
- <div class="span2">
- <div class="row-fluid">
- <div class="span12">
- <p>
- {% set day = article.date.strftime('%d')|int %}
- {% set suffix = ['st', 'nd', 'rd', 'th'] %}
- {{ article.date.strftime('%b') }} {{ day }}
- {%- if 4 <= day <= 20 or 24 <= day <= 30 -%} {{ suffix[3] }}
- {%- elif day % 10 - 1 == 0 -%} {{ suffix[0] }}
- {%- elif day % 10 - 1 == 1 -%} {{ suffix[1] }}
- {%- elif day % 10 - 1 == 2 -%} {{ suffix[2] }}
- {%- endif -%}
- {{ article.date.strftime(', %Y') }}
- </p>
- <p>
- Published by <a href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a> in <a href="{{ SITEURL }}/categories.html#collapse{{ category|replace(' ', '_')|e }}" "{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
- </p>
- {% if article.modified %}
- <p>Updated on {{ article.modified }}
- </p>
- {% endif %}
- </div>
- </div>
- <div class="row-fluid">
- <div class="span12">
- {% if article.tags %}
- <p>Tags:
- <ul>
- {% for tag in article.tags %}
- <li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}
- {% for aTag, tagged_articles in tags if aTag == tag %}
- {{ tagged_articles|count }}
- {% endfor %}</a></li>
- {% endfor %}
- </ul>
- </p>
- {% endif %}
- </div>
- </div>
- </div>
- </div>
- <script type="text/javascript" language="JavaScript">
- moveTOC();
- </script>
- {% endblock content %}
|