{#!
 # SeaCMS 1.0.0-alpha.2 (https://git.defis.info/SeaCMS/seacms)
 # Licensed under EUPL (https://git.defis.info/SeaCMS/seacms/src/branch/master/LICENCE)
 #}

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
    <title>{% if meta.title %}{{ meta.title }} | {% endif %}{{ site_title }}</title>
    {% if meta.description %}
        <meta name="description" content="{{ meta.description|striptags }}" />
    {% endif %}
    {% if meta.robots %}
        <meta name="robots" content="{{ meta.robots }}" />
    {% endif %}

    {% if current_page %}
        <link rel="canonical" href="{{ current_page.url }}" />
    {% endif %}

    <!-- Favicon-->
    <link rel="icon" type="image/x-icon" href="{{ index.favicon ? index.favicon|url : theme_url ~ "/img/favicon.svg" }}" />

    <!-- Core theme CSS -->
    <link href="{{ theme_url }}/css/knacss.css" rel="stylesheet" type="text/css" />
    <link href="{{ theme_url }}/css/style.css" rel="stylesheet" type="text/css" />

    <!-- JS-->
    <script src="{{ theme_url }}/js/modernizr-3.3.1-custom.min.js" type="text/javascript"></script>
    <script src="{{ theme_url }}/js/utils.js" type="text/javascript"></script>
    <script src="{{ theme_url }}/js/pico.js" type="text/javascript"></script>

    {# Contact Form Scripts #}
    {% if index.contact.form.enabled and not index.contact.disabled and not single_page_mode %}
        <script src="{{ theme_url }}/js/jquery.min.js"></script>
        <script src="{{ theme_url }}/js/contact.js"></script>
    {% endif %}

    {# User CSS & Fonts #}
    {% if index.css %}
        {% set stylesheets = index.css is iterable ? index.css : [index.css] %}
        {% for stylesheet in stylesheets %}
            <link rel="stylesheet" href="{{ stylesheet|url }}" type="text/css">
        {% endfor %}
    {% endif %}

    {% if index.fonts %}
        {% set fonts = index.fonts is iterable ? index.fonts : [index.fonts] %}
        {% for font in fonts %}
            <link href='{{ font|url }}' rel='stylesheet' type='text/css'>
        {% endfor %}
    {% endif %}

    {# Open Graph #}
    <meta property="og:title" content="{{ meta.title ? meta.title ~ " | " }}{{ index.title ? index.title : site_title }}">
    <meta property="og:description" content="{{ (meta.description ? meta.description : index.description ? index.description : index.header.skills ? index.header.skills : index.about.content ? index.about.content[:200])|striptags }}">
    <meta property="og:url" content="{{ current_page.url }}">
    <meta property="og:type" content="website">
    {% if index.og_image %}<meta property="og:image" content="{{ index.og_image|url }}">{% endif %}
</head>
