{% if editmode %}
<div class="settings">
<strong class="settings-header">Staff Member Settings</strong><button class="toggle-settings"><i class="fa fa-plus"></i></button>
<div class="settings_container">
<div class="row middle-lg middle-md middle-sm middle-xs" style="gap: 10px">
<div>Is Bio Popup Active</div>
<div>{{ pimcore_checkbox("bioPopupActive", {reload: true} ) }}</div>
</div>
<div class="row middle-lg middle-md middle-sm middle-xs" style="gap: 10px">
<div>Max Width on Content</div>
<div>{{ pimcore_numeric("maxWidth") }}</div>
</div>
<div class="row middle-lg middle-md middle-sm middle-xs" style="gap: 10px">
<div>Max Width on Images</div>
<div>{{ pimcore_numeric("imgMaxWidth") }}</div>
</div>
<div class="row middle-lg middle-md middle-sm middle-xs" style="gap: 10px">
<div>Image Alignment</div>
<div>
{{
pimcore_select("imageAlignment", {
"store": [
["left", "Left"],
["center", "Center"],
["right", "Right"]
]
})
}}
</div>
</div>
</div>
</div>
{% endif %}
<!-- Add a dropdown/select/number field to select a limit of staff members to show here -->
{% set staffMembers = app_staff_members_get() %}
{% set maxWidth = pimcore_numeric("maxWidth").getData() ? ' style=max-width:' ~ pimcore_numeric("maxWidth").getData() ~ 'px;' : '' %}
{% set imgAlignment = pimcore_select("imageAlignment").getData() == 'left' ? '' : pimcore_select("imageAlignment").getData() == 'center' ? ' auto-margins' : pimcore_select("imageAlignment").getData() == 'right' ? ' img-align-right' : '' %}
{% set imgMaxWidth = pimcore_numeric("imgMaxWidth").getData() ? ' style=max-width:' ~ pimcore_numeric("imgMaxWidth").getData() ~ 'px;' : '' %}
{% if staffMembers and staffMembers|length > 0 %}
<div class="staff-members">
<div class="inner">
<div class="row gutter-space--md"{{maxWidth}}>
{% for staffMember in staffMembers %}
{% set linkedInUrl = staffMember['linkedInUrl'] ? '<a class="linkedin-icon" href="' ~ staffMember['linkedInUrl'] ~ '" target="_blank"><i class="fa fa-linkedin"></i></a>' : '' %}
<div data-aos="fade-up" class="col col-lg-3 col-md-3 col-sm-6 col-xs-6 text-align-center">
<div class="card">
<div class="card-content">
<div class="circle-image{{imgAlignment}}"{{imgMaxWidth}}>
{% if pimcore_checkbox('bioPopupActive').getData() %}
<a href="javascript:void(0);" data-id="{{ staffMember['id'] }}" data-bio="{{ staffMember['bio'] }} {{ linkedInUrl }}" id="{{ staffMember['id'] }}" class="btn-modal" style="display: block;">
{% endif %}
{{ staffMember['profileImageThumbnail'] | raw }}
{% if pimcore_checkbox('bioPopupActive').getData() %}
</a>
{% endif %}
</div>
<p style="margin-top: 15px;"><strong>{{ staffMember['name'] }}</strong><br>{{ staffMember['position'] }}</p>
{{ linkedInUrl | raw }}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}