<?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;
/* public/game_list.html.twig */
class __TwigTemplate_5e4328a7e7c390081bddb920dbfb079d 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->blocks = [
'title' => [$this, 'block_title'],
'public_stylesheets' => [$this, 'block_public_stylesheets'],
'body' => [$this, 'block_body'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "public/base.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$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", "public/game_list.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "public/game_list.html.twig"));
$this->parent = $this->loadTemplate("public/base.html.twig", "public/game_list.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_title(array $context, array $blocks = []): iterable
{
$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"));
yield "openrpg.ru";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 5
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_public_stylesheets(array $context, array $blocks = []): iterable
{
$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", "public_stylesheets"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "public_stylesheets"));
// line 6
yield " <link rel=\"stylesheet\" href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("data/game-list.css"), "html", null, true);
yield "\">
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 9
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_body(array $context, array $blocks = []): iterable
{
$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 10
yield "<div id=\"tooltip\" class=\"tooltip\"></div>
<!-- ⭐ Топ игр -->
<section class=\"section\">
<h2><i class=\"fa-solid fa-crown\"></i> Топ приключений</h2>
<div class=\"cards\">
<!-- Большая -->
";
// line 18
if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["worlds"]) || array_key_exists("worlds", $context) ? $context["worlds"] : (function () { throw new RuntimeError('Variable "worlds" does not exist.', 18, $this->source); })())) > 0)) {
// line 19
yield " ";
$context["world"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["worlds"]) || array_key_exists("worlds", $context) ? $context["worlds"] : (function () { throw new RuntimeError('Variable "worlds" does not exist.', 19, $this->source); })()), 0, [], "array", false, false, false, 19);
// line 20
yield " <div class=\"card-big\" style=\"background-image:url('";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["world"]) || array_key_exists("world", $context) ? $context["world"] : (function () { throw new RuntimeError('Variable "world" does not exist.', 20, $this->source); })()), "background", [], "any", false, false, false, 20), "html", null, true);
yield "');\" onclick=\"window.location.href='";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("public_world_view", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["world"]) || array_key_exists("world", $context) ? $context["world"] : (function () { throw new RuntimeError('Variable "world" does not exist.', 20, $this->source); })()), "id", [], "any", false, false, false, 20)]), "html", null, true);
yield "'\">
<div class=\"card-gradient\"></div>
<div class=\"card-info\">
<h3>";
// line 23
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["world"]) || array_key_exists("world", $context) ? $context["world"] : (function () { throw new RuntimeError('Variable "world" does not exist.', 23, $this->source); })()), "name", [], "any", false, false, false, 23), "html", null, true);
yield "</h3>
<p>";
// line 24
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["world"]) || array_key_exists("world", $context) ? $context["world"] : (function () { throw new RuntimeError('Variable "world" does not exist.', 24, $this->source); })()), "description", [], "any", false, false, false, 24), "html", null, true);
yield "</p>
<div class=\"badges\">
";
// line 26
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["world"]) || array_key_exists("world", $context) ? $context["world"] : (function () { throw new RuntimeError('Variable "world" does not exist.', 26, $this->source); })()), "publicBadges", [], "any", false, false, false, 26));
foreach ($context['_seq'] as $context["_key"] => $context["badge"]) {
// line 27
yield " <div class=\"badge\"><i class=\"fa-solid fa-tag\"></i> ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["badge"], "html", null, true);
yield "</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['badge'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 29
yield " </div>
</div>
</div>
";
}
// line 33
yield "
<!-- Маленькие -->
";
// line 35
if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["worlds"]) || array_key_exists("worlds", $context) ? $context["worlds"] : (function () { throw new RuntimeError('Variable "worlds" does not exist.', 35, $this->source); })())) > 1)) {
// line 36
yield " ";
$context["world2"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["worlds"]) || array_key_exists("worlds", $context) ? $context["worlds"] : (function () { throw new RuntimeError('Variable "worlds" does not exist.', 36, $this->source); })()), 1, [], "array", false, false, false, 36);
// line 37
yield " <div class=\"card-half\" style=\"background-image:url('";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["world2"]) || array_key_exists("world2", $context) ? $context["world2"] : (function () { throw new RuntimeError('Variable "world2" does not exist.', 37, $this->source); })()), "background", [], "any", false, false, false, 37), "html", null, true);
yield "');\" onclick=\"window.location.href='";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("public_world_view", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["world2"]) || array_key_exists("world2", $context) ? $context["world2"] : (function () { throw new RuntimeError('Variable "world2" does not exist.', 37, $this->source); })()), "id", [], "any", false, false, false, 37)]), "html", null, true);
yield "'\">
<div class=\"card-gradient\"></div>
<div class=\"card-info\">
<h3>";
// line 40
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["world2"]) || array_key_exists("world2", $context) ? $context["world2"] : (function () { throw new RuntimeError('Variable "world2" does not exist.', 40, $this->source); })()), "name", [], "any", false, false, false, 40), "html", null, true);
yield "</h3>
<p>";
// line 41
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["world2"]) || array_key_exists("world2", $context) ? $context["world2"] : (function () { throw new RuntimeError('Variable "world2" does not exist.', 41, $this->source); })()), "description", [], "any", false, false, false, 41), "html", null, true);
yield "</p>
<div class=\"badges\">
";
// line 43
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["world2"]) || array_key_exists("world2", $context) ? $context["world2"] : (function () { throw new RuntimeError('Variable "world2" does not exist.', 43, $this->source); })()), "publicBadges", [], "any", false, false, false, 43));
foreach ($context['_seq'] as $context["_key"] => $context["badge"]) {
// line 44
yield " <div class=\"badge\"><i class=\"fa-solid fa-tag\"></i> ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["badge"], "html", null, true);
yield "</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['badge'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 46
yield " </div>
</div>
</div>
";
}
// line 50
yield "
";
// line 51
if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["worlds"]) || array_key_exists("worlds", $context) ? $context["worlds"] : (function () { throw new RuntimeError('Variable "worlds" does not exist.', 51, $this->source); })())) > 2)) {
// line 52
yield " ";
$context["world3"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["worlds"]) || array_key_exists("worlds", $context) ? $context["worlds"] : (function () { throw new RuntimeError('Variable "worlds" does not exist.', 52, $this->source); })()), 2, [], "array", false, false, false, 52);
// line 53
yield " <div class=\"card-half\" style=\"background-image:url('";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["world3"]) || array_key_exists("world3", $context) ? $context["world3"] : (function () { throw new RuntimeError('Variable "world3" does not exist.', 53, $this->source); })()), "background", [], "any", false, false, false, 53), "html", null, true);
yield "');\" onclick=\"window.location.href='";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("public_world_view", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["world3"]) || array_key_exists("world3", $context) ? $context["world3"] : (function () { throw new RuntimeError('Variable "world3" does not exist.', 53, $this->source); })()), "id", [], "any", false, false, false, 53)]), "html", null, true);
yield "'\">
<div class=\"card-gradient\"></div>
<div class=\"card-info\">
<h3>";
// line 56
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["world3"]) || array_key_exists("world3", $context) ? $context["world3"] : (function () { throw new RuntimeError('Variable "world3" does not exist.', 56, $this->source); })()), "name", [], "any", false, false, false, 56), "html", null, true);
yield "</h3>
<p>";
// line 57
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["world3"]) || array_key_exists("world3", $context) ? $context["world3"] : (function () { throw new RuntimeError('Variable "world3" does not exist.', 57, $this->source); })()), "description", [], "any", false, false, false, 57), "html", null, true);
yield "</p>
<div class=\"badges\">
";
// line 59
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["world3"]) || array_key_exists("world3", $context) ? $context["world3"] : (function () { throw new RuntimeError('Variable "world3" does not exist.', 59, $this->source); })()), "publicBadges", [], "any", false, false, false, 59));
foreach ($context['_seq'] as $context["_key"] => $context["badge"]) {
// line 60
yield " <div class=\"badge\"><i class=\"fa-solid fa-tag\"></i> ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["badge"], "html", null, true);
yield "</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['badge'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 62
yield " </div>
</div>
</div>
";
}
// line 66
yield " </div>
</section>
<!-- 👥 Сообщество -->
<section class=\"section\">
<h2><i class=\"fa-solid fa-users\"></i> Игры сообщества</h2>
<div class=\"community-wrapper\">
<div class=\"arrow arrow-left\" onclick=\"scrollCommunity(-1)\"><i class=\"fa-solid fa-chevron-left\"></i></div>
<div class=\"community-list\" id=\"communityList\">
<script>
const commGames = [
[\"Город шепотов\", \"Загадки улиц и опасные слухи.\"],
[\"Пески отчаяния\", \"Путешествие через проклятую пустыню.\"],
[\"Танец масок\", \"Бал, где каждый скрывает тайны.\"],
[\"Дом у бездны\", \"Шёпоты в глубине старого дома.\"],
[\"Охотники на звёзды\", \"Фэнтези с космическим оттенком.\"],
[\"Кукольный театр\", \"Жуткие представления и живые куклы.\"],
[\"Вкус грозы\", \"Город, где гроза меняет судьбы.\"],
[\"Серп луны\", \"Культ, приносящий лунные жертвы.\"]
];
document.write(commGames.map(g =>
`<div class=\"community-card\">
<h4>\${g[0]}</h4>
<p>\${g[1]}</p>
<div class=\"badges\">
<div class=\"badge\"><i class=\"fa-solid fa-user-group\"></i> Сообщество</div>
<div class=\"badge\"><i class=\"fa-solid fa-star\"></i> Популярное</div>
</div>
</div>`
).join(\"\"));
</script>
</div>
<div class=\"arrow arrow-right\" onclick=\"scrollCommunity(1)\"><i class=\"fa-solid fa-chevron-right\"></i></div>
</div>
</section>
<!-- Остальные миры -->
";
// line 106
if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["worlds"]) || array_key_exists("worlds", $context) ? $context["worlds"] : (function () { throw new RuntimeError('Variable "worlds" does not exist.', 106, $this->source); })())) > 3)) {
// line 107
yield "<section class=\"section\">
<h2><i class=\"fa-solid fa-dice\"></i> Ещё подборки</h2>
<div class=\"cards\">
";
// line 110
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(Twig\Extension\CoreExtension::slice($this->env->getCharset(), (isset($context["worlds"]) || array_key_exists("worlds", $context) ? $context["worlds"] : (function () { throw new RuntimeError('Variable "worlds" does not exist.', 110, $this->source); })()), 3));
foreach ($context['_seq'] as $context["_key"] => $context["world"]) {
// line 111
yield " <div class=\"card-half\" style=\"background-image:url('";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["world"], "background", [], "any", false, false, false, 111), "html", null, true);
yield "');\" onclick=\"window.location.href='";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("public_world_view", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["world"], "id", [], "any", false, false, false, 111)]), "html", null, true);
yield "'\">
<div class=\"card-gradient\"></div>
<div class=\"card-info\">
<h3>";
// line 114
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["world"], "name", [], "any", false, false, false, 114), "html", null, true);
yield "</h3>
<p>";
// line 115
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["world"], "description", [], "any", false, false, false, 115), "html", null, true);
yield "</p>
<div class=\"badges\">
";
// line 117
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["world"], "publicBadges", [], "any", false, false, false, 117));
foreach ($context['_seq'] as $context["_key"] => $context["badge"]) {
// line 118
yield " <div class=\"badge\"><i class=\"fa-solid fa-tag\"></i> ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["badge"], "html", null, true);
yield "</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['badge'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 120
yield " </div>
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['world'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 124
yield " </div>
</section>
";
}
// line 127
yield "
<script>
function scrollCommunity(dir) {
const list = document.getElementById(\"communityList\");
list.scrollBy({ left: dir * (list.clientWidth * 0.7), behavior: 'smooth' });
}
</script>
<script>
document.addEventListener('DOMContentLoaded', function() {
const logoElement = document.getElementById('logo');
const tooltipElement = document.getElementById('tooltip');
const tooltipMessage = \"OpenRPG - это сервис для совместного прохождения ролевых игр, где истории написаны авторами, а ИИ служит их рассказчиком\";
let tooltipTimeoutId;
if (logoElement && tooltipElement) {
logoElement.addEventListener('mouseenter', () => {
tooltipTimeoutId = setTimeout(() => {
tooltipElement.textContent = tooltipMessage;
tooltipElement.style.display = 'block';
tooltipElement.style.opacity = '1';
// Позиционирование подсказки строго под заголовком
const logoRect = logoElement.getBoundingClientRect();
tooltipElement.style.left = logoRect.left + 'px';
tooltipElement.style.top = (logoRect.bottom + 5) + 'px';
}, 500); // Задержка 500 мс
});
logoElement.addEventListener('mouseleave', () => {
clearTimeout(tooltipTimeoutId);
tooltipElement.style.opacity = '0';
setTimeout(() => {
tooltipElement.style.display = 'none';
}, 300); // Длительность fade-out
});
}
});
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "public/game_list.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 369 => 127, 364 => 124, 355 => 120, 346 => 118, 342 => 117, 337 => 115, 333 => 114, 324 => 111, 320 => 110, 315 => 107, 313 => 106, 271 => 66, 265 => 62, 256 => 60, 252 => 59, 247 => 57, 243 => 56, 234 => 53, 231 => 52, 229 => 51, 226 => 50, 220 => 46, 211 => 44, 207 => 43, 202 => 41, 198 => 40, 189 => 37, 186 => 36, 184 => 35, 180 => 33, 174 => 29, 165 => 27, 161 => 26, 156 => 24, 152 => 23, 143 => 20, 140 => 19, 138 => 18, 128 => 10, 115 => 9, 101 => 6, 88 => 5, 65 => 3, 42 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% extends 'public/base.html.twig' %}
{% block title %}openrpg.ru{% endblock %}
{% block public_stylesheets %}
<link rel=\"stylesheet\" href=\"{{ asset('data/game-list.css') }}\">
{% endblock %}
{% block body %}
<div id=\"tooltip\" class=\"tooltip\"></div>
<!-- ⭐ Топ игр -->
<section class=\"section\">
<h2><i class=\"fa-solid fa-crown\"></i> Топ приключений</h2>
<div class=\"cards\">
<!-- Большая -->
{% if worlds|length > 0 %}
{% set world = worlds[0] %}
<div class=\"card-big\" style=\"background-image:url('{{ world.background }}');\" onclick=\"window.location.href='{{ path('public_world_view', {'id': world.id}) }}'\">
<div class=\"card-gradient\"></div>
<div class=\"card-info\">
<h3>{{ world.name }}</h3>
<p>{{ world.description }}</p>
<div class=\"badges\">
{% for badge in world.publicBadges %}
<div class=\"badge\"><i class=\"fa-solid fa-tag\"></i> {{ badge }}</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}
<!-- Маленькие -->
{% if worlds|length > 1 %}
{% set world2 = worlds[1] %}
<div class=\"card-half\" style=\"background-image:url('{{ world2.background }}');\" onclick=\"window.location.href='{{ path('public_world_view', {'id': world2.id}) }}'\">
<div class=\"card-gradient\"></div>
<div class=\"card-info\">
<h3>{{ world2.name }}</h3>
<p>{{ world2.description }}</p>
<div class=\"badges\">
{% for badge in world2.publicBadges %}
<div class=\"badge\"><i class=\"fa-solid fa-tag\"></i> {{ badge }}</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}
{% if worlds|length > 2 %}
{% set world3 = worlds[2] %}
<div class=\"card-half\" style=\"background-image:url('{{ world3.background }}');\" onclick=\"window.location.href='{{ path('public_world_view', {'id': world3.id}) }}'\">
<div class=\"card-gradient\"></div>
<div class=\"card-info\">
<h3>{{ world3.name }}</h3>
<p>{{ world3.description }}</p>
<div class=\"badges\">
{% for badge in world3.publicBadges %}
<div class=\"badge\"><i class=\"fa-solid fa-tag\"></i> {{ badge }}</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}
</div>
</section>
<!-- 👥 Сообщество -->
<section class=\"section\">
<h2><i class=\"fa-solid fa-users\"></i> Игры сообщества</h2>
<div class=\"community-wrapper\">
<div class=\"arrow arrow-left\" onclick=\"scrollCommunity(-1)\"><i class=\"fa-solid fa-chevron-left\"></i></div>
<div class=\"community-list\" id=\"communityList\">
<script>
const commGames = [
[\"Город шепотов\", \"Загадки улиц и опасные слухи.\"],
[\"Пески отчаяния\", \"Путешествие через проклятую пустыню.\"],
[\"Танец масок\", \"Бал, где каждый скрывает тайны.\"],
[\"Дом у бездны\", \"Шёпоты в глубине старого дома.\"],
[\"Охотники на звёзды\", \"Фэнтези с космическим оттенком.\"],
[\"Кукольный театр\", \"Жуткие представления и живые куклы.\"],
[\"Вкус грозы\", \"Город, где гроза меняет судьбы.\"],
[\"Серп луны\", \"Культ, приносящий лунные жертвы.\"]
];
document.write(commGames.map(g =>
`<div class=\"community-card\">
<h4>\${g[0]}</h4>
<p>\${g[1]}</p>
<div class=\"badges\">
<div class=\"badge\"><i class=\"fa-solid fa-user-group\"></i> Сообщество</div>
<div class=\"badge\"><i class=\"fa-solid fa-star\"></i> Популярное</div>
</div>
</div>`
).join(\"\"));
</script>
</div>
<div class=\"arrow arrow-right\" onclick=\"scrollCommunity(1)\"><i class=\"fa-solid fa-chevron-right\"></i></div>
</div>
</section>
<!-- Остальные миры -->
{% if worlds|length > 3 %}
<section class=\"section\">
<h2><i class=\"fa-solid fa-dice\"></i> Ещё подборки</h2>
<div class=\"cards\">
{% for world in worlds|slice(3) %}
<div class=\"card-half\" style=\"background-image:url('{{ world.background }}');\" onclick=\"window.location.href='{{ path('public_world_view', {'id': world.id}) }}'\">
<div class=\"card-gradient\"></div>
<div class=\"card-info\">
<h3>{{ world.name }}</h3>
<p>{{ world.description }}</p>
<div class=\"badges\">
{% for badge in world.publicBadges %}
<div class=\"badge\"><i class=\"fa-solid fa-tag\"></i> {{ badge }}</div>
{% endfor %}
</div>
</div>
</div>
{% endfor %}
</div>
</section>
{% endif %}
<script>
function scrollCommunity(dir) {
const list = document.getElementById(\"communityList\");
list.scrollBy({ left: dir * (list.clientWidth * 0.7), behavior: 'smooth' });
}
</script>
<script>
document.addEventListener('DOMContentLoaded', function() {
const logoElement = document.getElementById('logo');
const tooltipElement = document.getElementById('tooltip');
const tooltipMessage = \"OpenRPG - это сервис для совместного прохождения ролевых игр, где истории написаны авторами, а ИИ служит их рассказчиком\";
let tooltipTimeoutId;
if (logoElement && tooltipElement) {
logoElement.addEventListener('mouseenter', () => {
tooltipTimeoutId = setTimeout(() => {
tooltipElement.textContent = tooltipMessage;
tooltipElement.style.display = 'block';
tooltipElement.style.opacity = '1';
// Позиционирование подсказки строго под заголовком
const logoRect = logoElement.getBoundingClientRect();
tooltipElement.style.left = logoRect.left + 'px';
tooltipElement.style.top = (logoRect.bottom + 5) + 'px';
}, 500); // Задержка 500 мс
});
logoElement.addEventListener('mouseleave', () => {
clearTimeout(tooltipTimeoutId);
tooltipElement.style.opacity = '0';
setTimeout(() => {
tooltipElement.style.display = 'none';
}, 300); // Длительность fade-out
});
}
});
</script>
{% endblock %}
", "public/game_list.html.twig", "/var/www/openrpg/admin/templates/public/game_list.html.twig");
}
}