templates/areas/image/view.html.twig line 1

Open in your IDE?
  1. {% extends 'areas/image/editables.html.twig' %}
  2. {% block view %}
  3.   {% if contentInclude is not defined %}
  4.     {% set brickConfig = info.getEditable().getConfig() %}
  5.     {% if brickConfig.params.colSize %}
  6.       {% set colSize = brickConfig.params.colSize %}
  7.     {% else %}
  8.       {% set colSize = '12' %}
  9.     {% endif %}
  10.     {% set imageTitleShowValue = imageTitleShow.isChecked() %}
  11.   {% endif %}
  12.   {% set thumbnailString = 'col-' ~ colSize %}
  13.   <div class="c-image c-image__size--{{imageSize}}  {{componentSpacingLeftRight}} {{componentMargin}}
  14.   {% if contentInclude is not defined and maxWidthSelect.isChecked() == true %}c-image__max-width{% endif %}
  15.   ">
  16.     {% if editmode %}
  17.       {{ image | raw }}
  18.     {% elseif image.getImage() or contentInclude is defined %}
  19.       {% if imageSize != 'icon' %}
  20.         {% set imageVars = {
  21.           'thumbnailString': thumbnailString,
  22.           'image': image,
  23.           'imageTitleShow': imageTitleShowValue,
  24.           'imageTitleInput': imageTitleInput
  25.         } %}
  26.         {% include 'utils/image.position.html.twig' with imageVars %}
  27.       {% else %}
  28.       <div class="color-{{iconColor}} background-{{iconBackground}}">
  29.         {{ convert_svg_to_code(app.request.getSchemeAndHttpHost(), image.getImage()) | raw }}
  30.       </div>
  31.       {% endif %}
  32.     {% endif %}
  33.   </div>
  34. {% endblock %}