You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
168 lines
6.3 KiB
168 lines
6.3 KiB
<?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;
|
|
|
|
/* quiz.html.twig */
|
|
class __TwigTemplate_eb15b3c7b3e1c48f1a2ebec5d9eb6685 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 = [
|
|
];
|
|
}
|
|
|
|
protected function doDisplay(array $context, array $blocks = []): iterable
|
|
{
|
|
$macros = $this->macros;
|
|
// line 1
|
|
yield "<!DOCTYPE html>
|
|
<html lang=\"fr\">
|
|
<head>
|
|
<meta charset=\"UTF-8\">
|
|
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
|
|
<title>Wiki Fantasy : Quiz</title>
|
|
<link id=\"favicon\" rel=\"icon\" href=\"../../images/iconeSombre.ico\"> <!-- Par défaut sombre -->
|
|
<link rel=\"stylesheet\" href=\"../../public/styles/styleQuiz.css\">
|
|
<script defer src=\"../../public/script/theme-toggle.js\"></script>
|
|
<script>
|
|
// Timer pour 5 minutes
|
|
var timeLeft = 300;
|
|
function countdown() {
|
|
var timerDisplay = document.getElementById(\"timer\");
|
|
if (timeLeft <= 0) {
|
|
document.getElementById(\"quizForm\").submit();
|
|
} else {
|
|
timerDisplay.innerHTML = timeLeft + \" seconds left\";
|
|
timeLeft -= 1;
|
|
setTimeout(countdown, 1000);
|
|
}
|
|
}
|
|
window.onload = countdown;
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div class=\"header\">
|
|
<div class=\"nav\">
|
|
<a href=\"../favorite.html\"><img src=\"../../images/coeur.svg\" alt=\"coeur\" width=\"67px\" height=\"67px\" onmousedown=\"return false\"></a>
|
|
<img id=\"theme-icon\" src=\"../../images/light.svg\" alt=\"toggle theme\" width=\"72px\" height=\"37px\" onmousedown=\"return false\" onclick=\"toggleTheme()\">
|
|
<img src=\"../../images/quizz.svg\" alt=\"quizz\" width=\"51px\" height=\"82px\" onmousedown=\"return false\">
|
|
</div>
|
|
<div class=\"logo\">
|
|
<img src=\"../../images/WIKIFANTASY.png\" alt=\"Logo\" width=\"227px\" height=\"106px\" onmousedown=\"return false\">
|
|
</div>
|
|
<div class=\"user\">
|
|
<img src=\"../../images/user_dark.png\" alt=\"user\" width=\"70px\" height=\"70px\" onmousedown=\"return false\">
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<h1>▶ Quiz ◀</h1>
|
|
<div class=\"quiz\">
|
|
<h2> ";
|
|
// line 44
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["question"] ?? null), "question", [], "any", false, false, false, 44), "html", null, true);
|
|
yield " </h2>
|
|
<a id=\"timer\"> 300 seconds left .. </a>
|
|
|
|
<form id=\"quizForm\" method=\"POST\">
|
|
<div class=\"answers\">
|
|
<button class=\"answer\" name=\"answera\" value=\"A-";
|
|
// line 49
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["id"] ?? null), "html", null, true);
|
|
yield "\">
|
|
";
|
|
// line 50
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["question"] ?? null), "answera", [], "any", false, false, false, 50), "html", null, true);
|
|
yield "
|
|
</button>
|
|
<button class=\"answer\" name=\"answerb\" value=\"B-";
|
|
// line 52
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["id"] ?? null), "html", null, true);
|
|
yield "\">
|
|
";
|
|
// line 53
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["question"] ?? null), "answerb", [], "any", false, false, false, 53), "html", null, true);
|
|
yield "
|
|
</button>
|
|
<button class=\"answer\" name=\"answerc\" value=\"C-";
|
|
// line 55
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["id"] ?? null), "html", null, true);
|
|
yield "\">
|
|
";
|
|
// line 56
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["question"] ?? null), "answerc", [], "any", false, false, false, 56), "html", null, true);
|
|
yield "
|
|
</button>
|
|
<button class=\"answer\" name=\"answerd\" value=\"D-";
|
|
// line 58
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["id"] ?? null), "html", null, true);
|
|
yield "\">
|
|
";
|
|
// line 59
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["question"] ?? null), "answerd", [], "any", false, false, false, 59), "html", null, true);
|
|
yield "
|
|
</button>
|
|
</div>
|
|
<input type=\"hidden\" name=\"action\" value=\"canswer\">
|
|
</form>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
";
|
|
yield from [];
|
|
}
|
|
|
|
/**
|
|
* @codeCoverageIgnore
|
|
*/
|
|
public function getTemplateName(): string
|
|
{
|
|
return "quiz.html.twig";
|
|
}
|
|
|
|
/**
|
|
* @codeCoverageIgnore
|
|
*/
|
|
public function isTraitable(): bool
|
|
{
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* @codeCoverageIgnore
|
|
*/
|
|
public function getDebugInfo(): array
|
|
{
|
|
return array ( 126 => 59, 122 => 58, 117 => 56, 113 => 55, 108 => 53, 104 => 52, 99 => 50, 95 => 49, 87 => 44, 42 => 1,);
|
|
}
|
|
|
|
public function getSourceContext(): Source
|
|
{
|
|
return new Source("", "quiz.html.twig", "/Users/kiem/Documents/WikiFantasy/WF-Website/vue/templates/quiz.html.twig");
|
|
}
|
|
}
|