{% load macros %}
{% loadmacros richtext_blog/blog-macros.html %}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <title>{% block title %}{{ SITE.name }}{% endblock %}</title>
    {% block global_javascript %}
    {% endblock %}
    {% block page_javascript %}
    {% endblock %}
    {% block global_css %}
      <link rel="stylesheet" href="{{ STATIC_URL }}blog-style.css" />
    {% endblock %}
    {% block page_css %}
    {% endblock %}
    {% block rss %}
      <link rel="alternate" type="application/rss+xml" title="{{ SITE.name }} RSS Feed" href="{% url posts_all_rss %}" />
      <link rel="alternate" type="application/atom+xml" title="{{ SITE.name }} Atom Feed" href="{% url posts_all_atom %}" />
    {% endblock %}
  </head>

  <body>
    <div id="site-wrapper">
      <div id="header">
	{% block header %}
	  <div id="django-blog-richtext-default-header">
	    <h1><a href="{% url posts_all %}">Richtext Blog</a></h1>
	    <p>Feel free to customise! :)</p>
	  </div>
	{% endblock %}
      </div>

      <table id="main">
	<tr>
	  <!-- main content area -->
	  <td id="content-wrapper">
	    {% block messages_section %}
	      {% if messages %}
		<ul class="messages">
		  {% for message in messages %}
		    <li {% if message.tags %}class="{{ message.tags }}"{% endif %}>
		      {{ message }}
		    </li>
		  {% endfor %}
		</ul>
	      {% endif %}
	    {% endblock %}
	    {% block content %}
	      <div class="content">
		Content placeholder
	      </div>
	    {% endblock %}
	  </td>

	  <!-- right sidebar -->
	  {% block right-sidebar %}
	    <td id="right-sidebar">
	      {% block right-sidebar-content %}
		<div class="sidebar-items">
		  <div class="sidebar-item recent-posts">
		    <div class="sidebar-item-header">
		      Recent Posts
		    </div>
		    <div class="sidebar-item-content">
		      {% usemacro blog_recent_posts %}
		    </div>
		  </div>
		</div>

		<div class="sidebar-items">
		  <div class="sidebar-item">
		    <div class="sidebar-item-header">
		      Tags
		    </div>
		    <div class="sidebar-item-content">
		      {% usemacro blog_tag_links %}
		    </div>
		  </div>
		</div>

		<div class="sidebar-items">
		  <div class="sidebar-item">
		    <div class="sidebar-item-header">
		      Feeds
		    </div>
		    <div class="sidebar-item-content">
		      {% usemacro blog_feed_links %}
		    </div>
		  </div>
		</div>

		<div class="sidebar-items">
		  <div class="sidebar-item">
		    <div class="sidebar-item-header">
		      Archive
		    </div>
		    <div class="sidebar-item-content">
		      {% usemacro blog_archive_links %}
		    </div>
		  </div>
		</div>

		<div class="sidebar-items">
		  <div class="sidebar-item">
		    <div class="sidebar-item-content text-centered">
		      <a href="http://www.djangoproject.com/"><img src="http://media.djangoproject.com/img/badges/djangopowered126x54.gif" border="0" alt="Powered by Django." title="Powered by Django." /></a>
		    </div>
		  </div>
		</div>
	      {% endblock %}
	    </td>
	  {% endblock %}
	</tr>
      </table>

      <!-- footer -->
      <div id="footer">
	{% block footer-content %}
	  <table>
	    <tr>
	      <td id="footer-left">
	      </td>
	      <td id="footer-center">
	      </td>
	      <td id="footer-right">
	      </td>
	    </tr>
	  </table>
	{% endblock %}
      </div>
    </div>	
  </body>
</html>
