{% extends "common/indexfloat.html.twig" %}

{% set local_title = record.get_title() %}

{% block icon %}
    <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
{% endblock %}

{% block stylesheet %}
    <link type="text/css" rel="stylesheet" href="/assets/permaview/css/permaview{% if not app.debug %}.min{% endif %}.css">
    <style type="text/css"></style>
{% endblock %}

{% block rss %}
    {% for metaKey, metaValue in ogMetaData %}
        <meta property="{{ metaKey }}" content="{{ metaValue }}" />
    {% endfor %}
{% endblock %}

{% block content %}
    <div class="content-container" >
        <h1>{{ local_title }}</h1>

        <div class="preview">
            <div id="phraseanet-embed-frame"></div>
        </div>

        <div class="caption">
            {% include 'common/caption.html.twig' %}
        </div>
    </div>
    <script type="text/javascript" src="/assets/production/permaview{% if not app.debug %}.min{% endif %}.js"></script>

    <script type="text/javascript">
        window.permApp = PermaviewApplication.bootstrap({
            lang: "{{ app.locale }}",
            baseUrl: '{{ app['request'].getUriForPath('/') }}',
            basePath: '{{ app.request.basePath|e('js') }}',
            recordUrl: '{{ url('alchemy_embed_view', {url: recordUrl|trim, autoplay: autoplay|default('false'), t: currentTime|trim }) | e('js')}}',
            debug: {% if app.debug == true %}true{% else %}false{% endif %}
        });
    </script>
{% endblock %}
