{% extends 'base.html' %}
{% load macros %}
{% loadmacros richtext_blog/blog-macros.html %}
{% load blog_extras %}

{% block page_javascript %}
  <script type="text/javascript" src="{{ STATIC_URL }}jquery-1.7.2.min.js"></script>
  <script type="text/javascript">
    {% usemacro blog_jquery_selecttext %}
    $(document).ready(function() {
       $('pre').click(function() {
           selectText(this);
       });
    });
  </script>
{% endblock %}

{% block page_css %}
  <link rel="stylesheet" href="{{ STATIC_URL }}pygments.css" />
{% endblock %}

{% block title %}
{% if display_mode %}
  {% if display_mode == 'monthly' %}
    {{ SITE.name }} &mdash; Posts for {{ month|month_name }} {{ year }}
  {% endif %}
  {% if display_mode == 'yearly' %}
    {{ SITE.name }} &mdash; Posts for {{ year }}
  {% endif %}
{% else %}
  {{ SITE.name }} &mdash; All Posts
{% endif %}
{% endblock %}

{% block content %}
  <div class="content">
    {% if display_mode %}
      {% if display_mode == 'monthly' %}
	<h1 class="post-list-title">Posts for {{ month|month_name }} {{ year }}</h1>
      {% endif %}
      {% if display_mode == 'yearly' %}
	<h1 class="post-list-title">Posts for {{ year }}</h1>
      {% endif %}
	{% usemacro blog_back_to_all %}
      {% endif %}
      {% usemacro blog_pagination %}
      <div id="posts">
	<ul>
	  {% for post in post_list %}
	    {% usemacro blog_post %}
	  {% endfor %}
	</ul>
      </div>
      {% usemacro blog_pagination %}
      {% if display_mode %}
	{% usemacro blog_back_to_all %}
      {% endif %}
  </div>
{% endblock %}
