{% extends "front/base.html.twig" %}
{% block title %}
{{ 'seo.home_title' | trans }}
{% endblock %}
{% block seo %}
<meta name="description" content="{{ 'seo.home_description' | trans }}">
{% endblock %}
{% block og %}
<meta property="og:type" content="website" />
<meta property="og:title" content="{{ 'seo.home_title' | trans }}" />
<meta property="og:image" content="{{ url('homepage_no_locale') }}images/open-graph.png"/>
<meta property="og:description" content="{{ 'seo.home_description' | trans }}"/>
{% endblock %}
{% form_theme form _self %}
{%- block choice_widget_expanded -%}
{%- for child in form %}
<div class="checkbox icheck-primary">
{{- form_widget(child) -}}
</div>
{% endfor -%}{%- endblock choice_widget_expanded -%}
{% block body %}
<section class="screen-height overflow-hidden pt-0" id="hero-section">
<div class="home-sliders hide-mobile">
{% if sliders | length > 0 %}
{% for slider in sliders %}
<div class="landing-slider-item" style="background-image: url('/images/header/{{ slider.image }}');">
<div class="container-fluid">
<div class="row slide-row">
<div class="col-12 content">
<h3 class="title">{{ slider.title }}</h3>
<p class="text">
{{ slider.description }}
</p>
{% if slider.link %}
<a href="{{ slider.link }}" class="btn discover" target="_blank">{{ 'homepage.discover' | trans }}</a>
{% endif %}
</div>
</div>
</div>
</div>
{% endfor %}
{% else %}
<div class="landing-slider-item" style="background-image: url('/images/hero-mobile.png');">
<div class="container-fluid">
<div class="row slide-row">
<div class="col-12 content">
<h3 class="title">Racket Trip</h3>
<p class="text">
</p>
</div>
</div>
</div>
</div>
{% endif %}
</div>
<div class="home-intro hide-desktop" style="background-image: url('/images/hero-mobile.png');"></div>
<div class="card search-card">
<h3 class="title">{{ "form.looking_for_what" | trans }}</h3>
{{ form_start(form, {'attr': {'class': 'home-search-form'}}) }}
<div class="input-group global destination">
<div class="form-group">
<input type="text" id="destination" autocomplete="off" placeholder="{{ "homepage.where_to" | trans }}" class="form-control">
</div>
{{ form_widget(form.place) }}
</div>
<div class="custom-dropdown-input short-input" id="sport-wrap">
<span class="custom-dropdown-label" id="sport-checkbox-label">{{ "directory.sport" | trans }}</span>
<div class="custom-dropdown-content" id="sport-checkbox">
{{ form_widget(form.sports) }}
</div>
</div>
<div class="custom-dropdown-input short-input" id="date-wrap">
<span class="custom-dropdown-label" id="date-input-label">{{ "page_course_detail.from" | trans }}</span>
<div class="custom-dropdown-content">
<div id="datepicker"></div>
{{ form_widget(form.begin) }}
</div>
</div>
<div class="hide">
{{ form_row(form.search) }}
{{ form_rest(form) }}
</div>
<button type="submit" class="btn main-btn mx-auto">{{ "global.search" | trans }}</button>
{{ form_end(form) }}
</div>
<div class="landing-scroll" id="discover">
<span class="scroll-text">{{ 'homepage.discover_offers' | trans }}</span>
<i class="far fa-chevron-down"></i>
</div>
</section>
<div class="overflow-hidden">
{% if courses | length > 0 %}
<section class="home-courses" id="courses">
<div class="container-fluid home-courses-container">
<div class="main-title">
<h1 class="title-text">{{ 'homepage.current_courses' | trans }}</h1>
</div>
<div class="courses-slider-wrapper mt-4">
{% for course in courses %}
{% if course | nextdate(startingDate).begin != null %}
{% include "front/course/_course-card.html.twig" %}
{% endif %}
{% endfor %}
</div>
</div>
</section>
{% endif %}
{% if is_granted('ROLE_TRAINEE') and traineeCourses | length > 0 %}
<section id="trainee-courses">
<div class="container-fluid home-courses-container">
<div class="main-title">
<h1 class="title-text">{{ 'homepage.current_courses_trainee' | trans }}</h1>
</div>
<div class="courses-slider-wrapper mt-4">
{% for course in traineeCourses %}
{% if course | nextdate(startingDate).begin != null %}
{% include "front/course/_course-card.html.twig" %}
{% endif %}
{% endfor %}
</div>
</div>
</section>
{% endif %}
<section id="countries">
<div class="container-fluid">
<h2 class="section-title-underline">{{ 'homepage.countries' | trans }}</h2>
<div class="countries-grid">
<div class="country-card">
<img loading="lazy" src="{{ asset('/images/destinations/espagne.png') }}" alt="{{ 'homepage.spain' | trans }}">
<a href="{{ path('courses') }}" data-place="ChIJi7xhMnjjQgwR7KNoB5Qs7KY" class="country-mobile-link search-country">
<p class="country-title">{{ 'homepage.spain' | trans }}</p>
</a>
<a href="{{ path('courses') }}" data-place="ChIJi7xhMnjjQgwR7KNoB5Qs7KY" class="country-link search-country">{{ 'homepage.discover' | trans }}</a>
</div>
<div class="country-card">
<img loading="lazy" src="{{ asset('/images/destinations/senegal.png') }}" alt="{{ 'homepage.senegal' | trans }}">
<a href="{{ path('courses') }}" data-place="ChIJcbvFs_VywQ4RQFlhmVClRlo" class="country-mobile-link search-country">
<p class="country-title">{{ 'homepage.senegal' | trans }}</p>
</a>
<a href="{{ path('courses') }}" data-place="ChIJcbvFs_VywQ4RQFlhmVClRlo" class="country-link search-country">{{ 'homepage.discover' | trans }}</a>
</div>
<div class="country-card">
<img loading="lazy" src="{{ asset('/images/destinations/italie.png') }}" alt="{{ 'homepage.italy' | trans }}">
<a href="{{ path('courses') }}" data-place="ChIJA9KNRIL-1BIRb15jJFz1LOI" class="country-mobile-link search-country">
<p class="country-title">{{ 'homepage.italy' | trans }}</p>
</a>
<a href="{{ path('courses') }}" data-place="ChIJA9KNRIL-1BIRb15jJFz1LOI" class="country-link search-country">{{ 'homepage.discover' | trans }}</a>
</div>
<div class="country-card">
<img loading="lazy" src="{{ asset('/images/destinations/france.png') }}" alt="{{ 'homepage.france' | trans }}">
<a href="{{ path('courses') }}" data-place="ChIJMVd4MymgVA0R99lHx5Y__Ws" class="country-mobile-link search-country">
<p class="country-title">{{ 'homepage.france' | trans }}</p>
</a>
<a href="{{ path('courses') }}" data-place="ChIJMVd4MymgVA0R99lHx5Y__Ws" class="country-link search-country">{{ 'homepage.discover' | trans }}</a>
</div>
<div class="country-card">
<img loading="lazy" src="{{ asset('/images/destinations/belgique.png') }}" alt="{{ 'homepage.belgium' | trans }}">
<a href="{{ path('courses') }}" data-place="ChIJl5fz7WR9wUcR8g_mObTy60c" class="country-mobile-link search-country">
<p class="country-title">{{ 'homepage.belgium' | trans }}</p>
</a>
<a href="{{ path('courses') }}" data-place="ChIJl5fz7WR9wUcR8g_mObTy60c" class="country-link search-country">{{ 'homepage.discover' | trans }}</a>
</div>
<div class="country-card">
<img loading="lazy" src="{{ asset('/images/destinations/maroc.png') }}" alt="{{ 'homepage.morocco' | trans }}">
<a href="{{ path('courses') }}" data-place="ChIJjcVRlmGICw0Rw_8sxIGT09k" class="country-mobile-link search-country">
<p class="country-title">{{ 'homepage.morocco' | trans }}</p>
</a>
<a href="{{ path('courses') }}" data-place="ChIJjcVRlmGICw0Rw_8sxIGT09k" class="country-link search-country">{{ 'homepage.discover' | trans }}</a>
</div>
{#
<div class="country-card">
<img loading="lazy" src="{{ asset('/images/destinations/espagne.png') }}" alt="{{ 'homepage.spain' | trans }}">
<a href="{{ path('courses', {'place': 'ChIJi7xhMnjjQgwR7KNoB5Qs7KY', 'search': 'true'}) }}" class="country-mobile-link search-country">
<p class="country-title">{{ 'homepage.spain' | trans }}</p>
</a>
<a href="{{ path('courses', {'place': 'ChIJi7xhMnjjQgwR7KNoB5Qs7KY', 'search': 'true'}) }}" class="country-link search-country">{{ 'homepage.discover' | trans }}</a>
</div>
<div class="country-card">
<img loading="lazy" src="{{ asset('/images/destinations/senegal.png') }}" alt="{{ 'homepage.senegal' | trans }}">
<a href="{{ path('courses', {'place': 'ChIJcbvFs_VywQ4RQFlhmVClRlo', 'search': 'true'}) }}" class="country-mobile-link search-country">
<p class="country-title">{{ 'homepage.senegal' | trans }}</p>
</a>
<a href="{{ path('courses', {'place': 'ChIJcbvFs_VywQ4RQFlhmVClRlo', 'search': 'true'}) }}" class="country-link search-country">{{ 'homepage.discover' | trans }}</a>
</div>
<div class="country-card">
<img loading="lazy" src="{{ asset('/images/destinations/italie.png') }}" alt="{{ 'homepage.italy' | trans }}">
<a href="{{ path('courses', {'place': 'ChIJA9KNRIL-1BIRb15jJFz1LOI', 'search': 'true'}) }}" class="country-mobile-link search-country">
<p class="country-title">{{ 'homepage.italy' | trans }}</p>
</a>
<a href="{{ path('courses', {'place': 'ChIJA9KNRIL-1BIRb15jJFz1LOI', 'search': 'true'}) }}" class="country-link search-country">{{ 'homepage.discover' | trans }}</a>
</div>
<div class="country-card">
<img loading="lazy" src="{{ asset('/images/destinations/france.png') }}" alt="{{ 'homepage.france' | trans }}">
<a href="{{ path('courses', {'place': 'ChIJMVd4MymgVA0R99lHx5Y__Ws', 'search': 'true'}) }}" class="country-mobile-link search-country">
<p class="country-title">{{ 'homepage.france' | trans }}</p>
</a>
<a href="{{ path('courses', {'place': 'ChIJMVd4MymgVA0R99lHx5Y__Ws', 'search': 'true'}) }}" class="country-link search-country">{{ 'homepage.discover' | trans }}</a>
</div>
<div class="country-card">
<img loading="lazy" src="{{ asset('/images/destinations/belgique.png') }}" alt="{{ 'homepage.belgium' | trans }}">
<a href="{{ path('courses', {'place': 'ChIJl5fz7WR9wUcR8g_mObTy60c', 'search': 'true'}) }}" class="country-mobile-link search-country">
<p class="country-title">{{ 'homepage.belgium' | trans }}</p>
</a>
<a href="{{ path('courses', {'place': 'ChIJl5fz7WR9wUcR8g_mObTy60c', 'search': 'true'}) }}" class="country-link search-country">{{ 'homepage.discover' | trans }}</a>
</div>
<div class="country-card">
<img loading="lazy" src="{{ asset('/images/destinations/maroc.png') }}" alt="{{ 'homepage.morocco' | trans }}">
<a href="{{ path('courses', {'place': 'ChIJjcVRlmGICw0Rw_8sxIGT09k', 'search': 'true'}) }}" class="country-mobile-link search-country">
<p class="country-title">{{ 'homepage.morocco' | trans }}</p>
</a>
<a href="{{ path('courses', {'place': 'ChIJjcVRlmGICw0Rw_8sxIGT09k', 'search': 'true'}) }}" class="country-link search-country">{{ 'homepage.discover' | trans }}</a>
</div>
#}
</div>
</section>
{% if medias | length > 0 %}
<section id="talks">
<div class="container-fluid">
<div class="main-title mb-5">
<h2 class="title-text">{{ 'homepage.sponsors' | trans }}</h2>
</div>
<div class="logos-wrap">
{% for media in medias %}
{% if media.link != null %}
<a href="{{media.link}}" target="_blank">
{% endif %}
<div class="logo-item">
<img loading="lazy" src="{{ asset('/images/media/' ~ media.image) }}" alt="Sport Eco">
<span class="logo-text">"{{ media.name }}"</span>
</div>
{% if media.link != null %}
</a>
{% endif %}
{% endfor %}
</div>
</div>
</section>
{% endif %}
{% if articles | length > 0 %}
<section class="blog-section" id="articles">
<div class="container-fluid" id="news">
<h2 class="section-title-underline">{{ 'homepage.community' | trans }}</h2>
<div class="row">
{% for article in articles %}
<div class="col-xl-3 col-lg-4 col-md-6 col-sm-12 blog-col">
{% include "front/blog/_blog-card.html.twig" %}
</div>
{% endfor %}
</div>
<div class="text-center">
<a href="{{ path('blog') }}">
<button class="btn main-btn mx-auto">{{ 'homepage.see_blog' | trans }}</button>
</a>
</div>
</div>
</section>
{% endif %}
<section id="" class="pb-5">
<div class="container-fluid">
<div class="main-title mb-5">
<h2 class="title-text">{{ 'homepage.pros' | trans }}</h2>
</div>
<div class="partners-wrap">
<div class="partner-item">
<img loading="lazy" src="{{ asset('/images/coach.png') }}" alt="Coachs">
<a href="{{ path('directory', {'type[]': 'coach'}) }}" class="btn partner-btn coach">{{ 'global.coachs' | trans }}</a>
</div>
<div class="partner-item">
<img loading="lazy" src="{{ asset('/images/club.png') }}" alt="Clubs">
<a href="{{ path('directory', {'type[]': 'club'}) }}" class="btn partner-btn club">{{ 'global.clubs' | trans }}</a>
</div>
<div class="partner-item">
<img loading="lazy" src="{{ asset('/images/operator.png') }}" alt="Opérateurs">
<a href="{{ path('directory', {'type[]': 'operator'}) }}" class="btn partner-btn operator">{{ 'global.operators' | trans }}</a>
</div>
</div>
</div>
</section>
{% include "front/blog/_blog-cta.html.twig" %}
</div>
{% endblock %}
{% block javascript %}
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBNWTs1XHaB_zzkP1menI9mdg-NBk1IZnY&libraries=places&language={{ app.request.locale }}"></script>
{{ parent() }}
{{ encore_entry_script_tags('search') }}
<script>
google.maps.event.addDomListener(window, 'load', initialize);
function initialize() {
var address = document.getElementById('destination');
var options = {
types: ['(regions)']
};
autocomplete = new google.maps.places.Autocomplete(address, options);
google.maps.event.addListener(autocomplete, 'place_changed', function() {
fillInAddress();
});
google.maps.event.addDomListener(address, 'keydown', function(event) {
if (event.keyCode === 13) {
event.preventDefault();
}
});
}
function fillInAddress() {
var place = autocomplete.getPlace();
document.getElementById('place').value = place.place_id;
}
</script>
{#
<script>
$.post('/set-device', { width: screen.width, height:screen.height }, function(json) {
if(json.outcome == 'success') {
// do something with the knowledge possibly?
} else {
alert('Unable to let PHP know what the screen resolution is!');
}
},'json');
</script>
#}
<script>
var searchInput = $('#search');
var place = $('#place');
var inSession = false;
$('button[type=submit]').on('click', function (e) {
searchInput.val("true");
if (inSession == false) {
e.preventDefault()
let locale = $('.header').data('locale');
let destination = $('#destination').val();
inSession = true;
if (destination != '') {
localStorage.setItem('destination', destination)
}
}
$('.home-search-form').trigger('submit');
})
$('.search-country').on('click', function (e) {
if (inSession == false) {
e.preventDefault()
let locale = $('.header').data('locale');
let destination = null;
if ($(this).hasClass('country-mobile-link')) {
destination = $(this).find('.country-title').text();
} else {
destination = $(this).prev().find('.country-title').text();
}
searchInput.val("true");
place.val($(this).data('place'));
inSession = true;
if (destination != '') {
localStorage.setItem('destination', destination)
}
}
$('.home-search-form').trigger('submit');
})
</script>
{% endblock %}