{% load trans from i18n %}
{% load url from future %}

<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

  <title>{% block title %}{% endblock %}</title>
  <meta name="description" content="">
  <meta name="author" content="">

  <meta name="viewport" content="width=device-width">

  <link rel="stylesheet" href="{{ STATIC_URL }}radpress/bootstrap/css/bootstrap.min.css" />
  <link rel="stylesheet" href="{{ STATIC_URL }}radpress/css/style.css" />
  <link rel="stylesheet" href="{{ STATIC_URL }}radpress/bootstrap/css/bootstrap-responsive.min.css" />

  <!-- Use SimpLESS (Win/Linux/Mac) or LESS.app (Mac) to compile your .less files
  to style.css, and replace the 2 lines above by this one:

  <link rel="stylesheet" href="less/style.css">
   -->

  <script src="{{ STATIC_URL }}radpress/js/libs/modernizr-2.5.3-respond-1.1.0.min.js"></script>
  {% block extraheads %}{% endblock %}
</head>
<body>
<!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->

    <div class="container">
      <header>
        <h1>{{ RADPRESS_TITLE }}</h1>
        <h2>{{ RADPRESS_DESCRIPTION }}</h2>
      </header>

      <nav class="navbar">
        <ul class="nav">
          <li class="divider-vertical"></li>
          <li>
            <a href="{% url 'radpress-index' %}">{% trans "Blog" %}</a>
          </li>
          <li class="divider-vertical"></li>
          <li>
            <a href="{% url 'radpress-archive' %}">{% trans "Archive" %}</a>
          </li>
          <li class="divider-vertical"></li>
          {% for menu in RADPRESS_MENUS %}
            <li>
              <a href="{{ menu.url }}">{{ menu.title }}</a>
            </li>
            <li class="divider-vertical"></li>
          {% endfor %}
        </ul>

        <ul class="nav pull-right">
          <li>
            <a href="{% url 'radpress-rss' %}">RSS</a>
          </li>
        </ul>
      </nav>
    </div>

    <div class="container">
      <div id="wrapper">
        {% if messages %}
          <div id="message">
            {% for message in messages %}
              <div class="alert{% if message.tags %} {{ message.tags }}{% endif %}">
                <button class="close" data-dismiss="alert">×</button>
                {{ message }}
              </div>
            {% endfor %}
          </div>
        {% endif %}

        <div class="row">
          {% block base_content %}
            <div class="span9">
              <div id="content" class="{% block content_class %}{% endblock %}">
                {% block content %}{% endblock %}
              </div>
            </div>
            <div class="span3 sidebar-span">
              <div id="sidebar">
                {% block sidebar %}
                  <div class="sidebar-box">
                    {%  include "radpress/_search_form.html" %}
                  </div>

                  <div class="sidebar-box">
                    {% include "radpress/_latest_posts.html" %}
                  </div>

                  {% if tag_list %}
                    <div class="sidebar-box">
                      <h2>{% trans "Tag Cloud" %}</h2>

                      <div class="tags">
                        {% for tag in tag_list %}
                          <a class="label {% if tag.slug != enabled_tag %} label-info{% endif %}"
                             href="{% url 'radpress-archive' %}?tag={{ tag.slug }}">
                             <i class="icon-tag icon-white"></i>
                             {{ tag.name }}
                          </a>
                        {% endfor %}
                      </div>
                    {% endif %}
                {% endblock %}
              </div>
            </div>
          {% endblock %}
        </div>
      </div>
      <div class="container">
        <footer>
          <div class="row-fluid">
            <div class="span9">
              <p>Copyright &copy; {% now "Y" %} - Gökmen Görgen - Powered by RADPRESS</p>
            </div>
            <div class="span3">
              {% if user.is_authenticated %}
                <a href="{% url 'admin:logout' %}?next={% url 'radpress-index' %}" class="pull-right menu">
                  {% trans "logout" %}
                </a>
              {% endif %}
              <a href="{% url 'admin:index' %}" class="pull-right menu">
                {% trans "dashboard" %}
              </a>
            </div>
          </div>

        </footer>
      </div>
    </div> <!-- /container -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="{{ STATIC_URL }}radpress/js/libs/jquery-1.7.2.min.js"><\/script>')</script>

<!-- scripts concatenated and minified via ant build script-->
<script src="{{ STATIC_URL }}radpress/bootstrap/js/bootstrap.min.js"></script>

<script src="{{ STATIC_URL }}radpress/js/plugins.js"></script>
<script src="{{ STATIC_URL }}radpress/js/script.js"></script>
{% block scripts %}{% endblock %}
<!-- end scripts-->

{% if RADPRESS_GA_CODE %}
  <script>
    var _gaq=[['_setAccount','{{ RADPRESS_GA_CODE }}'],['_trackPageview']];
    (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
    g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
    s.parentNode.insertBefore(g,s)}(document,'script'));
  </script>
{% endif %}

</body>
</html>
