templates/mons/stores/show.html.twig line 1

Open in your IDE?
  1. {% extends '@SyliusShop/layout-large.html.twig' %}
  2. {%- block title -%}
  3.     {% if page.title is not empty %}
  4.         {{ page.title }}
  5.     {% else %}
  6.         {{ parent() }}
  7.     {% endif %}
  8. {%- endblock -%}
  9. {% block head %}
  10.     {{ parent() }}
  11.     {% block stylesheets %}
  12.         {{ parent() }}
  13.         <link href='https://api.mapbox.com/mapbox-gl-js/v2.3.1/mapbox-gl.css' rel='stylesheet' />
  14.     {% endblock %}
  15.     {% block metatags %}
  16.         {{ parent() }}
  17.         <meta name="keywords" content="{{ page.metaKeywords }}"/>
  18.         <meta name="description" content="{{ page.metaDescription }}"/>
  19.     {% endblock %}
  20. {% endblock %}
  21. {% block content %}
  22.     <div class="store-details">
  23.         <div class="container">
  24.             {% include 'common/_breadcrumb-store.html.twig' %}
  25.             <div class="store-details__columns">
  26.                 {% if store.image is not empty %}
  27.                     <img class="store-details__image" src="{{ store.image.path }}" alt="{{ store.title|e('html_attr') }}" data-aos="fade-right">
  28.                 {% endif %}
  29.                 <div class="store-details__content" data-aos="fade-left">
  30.                     <h1 class="page__title">
  31.                         <span class="page__tagline">{{ store.location }}</span>
  32.                         {{ store.name }}
  33.                     </h1>
  34.                     <div class="store-details__text">
  35.                         {{ store.content|raw }}
  36.                     </div>
  37.                 </div>
  38.             </div>
  39.         </div>
  40.         <div class="bg-dark store-details__deco">
  41.             <div class="container">
  42.                 <div class="store-details__infos">
  43.                     <div class="store-details__infos-left" data-aos="fade-right">
  44.                         <h3 class="c-red bold h4 store-details__infos-title">{{ store.name }}</h3><br>
  45.                         <div class="store-details__infos-section">
  46.                             {% if store.address != "" and store.address is not null %}
  47.                                 <div class="store-details__icon-block">
  48.                                     <i class="fas fa-map-marker-alt"></i>
  49.                                     <div>
  50.                                         {{ store.address }}<br>
  51.                                         <a href="https://www.google.com/maps/place/{{ store.address|format_for_gmaps }}/@{{ store.gpsLat }},{{ store.gpsLng }},17z" title="{{ 'sylius.structures.link.see_on_gmaps'|trans }}" target="_blank">{{ 'sylius.stores.access_map'|trans }}</a>
  52.                                     </div>
  53.                                 </div>
  54.                             {% endif %}
  55.                             {% if store.email != "" and store.email is not null %}
  56.                                 <div class="store-details__icon-block">
  57.                                     <i class="fas fa-envelope"></i>
  58.                                     <div><a href="mailto:{{ store.email }}" title="{{ 'sylius.stores.write_to_the_store'|trans|e('html_attr') }}">{{ store.email }}</a></div>
  59.                                 </div>
  60.                             {% endif %}
  61.                             {% if store.phone != "" and store.phone is not null %}
  62.                                 <div class="store-details__icon-block">
  63.                                     <i class="fas fa-phone"></i>
  64.                                     <div>{{ 'sylius.stores.phone'|trans }} <a href="tel:{{ store.phone }}" target="_blank" title="{{ 'sylius.stores.call_the_store'|trans|e('html_attr') }}">{{ store.phone }}</a></div>
  65.                                 </div>
  66.                             {% endif %}
  67.                             {% if store.fax != "" and store.fax is not null %}
  68.                                 <div class="store-details__icon-block">
  69.                                     <i class="fas fa-fax"></i>
  70.                                     <div>{{ 'sylius.stores.fax'|trans }} {{ store.fax }}</div>
  71.                                 </div>
  72.                             {% endif %}
  73.                         </div>
  74.                         <div class="store-details__infos-section">
  75.                             {% if store.openingTimes != "" and store.openingTimes is not null %}
  76.                                 <div class="store-details__icon-block">
  77.                                     <i class="fas fa-clock"></i>
  78.                                     <div>
  79.                                         <strong>{{ 'sylius.stores.opening_times'|trans }}</strong>
  80.                                         <br>
  81.                                         {{ store.openingTimes|raw }}
  82.                                     </div>
  83.                                 </div>
  84.                             {% endif %}
  85.                             <br>
  86.                             <br>
  87.                             {% if store.googleBusinessUrl is not null %}
  88.                                 <a href="{{ store.googleBusinessUrl }}" class="button button--medium button--outline-red button--outline-thin" target="_blank" title="{{ 'sylius.stores.leave_a_comment'|trans|e('html_attr') }}"><i class="fas fa-comments"></i>{{ 'sylius.stores.leave_a_comment'|trans }}</a>
  89.                             {% endif %}
  90.                         </div>
  91.                     </div>
  92.                     <div class="store-details__infos-right" data-aos="fade-left">
  93.                         <div class="store-details__infos-map">
  94.                             <div id="map"></div>
  95.                         </div>
  96.                         <a href="{{ path('app_shop_store_index') }}" class="button button--outline button--medium button--outline-thin" title="{{ 'sylius.stores.back_to_the_list'|trans|e('html_attr') }}">{{ 'sylius.stores.back_to_the_list'|trans }}</a>
  97.                     </div>
  98.                 </div>
  99.             </div>
  100.         </div>
  101.         <div class="citation" data-aos="fade-up">
  102.             <div class="container">
  103.                 <p>{{ 'sylius.stores.order_online'|trans|raw }}</p>
  104.                 <a class="button button--secondary button--medium" href="{{ bitbag_cms_get_link_for_code('contact') }}" title="{{ 'sylius.stores.info_request'|trans|e('html_attr') }}">{{ 'sylius.stores.info_request'|trans }}</a>
  105.             </div>
  106.         </div>
  107.     </div>
  108. {% endblock %}
  109. {% block javascripts %}
  110.     {{ parent() }}
  111.     <script src='https://api.mapbox.com/mapbox-gl-js/v2.3.1/mapbox-gl.js'></script>
  112.     <script type="text/javascript">
  113.         // Display the map
  114.         mapboxgl.accessToken = '{{ mapbox_key }}';
  115.         var map = new mapboxgl.Map({
  116.             container: 'map',
  117.             style: 'mapbox://styles/mapbox/light-v10',
  118.             center: [{{ store.gpsLng }}, {{ store.gpsLat }}],
  119.             zoom: 13
  120.         });
  121.         var marker = new mapboxgl.Marker({
  122.             color: '#883412'
  123.         })
  124.             .setLngLat([{{ store.gpsLng }}, {{ store.gpsLat }}])
  125.             .addTo(map);
  126.         var nav = new mapboxgl.NavigationControl();
  127.         map.addControl(nav, 'top-left');
  128.     </script>
  129. {% endblock %}