templates/bundles/ProviderBundle/partials/head/styles.html.twig line 1

Open in your IDE?
  1. {% apply spaceless %}
  2.     {# main CSS#}
  3.     {% do pimcore_head_link({
  4.         "rel":"preload",
  5.         "href":preload(asset('static/css/main.min.css')),
  6.         "extras":{
  7.             "type":"text/css",
  8.             "crossorigin": "anonymous",
  9.             "as":"style"
  10.         }
  11.     }) %}
  12.     {% do pimcore_head_link().appendStylesheet(asset('static/css/main.min.css'), 'print', false, {
  13.         'onload': "this.media='all'; this.onload=null;"
  14.     }) %}
  15.     {# editmode CSS #}
  16.     {% if editmode %}
  17.         {% do pimcore_head_link().appendStylesheet(asset('static/css/editmode.min.css')) %}
  18.     {% endif %}
  19.     {% set inlineCss = conecto_file_get_contents('static/css/critical/index.css') %}
  20.     {% if isFrontpage %}
  21.         {% set inlineCss = conecto_file_get_contents('static/css/critical/index.css') %}
  22.     {% else %}
  23.         {% set inlineCss = conecto_file_get_contents('static/css/critical/all-elements.css') %}
  24.     {% endif %}
  25.     {% if inlineCss|length %}
  26.         {% do pimcore_head_style().appendStyle(inlineCss) %}
  27.     {% endif %}
  28. {% endapply %}