{% import 'common/macros/elements.html.twig' as elements %}
{% import 'common/macros/svg.html.twig' as svg %}
{% import _self as _ %}
{% macro media(location) %}
{% set code = location|lower %}
{% if code == 'seattle' %}
{{ svg.seattle }}
{% elseif code == 'amsterdam' %}
{{ svg.amsterdam }}
{% elseif code == 'budapest' %}
{{ svg.budapest }}
{% elseif code == 'bucharest' %}
{{ svg.bucharest }}
{% elseif code == 'luxembourg' %}
{{ svg.luxembourg }}
{% endif %}
{% endmacro %}
{% macro grid_item(location) %}
{% set href = path('office_show', { 'location': location|lower }) %}
<div class="item">
<a class="link" href="{{ href }}"></a>
<span class="headquarters">{{ getLocationHeadquarter(location) }}</span>
{{ elements.heading('<a href="' ~ href ~ '">' ~ getLocationCity(location) ~ '</a>', 3, 'city') }}
<span class="company">{{ location.getCompany() }}</span>
<span class="contact">{{ location.getEmail() }}</span>
<div class="media">{{ _.media(location) }}</div>
{{ elements.CTA('common.learn_mode'|trans|upper, href, 'link') }}
</div>
{% endmacro %}
<div id="locations">
<div class="header">
{{ elements.heading('our_locations.page_title'|trans, 1, 'title') }}
<p class="text"><strong>{{ 'our_locations.page_text'|trans }}</strong></p>
</div>
<div class="list">
{% for item in items %}
{{ _.grid_item(item) }}
{% endfor %}
</div>
</div>