templates/portfolio/index.html.twig line 1

  1. {% extends 'base-portfolio.html.twig' %}
  2. {% block title %}Portfolio de Surmurthag{% endblock %}
  3. {% block body %}
  4.     {#<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/css/bootstrap.min.css" rel="stylesheet">
  5.     <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet">#}
  6.     <style>
  7.      /*   .modal-backdrop.show {
  8.             opacity: 0.5 !important;
  9.             background-color: #000;
  10.         }
  11.         #btnConnexion {
  12.             background-color: transparent;
  13.             border: none;
  14.             padding: 0;
  15.             height: 25px;
  16.             width: 25px;
  17.         }
  18.         #btnConnexion:hover, #btnConnexion:focus {
  19.             background-color: transparent;
  20.             outline: none;
  21.             height: 25px;
  22.             width: 25px;
  23.         }
  24.         #chatModal {
  25.             background-color: transparent;
  26.             border: none;
  27.             padding: 0;
  28.             height: 25px;
  29.             width: 25px;
  30.         }
  31.         #chatModal:hover, #chatModal:focus {
  32.             background-color: transparent;
  33.             outline: none;
  34.             height: 25px;
  35.             width: 25px;
  36.         }
  37. */
  38.     </style>
  39.     <div class="text-center">
  40.         {% for message in app.flashes('error') %}
  41.             <div class="alert alert-danger" role="alert">
  42.                 {{ message }}
  43.             </div>
  44.         {% endfor %}
  45.     </div>
  46.     <div class="text-center mt-1">
  47.         <img src="{{ asset('build/portfolio/profilFondMath.png') }}" alt="Photo de profil" class="rounded-circle" style="width: 150px; height: 150px;">
  48.         <h1>Surmurthag</h1>
  49.         <a href="https://github.com/surmurthag" class="btn btn-dark mt-2"><i class="fab fa-github"></i> GitHub</a>
  50.     </div>
  51.     <div class="container mt-5">
  52.         <div class="row row-cols-1 row-cols-md-2 row-cols-lg-4 g-4">
  53.             <div class="col">
  54.             <div class="card h-100 d-flex flex-column justify-content-between">
  55.                 <img src="{{ asset('build/portfolio/EpisolBackground.PNG') }}" class="card-img-top" alt="Image du site 1">
  56.                 <div class="card-body text-center">
  57.                     <h5 class="card-title">Epicerie</h5>
  58.                 </div>
  59.                 <div class="card-footer bg-transparent text-center">
  60.                     <a href="{{ path('Episol_portfolio') }}" class="btn btn-success">Visiter le site</a>
  61.                 </div>
  62.             </div>
  63.     </div>
  64.             <div class="col">
  65.                 <div class="card h-100 d-flex flex-column justify-content-between">
  66.                 <img src="{{ asset('build/portfolio/LadegustBackground.PNG') }}" class="card-img-top" alt="Image du site 2">
  67.                     <div class="card-body text-center">
  68.                         <h5 class="card-title">Dégustation</h5>
  69.                     </div>
  70.                         <div class="card-footer bg-transparent text-center">
  71.                             <button id="monBouton"  class="btn btn-success">Visiter le site</button>
  72.                         </div>
  73.                     </div>
  74.             </div>
  75.             <div class="col">
  76.                 <div class="card h-100 d-flex flex-column justify-content-between">
  77.                 <img src="{{ asset('build/portfolio/UneTerreEnSoiBackground.PNG') }}" class="card-img-top" alt="Image du site 3">
  78.                     <div class="card-body text-center">
  79.                         <h5 class="card-title">Bien-être</h5>
  80.                     </div>
  81.                         <div class="card-footer bg-transparent text-center">
  82.                         <a href="{{ path('uneTerreEnSoi_portfolio') }}" class="btn btn-success">Visiter le site</a>
  83.                         </div>
  84.                     </div>
  85.             </div>
  86.             <div class="col">
  87.                 <div class="card h-100 d-flex flex-column justify-content-between">
  88.                 <img src="{{ asset('build/portfolio/EntBatimentBackground.PNG') }}" class="card-img-top" alt="Image du site 4">
  89.                     <div class="card-body text-center">
  90.                         <h5 class="card-title">Peinture</h5>
  91.                     </div>
  92.                         <div class="card-footer bg-transparent text-center">
  93.                         <a href="{{ path('app_portfolio_templates_entreprise_du_batiment') }}" class="btn btn-success">Visiter le site</a>
  94.                         </div>
  95.                 </div>
  96.             </div>
  97.             <div class="col">
  98.                 <div class="card h-100 d-flex flex-column justify-content-between">
  99.                 <img src="{{ asset('build/portfolio/ConfyUIBackground.PNG') }}" class="card-img-top" alt="Image du site 4">
  100.                     <div class="card-body text-center">
  101.                         <h5 class="card-title">ConfyUI</h5>
  102.                     </div>
  103.                     <div class="card-footer bg-transparent text-center">
  104.                         <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#downloadModal">Télécharger ConfyUI</button>
  105.                     </div>
  106.                 </div>
  107.             </div>
  108.             <div class="col">
  109.                 <div class="card h-100 d-flex flex-column justify-content-between">
  110.                     <img src="{{ asset('build/portfolio/SolarBackground.PNG') }}" class="card-img-top" alt="Image du site 4">
  111.                     <div class="card-body text-center">
  112.                         <h5 class="card-title">SolarSystem</h5>
  113.                     </div>
  114.                     <div class="card-footer bg-transparent text-center">
  115.                         <a href="{{ path('app_portfolio_solarSystem') }}" class="btn btn-success">Visiter le site</a>
  116.                     </div>
  117.                 </div>
  118.             </div>
  119.             <div class="col">
  120.                 <div class="card h-100 d-flex flex-column justify-content-between">
  121.                     <img src="{{ asset('build/portfolio/Llama2Background.PNG') }}" class="card-img-top" alt="Image du site 4">
  122.                     <div class="card-body text-center">
  123.                         <h5 class="card-title">Chatbot IA Génération</h5>
  124.                     </div>
  125.                     <div class="card-footer bg-transparent text-center">
  126.                         <a href="{{ path('app_portfolio_show_profil') }}" class="btn btn-success">Visiter le site</a>
  127.                     </div>
  128.                 </div>
  129.             </div>
  130.            {# <button id="btnConnexion" data-is-connected="{{ app.user ? 'true' : 'false' }}" class="btn position-absolute top-0 end-0 m-3 ">
  131.                 <svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-power {{ app.user ? 'text-success' : 'text-danger' }}" viewBox="0 0 16 16">
  132.                     <path d="M7.5 1v7h1V1z"/>
  133.                     <path d="M3 8.812a5 5 0 0 1 2.578-4.375l-.485-.874A6 6 0 1 0 11 3.616l-.501.865A5 5 0 1 1 3 8.812"/>
  134.                 </svg>
  135.             </button>
  136.             <div class="modal fade" id="modalConnexion" tabindex="-1" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
  137.                 <div class="modal-dialog modal-dialog-centered">
  138.                     <div class="modal-content">
  139.                         <div class="modal-header">
  140.                             <h5 class="modal-title">Vous souhaitez vous connecter.</h5>
  141.                             <button type="button" class="btn-close close-modal" data-bs-dismiss="modal" aria-label="Close"></button>
  142.                         </div>
  143.                         <div class="modal-body text-center">
  144.                             <form id="downloadVerificationForm" >
  145.                                 <a type="submit" class="btn btn-success" href="{{ path('app_login') }}">connexion</a>
  146.                             </form>
  147.                         </div>
  148.                     </div>
  149.                 </div>
  150.             </div>
  151.             <div class="modal fade" id="modalDeconnexion" tabindex="-1" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
  152.                 <div class="modal-dialog modal-dialog-centered">
  153.                     <div class="modal-content">
  154.                         <div class="modal-header">
  155.                             <h5 class="modal-title">Vous souhaitez vous déconnecter.</h5>
  156.                             <button type="button" class="btn-close close-modal" data-bs-dismiss="modal" aria-label="Close"></button>
  157.                         </div>
  158.                         <div class="modal-body text-center">
  159.                             <form id="downloadVerificationForm" >
  160.                                 <a type="submit" class="btn btn-success" href="{{ path('app_logout') }}">déconnexion</a>
  161.                             </form>
  162.                         </div>
  163.                     </div>
  164.                 </div>
  165.             </div>
  166. #}
  167.             <div class="modal fade" id="downloadModal" tabindex="-1" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
  168.                 <div class="modal-dialog modal-dialog-centered">
  169.                     <div class="modal-content">
  170.                         <div class="modal-header">
  171.                             <h5 class="modal-title">Entrer le code de téléchargement</h5>
  172.                             <button type="button" class="btn-close close-down-modal" data-bs-dismiss="modal" aria-label="Close"></button>
  173.                         </div>
  174.                         <div class="modal-body text-center">
  175.                             <form method="post" action="{{ path('verify_download_code_www') }}">
  176.                                 <div class="mb-3">
  177.                                     <label for="downloadverificationCode"></label>
  178.                                     <input type="text" class="form-control" id="downloadverificationCode" name="download-verification_code" placeholder="Code à 4 chiffres" required>
  179.                                 </div>
  180.                                 <button type="submit" class="btn btn-success">Vérifier le code</button>
  181.                             </form>
  182.                         </div>
  183.                     </div>
  184.                 </div>
  185.             </div>
  186.          {#   <button id="chatModal" class="btn position-absolute bottom-0 end-0 m-3" >
  187.                 <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="currentColor" class="bi bi-robot" viewBox="0 0 16 16">
  188.                     <path d="M6 12.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5M3 8.062C3 6.76 4.235 5.765 5.53 5.886a26.6 26.6 0 0 0 4.94 0C11.765 5.765 13 6.76 13 8.062v1.157a.93.93 0 0 1-.765.935c-.845.147-2.34.346-4.235.346s-3.39-.2-4.235-.346A.93.93 0 0 1 3 9.219zm4.542-.827a.25.25 0 0 0-.217.068l-.92.9a25 25 0 0 1-1.871-.183.25.25 0 0 0-.068.495c.55.076 1.232.149 2.02.193a.25.25 0 0 0 .189-.071l.754-.736.847 1.71a.25.25 0 0 0 .404.062l.932-.97a25 25 0 0 0 1.922-.188.25.25 0 0 0-.068-.495c-.538.074-1.207.145-1.98.189a.25.25 0 0 0-.166.076l-.754.785-.842-1.7a.25.25 0 0 0-.182-.135"></path>
  189.                     <path d="M8.5 1.866a1 1 0 1 0-1 0V3h-2A4.5 4.5 0 0 0 1 7.5V8a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1v1a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-1a1 1 0 0 0 1-1V9a1 1 0 0 0-1-1v-.5A4.5 4.5 0 0 0 10.5 3h-2zM14 7.5V13a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7.5A3.5 3.5 0 0 1 5.5 4h5A3.5 3.5 0 0 1 14 7.5"></path>
  190.                 </svg>
  191.             </button>
  192.             <div class="modal fade" id="chatbotModal" tabindex="-1" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
  193.                 <div class="modal-dialog modal-dialog-centered">
  194.                     <div class="modal-content">
  195.                         <div class="modal-header">
  196.                             <h5 class="modal-title">Bienvenue sur le tchatbot </h5>
  197.                             <button type="button" class="btn-close close-modal" data-bs-dismiss="modal" aria-label="Close"></button>
  198.                         </div>
  199.                         <div class="modal-body text-center">
  200.                             <form id="promptForm">
  201.                                 <input type="text" id="promptInput" placeholder="Entrez votre question ici">
  202.                                 <button type="submit">Envoyer</button>
  203.                             </form>
  204.                             <div id="responseContainer" style="margin-top: 20px; height: 15em;"></div> <!-- Zone pour afficher la réponse -->
  205.                             <div id="botpress-chat-container"></div> <!-- Conteneur pour le chatbot -->
  206.                         </div>
  207.                     </div>
  208.                 </div>
  209.             </div>
  210. #}
  211.         </div>
  212.     </div>
  213.     {#<script src="https://cdn.botpress.cloud/webchat/v1/inject.js"></script>
  214.     <script src="https://mediafiles.botpress.cloud/0e76e20f-72e7-48c7-b9be-6ad7817d50a7/webchat/config.js" defer></script>#}
  215.     {#<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>#}
  216.     <script>
  217.     /*    document.getElementById('btnConnexion').addEventListener('click', function() {
  218.             var isConnected = this.getAttribute('data-is-connected') === 'true';
  219.             var modalId = isConnected ? 'modalDeconnexion' : 'modalConnexion';
  220.             var modal = new bootstrap.Modal(document.getElementById(modalId));
  221.             modal.show();
  222.         });
  223. */
  224.     /*    document.addEventListener('DOMContentLoaded', function() {
  225.             // Configuration de Botpress
  226.             window.botpressWebChat.init({
  227.                 host: 'https://mediafiles.botpress.cloud/be59bd44-3746-46c9-b9bc-f7d1956d2ca3/webchat/bot.html', // Remplacez par votre URL de serveur Botpress
  228.                 botId: 'bp_pat_irQyeGbmyBSSkeSvtzDVFgeZMa5j2Pr0TxOv', // Remplacez par l'ID de votre bot Botpress
  229.                 container: document.getElementById('botpress-chat-container'), // Spécifiez le conteneur du chatbot
  230.             });
  231.             // Affichez le modal lorsque le chatbot est prêt
  232.             var modal = new bootstrap.Modal(document.getElementById('chatbotModal'));
  233.             document.getElementById('votre_bouton_ou_element_declencheur').addEventListener('click', function() {
  234.                 modal.show();
  235.             });
  236.         });
  237. */
  238.       /*  document.getElementById('chatModal').addEventListener('click', function() {
  239.             var modal = new bootstrap.Modal(document.getElementById('chatbotModal'));
  240.             modal.show();
  241.         });*/
  242.   /*      document.getElementById('monBouton').addEventListener('click', function() {
  243.             {% if app.user %}
  244.             window.location.href = 'https://ladegust.fr/';
  245.             {% else %}
  246.             window.location.href = '{{ path('app_login') }}';
  247.             {% endif %}
  248.         });
  249.         window.addEventListener('load', function() {
  250.             if (document.querySelectorAll('.alert-danger').length > 0) {
  251.                 var myModal = new bootstrap.Modal(document.getElementById('downloadModal'));
  252.                 myModal.show();
  253.             }
  254.         });*/
  255.      /*   window.addEventListener('chat', function() {
  256.             if (document.querySelectorAll('.alert-danger').length > 0) {
  257.                 var chatModal = new bootstrap.Modal(document.getElementById('chatbotModal'));
  258.                 chatModal.show();
  259.             }
  260.         });*/
  261.       /*  document.addEventListener('DOMContentLoaded', function () {
  262.             var closeModalButtons = document.querySelectorAll('.close-modal');
  263.             closeModalButtons.forEach(function (button) {
  264.                 button.addEventListener('click', function () {
  265.                     window.location.href = "{{ path('app_portfolio') }}";
  266.                 });
  267.             });
  268.         });*/
  269.        /* document.addEventListener('DOMContentLoaded', function () {
  270.             var username = 'surmurthag@outlook.fr'; // Remplacez par le nom d'utilisateur de test
  271.             var password = '@USqJnMp0f0BKAaKzIsUy'; // Remplacez par le mot de passe de test
  272.             var form = document.getElementById('promptForm');
  273.             form.onsubmit = async function (event) {
  274.                 event.preventDefault();
  275.                 var promptValue = document.getElementById('promptInput').value;
  276.                 var requestData = {
  277.                     "prompt": promptValue
  278.                 };
  279.                 try {
  280.                     const response = await fetch('/post-response-IA', {
  281.                         method: 'POST',
  282.                         headers: {
  283.                             'Content-Type': 'application/json',
  284.                             'Authorization': 'Basic ' + btoa(username + ':' + password)
  285.                         },
  286.                         body: JSON.stringify(requestData)
  287.                     });
  288.                     if (!response.ok) {
  289.                         throw new Error(`HTTP error! status: ${response.status}`);
  290.                     }
  291.                     const data = await response.json();
  292.                     console.log(data);
  293.                     // Extraire uniquement la réponse du tchat
  294.                     const chatResponse = data.response.response;
  295.                     // Mise à jour de la zone de réponse avec uniquement la réponse du tchat
  296.                     document.getElementById('responseContainer').innerText = chatResponse;
  297.                 } catch (error) {
  298.                     document.getElementById('responseContainer').innerText = 'Erreur : Impossible de récupérer la réponse.';
  299.                 }
  300.             };
  301.         });
  302. */
  303.     </script>
  304. {% endblock %}