{#
# This file is part of Invenio.
# Copyright (C) 2015, 2016 CERN.
#
# Invenio is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# Invenio is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Invenio; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307, USA.
#
# In applying this license, CERN does not
# waive the privileges and immunities granted to it by virtue of its status
# as an Intergovernmental Organization or submit itself to any jurisdiction.
#}
<!DOCTYPE html>
<html{% if html_css_classes %} class="{{ html_css_classes|join(' ') }}"{% endif %}{%- if g.ln %} lang="{{ g.ln|safe }}"{% endif %} dir="{{ current_i18n.locale.text_direction }}">
  <head>
    {%- block head %}
    {%- block head_meta %}
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    {%- if description %}<meta name="description" content="{{ description }}" />{% endif %}
    {%- if keywords %}<meta name="keywords" content="{{ keywords }}" />{% endif %}
    {%- if config.get('THEME_GOOGLE_SITE_VERIFICATION', None) %}
      {%- for google_id in config.THEME_GOOGLE_SITE_VERIFICATION %}
    <meta name="google-site-verification" content="{{google_id}}"/>
      {%- endfor %}
    {%- endif %}
    {%- endblock head_meta %}
    {%- block head_title %}
    {%- set title = title or _(config.THEME_SITENAME) or _('Invenio') %}
    <title>{{title}}</title>
    {%- endblock head_title %}
    {%- block head_links %}
    <link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}"/>
    {%- if keywords %}<link rel="canonical" href="{{ canonical_url }}"/>{% endif %}
    {%- block head_links_langs %}
      {%- if alternate_urls %}
        {%- for alt_ln, alternate_url in alternate_urls.items() %}
    <link rel="alternate" hreflang="{{ alt_ln }}" href="{{ alternate_url }}"/>
        {%- endfor %}
      {%- endif %}
    {%- endblock %}
    {%- block head_apple_icons %}
    {%- for size in [144, 114, 72, 57] %}
      {%- set icon_name = 'apple-touch-icon-%d-precomposed.png' | format(size) %}
    <link rel="apple-touch-icon-precomposed" sizes="{{ size }}x{{ size }}" href="{{ url_for('static', filename=icon_name) }}"/>
    {%- endfor %}
    {%- endblock head_apple_icons %}
    {%- endblock head_links %}
    {%- block header %}{% endblock header %}
    {%- block css %}
    {% assets "invenio_theme_css" %}<link href="{{ ASSET_URL }}" rel="stylesheet">{% endassets %}
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[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]-->
    {%- endblock css %}
    {%- endblock head %}
  </head>
  <body{% if body_css_classes %} class="{{ body_css_classes|join(' ') }}"{% endif %}{% if g.ln %} lang="{{ g.ln.split('_', 1)[0]|safe }}"{% if rtl_direction %} {{ rtl_direction|safe }}{% endif %}{% endif %} itemscope itemtype="http://schema.org/WebPage" data-spy="scroll" data-target=".scrollspy-target">
    {%- block body %}
    {%- block browserupgrade %}
    <!--[if lt IE 8]>
      <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
    <![endif]-->
    {%- endblock browserupgrade %}
    {%- block body_inner %}
    {%- block page_header %}
{% include "invenio_theme/header.html" %}
    {%- endblock page_header %}
    {%- block page_body %}
{% include "invenio_theme/body.html" %}
    {%- endblock page_body %}
    {%- block page_footer %}
{% include "invenio_theme/footer.html" %}
    {%- endblock page_footer %}
    {%- endblock body_inner %}
    {%- block javascript %}
{% include "invenio_theme/javascript.html" %}
    {%- endblock javascript %}
    {%- block trackingcode %}{% include "invenio_theme/trackingcode.html" %}
    {%- endblock %}
    {%- endblock body %}
  </body>
</html>
