You are here

image-effects-scale-and-smart-crop-summary.html.twig in Image Effects 8.2

Default theme implementation for a summary of an image scale and smart crop.

Available variables:

  • data: The current configuration for this scale and smart crop effect, including:

    • width: The width of the crop, in pixels or percentage.
    • height: The height of the crop, in pixels or percentage.
  • effect: The effect information, including:
    • id: The effect identifier.
    • label: The effect name.
    • description: The effect description.

File

templates/image-effects-scale-and-smart-crop-summary.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for a summary of an image scale and smart crop.
  5. *
  6. * Available variables:
  7. * - data: The current configuration for this scale and smart crop effect,
  8. * including:
  9. * - width: The width of the crop, in pixels or percentage.
  10. * - height: The height of the crop, in pixels or percentage.
  11. * - effect: The effect information, including:
  12. * - id: The effect identifier.
  13. * - label: The effect name.
  14. * - description: The effect description.
  15. *
  16. * @ingroup themeable
  17. */
  18. #}
  19. {% if data.width and data.height -%}
  20. {{ data.width }}×{{ data.height }}
  21. {%- else -%}
  22. {% if data.width %}
  23. {% trans %}
  24. width {{ data.width }}
  25. {% endtrans %}
  26. {% elseif data.height %}
  27. {% trans %}
  28. height {{ data.height }}
  29. {% endtrans %}
  30. {% endif %}
  31. {%- endif %}