<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* includes/cards/default.html.twig */
class __TwigTemplate_f6d76317629e4a9b7d0d4503a0f510ab17c079d8de455ceb71d0202ff54aef45 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
$this->sandbox = $this->extensions[SandboxExtension::class];
$this->checkSecurity();
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "includes/cards/default.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "includes/cards/default.html.twig"));
// line 1
$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", false, false, true, 1);
// line 2
$context["mod"] = 1;
// line 3
$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", false, false, true, 3), 3, $this->source));
// line 4
$context["image"] = CoreExtension::getAttribute($this->env, $this->source, 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.', 4, $this->source); })()), "visuals", [], "any", false, false, true, 4), "current", [], "method", false, false, true, 4);
// line 5
yield "
";
// line 6
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); })())))) {
// line 7
yield " ";
$context["customLabel"] = (isset($context["labelOverride"]) || array_key_exists("labelOverride", $context) ? $context["labelOverride"] : (function () { throw new RuntimeError('Variable "labelOverride" does not exist.', 7, $this->source); })());
} else {
// line 9
yield " ";
$context["customLabel"] = null;
}
// line 11
yield "
<div
class=\"block col-span-12 transition duration-300 bg-white hover:text-blue relative rounded overflow-hidden ";
// line 13
yield ($context["class"] ?? "");
yield "\">
<a
href=\"";
// line 15
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", false, false, true, 15), 15, $this->source)), "html", null, true)) : (""));
yield "\"
class=\"relative\"
>
";
// line 18
if ((isset($context["image"]) || array_key_exists("image", $context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.', 18, $this->source); })())) {
// line 19
yield " ";
yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::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", false, false, true, 19), "html", [["pictureAttributes" => ["class" => "block overflow-hidden"], "imgAttributes" => ["class" => "w-full"]]], "method", false, false, true, 19), 19, $this->source);
// line 22
yield "
";
}
// line 24
yield "
";
// line 25
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); })()))) {
// line 26
yield " ";
yield from $this->loadTemplate("includes/cards/partials/label.html.twig", "includes/cards/default.html.twig", 26)->unwrap()->yield(CoreExtension::merge($context, ["label" => // line 27
(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"]));
// line 30
yield " ";
} 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); })()))) {
// line 31
yield " ";
$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", false, false, true, 31);
// line 32
yield "
";
// line 33
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
(isset($context["sector"]) || array_key_exists("sector", $context) ? $context["sector"] : (function () { throw new RuntimeError('Variable "sector" does not exist.', 34, $this->source); })()), "branchename", [], "any", false, false, true, 34), "labelIcon" => // line 35
(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"]));
// line 38
yield " ";
}
// line 39
yield "
</a>
<div class=\"p-6\">
<a href=\"";
// line 42
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", false, false, true, 42), 42, $this->source)), "html", null, true)) : (""));
yield "\">
<h3 class=\"text-xl\">
";
// line 44
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", false, false, true, 44), 44, $this->source), "html", null, true);
yield "
</h3>
<p class=\"mb-3\">
";
// line 47
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", false, false, true, 47)) ? (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", false, false, true, 47)) : ((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", false, false, true, 47), 47, $this->source)), 0, 44) . "...")));
yield "
</p>
<div class=\"flex justify-end pt-8\">
<span
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\">
<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"14\"
height=\"10\" viewBox=\"0 0 15.5857104 11.2450309\" version=\"1.1\">
<g stroke=\"none\" stroke-width=\"1\" fill=\"none\"
fill-rule=\"evenodd\">
<g transform=\"translate(-895.000000, -698.366712)\"
fill=\"#0072BB\">
<g id=\"img+text\" transform=\"translate(0.000000, 174.000000)\">
<g id=\"Group-13\" transform=\"translate(316.000000, 80.000000)\">
<g id=\"Group-10\" transform=\"translate(0.000000, 395.000000)\">
<g id=\"Group-5\" transform=\"translate(562.000000, 30.000000)\">
<g id=\"icons/ui/arrow-line-right\"
transform=\"translate(17.000000, 19.000000)\">
<path
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\"
id=\"arrow-line-right\"
transform=\"translate(8.000000, 5.989228) scale(-1, 1) translate(-8.000000, -5.989228) \"/>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
</span>
</div>
</a>
</div>
</div>";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "includes/cards/default.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
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,);
}
public function getSourceContext(): Source
{
return new Source("{% set page = project.page() %}
{% set mod = 1 %}
{% set sector = project.sectors | first %}
{% set image = project.visuals.current() %}
{% if labelOverride is defined and labelOverride is not empty %}
{% set customLabel = labelOverride %}
{% else %}
{% set customLabel = null %}
{% endif %}
<div
class=\"block col-span-12 transition duration-300 bg-white hover:text-blue relative rounded overflow-hidden {{ class ?? '' }}\">
<a
href=\"{{ page ? (page.url | trimUrl) : '' }}\"
class=\"relative\"
>
{% if image %}
{{ image.getThumbnail('project-card').html({
pictureAttributes: {class: 'block overflow-hidden'},
imgAttributes: {class: 'w-full'},
})|raw }}
{% endif %}
{% if customLabel is not empty %}
{% include 'includes/cards/partials/label.html.twig' with {
label: customLabel,
position: 'absolute top-6 right-6'
} %}
{% elseif sector is defined and sector %}
{% set icon = sector.icon %}
{% include 'includes/cards/partials/label.html.twig' with {
label: sector.branchename,
labelIcon: icon,
position: 'absolute top-6 right-6'
} %}
{% endif %}
</a>
<div class=\"p-6\">
<a href=\"{{ page ? (page.url | trimUrl) : '' }}\">
<h3 class=\"text-xl\">
{{ project.title }}
</h3>
<p class=\"mb-3\">
{{ (project.meta_description ?: (project.webdesq_content|striptags|slice(0, 44) ~ '...'))|raw }}
</p>
<div class=\"flex justify-end pt-8\">
<span
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\">
<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"14\"
height=\"10\" viewBox=\"0 0 15.5857104 11.2450309\" version=\"1.1\">
<g stroke=\"none\" stroke-width=\"1\" fill=\"none\"
fill-rule=\"evenodd\">
<g transform=\"translate(-895.000000, -698.366712)\"
fill=\"#0072BB\">
<g id=\"img+text\" transform=\"translate(0.000000, 174.000000)\">
<g id=\"Group-13\" transform=\"translate(316.000000, 80.000000)\">
<g id=\"Group-10\" transform=\"translate(0.000000, 395.000000)\">
<g id=\"Group-5\" transform=\"translate(562.000000, 30.000000)\">
<g id=\"icons/ui/arrow-line-right\"
transform=\"translate(17.000000, 19.000000)\">
<path
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\"
id=\"arrow-line-right\"
transform=\"translate(8.000000, 5.989228) scale(-1, 1) translate(-8.000000, -5.989228) \"/>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
</span>
</div>
</a>
</div>
</div>", "includes/cards/default.html.twig", "/home/forge/testing.coolworld.ptchr.dev/templates/includes/cards/default.html.twig");
}
public function checkSecurity()
{
static $tags = ["set" => 1, "if" => 6, "include" => 26];
static $filters = ["first" => 3, "escape" => 15, "trimUrl" => 15, "raw" => 22, "slice" => 47, "striptags" => 47];
static $functions = [];
try {
$this->sandbox->checkSecurity(
['set', 'if', 'include'],
['first', 'escape', 'trimUrl', 'raw', 'slice', 'striptags'],
[],
$this->source
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}