/cache/twig/35/355fdb9dc905fc2b66131206c87536aeedf86a0e6888f87052cd93085cba9cef.php

https://gitlab.com/akbaryu/project_magang_blog_grav · PHP · 229 lines · 144 code · 7 blank · 78 comment · 17 complexity · b4d704179dddcf208d34b875b6c13df7 MD5 · raw file

  1. <?php
  2. /* @nucleus/layout/container.html.twig */
  3. class __TwigTemplate_34ad7a16b2aa684dec0b04bc9fb23dc961cf203f8d6dc882cbb8f18e3fae9caa extends Twig_Template
  4. {
  5. public function __construct(Twig_Environment $env)
  6. {
  7. parent::__construct($env);
  8. $this->parent = false;
  9. $this->blocks = array(
  10. );
  11. }
  12. protected function doDisplay(array $context, array $blocks = array())
  13. {
  14. // line 1
  15. $context["attr_id"] = (($this->getAttribute($this->getAttribute((isset($context["segment"]) ? $context["segment"] : null), "attributes", array()), "id", array())) ? ($this->getAttribute($this->getAttribute((isset($context["segment"]) ? $context["segment"] : null), "attributes", array()), "id", array())) : (("g-" . $this->getAttribute((isset($context["segment"]) ? $context["segment"] : null), "id", array()))));
  16. // line 2
  17. $context["boxed"] = $this->getAttribute($this->getAttribute((isset($context["segment"]) ? $context["segment"] : null), "attributes", array()), "boxed", array());
  18. // line 3
  19. if ( !(null === (isset($context["boxed"]) ? $context["boxed"] : null))) {
  20. // line 4
  21. echo " ";
  22. $context["boxed"] = (((trim((isset($context["boxed"]) ? $context["boxed"] : null)) == "")) ? ($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["gantry"]) ? $context["gantry"] : null), "config", array()), "page", array()), "body", array()), "layout", array()), "sections", array())) : ((isset($context["boxed"]) ? $context["boxed"] : null)));
  23. }
  24. // line 6
  25. echo "
  26. ";
  27. // line 7
  28. ob_start();
  29. // line 8
  30. echo " ";
  31. $context['_parent'] = $context;
  32. $context['_seq'] = twig_ensure_traversable((isset($context["segments"]) ? $context["segments"] : null));
  33. $context['loop'] = array(
  34. 'parent' => $context['_parent'],
  35. 'index0' => 0,
  36. 'index' => 1,
  37. 'first' => true,
  38. );
  39. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) {
  40. $length = count($context['_seq']);
  41. $context['loop']['revindex0'] = $length - 1;
  42. $context['loop']['revindex'] = $length;
  43. $context['loop']['length'] = $length;
  44. $context['loop']['last'] = 1 === $length;
  45. }
  46. foreach ($context['_seq'] as $context["_key"] => $context["segment"]) {
  47. // line 9
  48. echo " ";
  49. $this->loadTemplate((("@nucleus/layout/" . $this->getAttribute($context["segment"], "type", array())) . ".html.twig"), "@nucleus/layout/container.html.twig", 9)->display(array_merge($context, array("segments" => $this->getAttribute($context["segment"], "children", array()))));
  50. // line 10
  51. echo " ";
  52. ++$context['loop']['index0'];
  53. ++$context['loop']['index'];
  54. $context['loop']['first'] = false;
  55. if (isset($context['loop']['length'])) {
  56. --$context['loop']['revindex0'];
  57. --$context['loop']['revindex'];
  58. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  59. }
  60. }
  61. $_parent = $context['_parent'];
  62. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['segment'], $context['_parent'], $context['loop']);
  63. $context = array_intersect_key($context, $_parent) + $_parent;
  64. $context["html"] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
  65. // line 12
  66. echo "
  67. ";
  68. // line 13
  69. if (($this->getAttribute($this->getAttribute((isset($context["segment"]) ? $context["segment"] : null), "attributes", array()), "sticky", array()) || trim((isset($context["html"]) ? $context["html"] : null)))) {
  70. // line 14
  71. echo " ";
  72. $context["classes"] = (($this->getAttribute($this->getAttribute((isset($context["segment"]) ? $context["segment"] : null), "attributes", array()), "class", array())) ? ((" " . twig_escape_filter($this->env, $this->getAttribute($this->getAttribute((isset($context["segment"]) ? $context["segment"] : null), "attributes", array()), "class", array())))) : (""));
  73. // line 15
  74. echo " ";
  75. $context["attr_extra"] = "";
  76. // line 16
  77. echo "
  78. ";
  79. // line 17
  80. if ($this->getAttribute($this->getAttribute((isset($context["segment"]) ? $context["segment"] : null), "attributes", array()), "extra", array())) {
  81. // line 18
  82. echo " ";
  83. $context['_parent'] = $context;
  84. $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute((isset($context["segment"]) ? $context["segment"] : null), "attributes", array()), "extra", array()));
  85. foreach ($context['_seq'] as $context["_key"] => $context["attributes"]) {
  86. // line 19
  87. echo " ";
  88. $context['_parent'] = $context;
  89. $context['_seq'] = twig_ensure_traversable($context["attributes"]);
  90. foreach ($context['_seq'] as $context["key"] => $context["value"]) {
  91. // line 20
  92. echo " ";
  93. $context["attr_extra"] = ((((((isset($context["attr_extra"]) ? $context["attr_extra"] : null) . " ") . twig_escape_filter($this->env, $context["key"])) . "=\"") . twig_escape_filter($this->env, $context["value"], "html_attr")) . "\"");
  94. // line 21
  95. echo " ";
  96. }
  97. $_parent = $context['_parent'];
  98. unset($context['_seq'], $context['_iterated'], $context['key'], $context['value'], $context['_parent'], $context['loop']);
  99. $context = array_intersect_key($context, $_parent) + $_parent;
  100. // line 22
  101. echo " ";
  102. }
  103. $_parent = $context['_parent'];
  104. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['attributes'], $context['_parent'], $context['loop']);
  105. $context = array_intersect_key($context, $_parent) + $_parent;
  106. // line 23
  107. echo " ";
  108. }
  109. // line 24
  110. echo "
  111. ";
  112. // line 25
  113. if (( !(null === (isset($context["boxed"]) ? $context["boxed"] : null)) && (((isset($context["boxed"]) ? $context["boxed"] : null) == 0) || ((isset($context["boxed"]) ? $context["boxed"] : null) == 2)))) {
  114. // line 26
  115. echo " ";
  116. ob_start();
  117. // line 27
  118. echo " <div class=\"g-container";
  119. echo ((((isset($context["boxed"]) ? $context["boxed"] : null) == 2)) ? (" g-flushed") : (""));
  120. echo "\">";
  121. echo (isset($context["html"]) ? $context["html"] : null);
  122. echo "</div>
  123. ";
  124. $context["html"] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
  125. // line 29
  126. echo " ";
  127. }
  128. // line 30
  129. echo "
  130. ";
  131. // line 31
  132. ob_start();
  133. // line 32
  134. echo " <section id=\"";
  135. echo (isset($context["attr_id"]) ? $context["attr_id"] : null);
  136. echo "\" class=\"g-wrapper";
  137. echo (isset($context["classes"]) ? $context["classes"] : null);
  138. echo "\"";
  139. echo (isset($context["attr_extra"]) ? $context["attr_extra"] : null);
  140. echo ">
  141. ";
  142. // line 33
  143. echo (isset($context["html"]) ? $context["html"] : null);
  144. echo "
  145. </section>
  146. ";
  147. $context["html"] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
  148. // line 36
  149. echo "
  150. ";
  151. // line 37
  152. if (((isset($context["boxed"]) ? $context["boxed"] : null) == 1)) {
  153. // line 38
  154. echo " <div class=\"g-container\">";
  155. echo (isset($context["html"]) ? $context["html"] : null);
  156. echo "</div>
  157. ";
  158. } else {
  159. // line 40
  160. echo " ";
  161. echo (isset($context["html"]) ? $context["html"] : null);
  162. echo "
  163. ";
  164. }
  165. }
  166. }
  167. public function getTemplateName()
  168. {
  169. return "@nucleus/layout/container.html.twig";
  170. }
  171. public function isTraitable()
  172. {
  173. return false;
  174. }
  175. public function getDebugInfo()
  176. {
  177. return array ( 164 => 40, 158 => 38, 156 => 37, 153 => 36, 147 => 33, 138 => 32, 136 => 31, 133 => 30, 130 => 29, 122 => 27, 119 => 26, 117 => 25, 114 => 24, 111 => 23, 105 => 22, 99 => 21, 96 => 20, 91 => 19, 86 => 18, 84 => 17, 81 => 16, 78 => 15, 75 => 14, 73 => 13, 70 => 12, 55 => 10, 52 => 9, 34 => 8, 32 => 7, 29 => 6, 25 => 4, 23 => 3, 21 => 2, 19 => 1,);
  178. }
  179. }
  180. /* {% set attr_id = segment.attributes.id ?: 'g-' ~ segment.id %}*/
  181. /* {% set boxed = segment.attributes.boxed %}*/
  182. /* {% if boxed is not null %}*/
  183. /* {% set boxed = boxed|trim == '' ? gantry.config.page.body.layout.sections : boxed %}*/
  184. /* {% endif %}*/
  185. /* */
  186. /* {% set html %}*/
  187. /* {% for segment in segments %}*/
  188. /* {% include '@nucleus/layout/' ~ segment.type ~ '.html.twig' with { 'segments': segment.children } %}*/
  189. /* {% endfor %}*/
  190. /* {% endset %}*/
  191. /* */
  192. /* {% if segment.attributes.sticky or html|trim %}*/
  193. /* {% set classes = segment.attributes.class ? ' ' ~ segment.attributes.class|e %}*/
  194. /* {% set attr_extra = '' %}*/
  195. /* */
  196. /* {% if segment.attributes.extra %}*/
  197. /* {% for attributes in segment.attributes.extra %}*/
  198. /* {% for key, value in attributes %}*/
  199. /* {% set attr_extra = attr_extra ~ ' ' ~ key|e ~ '="' ~ value|e('html_attr') ~ '"' %}*/
  200. /* {% endfor %}*/
  201. /* {% endfor %}*/
  202. /* {% endif %}*/
  203. /* */
  204. /* {% if boxed is not null and (boxed == 0 or boxed == 2) %}*/
  205. /* {% set html %}*/
  206. /* <div class="g-container{{ boxed == 2 ? ' g-flushed' }}">{{ html|raw }}</div>*/
  207. /* {% endset %}*/
  208. /* {% endif %}*/
  209. /* */
  210. /* {% set html %}*/
  211. /* <section id="{{ attr_id }}" class="g-wrapper{{ classes }}"{{ attr_extra|raw }}>*/
  212. /* {{ html|raw }}*/
  213. /* </section>*/
  214. /* {% endset %}*/
  215. /* */
  216. /* {% if boxed == 1 %}*/
  217. /* <div class="g-container">{{ html|raw }}</div>*/
  218. /* {% else %}*/
  219. /* {{ html|raw }}*/
  220. /* {% endif %}*/
  221. /* {% endif %}*/
  222. /* */