var/cache/dev/twig/ca/ca5c92ca1846df42588047cc43ecb9f3.php line 55

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\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* pages/blogs.html.twig */
  16. class __TwigTemplate_45b912faff08dc5158c5e6bcd19da803 extends Template
  17. {
  18. private Source $source;
  19. /**
  20. * @var array<string, Template>
  21. */
  22. private array $macros = [];
  23. public function __construct(Environment $env)
  24. {
  25. parent::__construct($env);
  26. $this->source = $this->getSourceContext();
  27. $this->blocks = [
  28. 'css' => [$this, 'block_css'],
  29. 'content' => [$this, 'block_content'],
  30. 'js' => [$this, 'block_js'],
  31. ];
  32. }
  33. protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  34. {
  35. // line 1
  36. return "base.html.twig";
  37. }
  38. protected function doDisplay(array $context, array $blocks = []): iterable
  39. {
  40. $macros = $this->macros;
  41. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  42. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "pages/blogs.html.twig"));
  43. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  44. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "pages/blogs.html.twig"));
  45. $this->parent = $this->load("base.html.twig", 1);
  46. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  47. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  48. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  49. }
  50. // line 2
  51. /**
  52. * @return iterable<null|scalar|\Stringable>
  53. */
  54. public function block_css(array $context, array $blocks = []): iterable
  55. {
  56. $macros = $this->macros;
  57. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  58. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "css"));
  59. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  60. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "css"));
  61. // line 3
  62. yield " ";
  63. yield from $this->yieldParentBlock("css", $context, $blocks);
  64. yield "
  65. <style>
  66. </style>
  67. ";
  68. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  69. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  70. yield from [];
  71. }
  72. // line 9
  73. /**
  74. * @return iterable<null|scalar|\Stringable>
  75. */
  76. public function block_content(array $context, array $blocks = []): iterable
  77. {
  78. $macros = $this->macros;
  79. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  80. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  81. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  82. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  83. // line 10
  84. yield " <section id=\"page-title\" class=\"text-light\" ";
  85. yield $this->extensions['App\Twig\ImageRenderExtension']->generateBackground($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("websiteImage/blog.jpg"), "background-size: cover; background-position: center center;", true);
  86. yield ">
  87. <div class=\"bg-overlay\"></div>
  88. <div class=\"container\">
  89. <div class=\"page-title\">
  90. <h1>";
  91. // line 14
  92. yield $this->extensions['App\Twig\TransExtension']->trans("blogs.title");
  93. yield "</h1>
  94. ";
  95. // line 15
  96. if (((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["generalS"]) || array_key_exists("generalS", $context) ? $context["generalS"] : (function () { throw new RuntimeError('Variable "generalS" does not exist.', 15, $this->source); })()), "imageAccueil", [], "any", false, false, false, 15), "texteBlogs", [], "any", false, false, false, 15) != null) || (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["generalS"]) || array_key_exists("generalS", $context) ? $context["generalS"] : (function () { throw new RuntimeError('Variable "generalS" does not exist.', 15, $this->source); })()), "imageAccueil", [], "any", false, false, false, 15), "texteBlogs", [], "any", false, false, false, 15) != ""))) {
  97. yield "<p class=\"slider-text\"> ";
  98. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["generalS"]) || array_key_exists("generalS", $context) ? $context["generalS"] : (function () { throw new RuntimeError('Variable "generalS" does not exist.', 15, $this->source); })()), "imageAccueil", [], "any", false, false, false, 15), "texteBlogs", [], "any", false, false, false, 15), "html", null, true);
  99. yield "</p>";
  100. }
  101. // line 16
  102. yield "
  103. </div>
  104. </div>
  105. </section>
  106. <section id=\"page-content\">
  107. <div class=\"container\">
  108. <div id=\"blog\" class=\"grid-layout post-3-columns m-b-30\" data-item=\"post-item\">
  109. ";
  110. // line 26
  111. $context['_parent'] = $context;
  112. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["blogs"]) || array_key_exists("blogs", $context) ? $context["blogs"] : (function () { throw new RuntimeError('Variable "blogs" does not exist.', 26, $this->source); })()));
  113. foreach ($context['_seq'] as $context["_key"] => $context["blog"]) {
  114. // line 27
  115. yield " <div class=\"post-item border\">
  116. <div class=\"post-item-wrap\">
  117. <div class=\"post-image\"> <a href=\"";
  118. // line 29
  119. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("blog", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["blog"], "id", [], "any", false, false, false, 29)]), "html", null, true);
  120. yield "\"> <img alt=\"";
  121. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["blog"], "altDescription", [], "any", false, false, false, 29), "html", null, true);
  122. yield "\" ";
  123. yield $this->extensions['App\Twig\ImageRenderExtension']->generateSrc($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("images/upload/" . CoreExtension::getAttribute($this->env, $this->source, $context["blog"], "image", [], "any", false, false, false, 29))));
  124. yield "> </a></div>
  125. <div class=\"post-item-description\"> <span class=\"post-meta-date\"><i class=\"fa fa-calendar-o\"></i>";
  126. // line 30
  127. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["blog"], "date", [], "any", false, false, false, 30), "d M Y"), "html", null, true);
  128. yield "</span>
  129. <h2><a href=\"";
  130. // line 31
  131. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("blog", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["blog"], "id", [], "any", false, false, false, 31)]), "html", null, true);
  132. yield "\">";
  133. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["blog"], "titre", [], "any", false, false, false, 31), "html", null, true);
  134. yield "</a></h2>
  135. <div> ";
  136. // line 32
  137. yield CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Twig\Extra\String\StringExtension']->createUnicodeString(Twig\Extension\CoreExtension::striptags(CoreExtension::getAttribute($this->env, $this->source, $context["blog"], "displayContent", [], "any", false, false, false, 32), "<strong><u><br><li><ul>")), "truncate", [200, "...", false], "method", false, false, false, 32);
  138. yield " </div>
  139. <a href=\"";
  140. // line 33
  141. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("blog", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["blog"], "id", [], "any", false, false, false, 33)]), "html", null, true);
  142. yield "\" class=\"item-link\">";
  143. yield $this->extensions['App\Twig\TransExtension']->trans("blogs.read_more");
  144. yield " <i class=\"icon-chevron-right\"></i></a>
  145. </div>
  146. </div>
  147. </div>
  148. ";
  149. }
  150. $_parent = $context['_parent'];
  151. unset($context['_seq'], $context['_key'], $context['blog'], $context['_parent']);
  152. $context = array_intersect_key($context, $_parent) + $_parent;
  153. // line 38
  154. yield "
  155. </div>
  156. </div>
  157. </section>
  158. ";
  159. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  160. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  161. yield from [];
  162. }
  163. // line 50
  164. /**
  165. * @return iterable<null|scalar|\Stringable>
  166. */
  167. public function block_js(array $context, array $blocks = []): iterable
  168. {
  169. $macros = $this->macros;
  170. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  171. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "js"));
  172. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  173. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "js"));
  174. // line 51
  175. yield " ";
  176. yield from $this->yieldParentBlock("js", $context, $blocks);
  177. yield "
  178. ";
  179. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  180. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  181. yield from [];
  182. }
  183. /**
  184. * @codeCoverageIgnore
  185. */
  186. public function getTemplateName(): string
  187. {
  188. return "pages/blogs.html.twig";
  189. }
  190. /**
  191. * @codeCoverageIgnore
  192. */
  193. public function isTraitable(): bool
  194. {
  195. return false;
  196. }
  197. /**
  198. * @codeCoverageIgnore
  199. */
  200. public function getDebugInfo(): array
  201. {
  202. return array ( 216 => 51, 203 => 50, 182 => 38, 169 => 33, 165 => 32, 159 => 31, 155 => 30, 147 => 29, 143 => 27, 139 => 26, 127 => 16, 121 => 15, 117 => 14, 109 => 10, 96 => 9, 78 => 3, 65 => 2, 42 => 1,);
  203. }
  204. public function getSourceContext(): Source
  205. {
  206. return new Source("{% extends 'base.html.twig' %}
  207. {% block css %}
  208. {{ parent() }}
  209. <style>
  210. </style>
  211. {% endblock %}
  212. {% block content %}
  213. <section id=\"page-title\" class=\"text-light\" {{ responsive_background( asset('websiteImage/blog.jpg'),\"background-size: cover; background-position: center center;\",true ) | raw }}>
  214. <div class=\"bg-overlay\"></div>
  215. <div class=\"container\">
  216. <div class=\"page-title\">
  217. <h1>{{ 'blogs.title' | admintrans | raw }}</h1>
  218. {% if generalS.imageAccueil.texteBlogs != null or generalS.imageAccueil.texteBlogs != '' %}<p class=\"slider-text\"> {{ generalS.imageAccueil.texteBlogs }}</p>{% endif %}
  219. </div>
  220. </div>
  221. </section>
  222. <section id=\"page-content\">
  223. <div class=\"container\">
  224. <div id=\"blog\" class=\"grid-layout post-3-columns m-b-30\" data-item=\"post-item\">
  225. {% for blog in blogs %}
  226. <div class=\"post-item border\">
  227. <div class=\"post-item-wrap\">
  228. <div class=\"post-image\"> <a href=\"{{ path('blog',{'id' : blog.id}) }}\"> <img alt=\"{{ blog.altDescription }}\" {{ responsive_src(asset('images/upload/' ~ blog.image)) | raw }}> </a></div>
  229. <div class=\"post-item-description\"> <span class=\"post-meta-date\"><i class=\"fa fa-calendar-o\"></i>{{ blog.date | date('d M Y') }}</span>
  230. <h2><a href=\"{{ path('blog',{'id' : blog.id}) }}\">{{ blog.titre }}</a></h2>
  231. <div> {{ blog.displayContent | striptags('<strong><u><br><li><ul>') | u.truncate( 200, '...', false) | raw }} </div>
  232. <a href=\"{{ path('blog',{'id' : blog.id}) }}\" class=\"item-link\">{{ 'blogs.read_more' | admintrans | raw }} <i class=\"icon-chevron-right\"></i></a>
  233. </div>
  234. </div>
  235. </div>
  236. {% endfor %}
  237. </div>
  238. </div>
  239. </section>
  240. {% endblock %}
  241. {% block js %}
  242. {{ parent() }}
  243. {% endblock %}
  244. ", "pages/blogs.html.twig", "/app/templates/pages/blogs.html.twig");
  245. }
  246. }