templates/home/speaker.html.twig line 1

Open in your IDE?
  1. {% extends 'baseFront.html.twig' %}
  2. {% block title %}Hello HomeController!{% endblock %}
  3. {% block body %}
  4.     <style>
  5.         /* Bandeau principal */
  6.         .hero {
  7.             background-image: url("{{ asset('assetFront/images/headerBackground1.webp') }}"); /* votre image */
  8.             background-size: cover;
  9.             background-position: center;
  10.             height: 350px;
  11.             display: flex;
  12.             justify-content: center;
  13.             align-items: center;
  14.         }
  15.         .hero h1 {
  16.             color: white;
  17.             font-size: 48px;
  18.             font-weight: bold;
  19.             text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  20.         }
  21.         /* Responsive du bandeau */
  22.         @media (max-width: 768px) {
  23.             .hero {
  24.                 height: 250px;
  25.             }
  26.             .hero h1 {
  27.                 font-size: 32px;
  28.             }
  29.         }
  30.         @media (max-width: 480px) {
  31.             .hero {
  32.                 height: 200px;
  33.             }
  34.             .hero h1 {
  35.                 font-size: 24px;
  36.                 text-align: center;
  37.                 padding: 0 20px;
  38.             }
  39.         }
  40.         /* Section des cartes */
  41.         .speakers {
  42.             display: flex;
  43.             flex-wrap: wrap; /* Permet le retour à la ligne */
  44.             justify-content: center;
  45.             gap: 30px;
  46.             padding: 40px 20px;
  47.             max-width: 1200px;
  48.             margin: 0 auto;
  49.         }
  50.         /* Carte individuelle */
  51.         .card {
  52.             width: 250px;
  53.             height: auto;
  54.             background: #f7f7f7;
  55.             border-radius: 10px;
  56.             box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  57.             overflow: hidden;
  58.             text-align: center;
  59.             transition: transform 0.3s ease;
  60.             text-decoration: none;
  61.             color: inherit;
  62.             display: flex;
  63.             flex-direction: column;
  64.         }
  65.         .card:hover {
  66.             transform: translateY(-5px);
  67.         }
  68.         /* Conteneur pour l'image */
  69.         .card .image-container {
  70.             width: 100%;
  71.             height: 350px;
  72.             overflow: hidden;
  73.             display: flex;
  74.             align-items: center;
  75.             justify-content: center;
  76.             background: #f0f0f0; /* Couleur de fond si l'image est manquante */
  77.         }
  78.         .card img {
  79.             width: 100%;
  80.             height: 100%;
  81.             object-fit: cover; /* L'image couvre tout le conteneur */
  82.             object-position: center top; /* Centre l'image horizontalement, aligne en haut */
  83.             transition: transform 0.3s ease;
  84.         }
  85.         .card:hover img {
  86.             transform: scale(1.05); /* Effet de zoom au survol */
  87.         }
  88.         /* Texte sur les cartes */
  89.         .info {
  90.             padding: 20px;
  91.             flex-grow: 1;
  92.             display: flex;
  93.             flex-direction: column;
  94.             justify-content: center;
  95.         }
  96.         .role {
  97.             font-size: 12px;
  98.             color: #555;
  99.             margin: 0;
  100.             letter-spacing: 1px;
  101.             text-transform: uppercase;
  102.         }
  103.         .name {
  104.             font-size: 20px;
  105.             font-weight: bold;
  106.             margin-top: 5px;
  107.             color: #333;
  108.             line-height: 1.3;
  109.         }
  110.         /* Styles pour les icônes des liens (si vous en ajoutez plus tard) */
  111.         .icon-link img {
  112.             width: 35px;
  113.             height: 35px;
  114.             margin-top: 12px;
  115.             cursor: pointer;
  116.             transition: transform 0.2s ease, box-shadow 0.2s ease;
  117.         }
  118.         .icon-link img:hover {
  119.             transform: scale(1.12);
  120.             box-shadow: 0 0 10px rgba(0, 140, 255, 0.6);
  121.             border-radius: 50%;
  122.         }
  123.         /* Responsive Mobile */
  124.         @media (max-width: 768px) {
  125.             .speakers {
  126.                 gap: 25px;
  127.                 padding: 30px 15px;
  128.             }
  129.             .card {
  130.                 width: 280px;
  131.                 height: 420px;
  132.             }
  133.             .card .image-container {
  134.                 height: 300px;
  135.             }
  136.         }
  137.         @media (max-width: 640px) {
  138.             /* Sur les écrans moyens, 2 cartes par ligne */
  139.             .card {
  140.                 width: calc(50% - 20px);
  141.                 min-width: 250px;
  142.                 height: auto;
  143.                 min-height: 400px;
  144.             }
  145.             .card .image-container {
  146.                 height: 250px;
  147.             }
  148.             .info {
  149.                 padding: 15px;
  150.             }
  151.             .name {
  152.                 font-size: 18px;
  153.             }
  154.         }
  155.         @media (max-width: 576px) {
  156.             /* Sur mobile, une seule carte par ligne */
  157.             .speakers {
  158.                 flex-direction: column;
  159.                 align-items: center;
  160.                 gap: 20px;
  161.             }
  162.             .card {
  163.                 width: 100%;
  164.                 max-width: 320px;
  165.                 height: auto;
  166.                 min-height: 400px;
  167.             }
  168.             .card .image-container {
  169.                 height: 280px;
  170.             }
  171.         }
  172.         @media (max-width: 375px) {
  173.             /* Pour les très petits écrans */
  174.             .card {
  175.                 max-width: 280px;
  176.                 min-height: 380px;
  177.             }
  178.             .card .image-container {
  179.                 height: 240px;
  180.                 
  181.             }
  182.             .name {
  183.                 font-size: 16px;
  184.             }
  185.             .role {
  186.                 font-size: 11px;
  187.             }
  188.         }
  189.         /* Pour les écrans très larges */
  190.         @media (min-width: 1400px) {
  191.             .speakers {
  192.                 max-width: 1400px;
  193.             }
  194.         }
  195.     </style>
  196. <main>
  197.     <div class="container px-1 ">
  198.                 <h1>Speakers </h1>
  199.     <section class="speakers">
  200.         {% for speaker in speakers %}
  201.             <a href="{{speaker.lien}}" class="card">
  202.                 <div class="image-container">
  203.                     <img src="{{ speaker.photo ? asset('uploads/speaker/' ~ speaker.photo) : '' }}" alt="{{ speaker.nom}} {{ speaker.prenom}}">
  204.                 </div>
  205.                 <div class="info">
  206.                     <p class="role">PLENARY SPEAKER</p>
  207.                     <p class="name">{{ speaker.nom}} {{ speaker.prenom}}</p>
  208.                     <p class="role">Talk title</p>
  209.                     {% if speaker.libelletalk %}
  210.                 <p class="talk-title">{{ speaker.libelletalk }}</p>
  211.             {% endif %}
  212.                 </div>
  213.                 
  214.                 
  215.             </a>
  216.         {% endfor %}
  217.         {#
  218.         <div class="card">
  219.             <img src="img/speaker2.jpg" alt="speaker">
  220.             <div class="info">
  221.                 <p class="role">PLENARY SPEAKER</p>
  222.                 <p class="name">Rebecca Willett</p>
  223.                 <a href="https://example.com" class="icon-link">
  224.                     <img src="img/blue-icon.png" alt="icon">
  225.                 </a>
  226.             </div>
  227.         </div>
  228.         <div class="card">
  229.             <img src="img/speaker3.jpg" alt="speaker">
  230.             <div class="info">
  231.                 <p class="role">PLENARY SPEAKER</p>
  232.                 <p class="name">Stéphane Mallat</p>
  233.                 <a href="https://example.com" class="icon-link">
  234.                     <img src="img/blue-icon.png" alt="icon">
  235.                 </a>
  236.             </div>
  237.         </div>#}
  238.     </section>
  239.     </div>
  240.                 <!-- Section image de couverture -->
  241.    {# <header class="hero">
  242.         <h1>Plenary Speakers</h1>
  243.     </header>#}
  244.     <!-- Section des conférenciers -->
  245. </main>
  246. {% endblock %}