templates/includes/map-area.html.twig line 1

Open in your IDE?
  1. {% set detailTitle = title|default('') %}
  2. {% set geoPoint = geoPoint|default(false) %}
  3. {% set zip = zip|default(false) %}
  4. {% set street = street|default(false) %}
  5. {% set city = city|default(false) %}
  6. {% do jsConfig().add('googleMapAPIKey', googleApiKey()) %}
  7. {% if geoPoint or street or zip or city %}
  8.     <section class="map-area container content-block-small">
  9.         {{ include('includes/title-blocks/title-block-object.html.twig', {
  10.             titleBold: detailTitle,
  11.             title: " ",
  12.             subtitle: " ",
  13.             titleStyle: 'h4'
  14.         }) }}
  15.         <div class="ratio ratio-3x1 ratio-4x3-xs map-area__container">
  16.             {% if geoPoint|default(null) and geoPoint.longitude and geoPoint.latitude %}
  17.                 {% set geo = geoPoint.latitude ~ ',' ~ geoPoint.longitude %}
  18.             {% else %}
  19.                 {% set geo = street|default('') ~ ', ' ~ zip|default('') ~ ' ' ~ city|default('') %}
  20.             {% endif %}
  21.             {% embed('@ElementsCmsTools/consent-overlay.html.twig') with {
  22.                 'service': 'marketing',
  23.                 'buttonText': 'cookies.Marketingcookies akzeptieren'|trans,
  24.                 'overlayText': 'cookies.Um die Map anzusehen, müssen Sie die Cookies akzeptieren'|trans
  25.             } %}
  26.                 {% block consentIframe %}
  27.                     <iframe src="https://www.google.com/maps?q={{ geo }}&key={{ googleApiKey() }}&hl=es;z=14&amp;output=embed"
  28.                             style="border-radius: 0.5rem"
  29.                             allowfullscreen=""
  30.                             loading="lazy"
  31.                             referrerpolicy="no-referrer-when-downgrade"
  32.                             class="ratio-item location-map shadow">
  33.                     </iframe>
  34.                 {% endblock %}
  35.             {% endembed %}
  36.         </div>
  37.     </section>
  38. {% endif %}