custom/plugins/TcinnThemeWareClean/src/Resources/views/storefront/themeware/includes/twt-usp-bar-include.html.twig line 1

Open in your IDE?
  1. {# ThemeWare "USP bar" content #}
  2. {#
  3.     type: header/footer
  4.     @Storefront/storefront/themeware/includes/twt-usp-bar-include.html.twig
  5. #}
  6. {# TODO: Blöcke prüfen... #}
  7. {# ---------------- START: SET TEMPLATE VARS ---------------- #}
  8. {# ThemeWare: Set theme variables #}
  9. {% set twtUspBarBreakpointItem1 = theme_config('twt-usp-bar-breakpoint-item-1') %}
  10. {% set twtUspBarBreakpointItem2 = theme_config('twt-usp-bar-breakpoint-item-2') %}
  11. {% set twtUspBarBreakpointItem3 = theme_config('twt-usp-bar-breakpoint-item-3') %}
  12. {% set twtUspBarBreakpointItem4 = theme_config('twt-usp-bar-breakpoint-item-4') %}
  13. {% set twtUspBarBreakpointItem5 = theme_config('twt-usp-bar-breakpoint-item-5') %}
  14. {% set twtUspBarBreakpointItem6 = theme_config('twt-usp-bar-breakpoint-item-6') %}
  15. {% set twtUspBarHeaderLayout = theme_config('twt-usp-bar-header-layout') %}
  16. {% set twtUspBarFooterLayout = theme_config('twt-usp-bar-footer-layout') %}
  17. {# ThemeWare: Set USPs #}
  18. {# removed #}
  19. {# ThemeWare: Determine if subtitels should be shown #}
  20. {% set showSubtitles = false %}
  21. {# Determine if subtitles should have a hover effect #}
  22. {% set isHover = false %} {# TODO: For header layout "Small icon with subtitles" #}
  23. {# Header #}
  24. {# TODO: Add header layout "Small icon with subtitles" #}
  25. {# Footer #}
  26. {% if type == "footer" and twtUspBarFooterLayout == 3 %}
  27.     {% set showSubtitles = true %}
  28. {% endif %}
  29. {# ---------------- END: SET TEMPLATE VARS ---------------- #}
  30. {# ThemeWare: USP bar items #}
  31. {% block twt_usp_bar_content %}
  32.     {# ThemeWare: Check 'maxitems' (= $twt-widget-benefits-content-max-items (only in 'Benefits widget')) #}
  33.     {% if maxitems %}
  34.         {# maxitems is set = benefits widget #}
  35.         {% set itemsShow = false %}
  36.     {% else %}
  37.         {# maxitems is not set = usp-bar #}
  38.         {% set itemsShow = true %}
  39.     {% endif %}
  40.     {% set itemId = 0 %}
  41.     {# TODO: set itemFirst = 0 ?! #}
  42.     {# TODO: set itemLast = 0 ?! #}
  43.     {# ThemeWare: USP bar item 1 #}
  44.     {% if twtUspBarBreakpointItem1 > 1 %}
  45.         {% set itemId = itemId + 1 %}
  46.         {% block twt_widget_usp_bar_item_1 %}
  47.             {% if itemsShow or maxitems >= 1 %}
  48.                 <div class="twt-usp-bar-item twt-usp-{{ itemId }} item-1"{% if "twt.extension.uspBar.usp1.tooltip"|trans is not empty %}
  49.                      data-toggle="tooltip"
  50.                      data-placement="{% if type == "header" %}bottom{% else %}top{% endif %}"
  51.                      title="{{ "twt.extension.uspBar.usp1.tooltip"|trans }}"{% endif %}>
  52.                     <div class="item-icon">
  53.                         {% sw_include '@Storefront/storefront/themeware/twt-icons.html.twig' ignore missing with {
  54.                             icon: "twt.extension.uspBar.usp1.icon"|trans
  55.                         } %}
  56.                     </div>
  57.                     <div class="item-label{% if isHover and "twt.extension.uspBar.usp1.subtitle"|trans is not empty %} is-hover{% endif %}">
  58.                         <div class="item-title">{{ "twt.extension.uspBar.usp1.title"|trans|raw }}</div>
  59.                         {% if "twt.extension.uspBar.usp1.subtitle"|trans is not empty and showSubtitles %}
  60.                             <div class="item-subtitle">{{ "twt.extension.uspBar.usp1.subtitle"|trans }}</div>
  61.                         {% endif %}
  62.                     </div>
  63.                 </div>
  64.             {% endif %}
  65.         {% endblock %}
  66.     {% endif %}
  67.     {# ThemeWare: USP bar item 2 #}
  68.     {% if twtUspBarBreakpointItem2 > 1 %}
  69.         {% set itemId = itemId + 1 %}
  70.         {% block twt_widget_usp_bar_item_2 %}
  71.             {% if itemsShow or maxitems >= 2 %}
  72.                 <div class="twt-usp-bar-item twt-usp-{{ itemId }} item-2"{% if "twt.extension.uspBar.usp2.tooltip"|trans is not empty %}
  73.                      data-toggle="tooltip"
  74.                      data-placement="{% if type == "header" %}bottom{% else %}top{% endif %}"
  75.                      title="{{ "twt.extension.uspBar.usp2.tooltip"|trans }}"{% endif %}>
  76.                     <div class="item-icon">
  77.                         {% sw_include '@Storefront/storefront/themeware/twt-icons.html.twig' ignore missing with {
  78.                             icon: "twt.extension.uspBar.usp2.icon"|trans
  79.                         } %}
  80.                     </div>
  81.                     <div class="item-label{% if isHover and "twt.extension.uspBar.usp2.subtitle"|trans is not empty %} is-hover{% endif %}">
  82.                         <div class="item-title">{{ "twt.extension.uspBar.usp2.title"|trans|raw }}</div>
  83.                         {% if "twt.extension.uspBar.usp2.subtitle"|trans is not empty and showSubtitles %}
  84.                             <div class="item-subtitle">{{ "twt.extension.uspBar.usp2.subtitle"|trans }}</div>
  85.                         {% endif %}
  86.                     </div>
  87.                 </div>
  88.             {% endif %}
  89.         {% endblock %}
  90.     {% endif %}
  91.     {# ThemeWare: USP bar item 3 #}
  92.     {% if twtUspBarBreakpointItem3 > 1 %}
  93.         {% set itemId = itemId + 1 %}
  94.         {% block twt_widget_usp_bar_item_3 %}
  95.             {% if itemsShow or maxitems >= 3 %}
  96.                 <div class="twt-usp-bar-item twt-usp-{{ itemId }} item-3"{% if "twt.extension.uspBar.usp3.tooltip"|trans is not empty %}
  97.                      data-toggle="tooltip"
  98.                      data-placement="{% if type == "header" %}bottom{% else %}top{% endif %}"
  99.                      title="{{ "twt.extension.uspBar.usp3.tooltip"|trans }}"{% endif %}>
  100.                     <div class="item-icon">
  101.                         {% sw_include '@Storefront/storefront/themeware/twt-icons.html.twig' ignore missing with {
  102.                             icon: "twt.extension.uspBar.usp3.icon"|trans
  103.                         } %}
  104.                     </div>
  105.                     <div class="item-label{% if isHover and "twt.extension.uspBar.usp3.subtitle"|trans is not empty %} is-hover{% endif %}">
  106.                         <div class="item-title">{{ "twt.extension.uspBar.usp3.title"|trans|raw }}</div>
  107.                         {% if "twt.extension.uspBar.usp3.subtitle"|trans is not empty and showSubtitles %}
  108.                             <div class="item-subtitle">{{ "twt.extension.uspBar.usp3.subtitle"|trans }}</div>
  109.                         {% endif %}
  110.                     </div>
  111.                 </div>
  112.             {% endif %}
  113.         {% endblock %}
  114.     {% endif %}
  115.     {# ThemeWare: USP bar item 4 #}
  116.     {% if twtUspBarBreakpointItem4 > 1 %}
  117.         {% set itemId = itemId + 1 %}
  118.         {% block twt_widget_usp_bar_item_4 %}
  119.             {% if itemsShow or maxitems >= 4 %}
  120.                 <div class="twt-usp-bar-item twt-usp-{{ itemId }} item-4"{% if "twt.extension.uspBar.usp4.tooltip"|trans is not empty %}
  121.                      data-toggle="tooltip"
  122.                      data-placement="{% if type == "header" %}bottom{% else %}top{% endif %}"
  123.                      title="{{ "twt.extension.uspBar.usp4.tooltip"|trans }}"{% endif %}>
  124.                     <div class="item-icon">
  125.                         {% sw_include '@Storefront/storefront/themeware/twt-icons.html.twig' ignore missing with {
  126.                             icon: "twt.extension.uspBar.usp4.icon"|trans
  127.                         } %}
  128.                     </div>
  129.                     <div class="item-label{% if isHover and "twt.extension.uspBar.usp4.subtitle"|trans is not empty %} is-hover{% endif %}">
  130.                         <div class="item-title">{{ "twt.extension.uspBar.usp4.title"|trans|raw }}</div>
  131.                         {% if "twt.extension.uspBar.usp4.subtitle"|trans is not empty and showSubtitles %}
  132.                             <div class="item-subtitle">{{ "twt.extension.uspBar.usp4.subtitle"|trans }}</div>
  133.                         {% endif %}
  134.                     </div>
  135.                 </div>
  136.             {% endif %}
  137.         {% endblock %}
  138.     {% endif %}
  139.     {# ThemeWare: USP bar item 5 #}
  140.     {% if twtUspBarBreakpointItem5 > 1 %}
  141.         {% set itemId = itemId + 1 %}
  142.         {% block twt_widget_usp_bar_item_5 %}
  143.             {% if itemsShow or maxitems >= 5 %}
  144.                 <div class="twt-usp-bar-item twt-usp-{{ itemId }} item-5"{% if "twt.extension.uspBar.usp5.tooltip"|trans is not empty %}
  145.                      data-toggle="tooltip"
  146.                      data-placement="{% if type == "header" %}bottom{% else %}top{% endif %}"
  147.                      title="{{ "twt.extension.uspBar.usp5.tooltip"|trans }}"{% endif %}>
  148.                     <div class="item-icon">
  149.                         {% sw_include '@Storefront/storefront/themeware/twt-icons.html.twig' ignore missing with {
  150.                             icon: "twt.extension.uspBar.usp5.icon"|trans
  151.                         } %}
  152.                     </div>
  153.                     <div class="item-label{% if isHover and "twt.extension.uspBar.usp5.subtitle"|trans is not empty %} is-hover{% endif %}">
  154.                         <div class="item-title">{{ "twt.extension.uspBar.usp5.title"|trans|raw }}</div>
  155.                         {% if "twt.extension.uspBar.usp5.subtitle"|trans is not empty and showSubtitles %}
  156.                             <div class="item-subtitle">{{ "twt.extension.uspBar.usp5.subtitle"|trans }}</div>
  157.                         {% endif %}
  158.                     </div>
  159.                 </div>
  160.             {% endif %}
  161.         {% endblock %}
  162.     {% endif %}
  163.     {# ThemeWare: USP bar item 6 #}
  164.     {% if twtUspBarBreakpointItem6 > 1 %}
  165.         {% set itemId = itemId + 1 %}
  166.         {% block twt_widget_usp_bar_item_6 %}
  167.             {% if itemsShow or maxitems >= 6 %}
  168.                 <div class="twt-usp-bar-item twt-usp-{{ itemId }} item-6"{% if "twt.extension.uspBar.usp6.tooltip"|trans is not empty %}
  169.                      data-toggle="tooltip"
  170.                      data-placement="{% if type == "header" %}bottom{% else %}top{% endif %}"
  171.                      title="{{ "twt.extension.uspBar.usp6.tooltip"|trans }}"{% endif %}>
  172.                     <div class="item-icon">
  173.                         {% sw_include '@Storefront/storefront/themeware/twt-icons.html.twig' ignore missing with {
  174.                             icon: "twt.extension.uspBar.usp6.icon"|trans
  175.                         } %}
  176.                     </div>
  177.                     <div class="item-label{% if isHover and "twt.extension.uspBar.usp6.subtitle"|trans is not empty %} is-hover{% endif %}">
  178.                         <div class="item-title">{{ "twt.extension.uspBar.usp6.title"|trans|raw }}</div>
  179.                         {% if "twt.extension.uspBar.usp6.subtitle"|trans is not empty and showSubtitles %}
  180.                             <div class="item-subtitle">{{ "twt.extension.uspBar.usp6.subtitle"|trans }}</div>
  181.                         {% endif %}
  182.                     </div>
  183.                 </div>
  184.             {% endif %}
  185.         {% endblock %}
  186.     {% endif %}
  187. {% endblock %}