{% macro title() %}
{% block title %}{% endblock %}
{% endmacro %}
{% from "elements/upload.html" import upload_button_modal %}
<html lang="{{config['default_language']}}"
      xmlns="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
  <head>
    <meta charset="UTF-8">
      <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>{{ title() }} - {{ config['SITE_NAME'] }}</title>
    <meta charset="utf-8">
    <meta content="width=device-width,initial-scale=1,minimal-ui" name="viewport">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic|Material+Icons">
    <link rel="stylesheet" href="https://unpkg.com/vue-material/dist/vue-material.min.css">
    <link rel="stylesheet" href="https://unpkg.com/vue-material/dist/theme/default.css">

    <link rel="stylesheet" href="{{ url_for('static', filename='css/lib/bootstrap.min.css')}}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/lib/bootstrap-theme.min.css')}}">

    <link href="//fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
    <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic">

    <link rel="stylesheet" href="{{ url_for('static', filename='css/whyis.css')}}">
    <link rel="shortcut icon" href="{{ url_for('static', filename='images/favicon.ico') }}">
<link rel="apple-touch-icon" sizes="57x57" href="{{ url_for('static', filename='images/apple-icon-57x57.png') }}">
<link rel="apple-touch-icon" sizes="60x60" href="{{ url_for('static', filename='images/apple-icon-60x60.png') }}">
<link rel="apple-touch-icon" sizes="72x72" href="{{ url_for('static', filename='images/apple-icon-72x72.png') }}">
<link rel="apple-touch-icon" sizes="76x76" href="{{ url_for('static', filename='images/apple-icon-76x76.png') }}">
<link rel="apple-touch-icon" sizes="114x114" href="{{ url_for('static', filename='images/apple-icon-114x114.png') }}">
<link rel="apple-touch-icon" sizes="120x120" href="{{ url_for('static', filename='images/apple-icon-120x120.png') }}">
<link rel="apple-touch-icon" sizes="144x144" href="{{ url_for('static', filename='images/apple-icon-144x144.png') }}">
<link rel="apple-touch-icon" sizes="152x152" href="{{ url_for('static', filename='images/apple-icon-152x152.png') }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ url_for('static', filename='images/apple-icon-180x180.png') }}">
<link rel="icon" type="image/png" sizes="192x192"  href="{{ url_for('static', filename='images/android-icon-192x192.png') }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ url_for('static', filename='images/favicon-32x32.png') }}">
<link rel="icon" type="image/png" sizes="96x96" href="{{ url_for('static', filename='images/favicon-96x96.png') }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ url_for('static', filename='images/favicon-16x16.png') }}">
<meta name="msapplication-TileImage" content="{{ url_for('static', filename='images/ms-icon-144x144.png') }}">

<link href="{{ url_for('static', filename='css/lib/fileinput.css')}}" media="all" rel="stylesheet" type="text/css"/>

<link href="{{ url_for('static', filename='css/lib/fileinput.css')}}" media="all" rel="stylesheet" type="text/css"/>
<link href='//cdn.jsdelivr.net/npm/yasgui-yasqe@2.11.22/dist/yasqe.min.css' rel='stylesheet' type='text/css'/>
<link href='//cdn.jsdelivr.net/yasr/2.10.8/yasr.min.css' rel='stylesheet' type='text/css'/>
<link href='//cdn.jsdelivr.net/yasgui/2.5.0/yasgui.min.css' rel='stylesheet' type='text/css'/>
    {% block styles %}
    {% endblock %}

  </head>
<body>
  <div id="page">
{% block body %}
    <div class="utility-bg">
      <div class="page-container">
        <md-app md-waterfall md-mode="overlap">
          <md-app-toolbar
            site_name= "{{config['SITE_NAME']}}"
            page_title = "{{title()}}"
            register-nav = "{{url_for('security.register')}}"
            login-nav="{{url_for('security.login')}}">
          </md-app-toolbar>
          <md-app-drawer logout-nav="{{url_for('security.logout')}}" login-nav="{{url_for('security.login')}}"></md-app-drawer>
          {% block pageheader %}
          {% endblock %}
          <md-app-content class="utility-bg utility-bg_border">
            {% block content %}
            {% endblock %}
          </md-app-content>
        </md-app>
      </div>
      <dialog-box/>
    </div>
    {% endblock %}

  </div>

  <script>
    LOD_PREFIX = '{{config.LOD_PREFIX}}';
    {% if 'BASE_RATE_PROBABILITY' in config %}
    BASE_RATE = {{config['BASE_RATE_PROBABILITY']}};
    {% else %}
    BASE_RATE = 0.5;
    {% endif %}
    {% if current_user and current_user.identifier %}
    USER = {
      uri: '{{current_user.identifier}}',
      admin: "{{current_user.has_role('Admin')}}",
      name: "{{current_user.givenName}}",
      email: "{{current_user.email}}"
    };
    {% else %}
    USER = { }
    {% endif %}
    {% if this is defined %}
    NODE_URI = "{{this.identifier | safe}}";
    ATTRIBUTES = {{ this | include('attributes') | safe }};
    DESCRIPTION = {{this.description().graph | serialize(format="json-ld") | safe}};
    NODE = DESCRIPTION.filter(function(d) { return d['@id'] == NODE_URI});
    if (NODE.length > 0)  NODE = NODE[0];
    else NODE = {"@id" : NODE_URI};
    {% endif %}
    ROOT_URL = "{{url_for('entity.view',name='')}}";
    LINKS = {
      registerNav: "{{url_for('security.register')}}",
      changePasswordNav: "{{url_for('security.change_password')}}"
    }
    CONFIGS = {
      mongoBackup: "{{config.THIRD_PARTY_REST_BACKUP}}",
      speedDialIcon: "{{config.DISABLE_VUE_SPEED_DIAL}}"
    }
  </script>

    <script src="{{ url_for('static', filename='js/lib/jquery/dist/jquery.js')}}"></script>
    <script src="{{ url_for('static', filename='js/lib/bootstrap.js')}}"></script>

    <script src="{{ url_for('static', filename='js/lib/fileinput.js')}}" type="text/javascript"></script>

    <!-- TODO see if we can use the non-bundled versions -->
    <script src='//cdn.jsdelivr.net/npm/yasgui-yasqe@2.11.22/dist/yasqe.bundled.min.js'></script>
    <script src='//cdn.jsdelivr.net/yasr/2.10.8/yasr.bundled.min.js'></script>
    <script src='//cdn.jsdelivr.net/yasgui/2.5.0/yasgui.min.js'></script>
    <script src="{{ url_for('static', filename='dist/whyis_vue_bundle.js')}}"></script>


{% block scripts %}{% endblock %}

<script>
</script>

</body>
</html>
