{# -*- coding: utf-8 -*-

  This file is part of Invenio.
  Copyright (C) 2017-2018 CERN.

  Invenio is free software; you can redistribute it and/or modify it
  under the terms of the MIT License; see LICENSE file for more details.
#}
{% extends config.THEME_BASE_TEMPLATE %}

{%- set html_css_classes=['cover-page'] %}
{%- set body_css_classes=['ui grid doubling middle center aligned cover-page'] %}

{%- block body %}
  <div class="sixteen wide column centered">
    {%- block flashmessages %}
      {%- from "invenio_theme/macros/messages.html" import flashed_messages with context -%}
      {{ flashed_messages(center_text=true) }}
    {%- endblock flashmessages %}

    <div class="ui grid">
      <div class="fourteen wide mobile eight wide tablet five wide computer centered column">
        {% block page_header %}
          <div class="ui basic very padded segment">
            {%- block brand %}
              {%- if config.THEME_LOGO %}
                <a href="/">
                  <img class="ui centered medium image"
                      src="{{ url_for('static', filename=config.THEME_LOGO) }}"
                      alt="{{ _(config.THEME_SITENAME) }}"/>
                </a>
              {%- elif config.THEME_SITENAME %}
                <a href="/" class="text-center">
                  {{ _(config.THEME_SITENAME) }}
                </a>
              {% endif %}
            {%- endblock brand %}
          </div>
        {% endblock page_header %}

        {%- block page_body %}
          <div class="container">
            <div class="row panel-container">
              {% block panel %}
                <div class="column three wide"></div>
                <div class="column six wide">
                  <div class="panel panel-default">
                    <div class="panel-body">
                      {% block panel_content %}
                        <h3 class="centered panel-free-title">{{ panel_title }}</h3>
                      {% endblock panel_content %}
                    </div>
                  </div>
                </div>
              {% endblock panel %}
            </div>
          </div>
        {%- endblock page_body %}
      </div>
    </div>
    {% block page_footer %}
    {% endblock page_footer %}
  </div>

  {%- block javascript %}
    {{ webpack['theme.js']}}
  {%- endblock javascript %}
{%- endblock body %}
