custom/plugins/TcinnThemeWareLiving/src/Resources/views/storefront/themeware/widgets/twt-awards-include.html.twig line 1

Open in your IDE?
  1. {# ThemeWare "Awards" widget #}
  2. {#
  3.     "Awards" widget and content
  4.     @Storefront/storefront/themeware/widgets/twt-awards-include.html.twig
  5. #}
  6. {# TODO: Blöcke prüfen... #}
  7. {# ---------------- START: SET TEMPLATE VARS ---------------- #}
  8. {# ThemeWare: Set theme variables #}
  9. {% set twtWidgetAwardsCustomImage1 = theme_config('twt-widget-awards-custom-image-1') %}
  10. {% set twtWidgetAwardsCustomImage1Url = theme_config('twt-widget-awards-custom-image-1-url') %}
  11. {% set twtWidgetAwardsCustomImage2 = theme_config('twt-widget-awards-custom-image-2') %}
  12. {% set twtWidgetAwardsCustomImage2Url = theme_config('twt-widget-awards-custom-image-2-url') %}
  13. {% set twtWidgetAwardsCustomImage3 = theme_config('twt-widget-awards-custom-image-3') %}
  14. {% set twtWidgetAwardsCustomImage3Url = theme_config('twt-widget-awards-custom-image-3-url') %}
  15. {% set twtWidgetAwardsCustomImage4 = theme_config('twt-widget-awards-custom-image-4') %}
  16. {% set twtWidgetAwardsCustomImage4Url = theme_config('twt-widget-awards-custom-image-4-url') %}
  17. {% set twtWidgetAwardsCustomImage5 = theme_config('twt-widget-awards-custom-image-5') %}
  18. {% set twtWidgetAwardsCustomImage5Url = theme_config('twt-widget-awards-custom-image-5-url') %}
  19. {% set twtWidgetAwardsCustomImage6 = theme_config('twt-widget-awards-custom-image-6') %}
  20. {% set twtWidgetAwardsCustomImage6Url = theme_config('twt-widget-awards-custom-image-6-url') %}
  21. {% set twtWidgetAwardsStandardSsl = theme_config('twt-widget-awards-standard-ssl') %}
  22. {% set twtWidgetAwardsTextShow = theme_config('twt-widget-awards-text-show') %}
  23. {% set twtWidgetAwardsImageMaxWidth = theme_config('twt-widget-awards-image-max-width') %}
  24. {% set twtWidgetAwardsImageMaxHeight = theme_config('twt-widget-awards-image-max-height') %}
  25. {% if twtWidgetAwardsImageMaxWidth != 'none' and twtWidgetAwardsImageMaxHeight == 'none' %}
  26.     {% set twtWidgetAwardsImageSize = twtWidgetAwardsImageMaxWidth %}
  27. {% elseif twtWidgetAwardsImageMaxWidth == 'none' and twtWidgetAwardsImageMaxHeight != 'none' %}
  28.     {% set twtWidgetAwardsImageSize = twtWidgetAwardsImageMaxHeight %}
  29. {% else %}
  30.     {% set twtWidgetAwardsImageSize = 100 %} {# Fallback #}
  31. {% endif %}
  32. {# ---------------- END: SET TEMPLATE VARS ---------------- #}
  33. {% block twt_widget_awards %}
  34.     <div class="twt-widget-awards twt-awards">
  35.         {% block twt_widget_awards_content %}
  36.             {% if twtWidgetAwardsTextShow == 2 %}
  37.                 <p>{{ "twt.widget.awards.content"|trans|sw_sanitize }}</p>
  38.             {% endif %}
  39.             <div class="twt-awards-container">
  40.                 {# ThemeWare: SSL seal #}
  41.                 {% if twtWidgetAwardsStandardSsl == 2 %}
  42.                     {% set isoCode = page.header.activeLanguage.translationCode.code|lower|split('-') %}
  43.                     {% if isoCode[0] == "de" or isoCode[1] == "de" %}
  44.                         <img src="{{ asset('bundles/tcinnthemewareliving/assets/awards/twt-ssl-siegel.png', 'asset') }}" alt="SSL" width="{{ twtWidgetAwardsImageSize }}px" height="{{ twtWidgetAwardsImageSize }}px">
  45.                     {% else %}
  46.                         <img src="{{ asset('bundles/tcinnthemewareliving/assets/awards/twt-ssl-seal.png', 'asset') }}" alt="SSL" width="{{ twtWidgetAwardsImageSize }}px" height="{{ twtWidgetAwardsImageSize }}px">
  47.                     {% endif %}
  48.                 {% endif %}
  49.                 {# ThemeWare: Custom image 1 #}
  50.                 {% if twtWidgetAwardsCustomImage1 %}
  51.                     {% if twtWidgetAwardsCustomImage1Url %}
  52.                         <a href="{{ twtWidgetAwardsCustomImage1Url }}" target="_blank" rel="noopener" title="{{ "twt.widget.awards.customImages.title1"|trans }}">
  53.                     {% endif %}
  54.                     <img src="{{ twtWidgetAwardsCustomImage1|sw_encode_url }}" alt="{{ "twt.widget.awards.customImages.title1"|trans }}" title="{{ "twt.widget.awards.customImages.title1"|trans }}"/>
  55.                     {% if twtWidgetAwardsCustomImage1Url %}
  56.                         </a>
  57.                     {% endif %}
  58.                 {% endif %}
  59.                 {# ThemeWare: Custom image 2 #}
  60.                 {% if twtWidgetAwardsCustomImage2 %}
  61.                     {% if twtWidgetAwardsCustomImage2Url %}
  62.                         <a href="{{ twtWidgetAwardsCustomImage2Url }}" target="_blank" rel="noopener" title="{{ "twt.widget.awards.customImages.title2"|trans }}">
  63.                     {% endif %}
  64.                     <img src="{{ twtWidgetAwardsCustomImage2|sw_encode_url }}" alt="{{ "twt.widget.awards.customImages.title2"|trans }}" title="{{ "twt.widget.awards.customImages.title2"|trans }}"/>
  65.                     {% if twtWidgetAwardsCustomImage2Url %}
  66.                         </a>
  67.                     {% endif %}
  68.                 {% endif %}
  69.                 {# ThemeWare: Custom image 3 #}
  70.                 {% if twtWidgetAwardsCustomImage3 %}
  71.                     {% if twtWidgetAwardsCustomImage3Url %}
  72.                         <a href="{{ twtWidgetAwardsCustomImage3Url }}" target="_blank" rel="noopener" title="{{ "twt.widget.awards.customImages.title3"|trans }}">
  73.                     {% endif %}
  74.                     <img src="{{ twtWidgetAwardsCustomImage3|sw_encode_url }}" alt="{{ "twt.widget.awards.customImages.title3"|trans }}" title="{{ "twt.widget.awards.customImages.title3"|trans }}"/>
  75.                     {% if twtWidgetAwardsCustomImage3Url %}
  76.                         </a>
  77.                     {% endif %}
  78.                 {% endif %}
  79.                 {# ThemeWare: Custom image 4 #}
  80.                 {% if twtWidgetAwardsCustomImage4 %}
  81.                     {% if twtWidgetAwardsCustomImage4Url %}
  82.                         <a href="{{ twtWidgetAwardsCustomImage4Url }}" target="_blank" rel="noopener" title="{{ "twt.widget.awards.customImages.title4"|trans }}">
  83.                     {% endif %}
  84.                     <img src="{{ twtWidgetAwardsCustomImage4|sw_encode_url }}" alt="{{ "twt.widget.awards.customImages.title4"|trans }}" title="{{ "twt.widget.awards.customImages.title4"|trans }}"/>
  85.                     {% if twtWidgetAwardsCustomImage4Url %}
  86.                         </a>
  87.                     {% endif %}
  88.                 {% endif %}
  89.                 {# ThemeWare: Custom image 5 #}
  90.                 {% if twtWidgetAwardsCustomImage5 %}
  91.                     {% if twtWidgetAwardsCustomImage5Url %}
  92.                         <a href="{{ twtWidgetAwardsCustomImage5Url }}" target="_blank" rel="noopener" title="{{ "twt.widget.awards.customImages.title5"|trans }}">
  93.                     {% endif %}
  94.                     <img src="{{ twtWidgetAwardsCustomImage5|sw_encode_url }}" alt="{{ "twt.widget.awards.customImages.title5"|trans }}" title="{{ "twt.widget.awards.customImages.title5"|trans }}"/>
  95.                     {% if twtWidgetAwardsCustomImage5Url %}
  96.                         </a>
  97.                     {% endif %}
  98.                 {% endif %}
  99.                 {# ThemeWare: Custom image 6 #}
  100.                 {% if twtWidgetAwardsCustomImage6 %}
  101.                     {% if twtWidgetAwardsCustomImage6Url %}
  102.                         <a href="{{ twtWidgetAwardsCustomImage6Url }}" target="_blank" rel="noopener" title="{{ "twt.widget.awards.customImages.title6"|trans }}">
  103.                     {% endif %}
  104.                     <img src="{{ twtWidgetAwardsCustomImage6|sw_encode_url }}" alt="{{ "twt.widget.awards.customImages.title6"|trans }}" title="{{ "twt.widget.awards.customImages.title6"|trans }}"/>
  105.                     {% if twtWidgetAwardsCustomImage6Url %}
  106.                         </a>
  107.                     {% endif %}
  108.                 {% endif %}
  109.             </div>
  110.         {% endblock %}
  111.     </div>
  112. {% endblock %}