{% load static %}
{% load i18n %}
{% load egostringfilters %}
<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="description" content="eGonomy">
    <title>eGonomy : Diaporama</title>
    <link rel="stylesheet" href="{% static 'egonomy/css/reset.css' %}" />
    <link rel="stylesheet" href="{% static 'egonomy/css/fonts.css' %}" />
    <link rel="stylesheet" href="{% static 'egonomy/css/slideshow.css' %}" />
</head>
<body>
    <div class="slideshow-wrap">
        <img class="backdrop" />
        <div class="caption-wrap">
            <div class="caption">
                <h2></h2>
                <h3></h3>
                <div class="caption-description"></div>
            </div>
        </div>
        <svg class="image-container" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1 1" preserveAspectRatio="none">
            <defs>
                <clipPath id="fragment-clip">
                    <path d="M0 0L1 0L1 1L0 1Z" class="clip-path" />
                </clipPath>
            </defs>
            <image class="main-image" xlink:href="" x="0" y="0" preserveAspectRatio="none" width="1" height="1" clip-path="url(#fragment-clip)" />
        </svg>
        <div class="top-controls">
            <a class="full-screen" href="#"></a>
            <a class="play-pause" href="#"></a>
        </div>
        <div class="arrow-wrap left-arrow">
            <a class="arrow" href="#"></a>
        </div>
        <div class="arrow-wrap right-arrow">
            <a class="arrow" href="#"></a>
        </div>
    </div><!-- /.wrap -->

    <script type="text/javascript" src="{% static 'egonomy/lib/jquery.min.js' %}"></script>
    <script type="text/javascript" src="{% static 'egonomy/js/slideshow.js' %}"></script>
    <script>
    {% autoescape off %}
        var imgurlbase = "";
        var slides = [
	     {% for item in items %}
	      {% ifequal item.content_type.model "fragment" %}
	       {% with fragment=item.content_object %}
            {
                "type": "fragment",
                "title": "{{ fragment.title }}",
                "author": "{{ fragment.author }}",
                "src": "{{ fragment.image.info.image_file.url }}",
                "path": "{{ fragment.coordinates }}",
                "description": "{{ item.description|linebreaksantislashn }}"
            }
           {% endwith %}
          {% else %}
           {% with img=item.content_object %}
            {
            	"type": "image",
            	"title": "{{ img.metadata.titre|default:_('No title') }}",
                "author": "{{ img.metadata.auteur|default:'' }}",
                "src": "{{ img.info.image_file.url }}",
                "description": "{{ item.description|linebreaksantislashn }}"
            }
           {% endwith %}
          {% endifequal %}
          {% if not forloop.last %},{% endif %}
         {% endfor %}
        ];
    {% endautoescape %}
    </script>
</body>
</html>