{{ attach_library('budvue/snapshot-script') }} {{ attach_library('ajax_link/ajaxLink') }}
{{ drupal_view('store_location_details', 'block_3') }}
{# Loader element #} {# #} {% for playlistTitle, slides in slide_data %} {% set playlistSlug = playlistTitle|replace({' ': ''})|lower %} {% set slideBlock = datas[loop.index0] %} {% set currentRatio = ratio_data[loop.index0] %}
{{ playlistTitle }} {{' ▶'}}{{' ▼'}} {# #}
{% if slides is empty %} {% else %}
{% if currentRatio is defined %} {% if currentRatio.androidDeviceId is not null %} {% endif %} {% set totalValue = currentRatio.promotionRatio + currentRatio.socialRatio + currentRatio.entRatio %} {% set prmotionRatioWid = 25 + ((currentRatio.promotionRatio / totalValue) * 25) %} {% set socialRatioWid = 25 + ((currentRatio.socialRatio / totalValue) * 25) %} {% set entRatioWid = 25 + ((currentRatio.entRatio / totalValue) * 25) %} {% set prmotionRatioValue = (currentRatio.promotionRatio / totalValue) * 100 %} {% set socialRatioValue = (currentRatio.socialRatio / totalValue) * 100 %} {% set entRatioValue = (currentRatio.entRatio / totalValue) * 100 %} {% set maxA = (prmotionRatioValue + socialRatioValue)|round %} {% set valA = prmotionRatioValue|round %} {% set minA = 0 %} {% set widA = "calc(" ~ (maxA / 2) ~ "% - 4px + 9px)" %} {% set minB = prmotionRatioValue|round %} {% set maxB = 100 %} {% set valB = (prmotionRatioValue|round + socialRatioValue)|round %} {% set widB = "calc(" ~ ((maxB - minB) / 2) ~ "% - 4px + 9px)" %} {% if maxB - minB == 0 %} {% set widB = "calc(4px + 9px + 5px)" %} {% endif %} {% endif %} {# {{ slide_block }} #}
{% endif %}
{% endfor %}