var/cache/dev/twig/91/918cc452d864e69c20de799a820b0a71.php line 40

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* home/index.html.twig */
  14. class __TwigTemplate_6cf145df046b67e5022fd45fc6736465 extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'stylesheets' => [$this'block_stylesheets'],
  24.             'title' => [$this'block_title'],
  25.             'content' => [$this'block_content'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 2
  31.         return "base.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""home/index.html.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""home/index.html.twig"));
  40.         $this->parent $this->loadTemplate("base.html.twig""home/index.html.twig"2);
  41.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  42.         
  43.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  44.         
  45.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  46.     }
  47.     // line 4
  48.     public function block_stylesheets($context, array $blocks = [])
  49.     {
  50.         $macros $this->macros;
  51.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  52.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  53.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  54.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  55.         // line 5
  56.         echo "\t";
  57.         echo $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackLinkTags("app");
  58.         echo "
  59. ";
  60.         
  61.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  62.         
  63.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  64.     }
  65.     // line 8
  66.     public function block_title($context, array $blocks = [])
  67.     {
  68.         $macros $this->macros;
  69.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  70.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  71.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  72.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  73.         echo "Accueil |
  74. \t";
  75.         // line 9
  76.         $this->displayParentBlock("title"$context$blocks);
  77.         echo "
  78. ";
  79.         
  80.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  81.         
  82.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  83.     }
  84.     // line 13
  85.     public function block_content($context, array $blocks = [])
  86.     {
  87.         $macros $this->macros;
  88.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  89.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  90.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  91.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  92.         // line 14
  93.         echo "\t<div class=\"screen\">
  94. \t\t<div class=\"entete\">
  95. \t\t\t<div class=\"text\">
  96. \t\t\t\t<h1>LUNE</h1>
  97. \t\t\t\t<h3>portaiL des Usages du Numérique Éducatif</h3>
  98. \t\t\t\t<p class=\"accroche\">LUNE est un portail qui intègre de l'intelligence artificielle
  99. \t\t\t\t pour faciliter l'accès au personnel de l'éducation nationale à
  100. \t\t\t\t des ressources pédagogiques. Grâce à LUNE, trouvez depuis
  101. \t\t\t\t un seul endroit vos ressources pédagogiques pour les usages du 
  102. \t\t\t\t numérique.</p>
  103. \t\t\t</div>
  104. \t\t\t<div class=\"img_logo\">
  105. \t\t\t\t<img class=\"img_text\" src=\"";
  106.         // line 27
  107.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/ICONE-Turquoise.png"), "html"nulltrue);
  108.         echo "\"/>
  109. \t\t\t</div>
  110. \t\t</div>
  111. \t
  112. \t\t<!--Telescope-->
  113. \t\t<div class=\"telescope\">
  114. \t\t\t<h2><img class=\"img_titre\" src=\"";
  115.         // line 35
  116.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/TELESCOPE_blue.png"), "html"nulltrue);
  117.         echo "\"/>Le téléscope</h2>
  118. \t\t\t<p>Vous cherchez quelque chose ? Le télécsope est là pour vous aider ! Pensez, écrivez et laissez le chercher! Le téléscope vous emmènera découvrir de nombreuses
  119. \t\t\tressources issues de sites internets d'intérêts. Vous pouvez également vous laisser guider dans votre recherhe en sélectionnant des thématiques.</p>
  120. \t\t
  121. \t\t\t<div class=\"ContainerTelescope\">
  122. \t\t\t\t<div class=\"SousTitre-Telescope\">Je recherche:</div>
  123. \t\t\t\t<div class=\"ChoixContainer\">
  124. \t\t\t\t\t";
  125.         // line 44
  126.         $context["i"] = 1;
  127.         // line 45
  128.         echo "\t\t\t\t\t";
  129.         $context['_parent'] = $context;
  130.         $context['_seq'] = twig_ensure_traversable((isset($context["choix"]) || array_key_exists("choix"$context) ? $context["choix"] : (function () { throw new RuntimeError('Variable "choix" does not exist.'45$this->source); })()));
  131.         foreach ($context['_seq'] as $context["_key"] => $context["chx"]) {
  132.             // line 46
  133.             echo "\t\t\t\t\t\t<button class=\"Btn_second ChoixTelescope\" onclick=\"rechercheGuideeChx('";
  134.             echo twig_escape_filter($this->env, (isset($context["i"]) || array_key_exists("i"$context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.'46$this->source); })()), "html"nulltrue);
  135.             echo "')\">";
  136.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["chx"], "nom", [], "any"falsefalsefalse46), "html"nulltrue);
  137.             echo "</button>
  138. \t\t\t\t\t\t";
  139.             // line 47
  140.             $context["i"] = ((isset($context["i"]) || array_key_exists("i"$context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.'47$this->source); })()) + 1);
  141.             // line 48
  142.             echo "\t\t\t\t\t";
  143.         }
  144.         $_parent $context['_parent'];
  145.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['chx'], $context['_parent'], $context['loop']);
  146.         $context array_intersect_key($context$_parent) + $_parent;
  147.         // line 49
  148.         echo "\t\t\t\t</div>
  149. \t\t\t\t";
  150.         // line 51
  151.         $context["j"] = 2;
  152.         // line 52
  153.         echo "\t\t\t\t<div class=\"RequeteContainer\">
  154. \t\t\t\t\t";
  155.         // line 53
  156.         $context['_parent'] = $context;
  157.         $context['_seq'] = twig_ensure_traversable((isset($context["choix"]) || array_key_exists("choix"$context) ? $context["choix"] : (function () { throw new RuntimeError('Variable "choix" does not exist.'53$this->source); })()));
  158.         foreach ($context['_seq'] as $context["_key"] => $context["chx"]) {
  159.             // line 54
  160.             echo "\t\t\t\t\t\t<div style=\"inline\" class='Requete'>
  161. \t\t\t\t\t\t\t";
  162.             // line 55
  163.             $context['_parent'] = $context;
  164.             $context['_seq'] = twig_ensure_traversable((isset($context["requete"]) || array_key_exists("requete"$context) ? $context["requete"] : (function () { throw new RuntimeError('Variable "requete" does not exist.'55$this->source); })()));
  165.             foreach ($context['_seq'] as $context["_key"] => $context["req"]) {
  166.                 // line 56
  167.                 echo "\t\t\t\t\t\t\t\t";
  168.                 if ((twig_get_attribute($this->env$this->source$context["req"], "choix", [], "any"falsefalsefalse56) == $context["chx"])) {
  169.                     // line 57
  170.                     echo "\t\t\t\t\t\t\t\t\t<button class=\"Btn_second RequeteTelescope\" onclick=\"rechercheGuideeReq('";
  171.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["req"], "nom", [], "any"falsefalsefalse57), "html"nulltrue);
  172.                     echo "', '";
  173.                     echo twig_escape_filter($this->env, (isset($context["j"]) || array_key_exists("j"$context) ? $context["j"] : (function () { throw new RuntimeError('Variable "j" does not exist.'57$this->source); })()), "html"nulltrue);
  174.                     echo "')\">";
  175.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["req"], "nom", [], "any"falsefalsefalse57), "html"nulltrue);
  176.                     echo "</button>
  177. \t\t\t\t\t\t\t\t";
  178.                 }
  179.                 // line 59
  180.                 echo "\t\t\t\t\t\t\t";
  181.             }
  182.             $_parent $context['_parent'];
  183.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['req'], $context['_parent'], $context['loop']);
  184.             $context array_intersect_key($context$_parent) + $_parent;
  185.             // line 60
  186.             echo "\t\t\t\t\t\t</div>
  187. \t\t\t\t\t\t";
  188.             // line 61
  189.             $context["j"] = ((isset($context["j"]) || array_key_exists("j"$context) ? $context["j"] : (function () { throw new RuntimeError('Variable "j" does not exist.'61$this->source); })()) + 1);
  190.             // line 62
  191.             echo "\t\t\t\t\t";
  192.         }
  193.         $_parent $context['_parent'];
  194.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['chx'], $context['_parent'], $context['loop']);
  195.         $context array_intersect_key($context$_parent) + $_parent;
  196.         // line 63
  197.         echo "\t\t\t\t</div>
  198. \t\t\t\t<form method=\"get\" action=\"/search\">
  199. \t\t\t\t\t<div class=\"RechercheContainer\">
  200. \t\t\t\t\t\t<input class=\"form-control je-recherche-une-sq\" id=\"searchbar\" type=\"text\" style=\"\" placeholder=\"Recherche\" name=\"q\" required>
  201. \t\t\t\t\t</div>
  202. \t\t\t\t\t<div class=\"BtnRechercheContainer\">
  203. \t\t\t\t\t\t<button class=\"Btn_primary BtnRecherche\" type=\"submit\">Lancer la Recherche</button>
  204. \t\t\t\t\t</div>
  205. \t\t\t\t</form>
  206. \t\t\t</div>
  207. \t\t</div>
  208. \t\t\t
  209. \t\t<div class=\"recommandationContainer\">
  210. \t\t\t<h2 class=\"parcours-recommand h2\"><img class=\"img_titre\" src=\"";
  211.         // line 79
  212.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/TRAJECTOIRE_blue.png"), "html"nulltrue);
  213.         echo "\"/>Trajectoires recommandées!</h2>
  214. \t\t\t<p class=\"lorem-ipsum-dolor-si\">
  215. \t\t\t\tCes parcours de navigation vous sont proposés sur la base de votre utilisation de LUNE. N'hésitez pas à les suivres. Ils pourraient vous intéresser! Ils se construisent 
  216. \t\t\t\tau fur et à mesure de vos recherches et de votre navigation. Grâce à ces trajectoires, visitez des ressources auxquelles nous n'auriez pas pensés !
  217. \t\t\t</p>
  218. \t\t\t";
  219.         // line 84
  220.         echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\RecoController::index"));
  221.         echo "
  222. \t\t</div>
  223. \t\t<h2>Les dernières découvertes!</h2>
  224. \t\t<p>
  225. \t\t\tToutes les nouvelles ressources sont disponibles ici ! Voyagez à travers ces découvertes pour découvertes pour découvrir des nouveautés !
  226. \t\t</p>
  227. \t\t<div id=\"newArticlesContainer\"></div>
  228. \t\t";
  229.         // line 94
  230.         if ($this->extensions['SunCat\MobileDetectBundle\Twig\Extension\MobileDetectExtension']->isMobile()) {
  231.             // line 95
  232.             echo "\t\t\t<div style=\"display: flex; justify-content: center; margin-top: 1em\">
  233. \t\t\t\t<a class=\"prev\" onclick=\"plusArticle(-1)\">&#10094;</a>
  234. \t\t\t\t<a class=\"next\" onclick=\"plusArticle(1)\">&#10095;</a>
  235. \t\t\t</div>
  236. \t\t";
  237.         }
  238.         // line 100
  239.         echo "
  240. \t\t<div id=\"verif_container\" class=\"popup\">
  241. \t\t\t<div class=\"popup-box\">
  242. \t\t\t\t<h5 class=\"popup-title\">Voulez-vous vraiment supprimer ?</h5>
  243. \t\t\t\t<p class=\"popup-content\">Il ne sera pas possible de revenir en arrière.</p>
  244. \t\t\t\t<!--initialisation du bouton supprimer et retour pour annuler l'opération-->
  245. \t\t\t\t<div class=\"popup-bottom\">
  246. \t\t\t\t\t<button id=\"supr\" type=\"button\" class=\"popup-button\">
  247. \t\t\t\t\t\t<strong>Supprimer</strong>
  248. \t\t\t\t\t</button>
  249. \t\t\t\t\t<button id=\"retour\" type=\"button\" class=\"popup-button\" data-bs-dismiss=\"modal\">retour</button>
  250. \t\t\t\t</div>
  251. \t\t\t</div>
  252. \t\t</div>
  253. \t</div>
  254. \t";
  255.         // line 115
  256.         $this->loadTemplate("footer/index.html.twig""home/index.html.twig"115)->display($context);
  257.         // line 116
  258.         echo "
  259. \t";
  260.         // line 117
  261.         $this->loadTemplate("includes/volet.html.twig""home/index.html.twig"117)->display($context);
  262.         // line 118
  263.         echo "
  264. \t<script src=\"https://code.jquery.com/jquery-3.6.0.js\"></script>
  265. \t<script src=\"https://code.jquery.com/ui/1.13.1/jquery-ui.js\"></script>
  266. \t<script src=\"https://code.jquery.com/jquery-2.2.4.min.js\"></script>
  267. <script>
  268. \tlet articleIndex = 0;
  269. \tfunction plusArticle(n) {
  270. \t\tshowArticle(articleIndex += n);
  271. \t}
  272. \tfunction showArticle(n) {
  273. \t\tlet articles = \$('#newArticlesContainer .article');
  274. \t\tif (n >= articles.length) {
  275. \t\t\tarticleIndex = 0
  276. \t\t}
  277. \t\tif (n < 0) {
  278. \t\t\tarticleIndex = articles.length - 1
  279. \t\t}
  280. \t\tfor (i = 0; i < articles.length; i ++) {
  281. \t\t\tarticles[i].style.display = \"none\";
  282. \t\t}
  283. \t\tarticles[articleIndex].style.display = \"block\";
  284. \t}
  285. </script>
  286. <script type=\"module\">
  287. \timport ui_article from \"/assets/js/ui/ui_article.js\";
  288. \timport gestionVue from \"/assets/js/gestionVue.js\";
  289. \timport gestionSignal from \"/assets/js/gestionSignal.js\";
  290. \timport gestionIndicateur from \"/assets/js/gestion_indicateurs.js\";
  291. \timport article from \"/assets/js/article.js\";
  292. \timport favoris from \"/assets/js/favoris.js\";
  293. \timport affichage from \"/assets/js/affichage.js\";
  294. \t\$(document).ready(function () {
  295. \tloadNewArticles();
  296. \t// ------------ Functions
  297. \tfunction loadNewArticles() {
  298. \t\t\$('#newArticlesContainer').append(affichage.preloader())
  299. \t\t\$.ajax({
  300. \t\t\turl: '/search/ajaxNews',
  301. \t\t\ttype: 'POST',
  302. \t\t\tdataType: 'json',
  303. \t\t\tasync: true,
  304. \t\t\tsuccess: function (data, status) {
  305. \t\t\t\tshowNewArticles(data);
  306. \t\t\t},
  307. \t\t\terror: function (xhr, textStatus, errorThrown) {
  308. \t\t\t\tshowErrorMessage();
  309. \t\t\t}
  310. \t\t});
  311. \t}
  312. \tfunction showNewArticles(data) {
  313. \tlet articlesContainer = \$('#newArticlesContainer');
  314. \tlet string = '';
  315. \tlet connecte = false 
  316. \t";
  317.         // line 182
  318.         if ((twig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'182$this->source); })()), "user", [], "any"falsefalsefalse182) != null)) {
  319.             // line 183
  320.             echo "\tconnecte = true
  321. \t";
  322.         }
  323.         // line 185
  324.         echo "\tlet favs = ";
  325.         echo twig_escape_filter($this->env$this->env->getRuntime('Symfony\Bridge\Twig\Extension\SerializerRuntime')->serialize((isset($context["favs"]) || array_key_exists("favs"$context) ? $context["favs"] : (function () { throw new RuntimeError('Variable "favs" does not exist.'185$this->source); })()), "json"), "html"nulltrue);
  326.         echo "
  327. \t";
  328.         // line 186
  329.         if ($this->extensions['SunCat\MobileDetectBundle\Twig\Extension\MobileDetectExtension']->isMobile()) {
  330.             // line 187
  331.             echo "\tfor (let i = 0; i < 3; i++) {
  332. \tif (i > 0) {
  333. \tstring += '<div id=\"new-article\" class=\"article\" style=\"display: none\">';
  334. \t} else {
  335. \tstring += '<div id=\"new-article\" class=\"article\">';
  336. \t} data[i]['date'] = data[i]['date']['date'];
  337. \tstring += ui_article.creerCarteArticle(data[i], connecte, favs);
  338. \tstring += '</div>'
  339. \t}
  340. \t";
  341.         } else {
  342.             // line 197
  343.             echo "\tfor (let i = 0; i < 3; i++) {
  344. \tdata[i]['date'] = data[i]['date']['date'];
  345. \tstring += '<div class=\"article\">';
  346. \tstring += ui_article.creerCarteArticle(data[i], connecte, favs);
  347. \tstring += '</div>'
  348. \t}
  349. \t";
  350.         }
  351.         // line 204
  352.         echo "
  353. \t// remove loading
  354. \t\$('#loading').remove();
  355. \t// add articles
  356. \tarticlesContainer.append(string);
  357. \tarticle.init();
  358. \tfavoris.initAddFavoriteEvents();
  359. \tgestionVue.initialisation();
  360. \tgestionSignal.initialisation();
  361. \tgestionIndicateur.initialisation();
  362. \t}
  363. \tfunction showErrorMessage() {
  364. \t\$('#loading').remove();
  365. \t\$('#newArticlesContainer').append(`<div class=\"center-align\" id=\"loading\" style=\"margin-bottom: 1.5em\">
  366. \t\t\t\t\t\t\t\t\tErreur lors du chargement
  367. \t\t\t\t\t\t\t\t\t<br/>
  368. \t\t\t\t\t\t\t\t\t<a class=\"btn\" style=\"margin-top: 0.5em\">Réessayer</a>
  369. \t\t\t\t\t\t\t\t</div>`);
  370. \t\$('#loading').on('click', event => {
  371. \t\$('#loading').remove();
  372. \tloadNewArticles();
  373. \t})
  374. \t}
  375. \t});
  376. </script>
  377. <script>
  378. \tfunction CacherRequete(cls) {
  379. \t\tlet block = document.getElementsByClassName(cls);
  380. \t\tlet i = 0;
  381. \t\tfor (requete in block) {
  382. \t\t\tif (block[i] != undefined) {
  383. \t\t\t\tblock[i].style.display = \"none\";
  384. \t\t\t}
  385. \t\t\ti = i + 1;
  386. \t\t}
  387. \t}
  388. \tfunction AfficherRequete(cls, id) {
  389. \t\tlet block = document.getElementsByClassName(cls);
  390. \t\tlet i = id;
  391. \t\ti=i-1;
  392. \t\tif (block[i] != undefined) {
  393. \t\t\tblock[i].style.display = \"inline\";
  394. \t\t}
  395. \t}
  396. \tfunction rechercheGuideeChx(id1) {
  397. \t\tCacherRequete('Requete');
  398. \t\tAfficherRequete('Requete',id1);
  399. \t}
  400. \tfunction rechercheGuideeReq(msg, id1) {
  401. \t\tdocument.getElementById(\"searchbar\").value = document.getElementById(\"searchbar\").value + \" \" + msg;
  402. \t\tCacherRequete('Requete');
  403. \t\tAfficherRequete('Requete',id1);
  404. \t}
  405. \tfunction reinitRechercheGuidee() {
  406. \t\tdocument.getElementById(\"searchbar\").value = \"\";
  407. \t\tCacherRequete('Requete');
  408. \t\tAfficherRequete('Requete', '1');
  409. \t} 
  410. \t</script>
  411. ";
  412.         
  413.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  414.         
  415.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  416.     }
  417.     /**
  418.      * @codeCoverageIgnore
  419.      */
  420.     public function getTemplateName()
  421.     {
  422.         return "home/index.html.twig";
  423.     }
  424.     /**
  425.      * @codeCoverageIgnore
  426.      */
  427.     public function isTraitable()
  428.     {
  429.         return false;
  430.     }
  431.     /**
  432.      * @codeCoverageIgnore
  433.      */
  434.     public function getDebugInfo()
  435.     {
  436.         return array (  399 => 204,  390 => 197,  378 => 187,  376 => 186,  371 => 185,  367 => 183,  365 => 182,  299 => 118,  297 => 117,  294 => 116,  292 => 115,  275 => 100,  268 => 95,  266 => 94,  253 => 84,  245 => 79,  227 => 63,  221 => 62,  219 => 61,  216 => 60,  210 => 59,  200 => 57,  197 => 56,  193 => 55,  190 => 54,  186 => 53,  183 => 52,  181 => 51,  177 => 49,  171 => 48,  169 => 47,  162 => 46,  157 => 45,  155 => 44,  143 => 35,  132 => 27,  117 => 14,  107 => 13,  95 => 9,  83 => 8,  70 => 5,  60 => 4,  37 => 2,);
  437.     }
  438.     public function getSourceContext()
  439.     {
  440.         return new Source("{# templates/blog/index.html.twig #}
  441. {% extends \"base.html.twig\" %}
  442. {% block stylesheets %}
  443. \t{{ encore_entry_link_tags('app') }}
  444. {% endblock %}
  445. {% block title %}Accueil |
  446. \t{{ parent() }}
  447. {% endblock %}
  448. {% block content %}
  449. \t<div class=\"screen\">
  450. \t\t<div class=\"entete\">
  451. \t\t\t<div class=\"text\">
  452. \t\t\t\t<h1>LUNE</h1>
  453. \t\t\t\t<h3>portaiL des Usages du Numérique Éducatif</h3>
  454. \t\t\t\t<p class=\"accroche\">LUNE est un portail qui intègre de l'intelligence artificielle
  455. \t\t\t\t pour faciliter l'accès au personnel de l'éducation nationale à
  456. \t\t\t\t des ressources pédagogiques. Grâce à LUNE, trouvez depuis
  457. \t\t\t\t un seul endroit vos ressources pédagogiques pour les usages du 
  458. \t\t\t\t numérique.</p>
  459. \t\t\t</div>
  460. \t\t\t<div class=\"img_logo\">
  461. \t\t\t\t<img class=\"img_text\" src=\"{{ asset('build/images/ICONE-Turquoise.png') }}\"/>
  462. \t\t\t</div>
  463. \t\t</div>
  464. \t
  465. \t\t<!--Telescope-->
  466. \t\t<div class=\"telescope\">
  467. \t\t\t<h2><img class=\"img_titre\" src=\"{{ asset('build/images/TELESCOPE_blue.png') }}\"/>Le téléscope</h2>
  468. \t\t\t<p>Vous cherchez quelque chose ? Le télécsope est là pour vous aider ! Pensez, écrivez et laissez le chercher! Le téléscope vous emmènera découvrir de nombreuses
  469. \t\t\tressources issues de sites internets d'intérêts. Vous pouvez également vous laisser guider dans votre recherhe en sélectionnant des thématiques.</p>
  470. \t\t
  471. \t\t\t<div class=\"ContainerTelescope\">
  472. \t\t\t\t<div class=\"SousTitre-Telescope\">Je recherche:</div>
  473. \t\t\t\t<div class=\"ChoixContainer\">
  474. \t\t\t\t\t{% set i = 1 %}
  475. \t\t\t\t\t{% for chx in choix %}
  476. \t\t\t\t\t\t<button class=\"Btn_second ChoixTelescope\" onclick=\"rechercheGuideeChx('{{i}}')\">{{chx.nom}}</button>
  477. \t\t\t\t\t\t{% set i = i + 1 %}
  478. \t\t\t\t\t{% endfor %}
  479. \t\t\t\t</div>
  480. \t\t\t\t{% set j = 2 %}
  481. \t\t\t\t<div class=\"RequeteContainer\">
  482. \t\t\t\t\t{% for chx in choix %}
  483. \t\t\t\t\t\t<div style=\"inline\" class='Requete'>
  484. \t\t\t\t\t\t\t{% for req in requete %}
  485. \t\t\t\t\t\t\t\t{% if req.choix == chx %}
  486. \t\t\t\t\t\t\t\t\t<button class=\"Btn_second RequeteTelescope\" onclick=\"rechercheGuideeReq('{{req.nom}}', '{{j}}')\">{{req.nom}}</button>
  487. \t\t\t\t\t\t\t\t{% endif %}
  488. \t\t\t\t\t\t\t{% endfor %}
  489. \t\t\t\t\t\t</div>
  490. \t\t\t\t\t\t{% set j = j + 1 %}
  491. \t\t\t\t\t{% endfor %}
  492. \t\t\t\t</div>
  493. \t\t\t\t<form method=\"get\" action=\"/search\">
  494. \t\t\t\t\t<div class=\"RechercheContainer\">
  495. \t\t\t\t\t\t<input class=\"form-control je-recherche-une-sq\" id=\"searchbar\" type=\"text\" style=\"\" placeholder=\"Recherche\" name=\"q\" required>
  496. \t\t\t\t\t</div>
  497. \t\t\t\t\t<div class=\"BtnRechercheContainer\">
  498. \t\t\t\t\t\t<button class=\"Btn_primary BtnRecherche\" type=\"submit\">Lancer la Recherche</button>
  499. \t\t\t\t\t</div>
  500. \t\t\t\t</form>
  501. \t\t\t</div>
  502. \t\t</div>
  503. \t\t\t
  504. \t\t<div class=\"recommandationContainer\">
  505. \t\t\t<h2 class=\"parcours-recommand h2\"><img class=\"img_titre\" src=\"{{ asset('build/images/TRAJECTOIRE_blue.png') }}\"/>Trajectoires recommandées!</h2>
  506. \t\t\t<p class=\"lorem-ipsum-dolor-si\">
  507. \t\t\t\tCes parcours de navigation vous sont proposés sur la base de votre utilisation de LUNE. N'hésitez pas à les suivres. Ils pourraient vous intéresser! Ils se construisent 
  508. \t\t\t\tau fur et à mesure de vos recherches et de votre navigation. Grâce à ces trajectoires, visitez des ressources auxquelles nous n'auriez pas pensés !
  509. \t\t\t</p>
  510. \t\t\t{{ render(controller('App\\\\Controller\\\\RecoController::index')) }}
  511. \t\t</div>
  512. \t\t<h2>Les dernières découvertes!</h2>
  513. \t\t<p>
  514. \t\t\tToutes les nouvelles ressources sont disponibles ici ! Voyagez à travers ces découvertes pour découvertes pour découvrir des nouveautés !
  515. \t\t</p>
  516. \t\t<div id=\"newArticlesContainer\"></div>
  517. \t\t{% if is_mobile() %}
  518. \t\t\t<div style=\"display: flex; justify-content: center; margin-top: 1em\">
  519. \t\t\t\t<a class=\"prev\" onclick=\"plusArticle(-1)\">&#10094;</a>
  520. \t\t\t\t<a class=\"next\" onclick=\"plusArticle(1)\">&#10095;</a>
  521. \t\t\t</div>
  522. \t\t{% endif %}
  523. \t\t<div id=\"verif_container\" class=\"popup\">
  524. \t\t\t<div class=\"popup-box\">
  525. \t\t\t\t<h5 class=\"popup-title\">Voulez-vous vraiment supprimer ?</h5>
  526. \t\t\t\t<p class=\"popup-content\">Il ne sera pas possible de revenir en arrière.</p>
  527. \t\t\t\t<!--initialisation du bouton supprimer et retour pour annuler l'opération-->
  528. \t\t\t\t<div class=\"popup-bottom\">
  529. \t\t\t\t\t<button id=\"supr\" type=\"button\" class=\"popup-button\">
  530. \t\t\t\t\t\t<strong>Supprimer</strong>
  531. \t\t\t\t\t</button>
  532. \t\t\t\t\t<button id=\"retour\" type=\"button\" class=\"popup-button\" data-bs-dismiss=\"modal\">retour</button>
  533. \t\t\t\t</div>
  534. \t\t\t</div>
  535. \t\t</div>
  536. \t</div>
  537. \t{% include \"footer/index.html.twig\" %}
  538. \t{% include \"includes/volet.html.twig\" %}
  539. \t<script src=\"https://code.jquery.com/jquery-3.6.0.js\"></script>
  540. \t<script src=\"https://code.jquery.com/ui/1.13.1/jquery-ui.js\"></script>
  541. \t<script src=\"https://code.jquery.com/jquery-2.2.4.min.js\"></script>
  542. <script>
  543. \tlet articleIndex = 0;
  544. \tfunction plusArticle(n) {
  545. \t\tshowArticle(articleIndex += n);
  546. \t}
  547. \tfunction showArticle(n) {
  548. \t\tlet articles = \$('#newArticlesContainer .article');
  549. \t\tif (n >= articles.length) {
  550. \t\t\tarticleIndex = 0
  551. \t\t}
  552. \t\tif (n < 0) {
  553. \t\t\tarticleIndex = articles.length - 1
  554. \t\t}
  555. \t\tfor (i = 0; i < articles.length; i ++) {
  556. \t\t\tarticles[i].style.display = \"none\";
  557. \t\t}
  558. \t\tarticles[articleIndex].style.display = \"block\";
  559. \t}
  560. </script>
  561. <script type=\"module\">
  562. \timport ui_article from \"/assets/js/ui/ui_article.js\";
  563. \timport gestionVue from \"/assets/js/gestionVue.js\";
  564. \timport gestionSignal from \"/assets/js/gestionSignal.js\";
  565. \timport gestionIndicateur from \"/assets/js/gestion_indicateurs.js\";
  566. \timport article from \"/assets/js/article.js\";
  567. \timport favoris from \"/assets/js/favoris.js\";
  568. \timport affichage from \"/assets/js/affichage.js\";
  569. \t\$(document).ready(function () {
  570. \tloadNewArticles();
  571. \t// ------------ Functions
  572. \tfunction loadNewArticles() {
  573. \t\t\$('#newArticlesContainer').append(affichage.preloader())
  574. \t\t\$.ajax({
  575. \t\t\turl: '/search/ajaxNews',
  576. \t\t\ttype: 'POST',
  577. \t\t\tdataType: 'json',
  578. \t\t\tasync: true,
  579. \t\t\tsuccess: function (data, status) {
  580. \t\t\t\tshowNewArticles(data);
  581. \t\t\t},
  582. \t\t\terror: function (xhr, textStatus, errorThrown) {
  583. \t\t\t\tshowErrorMessage();
  584. \t\t\t}
  585. \t\t});
  586. \t}
  587. \tfunction showNewArticles(data) {
  588. \tlet articlesContainer = \$('#newArticlesContainer');
  589. \tlet string = '';
  590. \tlet connecte = false 
  591. \t{% if app.user != null %}
  592. \tconnecte = true
  593. \t{% endif %}
  594. \tlet favs = {{ favs|serialize(format='json') }}
  595. \t{% if is_mobile() %}
  596. \tfor (let i = 0; i < 3; i++) {
  597. \tif (i > 0) {
  598. \tstring += '<div id=\"new-article\" class=\"article\" style=\"display: none\">';
  599. \t} else {
  600. \tstring += '<div id=\"new-article\" class=\"article\">';
  601. \t} data[i]['date'] = data[i]['date']['date'];
  602. \tstring += ui_article.creerCarteArticle(data[i], connecte, favs);
  603. \tstring += '</div>'
  604. \t}
  605. \t{% else %}
  606. \tfor (let i = 0; i < 3; i++) {
  607. \tdata[i]['date'] = data[i]['date']['date'];
  608. \tstring += '<div class=\"article\">';
  609. \tstring += ui_article.creerCarteArticle(data[i], connecte, favs);
  610. \tstring += '</div>'
  611. \t}
  612. \t{% endif %}
  613. \t// remove loading
  614. \t\$('#loading').remove();
  615. \t// add articles
  616. \tarticlesContainer.append(string);
  617. \tarticle.init();
  618. \tfavoris.initAddFavoriteEvents();
  619. \tgestionVue.initialisation();
  620. \tgestionSignal.initialisation();
  621. \tgestionIndicateur.initialisation();
  622. \t}
  623. \tfunction showErrorMessage() {
  624. \t\$('#loading').remove();
  625. \t\$('#newArticlesContainer').append(`<div class=\"center-align\" id=\"loading\" style=\"margin-bottom: 1.5em\">
  626. \t\t\t\t\t\t\t\t\tErreur lors du chargement
  627. \t\t\t\t\t\t\t\t\t<br/>
  628. \t\t\t\t\t\t\t\t\t<a class=\"btn\" style=\"margin-top: 0.5em\">Réessayer</a>
  629. \t\t\t\t\t\t\t\t</div>`);
  630. \t\$('#loading').on('click', event => {
  631. \t\$('#loading').remove();
  632. \tloadNewArticles();
  633. \t})
  634. \t}
  635. \t});
  636. </script>
  637. <script>
  638. \tfunction CacherRequete(cls) {
  639. \t\tlet block = document.getElementsByClassName(cls);
  640. \t\tlet i = 0;
  641. \t\tfor (requete in block) {
  642. \t\t\tif (block[i] != undefined) {
  643. \t\t\t\tblock[i].style.display = \"none\";
  644. \t\t\t}
  645. \t\t\ti = i + 1;
  646. \t\t}
  647. \t}
  648. \tfunction AfficherRequete(cls, id) {
  649. \t\tlet block = document.getElementsByClassName(cls);
  650. \t\tlet i = id;
  651. \t\ti=i-1;
  652. \t\tif (block[i] != undefined) {
  653. \t\t\tblock[i].style.display = \"inline\";
  654. \t\t}
  655. \t}
  656. \tfunction rechercheGuideeChx(id1) {
  657. \t\tCacherRequete('Requete');
  658. \t\tAfficherRequete('Requete',id1);
  659. \t}
  660. \tfunction rechercheGuideeReq(msg, id1) {
  661. \t\tdocument.getElementById(\"searchbar\").value = document.getElementById(\"searchbar\").value + \" \" + msg;
  662. \t\tCacherRequete('Requete');
  663. \t\tAfficherRequete('Requete',id1);
  664. \t}
  665. \tfunction reinitRechercheGuidee() {
  666. \t\tdocument.getElementById(\"searchbar\").value = \"\";
  667. \t\tCacherRequete('Requete');
  668. \t\tAfficherRequete('Requete', '1');
  669. \t} 
  670. \t</script>
  671. {% endblock %}
  672. ""home/index.html.twig""/var/www/dev.portail-lune.fr/PortailLune/templates/home/index.html.twig");
  673.     }
  674. }