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