var/cache/dev/twig/41/41292950f2cc33e742b6cd553660d718.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/blog.html.twig */
  16. class __TwigTemplate_d6c531e450c5f62d6b920f00d36a22ba 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/blog.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/blog.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 "
  85. <section id=\"page-content\" class=\"sidebar-right\">
  86. <div class=\"container\">
  87. <div class=\"row\">
  88. <div class=\"content col-lg-9\">
  89. <div id=\"blog\" class=\"single-post\">
  90. <div class=\"post-item\">
  91. <div class=\"post-item-wrap\">
  92. <div class=\"post-image\">
  93. <a href=\"\">
  94. <img alt=\"";
  95. // line 23
  96. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["blog"]) || array_key_exists("blog", $context) ? $context["blog"] : (function () { throw new RuntimeError('Variable "blog" does not exist.', 23, $this->source); })()), "altDescription", [], "any", false, false, false, 23), "html", null, true);
  97. yield "\" ";
  98. yield $this->extensions['App\Twig\ImageRenderExtension']->generateSrc($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("images/upload/" . CoreExtension::getAttribute($this->env, $this->source, (isset($context["blog"]) || array_key_exists("blog", $context) ? $context["blog"] : (function () { throw new RuntimeError('Variable "blog" does not exist.', 23, $this->source); })()), "image", [], "any", false, false, false, 23))));
  99. yield ">
  100. </a>
  101. </div>
  102. <div class=\"post-item-description\">
  103. <h2>";
  104. // line 27
  105. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["blog"]) || array_key_exists("blog", $context) ? $context["blog"] : (function () { throw new RuntimeError('Variable "blog" does not exist.', 27, $this->source); })()), "titre", [], "any", false, false, false, 27), "html", null, true);
  106. yield "</h2>
  107. <div class=\"post-meta\">
  108. <span class=\"post-meta-date\"><i class=\"fa fa-calendar-o\"></i>";
  109. // line 29
  110. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, (isset($context["blog"]) || array_key_exists("blog", $context) ? $context["blog"] : (function () { throw new RuntimeError('Variable "blog" does not exist.', 29, $this->source); })()), "date", [], "any", false, false, false, 29), "d M Y"), "html", null, true);
  111. yield "</span>
  112. </div>
  113. <div class=\"blog-content\">
  114. <div>";
  115. // line 32
  116. yield CoreExtension::getAttribute($this->env, $this->source, (isset($context["blog"]) || array_key_exists("blog", $context) ? $context["blog"] : (function () { throw new RuntimeError('Variable "blog" does not exist.', 32, $this->source); })()), "displayContent", [], "any", false, false, false, 32);
  117. yield "</div>
  118. </div>
  119. </div>
  120. <div class=\"post-navigation\">
  121. ";
  122. // line 36
  123. if ((($tmp = !(null === (isset($context["previousBlog"]) || array_key_exists("previousBlog", $context) ? $context["previousBlog"] : (function () { throw new RuntimeError('Variable "previousBlog" does not exist.', 36, $this->source); })()))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  124. // line 37
  125. yield " <a href=\"";
  126. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("blog", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["previousBlog"]) || array_key_exists("previousBlog", $context) ? $context["previousBlog"] : (function () { throw new RuntimeError('Variable "previousBlog" does not exist.', 37, $this->source); })()), "id", [], "any", false, false, false, 37)]), "html", null, true);
  127. yield "\" class=\"post-prev\">
  128. <div class=\"post-prev-title\"><span>";
  129. // line 38
  130. yield $this->extensions['App\Twig\TransExtension']->trans("blogs.previous");
  131. yield "</span>";
  132. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["previousBlog"]) || array_key_exists("previousBlog", $context) ? $context["previousBlog"] : (function () { throw new RuntimeError('Variable "previousBlog" does not exist.', 38, $this->source); })()), "titre", [], "any", false, false, false, 38), "html", null, true);
  133. yield "</div>
  134. </a>
  135. ";
  136. }
  137. // line 41
  138. yield " <a href=\"";
  139. yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("blogs");
  140. yield "\" class=\"post-all\">
  141. <i class=\"icon-grid\"> </i>
  142. </a>
  143. ";
  144. // line 44
  145. if ((($tmp = !(null === (isset($context["nextBlog"]) || array_key_exists("nextBlog", $context) ? $context["nextBlog"] : (function () { throw new RuntimeError('Variable "nextBlog" does not exist.', 44, $this->source); })()))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  146. // line 45
  147. yield " <a href=\"";
  148. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("blog", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["nextBlog"]) || array_key_exists("nextBlog", $context) ? $context["nextBlog"] : (function () { throw new RuntimeError('Variable "nextBlog" does not exist.', 45, $this->source); })()), "id", [], "any", false, false, false, 45)]), "html", null, true);
  149. yield "\" class=\"post-next\">
  150. <div class=\"post-next-title\"><span>";
  151. // line 46
  152. yield $this->extensions['App\Twig\TransExtension']->trans("blogs.next");
  153. yield "</span>";
  154. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["nextBlog"]) || array_key_exists("nextBlog", $context) ? $context["nextBlog"] : (function () { throw new RuntimeError('Variable "nextBlog" does not exist.', 46, $this->source); })()), "titre", [], "any", false, false, false, 46), "html", null, true);
  155. yield "</div>
  156. </a>
  157. ";
  158. }
  159. // line 49
  160. yield " </div>
  161. </div>
  162. </div>
  163. </div>
  164. </div>
  165. <div class=\"sidebar sticky-sidebar col-lg-3\">
  166. <div class=\"widget\">
  167. <h2 class=\"widget-title\">";
  168. // line 61
  169. yield $this->extensions['App\Twig\TransExtension']->trans("blog.other");
  170. yield "</h2>
  171. <div class=\"post-thumbnail-list\">
  172. ";
  173. // line 63
  174. $context['_parent'] = $context;
  175. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["otherBlogs"]) || array_key_exists("otherBlogs", $context) ? $context["otherBlogs"] : (function () { throw new RuntimeError('Variable "otherBlogs" does not exist.', 63, $this->source); })()));
  176. foreach ($context['_seq'] as $context["_key"] => $context["blog"]) {
  177. // line 64
  178. yield " <div class=\"post-thumbnail-entry\">
  179. <img alt=\"";
  180. // line 65
  181. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["blog"], "altDescription", [], "any", false, false, false, 65), "html", null, true);
  182. yield "\" ";
  183. 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, 65))));
  184. yield ">
  185. <div class=\"post-thumbnail-content\">
  186. <a href=\"";
  187. // line 67
  188. 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, 67)]), "html", null, true);
  189. yield "\">";
  190. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["blog"], "titre", [], "any", false, false, false, 67), "html", null, true);
  191. yield "</a>
  192. <span class=\"post-date\"><i class=\"fa fa-calendar-o\"></i>";
  193. // line 68
  194. 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, 68), "d M Y"), "html", null, true);
  195. yield "</span>
  196. </div>
  197. </div>
  198. ";
  199. }
  200. $_parent = $context['_parent'];
  201. unset($context['_seq'], $context['_key'], $context['blog'], $context['_parent']);
  202. $context = array_intersect_key($context, $_parent) + $_parent;
  203. // line 72
  204. yield "
  205. </div>
  206. </div>
  207. </div>
  208. </div>
  209. </div>
  210. </section>
  211. ";
  212. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  213. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  214. yield from [];
  215. }
  216. // line 82
  217. /**
  218. * @return iterable<null|scalar|\Stringable>
  219. */
  220. public function block_js(array $context, array $blocks = []): iterable
  221. {
  222. $macros = $this->macros;
  223. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  224. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "js"));
  225. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  226. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "js"));
  227. // line 83
  228. yield " ";
  229. yield from $this->yieldParentBlock("js", $context, $blocks);
  230. yield "
  231. ";
  232. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  233. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  234. yield from [];
  235. }
  236. /**
  237. * @codeCoverageIgnore
  238. */
  239. public function getTemplateName(): string
  240. {
  241. return "pages/blog.html.twig";
  242. }
  243. /**
  244. * @codeCoverageIgnore
  245. */
  246. public function isTraitable(): bool
  247. {
  248. return false;
  249. }
  250. /**
  251. * @codeCoverageIgnore
  252. */
  253. public function getDebugInfo(): array
  254. {
  255. return array ( 269 => 83, 256 => 82, 237 => 72, 227 => 68, 221 => 67, 214 => 65, 211 => 64, 207 => 63, 202 => 61, 188 => 49, 180 => 46, 175 => 45, 173 => 44, 166 => 41, 158 => 38, 153 => 37, 151 => 36, 144 => 32, 138 => 29, 133 => 27, 124 => 23, 109 => 10, 96 => 9, 78 => 3, 65 => 2, 42 => 1,);
  256. }
  257. public function getSourceContext(): Source
  258. {
  259. return new Source("{% extends 'base.html.twig' %}
  260. {% block css %}
  261. {{ parent() }}
  262. <style>
  263. </style>
  264. {% endblock %}
  265. {% block content %}
  266. <section id=\"page-content\" class=\"sidebar-right\">
  267. <div class=\"container\">
  268. <div class=\"row\">
  269. <div class=\"content col-lg-9\">
  270. <div id=\"blog\" class=\"single-post\">
  271. <div class=\"post-item\">
  272. <div class=\"post-item-wrap\">
  273. <div class=\"post-image\">
  274. <a href=\"\">
  275. <img alt=\"{{ blog.altDescription }}\" {{ responsive_src(asset('images/upload/' ~ blog.image)) | raw }}>
  276. </a>
  277. </div>
  278. <div class=\"post-item-description\">
  279. <h2>{{ blog.titre }}</h2>
  280. <div class=\"post-meta\">
  281. <span class=\"post-meta-date\"><i class=\"fa fa-calendar-o\"></i>{{ blog.date | date('d M Y') }}</span>
  282. </div>
  283. <div class=\"blog-content\">
  284. <div>{{ blog.displayContent | raw }}</div>
  285. </div>
  286. </div>
  287. <div class=\"post-navigation\">
  288. {% if previousBlog is not null %}
  289. <a href=\"{{ path('blog',{'id' : previousBlog.id}) }}\" class=\"post-prev\">
  290. <div class=\"post-prev-title\"><span>{{ 'blogs.previous' | admintrans | raw }}</span>{{ previousBlog.titre }}</div>
  291. </a>
  292. {% endif %}
  293. <a href=\"{{ path('blogs') }}\" class=\"post-all\">
  294. <i class=\"icon-grid\"> </i>
  295. </a>
  296. {% if nextBlog is not null %}
  297. <a href=\"{{ path('blog',{'id' : nextBlog.id}) }}\" class=\"post-next\">
  298. <div class=\"post-next-title\"><span>{{ 'blogs.next' | admintrans | raw }}</span>{{ nextBlog.titre }}</div>
  299. </a>
  300. {% endif %}
  301. </div>
  302. </div>
  303. </div>
  304. </div>
  305. </div>
  306. <div class=\"sidebar sticky-sidebar col-lg-3\">
  307. <div class=\"widget\">
  308. <h2 class=\"widget-title\">{{ 'blog.other' | admintrans | raw }}</h2>
  309. <div class=\"post-thumbnail-list\">
  310. {% for blog in otherBlogs %}
  311. <div class=\"post-thumbnail-entry\">
  312. <img alt=\"{{ blog.altDescription }}\" {{ responsive_src(asset('images/upload/' ~ blog.image)) | raw }}>
  313. <div class=\"post-thumbnail-content\">
  314. <a href=\"{{ path('blog',{'id' : blog.id}) }}\">{{ blog.titre }}</a>
  315. <span class=\"post-date\"><i class=\"fa fa-calendar-o\"></i>{{ blog.date | date('d M Y') }}</span>
  316. </div>
  317. </div>
  318. {% endfor %}
  319. </div>
  320. </div>
  321. </div>
  322. </div>
  323. </div>
  324. </section>
  325. {% endblock %}
  326. {% block js %}
  327. {{ parent() }}
  328. {% endblock %}
  329. ", "pages/blog.html.twig", "/app/templates/pages/blog.html.twig");
  330. }
  331. }