{# TEMPLATE VAR SETTINGS #}
{%- set url_root = pathto('', 1) %}
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
{%- if not embedded and docstitle %}
{%- set titlesuffix = " &mdash; "|safe + docstitle|e %}
{%- else %}
{%- set titlesuffix = "" %}
{%- endif %}


{%- macro add_body() %}
{% block body %}
{% endblock body %}
{% endmacro %}


<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">

        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
        <meta name="keywords" content="tensor learning, tensor decomposition, tensor operations">
        <meta name="description" content="{% block meta_description %}TensorLy: Tensor learning in Python{% endblock meta_description %}">

        {% block head %}
        <meta name="author" content="Jean Kossaifi">
        <title>{% block title %}TensorLy: Tensor learning in Python{% endblock title %}</title>
        {% endblock head %}

        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
        <link rel="stylesheet" type="text/css" href="{{ pathto('_static/bulma.min.css', 1) }}" />
        <link rel="stylesheet" type="text/css" href="{{ pathto('_static/base.min.css', 1) }}" />
        <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />

        {% block head_css %}
        {% endblock head_css %}

        {% block head_js %}
        {% endblock head_js %}
    </head>

    <body>
        {# Top bar #}
        {% include 'navigation.html' %} 

        {% block document %}
        <div class="columns">
            {# Side navbar #}
            <div class="column is-one-quarter is-hidden-mobile aside">
                <div class="sidebar" id="sidebar">
                    
                    <div class="search">
                        <div class="search-title">
                            Search in TensorLy
                        </div>

                        <script>
                          (function() {
                            var cx = '002285679029256671182:5tfqz3cvmm8';
                            var gcse = document.createElement('script');
                            gcse.type = 'text/javascript';
                            gcse.async = true;
                            gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
                            var s = document.getElementsByTagName('script')[0];
                            s.parentNode.insertBefore(gcse, s);
                          })();
                        </script>
                        <gcse:searchbox-only></gcse:searchbox-only>
                        {# overlay
                        <script>
                          (function() {
                            var cx = '002285679029256671182:5tfqz3cvmm8';
                            var gcse = document.createElement('script');
                            gcse.type = 'text/javascript';
                            gcse.async = true;
                            gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
                            var s = document.getElementsByTagName('script')[0];
                            s.parentNode.insertBefore(gcse, s);
                          })();
                        </script>
                        <gcse:search></gcse:search>
                        #}
                    </div>

                    <div class="toc">
                    {# Table Of Contents #}
                    {% block menu %}
                    {% set toctree = toctree(maxdepth=theme_navigation_depth|int, collapse=theme_collapse_navigation, includehidden=True) %}
                    {% if toctree %}
                        {{ toctree }}
                    {% else %}
                        {{ toc }}
                    {% endif %}
                    {% endblock %}
                    </div>
                    
                </div>
            </div>

            {# Main content #}
            <div class="column is-three-quarters main-column">
                <div class="content main-content">

                    {{ add_body() }}

                    {% include 'pagination.html' %}
                </div>

                {% include 'footer.html' %}
            </div>

        </div>

        
        {% endblock document %}

        <script src="{{ pathto('_static/navigation.min.js', 1) }}"></script>
        {% include 'analytics.html' %}

    </body>
</html>
