templates/homepage/detailDealer.html.twig line 1
{% extends 'base.html.twig' %}{% block title %}{{ seoTitle }}{% endblock %}{% block desc %}{{ seoDescription }}{% endblock %}{% block stylesheets %}{{ encore_entry_link_tags('app') }}{% endblock %}{% block javascripts %}{{ encore_entry_script_tags('app') }}<scriptsrc="https://maps.googleapis.com/maps/api/js?key=AIzaSyDMvCFLEp2JWA1HQ5riIBgtCn8Hy5bS9nw&callback=initMap&v=weekly"defer></script><script src="https://polyfill.io/v3/polyfill.min.js?features=default"></script><script src="https://unpkg.com/@googlemaps/markerclusterer/dist/index.min.js"></script>{% endblock %}{% block body %}<section class="contact"><header class="contact__header"><h1>{{ dealer.name }}</h1><figure class="contact__logo">{% if dealer.logo %}<imgsrc="{{ asset('img-dealer/')~dealer.logo }}"{{ stimulus_controller('symfony/ux-lazy-image/lazy-image', {src: asset('img-dealer/')~dealer.logo}) }}width="200">{% endif %}</figure></header>{% if dealer.description %}<div class="contact__description"><p>{{ dealer.description }}</p></div>{% endif %}<div class="contact__grid"><div><h2 class="contact__heading">Adresa</h2><div class="contact__item"><i class="contact__icon icon icon-garage"></i><div>{% if dealer.street %}{{ dealer.street }}<br>{% endif %}{% if dealer.city %}{{ dealer.city }}<br>{% endif %}{% if dealer.district %}{{ dealer.district.region.name }}{% endif %}</div></div></div><div><h2 class="contact__heading">Telefon</h2><div class="contact__item"><i class="contact__icon icon icon-phone"></i>{% for p in dealer.dealerPhones %}<a href="">{{ p.name }}</a><br>{% endfor %}</div></div><div><h2 class="contact__heading">E-mail</h2>{% if dealer.email %}<div class="contact__item contact__item--primary"><i class="contact__icon icon icon-email"></i><a href="mailto:{{ dealer.email }}">{{ dealer.email }}</a></div>{% endif %}</div></div><footer id="mapa" class="contact__footer">{% if hasVehicleImport %}<a class="contact__button" href="{{ path('page_dealer_vehicle', { url: dealer.url }) }}"><i class="icon icon-car"></i>Zobrazit nabídku vozidel</a>{% endif %}{% if dealer.lat and dealer.lng %}<a class="contact__button contact__button--secondary" href="https://www.google.com/maps/search/?api=1&query={{ dealer.lat }},{{ dealer.lng }}" target="_blank">Zobrazit trasu<i class="icon icon-map"></i></a>{% endif %}{% if dealer.www %}<a class="contact__button contact__button--secondary" href="http://{{ dealer.www }}" target="_blank">Zobrazit web<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 64 64" fill="currentColor"><path d="M 40 10 C 38.896 10 38 10.896 38 12 C 38 13.104 38.896 14 40 14 L 47.171875 14 L 30.585938 30.585938 C 29.804938 31.366938 29.804938 32.633063 30.585938 33.414062 C 30.976938 33.805063 31.488 34 32 34 C 32.512 34 33.023063 33.805062 33.414062 33.414062 L 50 16.828125 L 50 24 C 50 25.104 50.896 26 52 26 C 53.104 26 54 25.104 54 24 L 54 12 C 54 10.896 53.104 10 52 10 L 40 10 z M 18 12 C 14.691 12 12 14.691 12 18 L 12 46 C 12 49.309 14.691 52 18 52 L 46 52 C 49.309 52 52 49.309 52 46 L 52 34 C 52 32.896 51.104 32 50 32 C 48.896 32 48 32.896 48 34 L 48 46 C 48 47.103 47.103 48 46 48 L 18 48 C 16.897 48 16 47.103 16 46 L 16 18 C 16 16.897 16.897 16 18 16 L 30 16 C 31.104 16 32 15.104 32 14 C 32 12.896 31.104 12 30 12 L 18 12 z"></path></svg></a>{% endif %}</footer></section><section class="grid grid--gap40 grid--padding40"><div><div id="map" style="height: 400px" > </div><script>function initMap() {const map = new google.maps.Map(document.getElementById("map"), {zoom: 7,center: {lat: 49.7887636, lng: 15.6634697},});setMarkers(map);}function setMarkers(map) {const image = {url: "{{ asset('img/icon-dealer.png') }}",// This marker is 20 pixels wide by 32 pixels high.size: new google.maps.Size(40, 40),// The origin for this image is (0, 0).origin: new google.maps.Point(0, 0),// The anchor for this image is the base of the flagpole at (0, 32).anchor: new google.maps.Point(0, 40),};const dealers = [{id: {{ dealer.id }},name: "{{ dealer.name }}",city: "{{ dealer.city }}",street: "{{ dealer.street }}",lat: {{ dealer.lat }},lng: {{ dealer.lng }}}];const markers = [];for (let i = 0; i < dealers.length; i++) {const dealer = dealers[i];const marker = new google.maps.Marker({position: {lat: dealer.lat, lng: dealer.lng},map,icon: image,title: dealer.name + ' ' + dealer.city,zIndex: dealer.id,});marker.addListener("click", () => {const infowindow = new google.maps.InfoWindow({content: '<div style="width: 350px; overflow: hidden">' +'<b>'+dealer.name+'</b><br>'+dealer.city+', '+dealer.street+'</div>',});google.maps.event.addListener(map, 'click', function() {infowindow.close();});infowindow.open({anchor: marker,map,});});markers.push(marker);}}window.initMap = initMap;</script></div><div><article class="opening"><h2 class="opening__title"><i class="icon icon-hours"></i>Provozní doba</h2><div class="opening__schedule">{% for t in openTime %}<div>{{ t.day.value }}</div><div>{{ t.description }}</div>{% endfor %}</div>{% if dealer.openingHoursNote %}<div class="opening__info">{{ dealer.openingHoursNote }}</div>{% endif %}</article></div></section><section class="grid grid--gap40 grid--padding40"><div><div id="adform_squarem"></div>{% if dealer.dealerImages|length > 1 %}<section class="gallery gallery--columns3 js-gallery">{% for g in dealer.dealerImages %}<a {% if loop.index > 3 %} style="display: none" {% endif %}class="gallery__item" href="{{ asset('img-dealer/')~g.name }}" title="{{ dealer.name }}"><imgsrc="{{ asset('img-dealer/')~g.name }}"{{ stimulus_controller('symfony/ux-lazy-image/lazy-image', {src: asset('img-dealer/')~g.name}) }}width="200"></a>{% endfor %}{% if dealer.dealerImages|length > 3 %}<div class="gallery__show"><i class="icon icon-camera"></i>+ {{ dealer.dealerImages|length - 3 }}</div>{% endif%}</section>{% endif %}<!-- The Gallery as lightbox dialog, should be a document body child element --><div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls" aria-label="image gallery"aria-modal="true" role="dialog"><div class="slides" aria-live="polite"></div><h3 class="title"></h3><a class="prev" aria-controls="blueimp-gallery" aria-label="previous slide" aria-keyshortcuts="ArrowLeft"></a><a class="next" aria-controls="blueimp-gallery" aria-label="next slide" aria-keyshortcuts="ArrowRight"></a><a class="close" aria-controls="blueimp-gallery" aria-label="close" aria-keyshortcuts="Escape"></a><ol class="indicator"></ol></div>{% if hasVehicleImport %}<h2 class="grid__title">Novinky z nabídky</h2>{% for v in vehicles %}{% include 'vehicle/_vehicle.html.twig' with { vehicle: v } %}{% if loop.index == 1 %}<div id="banner-mobile-container" class="banner-mobile"></div>{% endif %}{% if loop.index == 4 %}<div id="adform_squarem2"></div>{% endif %}{% endfor %}<footer class="contact__footer" style="float: right"><a class="contact__button" href="{{ path('page_dealer_vehicle', { url: dealer.url }) }}"><i class="icon icon-car"></i>Zobrazit nabídku vozidel</a></footer>{% else %}<h2 class="grid__title">Tipy z autobazarů</h2>{% for tip in vehicleTips %}{% include 'vehicle/_vehicle.html.twig' with { vehicle: tip.vehicle } %}{% if loop.index == 1 %}<div id="banner-mobile-container" class="banner-mobile"></div>{% endif %}{% endfor %}{% if dealer.district %}<footer class="contact__footer" style="float: right"><a class="contact__button" href="{{ path('page_vehicle_search', {urlKind: 'osobni-vozidla'}) }}?place={{ dealer.district.region.url }}"><i class="icon icon-car"></i>Nabídka vozidel {{ dealer.district.region.name }}</a></footer>{% endif %}{% endif %}</div><div><div id="adform_halfpage"></div><div id="banner-container" class="banner"></div></div></section>{% endblock %}