<!DOCTYPE html>
<html>
  <head>
      <meta charset="utf-8">
      <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
      <title>Flex - {{ page.title }}</title>
      <meta name="viewport" content="width=device-width">

      <!-- syntax highlighting CSS -->
      <link rel="stylesheet" href="/css/syntax.css">

      <!-- Custom CSS -->
      <link rel="stylesheet" href="/css/main.css">

      <!-- Responsive CSS -->
      <link rel="stylesheet" href="/css/responsive.css">

      <!-- Google Fonts -->
      <link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700' rel='stylesheet' type='text/css'>
      <link href='https://fonts.googleapis.com/css?family=Raleway:300,400,700' rel='stylesheet' type='text/css'>
  </head>
  <body>
    <div class="site">
      <div class="sidebar" id="sidebar">
        <div class="header">
          {% if site.lang == "it" and site.default_locale_in_subfolder != true %}
            <h1 class="title"><a href="{{ site.baseurl_root }}/"><img id="logo" src="/images/logo.png"></a></h1>
          {% else %}
            <h1 class="title"><a href="{{ site.baseurl_root }}/{{ site.lang }}"><img id="logo" src="/images/logo.png"></a></h1>
          {% endif %}
          <span class="tagline">{% t global.tagline %}</span>
        </div>
        <div class="posts">
          <ul class="posts-list">
            {% for post in site.posts %}
              <li class="post-link">
                <a class="post-title" href="{{ site.baseurl }}{{ post.url }}">
                  {{ post.title }} 
                </a>
              </li>
            {% endfor %}
            {% if site.pages.size > 1 %}
              <hr>
              {% for page in site.pages %}
                {% if page.title != "Home" %}
                  {% unless page.url contains "page2" or page.url contains "page3" %}
                    <li class="post-link">
                      <a class="post-title" href="{{ site.baseurl }}{{ page.url }}">
                        {{ page.title }} - {{ site.lang }}
                      </a>
                    </li>
                  {% endunless %}
                {% endif %}
              {% endfor %}
            {% endif %}
          </ul>
        </div>
        <div class="footer">
          <span id="footer-links">
            <a href="" class="footer-link">{% t global.about %}</a> <span class="separator">&bull;</span>
            <a href="" class="footer-link">{% t global.twitter %}</a> <span class="separator">&bull;</span>
            <a href="" class="footer-link">{% t global.github %}</a>
          </span>
        </div>
        {% tf footer.md %}
        <br />
        <a class="link-it" href="{% tl root it %}">it</a>
        <a class="link-en" href="{% tl root en %}">en</a>
        <a class="link-es" href="{% tl root es %}">es</a>
      </div>

        {{ content }}

    </div>
    <script src="/scripts/responsive.js" type="text/javascript"></script>
  </body>
</html>
