{% extends 'base.html.twig' %}
{% block title %}{% trans from 'meta' %}home.title{% endtrans %}{% endblock %}
{% block meta %}
    <meta name="robots" content="index,follow">
    <meta name="description" lang="{{ app.request.locale }}"
          content="{% trans from 'meta' %}home.description{% endtrans %}">
    <meta property="og:site_name" content="{% trans from 'meta' %}home.title{% endtrans %}">
    <meta property="og:title" content="{% trans from 'meta' %}home.title{% endtrans %}">
    <meta property="og:type" content="website">
    <meta property="og:url" content="{{ app.request.uri }}">
    <meta property="og:image" content="{{ absolute_url('bundles/cpcreationtheme1/images/logo.jpg') }}">
    <meta property="og:locale" content="{{ app.request.locale }}">
    <meta property="og:image:type" content="image/jpeg">
    <meta property="og:image:width" content="600">
    <meta property="og:image:height" content="450">
    <meta property="og:description"
          content="{% trans from 'meta' %}home.description{% endtrans %}">
    <link rel="canonical" href="{{  absolute_url(path('home')) }}"  />
{% endblock meta %}
{% block submenu %}
    <ul class="sub-menu">
        {% for history in histories %}
            <li><a href="#{{ history.slug }}">{{ history.title }}</a></li>
        {% endfor %}
    </ul>
{% endblock %}
{% block header_bottom %}
    <div class="butFrame">
        <div class="butText">
            <h1>La maison</h1>
        </div>
        <div data-responsive-background-image>
            <img class="background-image" alt="Histoire {% trans from 'meta' %}company_name{% endtrans %}" srcset="
                 {{ asset('bundles/cpcreationtheme1/images/background/header_home.jpg') | imagine_filter('relative_widen_1024_filter_default') }} 1024w,
                 {{ asset('bundles/cpcreationtheme1/images/background/header_home.jpg') | imagine_filter('relative_widen_1200_filter_default') }} 1200w,
                 {{ asset('bundles/cpcreationtheme1/images/background/header_home.jpg') | imagine_filter('relative_widen_1600_filter_default') }} 1600w"
                 sizes="100vw" src="{{ asset('bundles/cpcreationtheme1/images/background/header_home.jpg')| imagine_filter('relative_widen_1600_filter_default') }}">
        </div>
    </div>
{% endblock %}
{% block content %}
    <section id="la-maison">
        {% for history in histories %}
            <article id="{{ history.slug }}">
                <h2 class="text-center">{{ history.title }}</h2>
                {% if history.subtitle %}<p class="text-center subtitle">{{ history.subtitle }}</p>{% endif %}
                <div class="grid-container text">
                    <div class="container">
                        {{ history.text | raw }}
                        <div class="photos grid-x grid-margin-x small-up-3 medium-up-3 large-up-3">
                            {% for image in history.images %}
                                <div class="cell">
                                    <img src="{{ asset(image.image.path)|imagine_filter('thumbnail_305_290_filter') }}"
                                         alt="{{ history.title }}">
                                </div>
                            {% endfor %}
                        </div>
                    </div>
                </div>
            </article>
            {% if loop.last != true %}
                <div class="separator">
                    <div class="grid-container">
                        <div class="line-picto text-center">
                            <img src="{{ asset('bundles/cpcreationtheme1/images/picto_blc.svg') }}"
                                 alt="Picto {% trans from 'meta' %}company_name{% endtrans %}">
                        </div>
                    </div>
                </div>
            {% endif %}
        {% endfor %}
    </section>
{% endblock %}
