var/cache/dev/twig/37/376b61984be3d69e29f6b29314a14e857849e02eb8b2d4057820428b0f20990e.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\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. /* includes/cards/default.html.twig */
  16. class __TwigTemplate_f6d76317629e4a9b7d0d4503a0f510ab17c079d8de455ceb71d0202ff54aef45 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->parent false;
  28.         $this->blocks = [
  29.         ];
  30.         $this->sandbox $this->extensions[SandboxExtension::class];
  31.         $this->checkSecurity();
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = []): iterable
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""includes/cards/default.html.twig"));
  38.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""includes/cards/default.html.twig"));
  40.         // line 1
  41.         $context["page"] = CoreExtension::getAttribute($this->env$this->source, (isset($context["project"]) || array_key_exists("project"$context) ? $context["project"] : (function () { throw new RuntimeError('Variable "project" does not exist.'1$this->source); })()), "page", [], "method"falsefalsetrue1);
  42.         // line 2
  43.         $context["mod"] = 1;
  44.         // line 3
  45.         $context["sector"] = Twig\Extension\CoreExtension::first($this->env->getCharset(), $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env$this->source, (isset($context["project"]) || array_key_exists("project"$context) ? $context["project"] : (function () { throw new RuntimeError('Variable "project" does not exist.'3$this->source); })()), "sectors", [], "any"falsefalsetrue3), 3$this->source));
  46.         // line 4
  47.         $context["image"] = CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["project"]) || array_key_exists("project"$context) ? $context["project"] : (function () { throw new RuntimeError('Variable "project" does not exist.'4$this->source); })()), "visuals", [], "any"falsefalsetrue4), "current", [], "method"falsefalsetrue4);
  48.         // line 5
  49.         yield "
  50. ";
  51.         // line 6
  52.         if ((array_key_exists("labelOverride"$context) &&  !Twig\Extension\CoreExtension::testEmpty((isset($context["labelOverride"]) || array_key_exists("labelOverride"$context) ? $context["labelOverride"] : (function () { throw new RuntimeError('Variable "labelOverride" does not exist.'6$this->source); })())))) {
  53.             // line 7
  54.             yield "    ";
  55.             $context["customLabel"] = (isset($context["labelOverride"]) || array_key_exists("labelOverride"$context) ? $context["labelOverride"] : (function () { throw new RuntimeError('Variable "labelOverride" does not exist.'7$this->source); })());
  56.         } else {
  57.             // line 9
  58.             yield "    ";
  59.             $context["customLabel"] = null;
  60.         }
  61.         // line 11
  62.         yield "
  63. <div
  64.     class=\"block col-span-12 transition duration-300 bg-white hover:text-blue relative rounded overflow-hidden ";
  65.         // line 13
  66.         yield ($context["class"] ?? "");
  67.         yield "\">
  68.     <a
  69.         href=\"";
  70.         // line 15
  71.         yield (((isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'15$this->source); })())) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\UrlExtension']->trimUrl($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'15$this->source); })()), "url", [], "any"falsefalsetrue15), 15$this->source)), "html"nulltrue)) : (""));
  72.         yield "\"
  73.         class=\"relative\"
  74.     >
  75.         ";
  76.         // line 18
  77.         if ((isset($context["image"]) || array_key_exists("image"$context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.'18$this->source); })())) {
  78.             // line 19
  79.             yield "            ";
  80.             yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["image"]) || array_key_exists("image"$context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.'19$this->source); })()), "getThumbnail", ["project-card"], "method"falsefalsetrue19), "html", [["pictureAttributes" => ["class" => "block overflow-hidden"], "imgAttributes" => ["class" => "w-full"]]], "method"falsefalsetrue19), 19$this->source);
  81.             // line 22
  82.             yield "
  83.         ";
  84.         }
  85.         // line 24
  86.         yield "
  87.         ";
  88.         // line 25
  89.         if ( !Twig\Extension\CoreExtension::testEmpty((isset($context["customLabel"]) || array_key_exists("customLabel"$context) ? $context["customLabel"] : (function () { throw new RuntimeError('Variable "customLabel" does not exist.'25$this->source); })()))) {
  90.             // line 26
  91.             yield "            ";
  92.             yield from $this->loadTemplate("includes/cards/partials/label.html.twig""includes/cards/default.html.twig"26)->unwrap()->yield(CoreExtension::merge($context, ["label" =>             // line 27
  93. (isset($context["customLabel"]) || array_key_exists("customLabel"$context) ? $context["customLabel"] : (function () { throw new RuntimeError('Variable "customLabel" does not exist.'27$this->source); })()), "position" => "absolute top-6 right-6"]));
  94.             // line 30
  95.             yield "        ";
  96.         } elseif ((array_key_exists("sector"$context) && (isset($context["sector"]) || array_key_exists("sector"$context) ? $context["sector"] : (function () { throw new RuntimeError('Variable "sector" does not exist.'30$this->source); })()))) {
  97.             // line 31
  98.             yield "            ";
  99.             $context["icon"] = CoreExtension::getAttribute($this->env$this->source, (isset($context["sector"]) || array_key_exists("sector"$context) ? $context["sector"] : (function () { throw new RuntimeError('Variable "sector" does not exist.'31$this->source); })()), "icon", [], "any"falsefalsetrue31);
  100.             // line 32
  101.             yield "
  102.             ";
  103.             // line 33
  104.             yield from $this->loadTemplate("includes/cards/partials/label.html.twig""includes/cards/default.html.twig"33)->unwrap()->yield(CoreExtension::merge($context, ["label" => CoreExtension::getAttribute($this->env$this->source,             // line 34
  105. (isset($context["sector"]) || array_key_exists("sector"$context) ? $context["sector"] : (function () { throw new RuntimeError('Variable "sector" does not exist.'34$this->source); })()), "branchename", [], "any"falsefalsetrue34), "labelIcon" =>             // line 35
  106. (isset($context["icon"]) || array_key_exists("icon"$context) ? $context["icon"] : (function () { throw new RuntimeError('Variable "icon" does not exist.'35$this->source); })()), "position" => "absolute top-6 right-6"]));
  107.             // line 38
  108.             yield "        ";
  109.         }
  110.         // line 39
  111.         yield "
  112.     </a>
  113.     <div class=\"p-6\">
  114.         <a href=\"";
  115.         // line 42
  116.         yield (((isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'42$this->source); })())) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\UrlExtension']->trimUrl($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'42$this->source); })()), "url", [], "any"falsefalsetrue42), 42$this->source)), "html"nulltrue)) : (""));
  117.         yield "\">
  118.             <h3 class=\"text-xl\">
  119.                 ";
  120.         // line 44
  121.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env$this->source, (isset($context["project"]) || array_key_exists("project"$context) ? $context["project"] : (function () { throw new RuntimeError('Variable "project" does not exist.'44$this->source); })()), "title", [], "any"falsefalsetrue44), 44$this->source), "html"nulltrue);
  122.         yield "
  123.             </h3>
  124.             <p class=\"mb-3\">
  125.                 ";
  126.         // line 47
  127.         yield ((CoreExtension::getAttribute($this->env$this->source, (isset($context["project"]) || array_key_exists("project"$context) ? $context["project"] : (function () { throw new RuntimeError('Variable "project" does not exist.'47$this->source); })()), "meta_description", [], "any"falsefalsetrue47)) ? (CoreExtension::getAttribute($this->env$this->source, (isset($context["project"]) || array_key_exists("project"$context) ? $context["project"] : (function () { throw new RuntimeError('Variable "project" does not exist.'47$this->source); })()), "meta_description", [], "any"falsefalsetrue47)) : ((Twig\Extension\CoreExtension::slice($this->env->getCharset(), Twig\Extension\CoreExtension::striptags($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env$this->source, (isset($context["project"]) || array_key_exists("project"$context) ? $context["project"] : (function () { throw new RuntimeError('Variable "project" does not exist.'47$this->source); })()), "webdesq_content", [], "any"falsefalsetrue47), 47$this->source)), 044) . "...")));
  128.         yield "
  129.             </p>
  130.             <div class=\"flex justify-end pt-8\">
  131.                 <span
  132.                     class=\" absolute right-6 bottom-6 flex items-center justify-center w-8 h-8 ml-3 transition-all bg-white rounded-full text-blue border-2 border-blue group-hover:bg-blue group-hover:text-white\">
  133.                     <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"14\"
  134.                          height=\"10\" viewBox=\"0 0 15.5857104 11.2450309\" version=\"1.1\">
  135.                         <g stroke=\"none\" stroke-width=\"1\" fill=\"none\"
  136.                            fill-rule=\"evenodd\">
  137.                             <g transform=\"translate(-895.000000, -698.366712)\"
  138.                                fill=\"#0072BB\">
  139.                                 <g id=\"img+text\" transform=\"translate(0.000000, 174.000000)\">
  140.                                     <g id=\"Group-13\" transform=\"translate(316.000000, 80.000000)\">
  141.                                         <g id=\"Group-10\" transform=\"translate(0.000000, 395.000000)\">
  142.                                             <g id=\"Group-5\" transform=\"translate(562.000000, 30.000000)\">
  143.                                                 <g id=\"icons/ui/arrow-line-right\"
  144.                                                    transform=\"translate(17.000000, 19.000000)\">
  145.                                                     <path
  146.                                                         d=\"M15.1058206,5.09504853 L3.39640583,5.09504853 L3.39640583,5.09504853 L6.61428562,1.8778871 C6.96000795,1.53224195 6.96007051,0.971777868 6.61442536,0.626055538 C6.61440207,0.626032244 6.61437878,0.626008952 6.61435549,0.625985661 C6.26865793,0.280288095 5.70817143,0.280288095 5.36247386,0.625985661 C5.36245892,0.62600061 5.36244397,0.626015558 5.36242902,0.626030508 L0.70705612,5.28207051 C0.316700705,5.67268453 0.316700705,6.30577137 0.70705612,6.69638539 L5.36242902,11.3524254 C5.70810182,11.6981477 6.26858831,11.6981879 6.61431065,11.3525151 C6.6143256,11.3525001 6.61434055,11.3524852 6.61435549,11.3524702 C6.96003924,11.0067865 6.96003924,10.4463224 6.61435549,10.1006387 C6.6143322,10.1006154 6.61430891,10.1005921 6.61428562,10.1005688 L3.39640583,6.88340737 L3.39640583,6.88340737 L15.1058206,6.88340737 C15.5996622,6.88340737 16,6.48306961 16,5.98922795 C16,5.49538629 15.5996622,5.09504853 15.1058206,5.09504853 Z\"
  147.                                                         id=\"arrow-line-right\"
  148.                                                         transform=\"translate(8.000000, 5.989228) scale(-1, 1) translate(-8.000000, -5.989228) \"/>
  149.                                                 </g>
  150.                                             </g>
  151.                                         </g>
  152.                                     </g>
  153.                                 </g>
  154.                             </g>
  155.                         </g>
  156.                     </svg>
  157.                 </span>
  158.             </div>
  159.         </a>
  160.     </div>
  161. </div>";
  162.         
  163.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  164.         
  165.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  166.         yield from [];
  167.     }
  168.     /**
  169.      * @codeCoverageIgnore
  170.      */
  171.     public function getTemplateName(): string
  172.     {
  173.         return "includes/cards/default.html.twig";
  174.     }
  175.     /**
  176.      * @codeCoverageIgnore
  177.      */
  178.     public function isTraitable(): bool
  179.     {
  180.         return false;
  181.     }
  182.     /**
  183.      * @codeCoverageIgnore
  184.      */
  185.     public function getDebugInfo(): array
  186.     {
  187.         return array (  136 => 47,  130 => 44,  125 => 42,  120 => 39,  117 => 38,  115 => 35,  114 => 34,  113 => 33,  110 => 32,  107 => 31,  104 => 30,  102 => 27,  100 => 26,  98 => 25,  95 => 24,  91 => 22,  88 => 19,  86 => 18,  80 => 15,  75 => 13,  71 => 11,  67 => 9,  63 => 7,  61 => 6,  58 => 5,  56 => 4,  54 => 3,  52 => 2,  50 => 1,);
  188.     }
  189.     public function getSourceContext(): Source
  190.     {
  191.         return new Source("{% set page = project.page() %}
  192. {% set mod = 1 %}
  193. {% set sector = project.sectors | first %}
  194. {% set image = project.visuals.current() %}
  195. {% if labelOverride is defined and labelOverride is not empty %}
  196.     {% set customLabel = labelOverride %}
  197. {% else %}
  198.     {% set customLabel = null %}
  199. {% endif %}
  200. <div
  201.     class=\"block col-span-12 transition duration-300 bg-white hover:text-blue relative rounded overflow-hidden {{ class ?? '' }}\">
  202.     <a
  203.         href=\"{{ page ? (page.url | trimUrl) : '' }}\"
  204.         class=\"relative\"
  205.     >
  206.         {% if image %}
  207.             {{ image.getThumbnail('project-card').html({
  208.                 pictureAttributes: {class: 'block overflow-hidden'},
  209.                 imgAttributes: {class: 'w-full'},
  210.             })|raw }}
  211.         {% endif %}
  212.         {% if customLabel is not empty %}
  213.             {% include 'includes/cards/partials/label.html.twig' with {
  214.                 label: customLabel,
  215.                 position: 'absolute top-6 right-6'
  216.             } %}
  217.         {% elseif sector is defined and sector %}
  218.             {% set icon = sector.icon %}
  219.             {% include 'includes/cards/partials/label.html.twig' with {
  220.                 label: sector.branchename,
  221.                 labelIcon: icon,
  222.                 position: 'absolute top-6 right-6'
  223.             } %}
  224.         {% endif %}
  225.     </a>
  226.     <div class=\"p-6\">
  227.         <a href=\"{{ page ? (page.url | trimUrl) : '' }}\">
  228.             <h3 class=\"text-xl\">
  229.                 {{ project.title }}
  230.             </h3>
  231.             <p class=\"mb-3\">
  232.                 {{ (project.meta_description ?: (project.webdesq_content|striptags|slice(0, 44) ~ '...'))|raw }}
  233.             </p>
  234.             <div class=\"flex justify-end pt-8\">
  235.                 <span
  236.                     class=\" absolute right-6 bottom-6 flex items-center justify-center w-8 h-8 ml-3 transition-all bg-white rounded-full text-blue border-2 border-blue group-hover:bg-blue group-hover:text-white\">
  237.                     <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"14\"
  238.                          height=\"10\" viewBox=\"0 0 15.5857104 11.2450309\" version=\"1.1\">
  239.                         <g stroke=\"none\" stroke-width=\"1\" fill=\"none\"
  240.                            fill-rule=\"evenodd\">
  241.                             <g transform=\"translate(-895.000000, -698.366712)\"
  242.                                fill=\"#0072BB\">
  243.                                 <g id=\"img+text\" transform=\"translate(0.000000, 174.000000)\">
  244.                                     <g id=\"Group-13\" transform=\"translate(316.000000, 80.000000)\">
  245.                                         <g id=\"Group-10\" transform=\"translate(0.000000, 395.000000)\">
  246.                                             <g id=\"Group-5\" transform=\"translate(562.000000, 30.000000)\">
  247.                                                 <g id=\"icons/ui/arrow-line-right\"
  248.                                                    transform=\"translate(17.000000, 19.000000)\">
  249.                                                     <path
  250.                                                         d=\"M15.1058206,5.09504853 L3.39640583,5.09504853 L3.39640583,5.09504853 L6.61428562,1.8778871 C6.96000795,1.53224195 6.96007051,0.971777868 6.61442536,0.626055538 C6.61440207,0.626032244 6.61437878,0.626008952 6.61435549,0.625985661 C6.26865793,0.280288095 5.70817143,0.280288095 5.36247386,0.625985661 C5.36245892,0.62600061 5.36244397,0.626015558 5.36242902,0.626030508 L0.70705612,5.28207051 C0.316700705,5.67268453 0.316700705,6.30577137 0.70705612,6.69638539 L5.36242902,11.3524254 C5.70810182,11.6981477 6.26858831,11.6981879 6.61431065,11.3525151 C6.6143256,11.3525001 6.61434055,11.3524852 6.61435549,11.3524702 C6.96003924,11.0067865 6.96003924,10.4463224 6.61435549,10.1006387 C6.6143322,10.1006154 6.61430891,10.1005921 6.61428562,10.1005688 L3.39640583,6.88340737 L3.39640583,6.88340737 L15.1058206,6.88340737 C15.5996622,6.88340737 16,6.48306961 16,5.98922795 C16,5.49538629 15.5996622,5.09504853 15.1058206,5.09504853 Z\"
  251.                                                         id=\"arrow-line-right\"
  252.                                                         transform=\"translate(8.000000, 5.989228) scale(-1, 1) translate(-8.000000, -5.989228) \"/>
  253.                                                 </g>
  254.                                             </g>
  255.                                         </g>
  256.                                     </g>
  257.                                 </g>
  258.                             </g>
  259.                         </g>
  260.                     </svg>
  261.                 </span>
  262.             </div>
  263.         </a>
  264.     </div>
  265. </div>""includes/cards/default.html.twig""/home/forge/testing.coolworld.ptchr.dev/templates/includes/cards/default.html.twig");
  266.     }
  267.     
  268.     public function checkSecurity()
  269.     {
  270.         static $tags = ["set" => 1"if" => 6"include" => 26];
  271.         static $filters = ["first" => 3"escape" => 15"trimUrl" => 15"raw" => 22"slice" => 47"striptags" => 47];
  272.         static $functions = [];
  273.         try {
  274.             $this->sandbox->checkSecurity(
  275.                 ['set''if''include'],
  276.                 ['first''escape''trimUrl''raw''slice''striptags'],
  277.                 [],
  278.                 $this->source
  279.             );
  280.         } catch (SecurityError $e) {
  281.             $e->setSourceContext($this->source);
  282.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  283.                 $e->setTemplateLine($tags[$e->getTagName()]);
  284.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  285.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  286.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  287.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  288.             }
  289.             throw $e;
  290.         }
  291.     }
  292. }