{# ThemeWare "USP bar" content #}
{#
type: header/footer
@Storefront/storefront/themeware/includes/twt-usp-bar-include.html.twig
#}
{# TODO: Blöcke prüfen... #}
{# ---------------- START: SET TEMPLATE VARS ---------------- #}
{# ThemeWare: Set theme variables #}
{% set twtUspBarBreakpointItem1 = theme_config('twt-usp-bar-breakpoint-item-1') %}
{% set twtUspBarBreakpointItem2 = theme_config('twt-usp-bar-breakpoint-item-2') %}
{% set twtUspBarBreakpointItem3 = theme_config('twt-usp-bar-breakpoint-item-3') %}
{% set twtUspBarBreakpointItem4 = theme_config('twt-usp-bar-breakpoint-item-4') %}
{% set twtUspBarBreakpointItem5 = theme_config('twt-usp-bar-breakpoint-item-5') %}
{% set twtUspBarBreakpointItem6 = theme_config('twt-usp-bar-breakpoint-item-6') %}
{% set twtUspBarHeaderLayout = theme_config('twt-usp-bar-header-layout') %}
{% set twtUspBarFooterLayout = theme_config('twt-usp-bar-footer-layout') %}
{# ThemeWare: Set USPs #}
{# removed #}
{# ThemeWare: Determine if subtitels should be shown #}
{% set showSubtitles = false %}
{# Determine if subtitles should have a hover effect #}
{% set isHover = false %} {# TODO: For header layout "Small icon with subtitles" #}
{# Header #}
{# TODO: Add header layout "Small icon with subtitles" #}
{# Footer #}
{% if type == "footer" and twtUspBarFooterLayout == 3 %}
{% set showSubtitles = true %}
{% endif %}
{# ---------------- END: SET TEMPLATE VARS ---------------- #}
{# ThemeWare: USP bar items #}
{% block twt_usp_bar_content %}
{# ThemeWare: Check 'maxitems' (= $twt-widget-benefits-content-max-items (only in 'Benefits widget')) #}
{% if maxitems %}
{# maxitems is set = benefits widget #}
{% set itemsShow = false %}
{% else %}
{# maxitems is not set = usp-bar #}
{% set itemsShow = true %}
{% endif %}
{% set itemId = 0 %}
{# TODO: set itemFirst = 0 ?! #}
{# TODO: set itemLast = 0 ?! #}
{# ThemeWare: USP bar item 1 #}
{% if twtUspBarBreakpointItem1 > 1 %}
{% set itemId = itemId + 1 %}
{% block twt_widget_usp_bar_item_1 %}
{% if itemsShow or maxitems >= 1 %}
<div class="twt-usp-bar-item twt-usp-{{ itemId }} item-1"{% if "twt.extension.uspBar.usp1.tooltip"|trans is not empty %}
data-toggle="tooltip"
data-placement="{% if type == "header" %}bottom{% else %}top{% endif %}"
title="{{ "twt.extension.uspBar.usp1.tooltip"|trans }}"{% endif %}>
<div class="item-icon">
{% sw_include '@Storefront/storefront/themeware/twt-icons.html.twig' ignore missing with {
icon: "twt.extension.uspBar.usp1.icon"|trans
} %}
</div>
<div class="item-label{% if isHover and "twt.extension.uspBar.usp1.subtitle"|trans is not empty %} is-hover{% endif %}">
<div class="item-title">{{ "twt.extension.uspBar.usp1.title"|trans|raw }}</div>
{% if "twt.extension.uspBar.usp1.subtitle"|trans is not empty and showSubtitles %}
<div class="item-subtitle">{{ "twt.extension.uspBar.usp1.subtitle"|trans }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% endblock %}
{% endif %}
{# ThemeWare: USP bar item 2 #}
{% if twtUspBarBreakpointItem2 > 1 %}
{% set itemId = itemId + 1 %}
{% block twt_widget_usp_bar_item_2 %}
{% if itemsShow or maxitems >= 2 %}
<div class="twt-usp-bar-item twt-usp-{{ itemId }} item-2"{% if "twt.extension.uspBar.usp2.tooltip"|trans is not empty %}
data-toggle="tooltip"
data-placement="{% if type == "header" %}bottom{% else %}top{% endif %}"
title="{{ "twt.extension.uspBar.usp2.tooltip"|trans }}"{% endif %}>
<div class="item-icon">
{% sw_include '@Storefront/storefront/themeware/twt-icons.html.twig' ignore missing with {
icon: "twt.extension.uspBar.usp2.icon"|trans
} %}
</div>
<div class="item-label{% if isHover and "twt.extension.uspBar.usp2.subtitle"|trans is not empty %} is-hover{% endif %}">
<div class="item-title">{{ "twt.extension.uspBar.usp2.title"|trans|raw }}</div>
{% if "twt.extension.uspBar.usp2.subtitle"|trans is not empty and showSubtitles %}
<div class="item-subtitle">{{ "twt.extension.uspBar.usp2.subtitle"|trans }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% endblock %}
{% endif %}
{# ThemeWare: USP bar item 3 #}
{% if twtUspBarBreakpointItem3 > 1 %}
{% set itemId = itemId + 1 %}
{% block twt_widget_usp_bar_item_3 %}
{% if itemsShow or maxitems >= 3 %}
<div class="twt-usp-bar-item twt-usp-{{ itemId }} item-3"{% if "twt.extension.uspBar.usp3.tooltip"|trans is not empty %}
data-toggle="tooltip"
data-placement="{% if type == "header" %}bottom{% else %}top{% endif %}"
title="{{ "twt.extension.uspBar.usp3.tooltip"|trans }}"{% endif %}>
<div class="item-icon">
{% sw_include '@Storefront/storefront/themeware/twt-icons.html.twig' ignore missing with {
icon: "twt.extension.uspBar.usp3.icon"|trans
} %}
</div>
<div class="item-label{% if isHover and "twt.extension.uspBar.usp3.subtitle"|trans is not empty %} is-hover{% endif %}">
<div class="item-title">{{ "twt.extension.uspBar.usp3.title"|trans|raw }}</div>
{% if "twt.extension.uspBar.usp3.subtitle"|trans is not empty and showSubtitles %}
<div class="item-subtitle">{{ "twt.extension.uspBar.usp3.subtitle"|trans }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% endblock %}
{% endif %}
{# ThemeWare: USP bar item 4 #}
{% if twtUspBarBreakpointItem4 > 1 %}
{% set itemId = itemId + 1 %}
{% block twt_widget_usp_bar_item_4 %}
{% if itemsShow or maxitems >= 4 %}
<div class="twt-usp-bar-item twt-usp-{{ itemId }} item-4"{% if "twt.extension.uspBar.usp4.tooltip"|trans is not empty %}
data-toggle="tooltip"
data-placement="{% if type == "header" %}bottom{% else %}top{% endif %}"
title="{{ "twt.extension.uspBar.usp4.tooltip"|trans }}"{% endif %}>
<div class="item-icon">
{% sw_include '@Storefront/storefront/themeware/twt-icons.html.twig' ignore missing with {
icon: "twt.extension.uspBar.usp4.icon"|trans
} %}
</div>
<div class="item-label{% if isHover and "twt.extension.uspBar.usp4.subtitle"|trans is not empty %} is-hover{% endif %}">
<div class="item-title">{{ "twt.extension.uspBar.usp4.title"|trans|raw }}</div>
{% if "twt.extension.uspBar.usp4.subtitle"|trans is not empty and showSubtitles %}
<div class="item-subtitle">{{ "twt.extension.uspBar.usp4.subtitle"|trans }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% endblock %}
{% endif %}
{# ThemeWare: USP bar item 5 #}
{% if twtUspBarBreakpointItem5 > 1 %}
{% set itemId = itemId + 1 %}
{% block twt_widget_usp_bar_item_5 %}
{% if itemsShow or maxitems >= 5 %}
<div class="twt-usp-bar-item twt-usp-{{ itemId }} item-5"{% if "twt.extension.uspBar.usp5.tooltip"|trans is not empty %}
data-toggle="tooltip"
data-placement="{% if type == "header" %}bottom{% else %}top{% endif %}"
title="{{ "twt.extension.uspBar.usp5.tooltip"|trans }}"{% endif %}>
<div class="item-icon">
{% sw_include '@Storefront/storefront/themeware/twt-icons.html.twig' ignore missing with {
icon: "twt.extension.uspBar.usp5.icon"|trans
} %}
</div>
<div class="item-label{% if isHover and "twt.extension.uspBar.usp5.subtitle"|trans is not empty %} is-hover{% endif %}">
<div class="item-title">{{ "twt.extension.uspBar.usp5.title"|trans|raw }}</div>
{% if "twt.extension.uspBar.usp5.subtitle"|trans is not empty and showSubtitles %}
<div class="item-subtitle">{{ "twt.extension.uspBar.usp5.subtitle"|trans }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% endblock %}
{% endif %}
{# ThemeWare: USP bar item 6 #}
{% if twtUspBarBreakpointItem6 > 1 %}
{% set itemId = itemId + 1 %}
{% block twt_widget_usp_bar_item_6 %}
{% if itemsShow or maxitems >= 6 %}
<div class="twt-usp-bar-item twt-usp-{{ itemId }} item-6"{% if "twt.extension.uspBar.usp6.tooltip"|trans is not empty %}
data-toggle="tooltip"
data-placement="{% if type == "header" %}bottom{% else %}top{% endif %}"
title="{{ "twt.extension.uspBar.usp6.tooltip"|trans }}"{% endif %}>
<div class="item-icon">
{% sw_include '@Storefront/storefront/themeware/twt-icons.html.twig' ignore missing with {
icon: "twt.extension.uspBar.usp6.icon"|trans
} %}
</div>
<div class="item-label{% if isHover and "twt.extension.uspBar.usp6.subtitle"|trans is not empty %} is-hover{% endif %}">
<div class="item-title">{{ "twt.extension.uspBar.usp6.title"|trans|raw }}</div>
{% if "twt.extension.uspBar.usp6.subtitle"|trans is not empty and showSubtitles %}
<div class="item-subtitle">{{ "twt.extension.uspBar.usp6.subtitle"|trans }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% endblock %}
{% endif %}
{% endblock %}