{% load staticfiles %}
{% load ninecms_extras %}
{% load i18n %}
{% get_current_language as LANGUAGE_CODE %}
{% comment %}

Base template
Author: George Karakostas
Copyright: Copyright 2015, George Karakostas
Licence: BSD-3
Email: gkarak@9-dev.com

{% endcomment %}
<!DOCTYPE html>
{# <!--suppress JSUnresolvedLibraryURL --> #}
<html lang="{{ LANGUAGE_CODE }}">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{% block title %}{{ title }}{% endblock %}</title>
    {% block meta %}
        {% if node.summary %}<meta name="description" content="{{ node.summary|striptags }}">{% endif %}
        <meta name="author" content="{{ author }}">
        <meta name="keywords" content="{{ keywords }}">
        <meta name="generator" content="9cms">
    {% endblock %}

    {% if 'bootstrap'|library %}
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
    {% elif 'bootstrap_local'|library %}
        <link href="{% static 'ninecms/bootstrap/css/bootstrap.min.css' %}" rel="stylesheet">
        <link href="{% static 'ninecms/bootstrap/css/bootstrap-theme.min.css' %}" rel="stylesheet">
    {% endif %}

    {% if 'html5shiv_respond'|library %}
        {# HTML5 shiv and Respond.js for IE8 support of HTML5 elements and media queries #}
        {# WARNING: Respond.js doesn't work if you view the page via file:// #}
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
          <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
        <![endif]-->
    {% endif %}

    {% if 'angularjs'|library %}
        <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.min.js"></script>
    {% elif 'angularjs_local'|library %}
        <script src="{% static 'ninecms/angular.min.js' %}"></script>
    {% endif %}

    {% if 'lightbox2'|library %}
        <link href="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.7.1/css/lightbox.css" rel="stylesheet">
    {% endif %}

    {% if 'video.js'|library %}
        <link href="//vjs.zencdn.net/4.12/video-js.css" rel="stylesheet">
        <script src="//vjs.zencdn.net/4.12/video.js"></script>
    {% elif 'video.js_local'|library %}
        <link href="{% static 'ninecms/video-js/video-js.css' %}" rel="stylesheet">
        <script src="{% static 'ninecms/video-js/video.js' %}"></script>
    {% endif %}

    {% if 'wow'|library %}
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.4.0/animate.min.css">
    {% elif 'wow_local'|library %}
        <link rel="stylesheet" href="{% static 'ninecms/wow/animate.min.css' %}">
    {% endif %}

    {% if 'owl'|library %}
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/owl-carousel/1.3.3/owl.carousel.min.css">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/owl-carousel/1.3.3/owl.theme.min.css">
    {% elif 'owl_local'|library %}
        <link rel="stylesheet" href="{% static 'ninecms/owl-carousel/owl.carousel.css' %}">
        <link rel="stylesheet" href="{% static 'ninecms/owl-carousel/owl.theme.css' %}">
    {% endif %}

    <link href="{% static 'ninecms/style.css' %}" rel="stylesheet">
    {% block head %}
        <link rel="shortcut icon" type="image/png" href="{% static 'ninecms/images/favicon.ico' %}"/>
        <link href="{% static 'ninecms/extend.css' %}" rel="stylesheet">
    {% endblock head %}
</head>

<body class="{{ classes }}">
    {#  <!--suppress HtmlUnknownAnchorTarget --> #}
    <a href="#top" id="top-link">^</a>

    <div id="loader">
        <div class="loader-container">
            <div class="wow pulse" data-wow-iteration="infinite" data-wow-duration="3s">
                {% include 'ninecms/site-name.html' %}
            </div>
        </div>
    </div>

    <!--[if lt IE 9]><div id="ie8" class="alert alert-warning">Your browser version is deprecated</div><![endif]-->

    <div id="page">
        {% block content %}{% endblock %}
    </div>

    {#  <!--suppress HtmlUnknownAnchorTarget --> #}
    <a href="#bottom" id="bottom-link"></a>

    {% if 'jQuery'|library %}
        {# jQuery (necessary for Bootstrap's JavaScript plugins) #}
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-scrollTo/2.1.2/jquery.scrollTo.min.js"></script>
    {% elif 'jQuery_local'|library %}
        <script src="{% static 'ninecms/jquery/jquery-1.11.2.min.js' %}"></script>
        <script src="{% static 'ninecms/jquery.scrollTo/jquery.scrollTo.min.js' %}"></script>
    {% endif %}

    {% if 'bootstrap'|library %}
        {# Include all compiled plugins (below), or include individual files as needed #}
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    {% elif 'bootstrap_local'|library %}
        <script src="{% static 'ninecms/bootstrap/js/bootstrap.min.js' %}"></script>
    {% endif %}

    {% if 'jQuery|jQuery_local'|library %}
        {# NineCMS scripts #}
        <script src="{% static 'ninecms/jquery.toplink.js' %}"></script>
        <script src="{% static 'ninecms/layout.js' %}"></script>
    {% endif %}

    {% if 'wow'|library %}
        <script src="https://cdnjs.cloudflare.com/ajax/libs/wow/1.1.2/wow.min.js"></script>
    {% elif 'wow_local'|library %}
        <script src="{% static 'ninecms/wow/wow.min.js' %}"></script>
    {% endif %}
    {% if 'wow|wow_local'|library %}
        <script>
            new WOW().init();
        </script>
    {% endif %}

    {% if 'masonry.pkdg'|library %}
        <script src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/123941/imagesLoaded.js"></script>
        <script src="http://cdnjs.cloudflare.com/ajax/libs/masonry/3.2.2/masonry.pkgd.min.js"></script>
        <script src="{% static 'ninecms/masonry.js' %}"></script>
    {% elif 'masonry.pkdg_local'|library %}
        <script src="{% static 'ninecms/masonry/imagesLoaded.js' %}"></script>
        <script src="{% static 'ninecms/masonry/masonry.pkgd.min.js' %}"></script>
        {# NineCMS scripts #}
        <script src="{% static 'ninecms/masonry.js' %}"></script>
    {% endif %}

    {% if 'lightbox2'|library %}
        <script src="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.7.1/js/lightbox.min.js"></script>
    {% endif %}

    {% if 'waypoints'|library %}
        <script src="https://cdn.rawgit.com/imakewebthings/waypoints/master/lib/jquery.waypoints.min.js"></script>
        <script src="https://cdn.rawgit.com/imakewebthings/waypoints/master/lib/shortcuts/inview.js"></script>
    {% elif 'waypoints_local'|library %}
        <script src="{% static 'ninecms/waypoints/lib/jquery.waypoints.min.js' %}"></script>
        <script src="{% static 'ninecms/waypoints/lib/shortcuts/inview.min.js' %}"></script>
    {% endif %}

    {% if 'iosslider'|library %}
        <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
        <script src="https://cdn.rawgit.com/iosscripts/iosslider/master/_src/jquery.iosslider.min.js"></script>
    {% elif 'iosslider_local'|library %}
        <script src="{% static 'ninecms/jquery/jquery.easing.min.js' %}"></script>
        <script src="{% static 'ninecms/jquery/jquery.iosslider.min.js' %}"></script>
    {% endif %}

    {% if 'owl'|library %}
        <script src="https://cdnjs.cloudflare.com/ajax/libs/owl-carousel/1.3.3/owl.carousel.min.js"></script>
    {% elif 'owl_local'|library %}
        <script src="{% static 'ninecms/owl-carousel/owl.carousel.min.js' %}"></script>
    {% endif %}

    {% block body_scripts %}{% endblock %}

</body>
</html>
