custom/plugins/TcinnThemeWareModern/src/Resources/views/storefront/themeware/twt-base-meta-styles.html.twig line 1

Open in your IDE?
  1. {# ThemeWare styles and stylesheets #}
  2. {#
  3.     @Storefront/storefront/themeware/twt-base-meta-styles.html.twig
  4. #}
  5. {# TODO: Blöcke prüfen... #}
  6. {# ---------------- START: SET TEMPLATE VARS ---------------- #}
  7. {# ThemeWare: Set theme variables #}
  8. {% set twtAdditionalCssFile = theme_config('twt-additional-css-file') %}
  9. {% set twtAdditionalCssFileLoad = theme_config('twt-additional-css-file-load') %}
  10. {% set twtBackgroundImage = theme_config('twt-background-image') %}
  11. {% set twtBackgroundImageShow = theme_config('twt-background-image-show') %}
  12. {% set twtCustomCss = theme_config('twt-custom-css') %}
  13. {% set twtCustomCssCode = theme_config('twt-custom-css-code') %}
  14. {% set twtExpertMode = theme_config('twt-expert-mode') %}
  15. {% set twtFooterBackgroundImage = theme_config('twt-footer-background-image') %}
  16. {% set twtFooterBackgroundImageShow = theme_config('twt-footer-background-image-show') %}
  17. {% set twtFooterBottomBackgroundImage = theme_config('twt-footer-bottom-background-image') %}
  18. {% set twtFooterBottomBackgroundImageShow = theme_config('twt-footer-bottom-background-image-show') %}
  19. {% set twtFooterLowerSectionBackgroundImage = theme_config('twt-footer-lower-section-background-image') %}
  20. {% set twtFooterLowerSectionBackgroundImageShow = theme_config('twt-footer-lower-section-background-image-show') %}
  21. {% set twtFooterMainSectionBackgroundImage = theme_config('twt-footer-main-section-background-image') %}
  22. {% set twtFooterMainSectionBackgroundImageShow = theme_config('twt-footer-main-section-background-image-show') %}
  23. {% set twtFooterUpperSectionBackgroundImage = theme_config('twt-footer-upper-section-background-image') %}
  24. {% set twtFooterUpperSectionBackgroundImageShow = theme_config('twt-footer-upper-section-background-image-show') %}
  25. {% set twtHeaderBackgroundImage = theme_config('twt-header-background-image') %}
  26. {% set twtHeaderBackgroundImageShow = theme_config('twt-header-background-image-show') %}
  27. {# Debug mode: Overwrite expert mode #}
  28. {% if config('TcinnThemeWareModern.config.debugMode') is not empty and config('TcinnThemeWareModern.config.debugMode') == 'true' %}
  29.     {% set twtExpertMode = 1 %}
  30. {% endif %}
  31. {# ---------------- END: SET TEMPLATE VARS ---------------- #}
  32. {# ThemeWare: Add styles and stylesheets to <head> #}
  33. {% block twt_layout_head_style %}
  34.     {# ThemeWare: CSS-Datei egänzen. #}
  35.     {% if twtAdditionalCssFile and twtAdditionalCssFileLoad == 2 and twtExpertMode == 2 %}
  36.         <!-- Custom css file -->
  37.         <link rel="stylesheet" href="{{ twtAdditionalCssFile }}" crossorigin="anonymous">
  38.     {% endif %}
  39.     {# ThemeWare: Hintergrundbilder ergänzen. #}
  40.     {# Todo: Add if to avoid an empty tag #}
  41.     {% if twtBackgroundImageShow == 2 or
  42.         twtHeaderBackgroundImageShow == 2 or
  43.         twtFooterBackgroundImageShow == 2 or
  44.         twtFooterUpperSectionBackgroundImageShow == 2 or
  45.         twtFooterMainSectionBackgroundImageShow == 2 or
  46.         twtFooterLowerSectionBackgroundImageShow == 2 or
  47.         twtFooterBottomBackgroundImageShow == 2 %}
  48.     <!-- Theme styles -->
  49.     <style>{% apply spaceless %}
  50.         {# ThemeWare: Add background image #}
  51.         {% if twtBackgroundImageShow == 2 and twtBackgroundImage != "" and twtBackgroundImage != "none" %}
  52.             body{background-image:url({{ twtBackgroundImage|sw_encode_url }});}
  53.         {% endif %}
  54.         {# ThemeWare: Add header background image #}
  55.         {% if twtHeaderBackgroundImageShow == 2 and twtHeaderBackgroundImage != "" and twtHeaderBackgroundImage != "none" %}
  56.             header.header-main{background-image:url({{ twtHeaderBackgroundImage|sw_encode_url }});}
  57.         {% endif %}
  58.         {# ThemeWare: Add footer background image #}
  59.         {% if twtFooterBackgroundImageShow == 2 and twtFooterBackgroundImage != "" and twtFooterBackgroundImage != "none" %}
  60.             footer.footer-main{background-image:url({{ twtFooterBackgroundImage|sw_encode_url }});}
  61.         {% endif %}
  62.         {# ThemeWare: Add background image to footer upper section #}
  63.         {% if twtFooterUpperSectionBackgroundImageShow == 2 and twtFooterUpperSectionBackgroundImage != "" and twtFooterUpperSectionBackgroundImage != "none" %}
  64.             #footerColumnsTop{background-image:url({{ twtFooterUpperSectionBackgroundImage|sw_encode_url }});}
  65.         {% endif %}
  66.         {# ThemeWare: Add background image to footer main section #}
  67.         {% if twtFooterMainSectionBackgroundImageShow == 2 and twtFooterMainSectionBackgroundImage != "" and twtFooterMainSectionBackgroundImage != "none" %}
  68.             #footerColumns{background-image:url({{ twtFooterMainSectionBackgroundImage|sw_encode_url }});}
  69.         {% endif %}
  70.         {# ThemeWare: Add background image to footer lower section #}
  71.         {% if twtFooterLowerSectionBackgroundImageShow == 2 and twtFooterLowerSectionBackgroundImage != "" and twtFooterLowerSectionBackgroundImage != "none" %}
  72.             #footerColumnsBottom{background-image:url({{ twtFooterLowerSectionBackgroundImage|sw_encode_url }});}
  73.         {% endif %}
  74.         {# ThemeWare: Add background image to footer bottom #}
  75.         {% if twtFooterBottomBackgroundImageShow == 2 and twtFooterBottomBackgroundImage != "" and twtFooterBottomBackgroundImage != "none" %}
  76.             footer.footer-main .footer-bottom{background-image:url({{ twtFooterBottomBackgroundImage|sw_encode_url }});}
  77.         {% endif %}
  78.     {% endapply %}</style>
  79.     {% endif %}
  80.     {# ThemeWare: CSS-Code per Textbaustein ergänzen. (v1)   @deprecated #}
  81.     {% set twtSnippetCssCode = "twt.custom.css"|trans|raw %}
  82.     {% if twtCustomCss == 2 and twtSnippetCssCode is not empty and twtExpertMode == 2 %}
  83.     <!-- Custom css code (old) -->
  84.     <style>{% apply spaceless %}
  85.         {{ twtSnippetCssCode }}
  86.     {% endapply %}</style>
  87.     {% endif %}
  88.     {# ThemeWare: CSS-Code per Theme-Konfiguration ergänzen. (v2) #}
  89.     {% if twtCustomCssCode and twtCustomCssCode is not empty and twtExpertMode == 2 %}
  90.     <!-- Custom css code -->
  91.     <style>{% apply spaceless %}
  92.         {{ twtCustomCssCode|raw }}
  93.     {% endapply %}</style>
  94.     {% endif %}
  95. {% endblock %}