<?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;
/* home/index.html.twig */
class __TwigTemplate_6cf145df046b67e5022fd45fc6736465 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'stylesheets' => [$this, 'block_stylesheets'],
'title' => [$this, 'block_title'],
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 2
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", "home/index.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "home/index.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "home/index.html.twig", 2);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 4
public function block_stylesheets($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", "stylesheets"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
// line 5
echo "\t";
echo $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackLinkTags("app");
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 8
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 "Accueil |
\t";
// line 9
$this->displayParentBlock("title", $context, $blocks);
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 13
public function block_content($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", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 14
echo "\t<div class=\"screen\">
\t\t<div class=\"entete\">
\t\t\t<div class=\"text\">
\t\t\t\t<h1>LUNE</h1>
\t\t\t\t<h3>portaiL des Usages du Numérique Éducatif</h3>
\t\t\t\t<p class=\"accroche\">LUNE est un portail qui intègre de l'intelligence artificielle
\t\t\t\t pour faciliter l'accès au personnel de l'éducation nationale à
\t\t\t\t des ressources pédagogiques. Grâce à LUNE, trouvez depuis
\t\t\t\t un seul endroit vos ressources pédagogiques pour les usages du
\t\t\t\t numérique.</p>
\t\t\t</div>
\t\t\t<div class=\"img_logo\">
\t\t\t\t<img class=\"img_text\" src=\"";
// line 27
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/ICONE-Turquoise.png"), "html", null, true);
echo "\"/>
\t\t\t</div>
\t\t</div>
\t
\t\t<!--Telescope-->
\t\t<div class=\"telescope\">
\t\t\t<h2><img class=\"img_titre\" src=\"";
// line 35
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/TELESCOPE_blue.png"), "html", null, true);
echo "\"/>Le téléscope</h2>
\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
\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>
\t\t
\t\t\t<div class=\"ContainerTelescope\">
\t\t\t\t<div class=\"SousTitre-Telescope\">Je recherche:</div>
\t\t\t\t<div class=\"ChoixContainer\">
\t\t\t\t\t";
// line 44
$context["i"] = 1;
// line 45
echo "\t\t\t\t\t";
$context['_parent'] = $context;
$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); })()));
foreach ($context['_seq'] as $context["_key"] => $context["chx"]) {
// line 46
echo "\t\t\t\t\t\t<button class=\"Btn_second ChoixTelescope\" onclick=\"rechercheGuideeChx('";
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", null, true);
echo "')\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["chx"], "nom", [], "any", false, false, false, 46), "html", null, true);
echo "</button>
\t\t\t\t\t\t";
// line 47
$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);
// line 48
echo "\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['chx'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 49
echo "\t\t\t\t</div>
\t\t\t\t";
// line 51
$context["j"] = 2;
// line 52
echo "\t\t\t\t<div class=\"RequeteContainer\">
\t\t\t\t\t";
// line 53
$context['_parent'] = $context;
$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); })()));
foreach ($context['_seq'] as $context["_key"] => $context["chx"]) {
// line 54
echo "\t\t\t\t\t\t<div style=\"inline\" class='Requete'>
\t\t\t\t\t\t\t";
// line 55
$context['_parent'] = $context;
$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); })()));
foreach ($context['_seq'] as $context["_key"] => $context["req"]) {
// line 56
echo "\t\t\t\t\t\t\t\t";
if ((twig_get_attribute($this->env, $this->source, $context["req"], "choix", [], "any", false, false, false, 56) == $context["chx"])) {
// line 57
echo "\t\t\t\t\t\t\t\t\t<button class=\"Btn_second RequeteTelescope\" onclick=\"rechercheGuideeReq('";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["req"], "nom", [], "any", false, false, false, 57), "html", null, true);
echo "', '";
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", null, true);
echo "')\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["req"], "nom", [], "any", false, false, false, 57), "html", null, true);
echo "</button>
\t\t\t\t\t\t\t\t";
}
// line 59
echo "\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['req'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 60
echo "\t\t\t\t\t\t</div>
\t\t\t\t\t\t";
// line 61
$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);
// line 62
echo "\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['chx'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 63
echo "\t\t\t\t</div>
\t\t\t\t<form method=\"get\" action=\"/search\">
\t\t\t\t\t<div class=\"RechercheContainer\">
\t\t\t\t\t\t<input class=\"form-control je-recherche-une-sq\" id=\"searchbar\" type=\"text\" style=\"\" placeholder=\"Recherche\" name=\"q\" required>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"BtnRechercheContainer\">
\t\t\t\t\t\t<button class=\"Btn_primary BtnRecherche\" type=\"submit\">Lancer la Recherche</button>
\t\t\t\t\t</div>
\t\t\t\t</form>
\t\t\t</div>
\t\t</div>
\t\t\t
\t\t<div class=\"recommandationContainer\">
\t\t\t<h2 class=\"parcours-recommand h2\"><img class=\"img_titre\" src=\"";
// line 79
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/TRAJECTOIRE_blue.png"), "html", null, true);
echo "\"/>Trajectoires recommandées!</h2>
\t\t\t<p class=\"lorem-ipsum-dolor-si\">
\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
\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 !
\t\t\t</p>
\t\t\t";
// line 84
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\RecoController::index"));
echo "
\t\t</div>
\t\t<h2>Les dernières découvertes!</h2>
\t\t<p>
\t\t\tToutes les nouvelles ressources sont disponibles ici ! Voyagez à travers ces découvertes pour découvertes pour découvrir des nouveautés !
\t\t</p>
\t\t<div id=\"newArticlesContainer\"></div>
\t\t";
// line 94
if ($this->extensions['SunCat\MobileDetectBundle\Twig\Extension\MobileDetectExtension']->isMobile()) {
// line 95
echo "\t\t\t<div style=\"display: flex; justify-content: center; margin-top: 1em\">
\t\t\t\t<a class=\"prev\" onclick=\"plusArticle(-1)\">❮</a>
\t\t\t\t<a class=\"next\" onclick=\"plusArticle(1)\">❯</a>
\t\t\t</div>
\t\t";
}
// line 100
echo "
\t\t<div id=\"verif_container\" class=\"popup\">
\t\t\t<div class=\"popup-box\">
\t\t\t\t<h5 class=\"popup-title\">Voulez-vous vraiment supprimer ?</h5>
\t\t\t\t<p class=\"popup-content\">Il ne sera pas possible de revenir en arrière.</p>
\t\t\t\t<!--initialisation du bouton supprimer et retour pour annuler l'opération-->
\t\t\t\t<div class=\"popup-bottom\">
\t\t\t\t\t<button id=\"supr\" type=\"button\" class=\"popup-button\">
\t\t\t\t\t\t<strong>Supprimer</strong>
\t\t\t\t\t</button>
\t\t\t\t\t<button id=\"retour\" type=\"button\" class=\"popup-button\" data-bs-dismiss=\"modal\">retour</button>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
\t";
// line 115
$this->loadTemplate("footer/index.html.twig", "home/index.html.twig", 115)->display($context);
// line 116
echo "
\t";
// line 117
$this->loadTemplate("includes/volet.html.twig", "home/index.html.twig", 117)->display($context);
// line 118
echo "
\t<script src=\"https://code.jquery.com/jquery-3.6.0.js\"></script>
\t<script src=\"https://code.jquery.com/ui/1.13.1/jquery-ui.js\"></script>
\t<script src=\"https://code.jquery.com/jquery-2.2.4.min.js\"></script>
<script>
\tlet articleIndex = 0;
\tfunction plusArticle(n) {
\t\tshowArticle(articleIndex += n);
\t}
\tfunction showArticle(n) {
\t\tlet articles = \$('#newArticlesContainer .article');
\t\tif (n >= articles.length) {
\t\t\tarticleIndex = 0
\t\t}
\t\tif (n < 0) {
\t\t\tarticleIndex = articles.length - 1
\t\t}
\t\tfor (i = 0; i < articles.length; i ++) {
\t\t\tarticles[i].style.display = \"none\";
\t\t}
\t\tarticles[articleIndex].style.display = \"block\";
\t}
</script>
<script type=\"module\">
\timport ui_article from \"/assets/js/ui/ui_article.js\";
\timport gestionVue from \"/assets/js/gestionVue.js\";
\timport gestionSignal from \"/assets/js/gestionSignal.js\";
\timport gestionIndicateur from \"/assets/js/gestion_indicateurs.js\";
\timport article from \"/assets/js/article.js\";
\timport favoris from \"/assets/js/favoris.js\";
\timport affichage from \"/assets/js/affichage.js\";
\t\$(document).ready(function () {
\tloadNewArticles();
\t// ------------ Functions
\tfunction loadNewArticles() {
\t\t\$('#newArticlesContainer').append(affichage.preloader())
\t\t\$.ajax({
\t\t\turl: '/search/ajaxNews',
\t\t\ttype: 'POST',
\t\t\tdataType: 'json',
\t\t\tasync: true,
\t\t\tsuccess: function (data, status) {
\t\t\t\tshowNewArticles(data);
\t\t\t},
\t\t\terror: function (xhr, textStatus, errorThrown) {
\t\t\t\tshowErrorMessage();
\t\t\t}
\t\t});
\t}
\tfunction showNewArticles(data) {
\tlet articlesContainer = \$('#newArticlesContainer');
\tlet string = '';
\tlet connecte = false
\t";
// line 182
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", false, false, false, 182) != null)) {
// line 183
echo "\tconnecte = true
\t";
}
// line 185
echo "\tlet favs = ";
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", null, true);
echo "
\t";
// line 186
if ($this->extensions['SunCat\MobileDetectBundle\Twig\Extension\MobileDetectExtension']->isMobile()) {
// line 187
echo "\tfor (let i = 0; i < 3; i++) {
\tif (i > 0) {
\tstring += '<div id=\"new-article\" class=\"article\" style=\"display: none\">';
\t} else {
\tstring += '<div id=\"new-article\" class=\"article\">';
\t} data[i]['date'] = data[i]['date']['date'];
\tstring += ui_article.creerCarteArticle(data[i], connecte, favs);
\tstring += '</div>'
\t}
\t";
} else {
// line 197
echo "\tfor (let i = 0; i < 3; i++) {
\tdata[i]['date'] = data[i]['date']['date'];
\tstring += '<div class=\"article\">';
\tstring += ui_article.creerCarteArticle(data[i], connecte, favs);
\tstring += '</div>'
\t}
\t";
}
// line 204
echo "
\t// remove loading
\t\$('#loading').remove();
\t// add articles
\tarticlesContainer.append(string);
\tarticle.init();
\tfavoris.initAddFavoriteEvents();
\tgestionVue.initialisation();
\tgestionSignal.initialisation();
\tgestionIndicateur.initialisation();
\t}
\tfunction showErrorMessage() {
\t\$('#loading').remove();
\t\$('#newArticlesContainer').append(`<div class=\"center-align\" id=\"loading\" style=\"margin-bottom: 1.5em\">
\t\t\t\t\t\t\t\t\tErreur lors du chargement
\t\t\t\t\t\t\t\t\t<br/>
\t\t\t\t\t\t\t\t\t<a class=\"btn\" style=\"margin-top: 0.5em\">Réessayer</a>
\t\t\t\t\t\t\t\t</div>`);
\t\$('#loading').on('click', event => {
\t\$('#loading').remove();
\tloadNewArticles();
\t})
\t}
\t});
</script>
<script>
\tfunction CacherRequete(cls) {
\t\tlet block = document.getElementsByClassName(cls);
\t\tlet i = 0;
\t\tfor (requete in block) {
\t\t\tif (block[i] != undefined) {
\t\t\t\tblock[i].style.display = \"none\";
\t\t\t}
\t\t\ti = i + 1;
\t\t}
\t}
\tfunction AfficherRequete(cls, id) {
\t\tlet block = document.getElementsByClassName(cls);
\t\tlet i = id;
\t\ti=i-1;
\t\tif (block[i] != undefined) {
\t\t\tblock[i].style.display = \"inline\";
\t\t}
\t}
\tfunction rechercheGuideeChx(id1) {
\t\tCacherRequete('Requete');
\t\tAfficherRequete('Requete',id1);
\t}
\tfunction rechercheGuideeReq(msg, id1) {
\t\tdocument.getElementById(\"searchbar\").value = document.getElementById(\"searchbar\").value + \" \" + msg;
\t\tCacherRequete('Requete');
\t\tAfficherRequete('Requete',id1);
\t}
\tfunction reinitRechercheGuidee() {
\t\tdocument.getElementById(\"searchbar\").value = \"\";
\t\tCacherRequete('Requete');
\t\tAfficherRequete('Requete', '1');
\t}
\t</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "home/index.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{# templates/blog/index.html.twig #}
{% extends \"base.html.twig\" %}
{% block stylesheets %}
\t{{ encore_entry_link_tags('app') }}
{% endblock %}
{% block title %}Accueil |
\t{{ parent() }}
{% endblock %}
{% block content %}
\t<div class=\"screen\">
\t\t<div class=\"entete\">
\t\t\t<div class=\"text\">
\t\t\t\t<h1>LUNE</h1>
\t\t\t\t<h3>portaiL des Usages du Numérique Éducatif</h3>
\t\t\t\t<p class=\"accroche\">LUNE est un portail qui intègre de l'intelligence artificielle
\t\t\t\t pour faciliter l'accès au personnel de l'éducation nationale à
\t\t\t\t des ressources pédagogiques. Grâce à LUNE, trouvez depuis
\t\t\t\t un seul endroit vos ressources pédagogiques pour les usages du
\t\t\t\t numérique.</p>
\t\t\t</div>
\t\t\t<div class=\"img_logo\">
\t\t\t\t<img class=\"img_text\" src=\"{{ asset('build/images/ICONE-Turquoise.png') }}\"/>
\t\t\t</div>
\t\t</div>
\t
\t\t<!--Telescope-->
\t\t<div class=\"telescope\">
\t\t\t<h2><img class=\"img_titre\" src=\"{{ asset('build/images/TELESCOPE_blue.png') }}\"/>Le téléscope</h2>
\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
\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>
\t\t
\t\t\t<div class=\"ContainerTelescope\">
\t\t\t\t<div class=\"SousTitre-Telescope\">Je recherche:</div>
\t\t\t\t<div class=\"ChoixContainer\">
\t\t\t\t\t{% set i = 1 %}
\t\t\t\t\t{% for chx in choix %}
\t\t\t\t\t\t<button class=\"Btn_second ChoixTelescope\" onclick=\"rechercheGuideeChx('{{i}}')\">{{chx.nom}}</button>
\t\t\t\t\t\t{% set i = i + 1 %}
\t\t\t\t\t{% endfor %}
\t\t\t\t</div>
\t\t\t\t{% set j = 2 %}
\t\t\t\t<div class=\"RequeteContainer\">
\t\t\t\t\t{% for chx in choix %}
\t\t\t\t\t\t<div style=\"inline\" class='Requete'>
\t\t\t\t\t\t\t{% for req in requete %}
\t\t\t\t\t\t\t\t{% if req.choix == chx %}
\t\t\t\t\t\t\t\t\t<button class=\"Btn_second RequeteTelescope\" onclick=\"rechercheGuideeReq('{{req.nom}}', '{{j}}')\">{{req.nom}}</button>
\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t</div>
\t\t\t\t\t\t{% set j = j + 1 %}
\t\t\t\t\t{% endfor %}
\t\t\t\t</div>
\t\t\t\t<form method=\"get\" action=\"/search\">
\t\t\t\t\t<div class=\"RechercheContainer\">
\t\t\t\t\t\t<input class=\"form-control je-recherche-une-sq\" id=\"searchbar\" type=\"text\" style=\"\" placeholder=\"Recherche\" name=\"q\" required>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"BtnRechercheContainer\">
\t\t\t\t\t\t<button class=\"Btn_primary BtnRecherche\" type=\"submit\">Lancer la Recherche</button>
\t\t\t\t\t</div>
\t\t\t\t</form>
\t\t\t</div>
\t\t</div>
\t\t\t
\t\t<div class=\"recommandationContainer\">
\t\t\t<h2 class=\"parcours-recommand h2\"><img class=\"img_titre\" src=\"{{ asset('build/images/TRAJECTOIRE_blue.png') }}\"/>Trajectoires recommandées!</h2>
\t\t\t<p class=\"lorem-ipsum-dolor-si\">
\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
\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 !
\t\t\t</p>
\t\t\t{{ render(controller('App\\\\Controller\\\\RecoController::index')) }}
\t\t</div>
\t\t<h2>Les dernières découvertes!</h2>
\t\t<p>
\t\t\tToutes les nouvelles ressources sont disponibles ici ! Voyagez à travers ces découvertes pour découvertes pour découvrir des nouveautés !
\t\t</p>
\t\t<div id=\"newArticlesContainer\"></div>
\t\t{% if is_mobile() %}
\t\t\t<div style=\"display: flex; justify-content: center; margin-top: 1em\">
\t\t\t\t<a class=\"prev\" onclick=\"plusArticle(-1)\">❮</a>
\t\t\t\t<a class=\"next\" onclick=\"plusArticle(1)\">❯</a>
\t\t\t</div>
\t\t{% endif %}
\t\t<div id=\"verif_container\" class=\"popup\">
\t\t\t<div class=\"popup-box\">
\t\t\t\t<h5 class=\"popup-title\">Voulez-vous vraiment supprimer ?</h5>
\t\t\t\t<p class=\"popup-content\">Il ne sera pas possible de revenir en arrière.</p>
\t\t\t\t<!--initialisation du bouton supprimer et retour pour annuler l'opération-->
\t\t\t\t<div class=\"popup-bottom\">
\t\t\t\t\t<button id=\"supr\" type=\"button\" class=\"popup-button\">
\t\t\t\t\t\t<strong>Supprimer</strong>
\t\t\t\t\t</button>
\t\t\t\t\t<button id=\"retour\" type=\"button\" class=\"popup-button\" data-bs-dismiss=\"modal\">retour</button>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
\t{% include \"footer/index.html.twig\" %}
\t{% include \"includes/volet.html.twig\" %}
\t<script src=\"https://code.jquery.com/jquery-3.6.0.js\"></script>
\t<script src=\"https://code.jquery.com/ui/1.13.1/jquery-ui.js\"></script>
\t<script src=\"https://code.jquery.com/jquery-2.2.4.min.js\"></script>
<script>
\tlet articleIndex = 0;
\tfunction plusArticle(n) {
\t\tshowArticle(articleIndex += n);
\t}
\tfunction showArticle(n) {
\t\tlet articles = \$('#newArticlesContainer .article');
\t\tif (n >= articles.length) {
\t\t\tarticleIndex = 0
\t\t}
\t\tif (n < 0) {
\t\t\tarticleIndex = articles.length - 1
\t\t}
\t\tfor (i = 0; i < articles.length; i ++) {
\t\t\tarticles[i].style.display = \"none\";
\t\t}
\t\tarticles[articleIndex].style.display = \"block\";
\t}
</script>
<script type=\"module\">
\timport ui_article from \"/assets/js/ui/ui_article.js\";
\timport gestionVue from \"/assets/js/gestionVue.js\";
\timport gestionSignal from \"/assets/js/gestionSignal.js\";
\timport gestionIndicateur from \"/assets/js/gestion_indicateurs.js\";
\timport article from \"/assets/js/article.js\";
\timport favoris from \"/assets/js/favoris.js\";
\timport affichage from \"/assets/js/affichage.js\";
\t\$(document).ready(function () {
\tloadNewArticles();
\t// ------------ Functions
\tfunction loadNewArticles() {
\t\t\$('#newArticlesContainer').append(affichage.preloader())
\t\t\$.ajax({
\t\t\turl: '/search/ajaxNews',
\t\t\ttype: 'POST',
\t\t\tdataType: 'json',
\t\t\tasync: true,
\t\t\tsuccess: function (data, status) {
\t\t\t\tshowNewArticles(data);
\t\t\t},
\t\t\terror: function (xhr, textStatus, errorThrown) {
\t\t\t\tshowErrorMessage();
\t\t\t}
\t\t});
\t}
\tfunction showNewArticles(data) {
\tlet articlesContainer = \$('#newArticlesContainer');
\tlet string = '';
\tlet connecte = false
\t{% if app.user != null %}
\tconnecte = true
\t{% endif %}
\tlet favs = {{ favs|serialize(format='json') }}
\t{% if is_mobile() %}
\tfor (let i = 0; i < 3; i++) {
\tif (i > 0) {
\tstring += '<div id=\"new-article\" class=\"article\" style=\"display: none\">';
\t} else {
\tstring += '<div id=\"new-article\" class=\"article\">';
\t} data[i]['date'] = data[i]['date']['date'];
\tstring += ui_article.creerCarteArticle(data[i], connecte, favs);
\tstring += '</div>'
\t}
\t{% else %}
\tfor (let i = 0; i < 3; i++) {
\tdata[i]['date'] = data[i]['date']['date'];
\tstring += '<div class=\"article\">';
\tstring += ui_article.creerCarteArticle(data[i], connecte, favs);
\tstring += '</div>'
\t}
\t{% endif %}
\t// remove loading
\t\$('#loading').remove();
\t// add articles
\tarticlesContainer.append(string);
\tarticle.init();
\tfavoris.initAddFavoriteEvents();
\tgestionVue.initialisation();
\tgestionSignal.initialisation();
\tgestionIndicateur.initialisation();
\t}
\tfunction showErrorMessage() {
\t\$('#loading').remove();
\t\$('#newArticlesContainer').append(`<div class=\"center-align\" id=\"loading\" style=\"margin-bottom: 1.5em\">
\t\t\t\t\t\t\t\t\tErreur lors du chargement
\t\t\t\t\t\t\t\t\t<br/>
\t\t\t\t\t\t\t\t\t<a class=\"btn\" style=\"margin-top: 0.5em\">Réessayer</a>
\t\t\t\t\t\t\t\t</div>`);
\t\$('#loading').on('click', event => {
\t\$('#loading').remove();
\tloadNewArticles();
\t})
\t}
\t});
</script>
<script>
\tfunction CacherRequete(cls) {
\t\tlet block = document.getElementsByClassName(cls);
\t\tlet i = 0;
\t\tfor (requete in block) {
\t\t\tif (block[i] != undefined) {
\t\t\t\tblock[i].style.display = \"none\";
\t\t\t}
\t\t\ti = i + 1;
\t\t}
\t}
\tfunction AfficherRequete(cls, id) {
\t\tlet block = document.getElementsByClassName(cls);
\t\tlet i = id;
\t\ti=i-1;
\t\tif (block[i] != undefined) {
\t\t\tblock[i].style.display = \"inline\";
\t\t}
\t}
\tfunction rechercheGuideeChx(id1) {
\t\tCacherRequete('Requete');
\t\tAfficherRequete('Requete',id1);
\t}
\tfunction rechercheGuideeReq(msg, id1) {
\t\tdocument.getElementById(\"searchbar\").value = document.getElementById(\"searchbar\").value + \" \" + msg;
\t\tCacherRequete('Requete');
\t\tAfficherRequete('Requete',id1);
\t}
\tfunction reinitRechercheGuidee() {
\t\tdocument.getElementById(\"searchbar\").value = \"\";
\t\tCacherRequete('Requete');
\t\tAfficherRequete('Requete', '1');
\t}
\t</script>
{% endblock %}
", "home/index.html.twig", "/var/www/dev.portail-lune.fr/PortailLune/templates/home/index.html.twig");
}
}