var/cache/dev/twig/70/705e566e2c1fac881c76a988dbff2bc6.php line 50

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\MacroNamespace;
  8. use Twig\Markup;
  9. use Twig\Sandbox\SecurityError;
  10. use Twig\Sandbox\SecurityNotAllowedTagError;
  11. use Twig\Sandbox\SecurityNotAllowedFilterError;
  12. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  13. use Twig\Sandbox\SecurityNotAllowedTestError;
  14. use Twig\Source;
  15. use Twig\Template;
  16. use Twig\TemplateWrapper;
  17. /* page/category/list.html.twig */
  18. class __TwigTemplate_5d2d38c0580d109cd8ece6881ca3cdd7 extends Template
  19. {
  20. private Source $source;
  21. /**
  22. * @var array<string, MacroNamespace>
  23. */
  24. private array $macros = [];
  25. private \Twig\Runtime\EscaperRuntime $escaper;
  26. public function __construct(Environment $env)
  27. {
  28. parent::__construct($env);
  29. $this->source = $this->getSourceContext();
  30. $this->escaper = $env->getRuntime('Twig\Runtime\EscaperRuntime');
  31. $this->blocks = [
  32. 'page_title' => [$this, 'block_page_title'],
  33. 'head_custom_stylesheets' => [$this, 'block_head_custom_stylesheets'],
  34. 'content' => [$this, 'block_content'],
  35. ];
  36. }
  37. protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  38. {
  39. // line 1
  40. return $this->parent ??= $this->load("base.html.twig", 1);
  41. }
  42. protected function doDisplay(array $context, array $blocks = []): iterable
  43. {
  44. $macros = $this->macros;
  45. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  46. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "page/category/list.html.twig"));
  47. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  48. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "page/category/list.html.twig"));
  49. $this->parent = $this->load("base.html.twig", 1);
  50. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  51. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  52. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  53. }
  54. // line 3
  55. /**
  56. * @return iterable<null|scalar|\Stringable>
  57. */
  58. public function block_page_title(array $context, array $blocks = []): iterable
  59. {
  60. $macros = $this->macros;
  61. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  62. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_title"));
  63. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  64. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_title"));
  65. // line 4
  66. yield " ";
  67. yield (string) $this->escaper->escape(Twig\Extension\CoreExtension::striptags($this->env->getRuntime('App\Twig\TextResolverRuntime')->resolve("storefront.title")), "html", null, true);
  68. yield " | Kategorien
  69. ";
  70. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  71. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  72. return; yield;
  73. }
  74. // line 7
  75. /**
  76. * @return iterable<null|scalar|\Stringable>
  77. */
  78. public function block_head_custom_stylesheets(array $context, array $blocks = []): iterable
  79. {
  80. $macros = $this->macros;
  81. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  82. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "head_custom_stylesheets"));
  83. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  84. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "head_custom_stylesheets"));
  85. // line 8
  86. yield " ";
  87. yield (string) $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackLinkTags("hero-header");
  88. yield "
  89. ";
  90. // line 9
  91. yield (string) $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackLinkTags("category");
  92. yield "
  93. ";
  94. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  95. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  96. return; yield;
  97. }
  98. // line 12
  99. /**
  100. * @return iterable<null|scalar|\Stringable>
  101. */
  102. public function block_content(array $context, array $blocks = []): iterable
  103. {
  104. $macros = $this->macros;
  105. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  106. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  107. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  108. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  109. // line 13
  110. yield " <div class=\"container-3xl my-5 mt-sm-6 mb-sm-4\">
  111. <div class=\"row\">
  112. <div class=\"col-12\">
  113. <h1 class=\"ornament-with-child\">";
  114. // line 16
  115. yield (string) $this->env->getRuntime('App\Twig\TextResolverRuntime')->resolve("category.page.headline");
  116. yield "</h1>
  117. ";
  118. // line 17
  119. yield (string) $this->env->getRuntime('App\Twig\TextResolverRuntime')->resolve("category.page.description");
  120. yield "
  121. </div>
  122. </div>
  123. </div>
  124. <div class=\"container-3xl mb-6\">
  125. ";
  126. // line 23
  127. $context['_parent'] = $context;
  128. $context['_seq'] = CoreExtension::ensureTraversable(Twig\Extension\CoreExtension::batch(CoreExtension::getAttribute($this->env, $this->source, (isset($context["tenant"]) || array_key_exists("tenant", $context) ? $context["tenant"] : (function () { throw new RuntimeError('Variable "tenant" does not exist.', 23, $this->source); })()), "categories", [], "any", false, false, false, 23), 4));
  129. foreach ($context['_seq'] as $context["_key"] => $context["category_batch"]) {
  130. // line 24
  131. yield " <div class=\"row nth-group\">
  132. ";
  133. // line 25
  134. $context['_parent'] = $context;
  135. $context['_seq'] = CoreExtension::ensureTraversable($context["category_batch"]);
  136. foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
  137. // line 26
  138. yield " <div class=\"col-12 col-md-6 nth-group-item\">
  139. <div class=\"mb-4 nth-group-item-background position-relative d-flex flex-column justify-content-between overflow-hidden p-5 min-h-24\">
  140. ";
  141. // line 28
  142. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["category"], "listImage", [], "any", false, false, false, 28)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  143. // line 29
  144. yield " <img class=\"d-none d-md-block position-absolute end--2 product-image\" src=\"/images/";
  145. yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["category"], "listImage", [], "any", false, false, false, 29), "html", null, true);
  146. yield "\" alt=\"";
  147. yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["category"], "name", [], "any", false, false, false, 29), "html", null, true);
  148. yield "\" class=\"img-fluid\">
  149. ";
  150. } else {
  151. // line 31
  152. yield " <img width=\"64\" class=\"d-none d-md-block position-absolute opacity-25 end--2 product-image\" src=\"";
  153. yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/icons/box.svg"), "html", null, true);
  154. yield "\" alt=\"";
  155. yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["category"], "name", [], "any", false, false, false, 31), "html", null, true);
  156. yield "\" class=\"img-fluid\">
  157. ";
  158. }
  159. // line 33
  160. yield " <div class=\"row\">
  161. <div class=\"col-12 col-sm-8\">
  162. <h4 class=\"mb-4\">";
  163. // line 35
  164. yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["category"], "name", [], "any", false, false, false, 35), "html", null, true);
  165. yield "</h4>
  166. <p class=\"text-break line-clamp clamp-4\">";
  167. // line 36
  168. yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["category"], "description", [], "any", false, false, false, 36), "html", null, true);
  169. yield "</p>
  170. ";
  171. // line 37
  172. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["category"], "listImage", [], "any", false, false, false, 37)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  173. // line 38
  174. yield " <img class=\"d-md-none mx-auto w-75 mb-4 mb-sm-0\" src=\"/images/";
  175. yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["category"], "listImage", [], "any", false, false, false, 38), "html", null, true);
  176. yield "\" alt=\"";
  177. yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["category"], "name", [], "any", false, false, false, 38), "html", null, true);
  178. yield "\" class=\"img-fluid\">
  179. ";
  180. } else {
  181. // line 40
  182. yield " <img width=\"64\" class=\"d-md-none mx-auto w-75 mb-4 mb-sm-0 opacity-25\" src=\"";
  183. yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/icons/box.svg"), "html", null, true);
  184. yield "\" alt=\"";
  185. yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["category"], "name", [], "any", false, false, false, 40), "html", null, true);
  186. yield "\" class=\"img-fluid\">
  187. ";
  188. }
  189. // line 42
  190. yield " </div>
  191. </div>
  192. <a href=\"";
  193. // line 44
  194. yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("products", ["categoryId" => CoreExtension::getAttribute($this->env, $this->source, $context["category"], "id", [], "any", false, false, false, 44)]), "html", null, true);
  195. yield "\" class=\"d-flex justify-content-end align-items-center text-decoration-none fw-bold\"><span class=\"me-2\">Zur Produktübersicht</span><i class=\"fas fa-arrow-right\"></i></a>
  196. </div>
  197. </div>
  198. ";
  199. }
  200. $_parent = $context['_parent'];
  201. unset($context['_seq'], $context['_key'], $context['category'], $context['_parent']);
  202. $context = array_intersect_key($context, $_parent);
  203. $context += $_parent;
  204. // line 48
  205. yield " </div>
  206. ";
  207. }
  208. $_parent = $context['_parent'];
  209. unset($context['_seq'], $context['_key'], $context['category_batch'], $context['_parent']);
  210. $context = array_intersect_key($context, $_parent);
  211. $context += $_parent;
  212. // line 50
  213. yield " </div>
  214. ";
  215. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  216. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  217. return; yield;
  218. }
  219. /**
  220. * @codeCoverageIgnore
  221. */
  222. public function getTemplateName(): string
  223. {
  224. return "page/category/list.html.twig";
  225. }
  226. /**
  227. * @codeCoverageIgnore
  228. */
  229. public function isTraitable(): bool
  230. {
  231. return false;
  232. }
  233. /**
  234. * @codeCoverageIgnore
  235. */
  236. public function getDefaultEscapeStrategy(): string|false
  237. {
  238. return "html";
  239. }
  240. /**
  241. * @codeCoverageIgnore
  242. */
  243. public function getDebugInfo(): array
  244. {
  245. return array ( 245 => 50, 237 => 48, 226 => 44, 222 => 42, 214 => 40, 206 => 38, 204 => 37, 200 => 36, 196 => 35, 192 => 33, 184 => 31, 176 => 29, 174 => 28, 170 => 26, 166 => 25, 163 => 24, 159 => 23, 150 => 17, 146 => 16, 141 => 13, 128 => 12, 115 => 9, 110 => 8, 97 => 7, 83 => 4, 70 => 3, 47 => 1,);
  246. }
  247. public function getSourceContext(): Source
  248. {
  249. return new Source("{% extends \x27base.html.twig\x27 %}
  250. {% block page_title %}
  251. {{ \x27storefront.title\x27|resolve|striptags }} | Kategorien
  252. {% endblock %}
  253. {% block head_custom_stylesheets %}
  254. {{ encore_entry_link_tags(\x27hero-header\x27) }}
  255. {{ encore_entry_link_tags(\x27category\x27) }}
  256. {% endblock head_custom_stylesheets %}
  257. {% block content %}
  258. <div class=\"container-3xl my-5 mt-sm-6 mb-sm-4\">
  259. <div class=\"row\">
  260. <div class=\"col-12\">
  261. <h1 class=\"ornament-with-child\">{{ \x27category.page.headline\x27|resolve }}</h1>
  262. {{ \x27category.page.description\x27|resolve }}
  263. </div>
  264. </div>
  265. </div>
  266. <div class=\"container-3xl mb-6\">
  267. {% for category_batch in tenant.categories|batch(4) %}
  268. <div class=\"row nth-group\">
  269. {% for category in category_batch %}
  270. <div class=\"col-12 col-md-6 nth-group-item\">
  271. <div class=\"mb-4 nth-group-item-background position-relative d-flex flex-column justify-content-between overflow-hidden p-5 min-h-24\">
  272. {% if category.listImage %}
  273. <img class=\"d-none d-md-block position-absolute end--2 product-image\" src=\"/images/{{ category.listImage }}\" alt=\"{{ category.name }}\" class=\"img-fluid\">
  274. {% else %}
  275. <img width=\"64\" class=\"d-none d-md-block position-absolute opacity-25 end--2 product-image\" src=\"{{ asset(\x27build/images/icons/box.svg\x27) }}\" alt=\"{{ category.name }}\" class=\"img-fluid\">
  276. {% endif %}
  277. <div class=\"row\">
  278. <div class=\"col-12 col-sm-8\">
  279. <h4 class=\"mb-4\">{{ category.name }}</h4>
  280. <p class=\"text-break line-clamp clamp-4\">{{ category.description }}</p>
  281. {% if category.listImage %}
  282. <img class=\"d-md-none mx-auto w-75 mb-4 mb-sm-0\" src=\"/images/{{ category.listImage }}\" alt=\"{{ category.name }}\" class=\"img-fluid\">
  283. {% else %}
  284. <img width=\"64\" class=\"d-md-none mx-auto w-75 mb-4 mb-sm-0 opacity-25\" src=\"{{ asset(\x27build/images/icons/box.svg\x27) }}\" alt=\"{{ category.name }}\" class=\"img-fluid\">
  285. {% endif %}
  286. </div>
  287. </div>
  288. <a href=\"{{ path(\x27products\x27, {categoryId: category.id}) }}\" class=\"d-flex justify-content-end align-items-center text-decoration-none fw-bold\"><span class=\"me-2\">Zur Produktübersicht</span><i class=\"fas fa-arrow-right\"></i></a>
  289. </div>
  290. </div>
  291. {% endfor %}
  292. </div>
  293. {% endfor %}
  294. </div>
  295. {% endblock %}
  296. ", "page/category/list.html.twig", "/srv/storefront/templates/page/category/list.html.twig");
  297. }
  298. }