<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* content/thumbnails.html.twig */
class __TwigTemplate_80b8c215b9de868711324b24e0ceafda extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "layouts/layout.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "content/thumbnails.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "content/thumbnails.html.twig"));
$this->parent = $this->loadTemplate("layouts/layout.html.twig", "content/thumbnails.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
public function block_content($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 4
echo "
<div id=\"main-content\" class=\"main-content\" >
";
// line 7
echo twig_include($this->env, $context, "includes/content-headline.html.twig");
echo "
";
// line 10
echo " ";
$context["image"] = ((twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "image", "image"), "getImage", [], "method", false, false, false, 10)) ? (twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "image", "image"), "getImage", [], "method", false, false, false, 10)) : (Pimcore\Model\Asset::getById(341)));
// line 11
echo "
<p>
";
// line 14
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Original Dimensions of the Image:"), "html", null, true);
echo "
";
// line 15
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["image"]) || array_key_exists("image", $context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.', 15, $this->source); })()), "width", [], "any", false, false, false, 15), "html", null, true);
echo " x ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["image"]) || array_key_exists("image", $context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.', 15, $this->source); })()), "height", [], "any", false, false, false, 15), "html", null, true);
echo "
</p>
<div class=\"mb-5\">
";
// line 19
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "image", "image", ["thumbnail" => "content", "imgAttributes" => ["class" => "img-responsive"]]);
echo "
</div>
";
// line 23
$context["thumbnails"] = ["Cover" => "exampleCover", "Contain" => "exampleContain", "Frame" => "exampleFrame", "Rotate" => "exampleRotate", "Resize" => "exampleResize", "Scale by Width" => "exampleScaleWidth", "Scale by Height" => "exampleScaleHeight", "Contain & Overlay" => "exampleOverlay", "Rounded Corners" => "exampleCorners", "Colors" => "exampleColor", "Sepia" => "exampleSepia", "Grayscale" => "exampleGrayscale", "Mask" => "exampleMask", "Combined 1" => "exampleCombined1", "Combined 2" => "exampleCombined2"];
// line 40
echo "
<section class=\"thumbnail-examples\">
";
// line 44
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["thumbnails"]) || array_key_exists("thumbnails", $context) ? $context["thumbnails"] : (function () { throw new RuntimeError('Variable "thumbnails" does not exist.', 44, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["title"] => $context["name"]) {
// line 45
echo "
";
// line 46
if (((twig_get_attribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 46) % 3) == 0)) {
// line 47
echo " <div class=\"row\">
";
}
// line 49
echo "
<div class=\"col-lg-4\">
";
// line 51
$context["thumbnail"] = twig_get_attribute($this->env, $this->source, (isset($context["image"]) || array_key_exists("image", $context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.', 51, $this->source); })()), "getThumbnail", [0 => $context["name"]], "method", false, false, false, 51);
// line 52
echo "
<div class=\"img-container\">
";
// line 54
echo twig_get_attribute($this->env, $this->source, (isset($context["thumbnail"]) || array_key_exists("thumbnail", $context) ? $context["thumbnail"] : (function () { throw new RuntimeError('Variable "thumbnail" does not exist.', 54, $this->source); })()), "getHTML", [], "method", false, false, false, 54);
echo "
</div>
<h5>";
// line 57
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($context["title"]), "html", null, true);
echo "</h5>
<div class=\"img-dimensions\">
";
// line 60
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Dimensions:"), "html", null, true);
echo "
";
// line 61
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["thumbnail"]) || array_key_exists("thumbnail", $context) ? $context["thumbnail"] : (function () { throw new RuntimeError('Variable "thumbnail" does not exist.', 61, $this->source); })()), "width", [], "any", false, false, false, 61), "html", null, true);
echo " x ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["thumbnail"]) || array_key_exists("thumbnail", $context) ? $context["thumbnail"] : (function () { throw new RuntimeError('Variable "thumbnail" does not exist.', 61, $this->source); })()), "height", [], "any", false, false, false, 61), "html", null, true);
echo "
</div>
</div>
";
// line 65
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 65) || (((twig_get_attribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 65) + 1) % 3) == 0))) {
// line 66
echo " </div>
";
}
// line 68
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['title'], $context['name'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 69
echo " </section>
</div>
";
// line 73
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "areablock", "content_bottom");
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "content/thumbnails.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 201 => 73, 195 => 69, 181 => 68, 177 => 66, 175 => 65, 166 => 61, 162 => 60, 156 => 57, 150 => 54, 146 => 52, 144 => 51, 140 => 49, 136 => 47, 134 => 46, 131 => 45, 114 => 44, 108 => 40, 106 => 23, 99 => 19, 90 => 15, 86 => 14, 81 => 11, 78 => 10, 73 => 7, 68 => 4, 58 => 3, 35 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'layouts/layout.html.twig' %}
{% block content %}
<div id=\"main-content\" class=\"main-content\" >
{{ include('includes/content-headline.html.twig') }}
{# this is just used for demonstration #}
{% set image = pimcore_image('image').getImage() ?: pimcore_asset(341) %}
<p>
{{ 'Original Dimensions of the Image:'|trans }}
{{ image.width }} x {{ image.height }}
</p>
<div class=\"mb-5\">
{{ pimcore_image('image', { thumbnail: 'content', imgAttributes: {class: 'img-responsive'}}) }}
</div>
{% set thumbnails = {
'Cover': 'exampleCover',
'Contain': 'exampleContain',
'Frame': 'exampleFrame',
'Rotate': 'exampleRotate',
'Resize': 'exampleResize',
'Scale by Width': 'exampleScaleWidth',
'Scale by Height': 'exampleScaleHeight',
'Contain & Overlay': 'exampleOverlay',
'Rounded Corners': 'exampleCorners',
'Colors': 'exampleColor',
'Sepia': 'exampleSepia',
'Grayscale': 'exampleGrayscale',
'Mask': 'exampleMask',
'Combined 1': 'exampleCombined1',
'Combined 2': 'exampleCombined2'
} %}
<section class=\"thumbnail-examples\">
{% for title, name in thumbnails %}
{% if loop.index0 % 3 == 0 %}
<div class=\"row\">
{% endif %}
<div class=\"col-lg-4\">
{% set thumbnail = image.getThumbnail(name) %}
<div class=\"img-container\">
{{ thumbnail.getHTML()|raw }}
</div>
<h5>{{ title|trans }}</h5>
<div class=\"img-dimensions\">
{{ 'Dimensions:'|trans }}
{{ thumbnail.width }} x {{ thumbnail.height }}
</div>
</div>
{% if loop.last or ((loop.index0 + 1) % 3 == 0) %}
</div>
{% endif %}
{% endfor %}
</section>
</div>
{{ pimcore_areablock('content_bottom') }}
{% endblock %}
", "content/thumbnails.html.twig", "/www/htdocs/w0189996/pimcore-demo/templates/content/thumbnails.html.twig");
}
}