<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
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;
/* pages/beat-detail.html.twig */
class __TwigTemplate_ebbac53e0fd3887cc19e174ce482016d extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'bodyClass' => [$this, 'block_bodyClass'],
'body' => [$this, 'block_body'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "base.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "pages/beat-detail.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "pages/beat-detail.html.twig"));
// line 4
$macros["macros"] = $this->macros["macros"] = $this->loadTemplate("components/macros.html.twig", "pages/beat-detail.html.twig", 4)->unwrap();
// line 1
$this->parent = $this->loadTemplate("base.html.twig", "pages/beat-detail.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 2
public function block_title($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
echo "Battle detail";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 3
public function block_bodyClass($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "bodyClass"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "bodyClass"));
echo "battleBody";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 6
public function block_body($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 7
echo "
<section id=\"beat\" class=\"beats mb-5\">
<div class=\"container\">
<div class=\"row\">
<div class=\"col-12 heading\">
<h2>";
// line 12
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["beat"]) || array_key_exists("beat", $context) ? $context["beat"] : (function () { throw new RuntimeError('Variable "beat" does not exist.', 12, $this->source); })()), "name", [], "any", false, false, false, 12), "html", null, true);
echo "</h2>
</div>
</div>
<div class=\"row\">
<div class=\"card beat-card mb-4 box-shadow position-relative col-12\">
<div class=\"card-bg position-absolute\">
<img src=\"";
// line 19
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("uploads/images/beats/" . twig_get_attribute($this->env, $this->source, (isset($context["beat"]) || array_key_exists("beat", $context) ? $context["beat"] : (function () { throw new RuntimeError('Variable "beat" does not exist.', 19, $this->source); })()), "imageName", [], "any", false, false, false, 19))), "html", null, true);
echo "\" alt=\"Beat\"/>
</div>
<div class=\"card-controls position-absolute\">
<div class=\"card-bottom-controls detail\">
<div class=\"playingIndicator\" data-indicator-id='";
// line 26
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["beat"]) || array_key_exists("beat", $context) ? $context["beat"] : (function () { throw new RuntimeError('Variable "beat" does not exist.', 26, $this->source); })()), "id", [], "any", false, false, false, 26), "html", null, true);
echo "' style='--piWidth: 0%;'></div>
<div class=\"play-button\" data-id=\"";
// line 28
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["beat"]) || array_key_exists("beat", $context) ? $context["beat"] : (function () { throw new RuntimeError('Variable "beat" does not exist.', 28, $this->source); })()), "id", [], "any", false, false, false, 28), "html", null, true);
echo "\" data-sample=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["beat"]) || array_key_exists("beat", $context) ? $context["beat"] : (function () { throw new RuntimeError('Variable "beat" does not exist.', 28, $this->source); })()), "instrumentalFileName", [], "any", false, false, false, 28), "html", null, true);
echo "\">
<i class=\"bi bi-play-circle-fill text-white\" data-icon-id=\"";
// line 29
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["beat"]) || array_key_exists("beat", $context) ? $context["beat"] : (function () { throw new RuntimeError('Variable "beat" does not exist.', 29, $this->source); })()), "id", [], "any", false, false, false, 29), "html", null, true);
echo "\"></i>
</div>
</div>
</div>
</div>
</div>
<div class=\"row\">
<div class=\"col-md-6\">
<div class=\"card mb-4 mb-md-0\">
<div class=\"card-body\">
<h5 class=\"mb-4\"> Beat details
</h5>
<p class=\"mb-1\" style=\"font-size: .77rem;\">Beat author</p>
<p class=\"mb-4\">";
// line 44
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["beat"]) || array_key_exists("beat", $context) ? $context["beat"] : (function () { throw new RuntimeError('Variable "beat" does not exist.', 44, $this->source); })()), "author", [], "any", false, false, false, 44), "pseudoname", [], "any", false, false, false, 44), "html", null, true);
echo "</p>
<p class=\"mb-1\" style=\"font-size: .77rem;\">Beat categories</p>
";
// line 47
$context["maxBeatCategory"] = twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["beat"]) || array_key_exists("beat", $context) ? $context["beat"] : (function () { throw new RuntimeError('Variable "beat" does not exist.', 47, $this->source); })()), "category", [], "any", false, false, false, 47));
// line 48
echo " <p class=\"mb-4\">";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["beat"]) || array_key_exists("beat", $context) ? $context["beat"] : (function () { throw new RuntimeError('Variable "beat" does not exist.', 48, $this->source); })()), "category", [], "any", false, false, false, 48));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "name", [], "any", false, false, false, 48), "html", null, true);
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 48) != (isset($context["maxBeatCategory"]) || array_key_exists("maxBeatCategory", $context) ? $context["maxBeatCategory"] : (function () { throw new RuntimeError('Variable "maxBeatCategory" does not exist.', 48, $this->source); })()))) {
echo ",";
}
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
echo "</p>
<p class=\"mt-4 mb-1\" style=\"font-size: .77rem;\">Created</p>
<p class=\"mb-4\" >";
// line 51
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["beat"]) || array_key_exists("beat", $context) ? $context["beat"] : (function () { throw new RuntimeError('Variable "beat" does not exist.', 51, $this->source); })()), "createdAt", [], "any", false, false, false, 51), "d/m/Y H:i:s"), "html", null, true);
echo "</p>
<p class=\"mt-4 mb-1\" style=\"font-size: .77rem;\">Likes</p>
<p class=\"mb-4\" >";
// line 54
echo twig_escape_filter($this->env, twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["beat"]) || array_key_exists("beat", $context) ? $context["beat"] : (function () { throw new RuntimeError('Variable "beat" does not exist.', 54, $this->source); })()), "favoritedClients", [], "any", false, false, false, 54)), "html", null, true);
echo "x</p>
</div>
</div>
</div>
</div>
</div>
</section>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "pages/beat-detail.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 220 => 54, 214 => 51, 175 => 48, 173 => 47, 167 => 44, 149 => 29, 143 => 28, 138 => 26, 128 => 19, 118 => 12, 111 => 7, 101 => 6, 82 => 3, 63 => 2, 52 => 1, 50 => 4, 37 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends \"base.html.twig\" %}
{% block title %}Battle detail{% endblock %}
{% block bodyClass %}battleBody{% endblock %}
{% import \"components/macros.html.twig\" as macros %}
{% block body %}
<section id=\"beat\" class=\"beats mb-5\">
<div class=\"container\">
<div class=\"row\">
<div class=\"col-12 heading\">
<h2>{{ beat.name }}</h2>
</div>
</div>
<div class=\"row\">
<div class=\"card beat-card mb-4 box-shadow position-relative col-12\">
<div class=\"card-bg position-absolute\">
<img src=\"{{ asset(\"uploads/images/beats/\"~ beat.imageName) }}\" alt=\"Beat\"/>
</div>
<div class=\"card-controls position-absolute\">
<div class=\"card-bottom-controls detail\">
<div class=\"playingIndicator\" data-indicator-id='{{ beat.id }}' style='--piWidth: 0%;'></div>
<div class=\"play-button\" data-id=\"{{ beat.id }}\" data-sample=\"{{ beat.instrumentalFileName }}\">
<i class=\"bi bi-play-circle-fill text-white\" data-icon-id=\"{{ beat.id }}\"></i>
</div>
</div>
</div>
</div>
</div>
<div class=\"row\">
<div class=\"col-md-6\">
<div class=\"card mb-4 mb-md-0\">
<div class=\"card-body\">
<h5 class=\"mb-4\"> Beat details
</h5>
<p class=\"mb-1\" style=\"font-size: .77rem;\">Beat author</p>
<p class=\"mb-4\">{{ beat.author.pseudoname }}</p>
<p class=\"mb-1\" style=\"font-size: .77rem;\">Beat categories</p>
{% set maxBeatCategory = beat.category|length %}
<p class=\"mb-4\">{% for category in beat.category %}{{ category.name }}{% if loop.index != maxBeatCategory %},{% endif %} {% endfor %}</p>
<p class=\"mt-4 mb-1\" style=\"font-size: .77rem;\">Created</p>
<p class=\"mb-4\" >{{ beat.createdAt|date(\"d/m/Y H:i:s\") }}</p>
<p class=\"mt-4 mb-1\" style=\"font-size: .77rem;\">Likes</p>
<p class=\"mb-4\" >{{ beat.favoritedClients|length }}x</p>
</div>
</div>
</div>
</div>
</div>
</section>
{% endblock %}", "pages/beat-detail.html.twig", "/home/u568363158/domains/rapbattleonline.com/public_html/templates/pages/beat-detail.html.twig");
}
}