<!DOCTYPE html>
<html lang="{{ grav.language.getActive ?: grav.config.site.default_lang }}">
<head>
    <meta charset="utf-8">
    <!-- (1) Optimize for mobile versions: http://goo.gl/EOpFl -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- (1) force latest IE rendering engine: bit.ly/1c8EiC9 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
    {% include 'partials/metadata.html.twig' %}
    <meta name="HandheldFriendly" content="True" />
    <meta name="MobileOptimized" content="320" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">

    <link rel="canonical" href="{{ page.url() }}">
    <link rel="shortcut icon" href="{{ theme_url }}/images/favicon.png">

    {% block stylesheets %}
        {% do assets.addCss('http://brick.a.ssl.fastly.net/Linux+Libertine:400,400i,700,700i/Open+Sans:400,400i,700,700i') %}
        {% do assets.addCss('//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css') %}
        {% do assets.addCss('theme://css/main.css') %}
        {# {% do assets.addCss('theme://css/print.css') %} #}
    {% endblock %}

    {% block javascripts %}
        {% do assets.add('jquery', {group: 'bottom', priority: 101}) %}
        {% do assets.addJs('theme://js/jquery.fitvids.js', {group: 'bottom'}) %}
        {% do assets.addJs('theme://js/readingTime.min.js', {group: 'bottom'}) %}
        {% do assets.addJs('theme://js/index.js', {group: 'bottom'}) %}
    {% endblock %}

    {% block assets deferred %}
        {{ assets.css()|raw }}
        {{ assets.js()|raw }}
    {% endblock %}
</head>
{% block body %}
<body>
{% endblock %}

{% set home = pages.find(config.system.home.alias) %}

    {% block header %}
        <a href="{{ base_url_relative }}" class="logo-readium"><span class="logo" style="background-image: url({{ uri.rootUrl() }}{{ site.logo }})"></span></a>
    {% endblock %}

    <!-- content start -->

    {% block content %}
    <div class="page-content">
        <div class="wrapper">
            {{ content|raw }}
        </div>
    </div>
    {% endblock %}
    <!-- content end -->


    {% block footer %}
    <!-- footer start -->
    <footer class="site-footer">
      <a class="subscribe" href="{{ base_url }}/blog.rss"> <span class="tooltip"> <i class="fa fa-rss"></i> Subscribe!</span></a>
        <div class="inner">
             <section class="copyright">All content copyright <a href="mailto:{{ site.email}}">{{ site.name }}</a> &copy; {{ "now"|date('Y') }} &bull; All rights reserved.</section>
             <section class="poweredby">Made with <a href="http://getgrav.org"> Grav</a></section>
        </div>
    </footer>
    <!-- footer end -->
    {% endblock %}

    {% block bottom %}
        {{ assets.js('bottom')|raw }}
    {% endblock %}
    {% include 'partials/javascripts.html.twig' %}
</body>
</html>
