@extends('frontend.layouts.main', array('body_class' => ($project->slides->isEmpty() ? 'no-header' : ''), 'scripts' => array(
        path_asset('path.frontend.js_path') . '/view/gallerydetail.js',
        path_asset('path.frontend.js_path') . '/view/gallerydetailmobile.js',
        path_asset('path.frontend.js_path') . '/view/slider_switcher.js',
        path_asset('path.frontend.js_path') . '/custom_marker.js'
    ),
    'metaData' => $metaData,
    'objectEmbeds' => $objectEmbeds))

@section('content')
<div id="project-detail-container" class="project-detail-template container-fluid page-container">
    @if(!$project->slides->isEmpty())
        <div class="gallery-slider-container">
            @include('frontend.templates.components.gallery-slider', array(
                "slides" => $project->slides,
                "sliderId" => "slider-detail-container",
                "overlayId" => "project-overlay-container"
            ))
            <div id="project-overlay-container" class="gallery-info-overlay-container">
                <div class="max-content-width project-info-overlay">
                    <div class="col-lg-offset-4 col-lg-12 col-md-offset-1 col-md-22 col-sm-offset-1 col-sm-22">
                        <h1>{{$project->title}}</h1>
                    </div>
                </div>
            </div>
        </div>
    @endif
    <!--
    <div class="cobenefits-bar">
        <div class="max-content-width cobenefits-holder">
            @foreach($project->cobenefits as $projectCobenefit)
                <div class="project-cobenefits">
                    {!! getMediaImg($projectCobenefit->cobenefit->iconLight, '180x180', htmlspecialchars($projectCobenefit->cobenefit->title)) !!}
                    <div class="co-content">
                        <h2>{{$projectCobenefit->mesure}}</h2>
                        <p>{{$projectCobenefit->title}}</p>
                    </div>
                </div>
            @endforeach
        </div>
    </div>
    -->
    <div class="row page-contents-holder main-content-holder">
        <div class="col-lg-16 col-sm-14 col-xs-24 content-column">
            <div class="row">
                <div class="col-lg-3 col-sm-2 article-actions">
                    @include('frontend.templates.components.share_button_small')
                    <div class="clear hidden-xs"></div>
                    @if($project->brochure && !empty($project->brochure->pardot_url))
                        <a
                            href="#"
                            class="download-btn download-pub"
                            data-download_id="{{ $project->brochure->id }}"
                            data-download="{{ base64_encode(json_encode(["title" => $project->brochure->title, "url" => $project->brochure->pardot_url ])) }}"
                            data-controller="components/form-modal"
                            data-popupid="download-modal"
                        >
                        </a>
                    @endif
                    <div class="clear"></div>
                </div>
                <div class="col-lg-offset-0 col-lg-18 col-sm-offset-0 col-sm-20 col-xs-offset-0 col-xs-24 content-column-project">
                    @if($project->slides->isEmpty())
                        <h1>{{$project->title}}</h1>
                    @endif
                    @if($project->slides->isEmpty() && $project->cobenefits->count() > 0)
                        <div class="row">
                        @foreach($project->cobenefits as $projectCobenefit)
                            <div class="project-cobenefits col-md-8 col-sm-12 col-xs-24">
                                {!! getMediaImg($projectCobenefit->cobenefit->iconDark, '80x80', htmlspecialchars($projectCobenefit->cobenefit->title)) !!}
                                <div class="info-box">
                                    <h5>{{$projectCobenefit->cobenefit->title}}</h5>
                                    <p>{{$projectCobenefit->title}}</p>
                                    <h2>{{$projectCobenefit->mesure}}</h2>
                                </div>
                            </div>
                        @endforeach
                        <div class="clear"></div>
                        </div>
                    @endif
                    @if($project->objective)
                    <div class="objective">
                        {!! strip_tags($project->objective, '<b><sup><strong><sub><i><span><u>') !!}
                    </div>
                    @endif
                    {!! $project->content !!}
                </div>
            </div>
            @if($project->testimonials->count() > 0)
                <div class="row">
                    <div class="col-md-offset-3 col-md-18 col-sm-offset-1 col-sm-20 col-xs-offset-0 col-xs-24">
                        <h3>What our clients say</h3>
                        <p>South Pole has more than 10 years' experience providing sustainability solutions, and has identified, assessed, designed, developed and managed Tailor-Made Emission Reduction Projects for numerous companies.</p>
                    </div>
                    <div class="col-md-offset-2 col-md-19 col-sm-offset-0 col-sm-21 col-xs-offset-0 col-xs-24">
                        @include('frontend.templates.components.testimonials_slider', ['testimonials' => $project->testimonials])
                    </div>
                </div>
            @endif
        </div>
        <div class="side-bar-elem col-lg-8 col-sm-10 col-xs-24 pull-right">
            @include('frontend.templates.components.sidebar', ['project' => $project])
        </div>

    </div>
    @include('frontend.templates.components.related_footer', array('title' => trans('frontend.further_reading')))
</div>
@stop
