src/Flexy/FrontBundle/Themes/CoWorking/templates/pages/offres.html.twig line 1

  1. {% extends '@Flexy/FrontBundle/Themes/CoWorking/templates/layout.html.twig' %}
  2. {% block stylesheets %}
  3. {{ parent() }}
  4.      
  5.    
  6. <style>
  7. @import url("https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap");
  8. @import url("https://use.fontawesome.com/releases/v5.13.0/css/all.css");
  9. @import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
  10. :root {
  11.   /* GENERAL FONT */
  12.   --font1: "Titillium Web", sans-serif;
  13.   --font2: "Roboto", sans-serif;
  14.   /* GENERAL COLOR */
  15.   --bg-col-1: #0059b3;
  16.   --bg-col-2: #dc3545;
  17.   --bg-col-3: #fff;
  18.   --bg-col-4: #024c96;
  19.   --tx-color-1: #fff;
  20.   --tx-color-2: #000;
  21.   --tx-color-3: #0059b3;
  22.   // FOCUS START
  23.   /* READ MORE COLOR */
  24.   --tx-rm-color-1: #fff;
  25.   --bg-rm-color-1: #fff;
  26.   /* TAG BOTTOM-RIGHT COLOR */
  27.   /* FOOTER CARD COLOR */
  28.   --bg-ft-col-1: #0059b3;
  29.   --tx-ft-color-1: #fff;
  30.   // focus section
  31.   --tx-focus-section-title: #212529;
  32.  
  33.   --bg-focus-card-overlay: rgba(0, 89, 179, 0.5);
  34.   --tx-focus-hover: #fff;
  35.   --tx-focus-font-weight: 400;
  36.   --tx-focus-tag-color-1: #fff;
  37.   --bg-focus-tag-color-1: #0059b3;
  38.   --bg-focus-cat: #0059b3;
  39.   --tx-focus-cat: #fff;
  40.   --bg-focus-footer: #0059b3;
  41.   --tx-focus-footer: #fff;
  42.   --bg-focus-card: #fff;
  43.   --tx-focus-card: #000;
  44.   //button arrow & archive
  45.   --tx-button: #fff;
  46.   --bg-button: #0059b3;
  47. }
  48. /*start dark mode css*/
  49. .dark-mode {
  50.   /* GENERAL COLOR */
  51.   --bg-col-1: #121212;
  52.   --tx-color-1: #fff;
  53.   //button arrow & archive
  54.   --tx-button: #fff;
  55.   --bg-button: #272727;
  56.   --bg-button-border: #272727;
  57.   --bg-button-hover: #fff;
  58.   --tx-button-hover: #272727;
  59.   --bg-button-focus: #0f0f0f40;
  60.   //focus-section
  61.   --tx-focus-section-title: #fff;
  62.   --bg-focus-section: #121212;
  63.   --bg-focus-card-overlay: rgba(0, 0, 0, 0.5);
  64.   --tx-focus-hover: #fff;
  65.   --bg-focus-card: #272727;
  66.   --tx-focus-card: #fff;
  67.   --tx-focus-font-weight: 100;
  68.   --tx-focus-tag-color-1: #fff;
  69.   --bg-focus-tag-color-1: #272727;
  70.   --tx-focus-cat: #272727;
  71.   --bg-focus-cat: #fff;
  72.   --tx-focus-tag-a: #fff;
  73.   --bg-focus-footer: #272727;
  74.   --tx-focus-footer: #fff;
  75.   --focus-border-card: 0;
  76. }
  77. /* end dark mode css */
  78. .btn-archive {
  79.   color: var(--tx-button);
  80.   background: var(--bg-button);
  81.   border-color: var(--bg-button-border);
  82.   -webkit-transition: all 0.3s linear 0s;
  83.   transition: all 0.3s linear 0s;
  84.   &:hover {
  85.     color: var(--tx-button-hover);
  86.     background-color: var(--bg-button-hover);
  87.     border-color: var(--bg-button-hover);
  88.   }
  89.   &:focus {
  90.     -webkit-box-shadow: 0 0 0 0.25rem var(--bg-button-focus);
  91.     box-shadow: 0 0 0 0.25rem var(--bg-button-focus);
  92.   }
  93. }
  94. .shadow-custom {
  95.     box-shadow: rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;
  96. }
  97. .focus-section {
  98.   background: var(--bg-focus-section);
  99.   font-family: var(--font1);
  100.   -webkit-transition: all 0.3s linear 0s;
  101.   transition: all 0.3s linear 0s;
  102.   .title-section {
  103.     font-weight: 700;
  104.     text-transform: uppercase;
  105.     color: var(--tx-focus-section-title);
  106.   }
  107.   .card {
  108.     font-size: 1rem;
  109.     /*border: var(--focus-border-card);*/
  110.     .card-body {
  111.       background: var(--bg-focus-card);
  112.       color: var(--tx-focus-card);
  113.       .card-text {
  114.         font-weight: var(--tx-focus-font-weight);
  115.       }
  116.     }
  117.     .card-image {
  118.       position: relative;
  119.       .image-overlay {
  120.         position: absolute;
  121.         top: 0;
  122.         bottom: 0;
  123.         left: 0;
  124.         right: 0;
  125.         height: 100%;
  126.         width: 100%;
  127.         opacity: 0;
  128.         transition: 0.5s ease;
  129.        
  130.       }
  131.       &:hover .image-overlay {
  132.         opacity: 1;
  133.       }
  134.     }
  135.     .text-img-over {
  136.       position: relative;
  137.       .overlay {
  138.         position: absolute;
  139.         top: 0;
  140.         bottom: 0;
  141.         left: 0;
  142.         right: 0;
  143.         height: 100%;
  144.         width: 100%;
  145.         opacity: 0;
  146.         transition: 0.5s ease;
  147.         background: var(--bg-focus-card-overlay);
  148.       }
  149.       &:hover .overlay {
  150.         opacity: 1;
  151.       }
  152.     }
  153.     .social-hover {
  154.       color: var(--tx-focus-hover);
  155.       font-size: 30px;
  156.       position: absolute;
  157.       top: 50%;
  158.       left: 50%;
  159.       -webkit-transform: translate(-50%, -50%);
  160.       -ms-transform: translate(-50%, -50%);
  161.       transform: translate(-50%, -50%);
  162.       text-align: center;
  163.       .fa-share-alt {
  164.         color: var(--tx-focus-hover);
  165.         &:hover {
  166.           color: var(--tx-color-1);
  167.         }
  168.       }
  169.     }
  170.     .hover-text {
  171.       position: relative;
  172.       text-align: center;
  173.       color: var(--tx-focus-hover);
  174.     }
  175.     .bottom-right-tag {
  176.       position: absolute;
  177.       bottom: 0;
  178.       right: 0;
  179.       background: #dfb150;
  180.       padding: 5px 10px 5px 10px;
  181.       border-top-left-radius: calc(0.25rem - 1px);
  182.       font-size: 0.8rem;
  183.       font-weight: 200;
  184.       color: var(--tx-focus-tag-color-1);
  185.       z-index: 1;
  186.       a {
  187.         color: var(--tx-focus-tag-color-1);
  188.         text-decoration: none;
  189.       }
  190.       a:hover {
  191.         color: var(--tx-focus-tag-color-1);
  192.         text-decoration: underline;
  193.       }
  194.     }
  195.     .sub-cat {
  196.       font-weight: 600;
  197.       font-size: 1rem;
  198.       .bg-category {
  199.         background: var(--bg-focus-cat);
  200.         color: var(--tx-focus-cat);
  201.       }
  202.       a {
  203.         color: var(--tx-focus-tag-a);
  204.       }
  205.     }
  206.     .card-title {
  207.       font-family: var(--font1);
  208.       font-weight: 600;
  209.       font-size: 1.3rem;
  210.       /* height: 73px;
  211.   overflow: hidden; */
  212.     }
  213.     .card-footer {
  214.       background: #dfb150;
  215.       color: var(--tx-focus-footer);
  216.       .card-footer__info {
  217.         font-size: 1rem;
  218.         font-weight: 300;
  219.         position: relative;
  220.       }
  221.     }
  222.     .read-more {
  223.       position: absolute;
  224.       right: 0;
  225.       font-weight: 600;
  226.     }
  227.     .read-more-1 {
  228.       text-decoration: none;
  229.       position: relative;
  230.       color: var(--tx-focus-footer);
  231.     }
  232.     .read-more-1::after {
  233.       content: "";
  234.       position: absolute;
  235.       left: 0;
  236.       bottom: 0;
  237.       width: 100%;
  238.       height: 2px;
  239.       background: var(--bg-rm-color-1);
  240.       transform: scaleX(0);
  241.       transform-origin: left;
  242.       transition: transform 250ms ease-in;
  243.     }
  244.     .read-more-1:hover {
  245.       color: var(--tx-focus-footer);
  246.     }
  247.     .read-more-1:hover::after {
  248.       transform: scaleX(1);
  249.       transform-origin: right;
  250.       color: var(--tx-focus-footer);
  251.     }
  252.     .read-more-2 {
  253.       text-decoration: none;
  254.       position: relative;
  255.       margin-right: 15px;
  256.       color: var(--tx-focus-footer);
  257.     }
  258.     .read-more-2::after {
  259.       content: "";
  260.       /* You should use \ and not /*/
  261.       font-family: "Font Awesome 5 Free";
  262.       /* This is the correct font-family*/
  263.       position: absolute;
  264.       right: -18px;
  265.       bottom: 0;
  266.       color: var(--tx-focus-footer);
  267.     }
  268.     .read-more-2:hover {
  269.       color: var(--tx-focus-footer);
  270.     }
  271.     .read-more-2:hover::after {
  272.       transform: translate(3px, 0);
  273.       transition: all 0.1s ease-in;
  274.       color: var(--tx-focus-footer);
  275.     }
  276.     .read-more-3 {
  277.       text-decoration: none;
  278.       position: relative;
  279.       color: var(--tx-focus-footer);
  280.     }
  281.     .read-more-3:hover {
  282.       color: var(--tx-focus-footer);
  283.       text-decoration: underline;
  284.     }
  285.   }
  286. }
  287. .custom-hr-1{
  288.      width: 3%;
  289.     border: 3px solid #555;
  290.     margin: 4px;
  291. }
  292.  .pagination {
  293.     display: flex;
  294.     justify-content: center;
  295.     margin-top: 20px;
  296. }
  297. .pagination li {
  298.     margin: 0 5px;
  299.     list-style: none;
  300. }
  301. .pagination li a {
  302.     text-decoration: none;
  303.     padding: 8px 12px;
  304.     border: 1px solid #FFCB00; /* Ajout de la couleur principale */
  305.     border-radius: 5px;
  306.     color: #FFCB00; /* Texte en couleur principale */
  307.     font-weight: 600;
  308.     transition: background-color 0.3s, color 0.3s;
  309. }
  310. .pagination li a:hover {
  311.     background-color: #FFCB00; /* Couleur au survol */
  312.     color: white; /* Texte en blanc au survol */
  313. }
  314. .pagination li.active a {
  315.     background-color: #FFCB00; /* Couleur principale pour l'élément actif */
  316.     color: white; /* Texte en blanc */
  317.     border: none; /* Supprimer la bordure */
  318. }
  319. .pagination li.disabled {
  320.     display: none; /* Cacher les boutons désactivés */
  321. }
  322. .shadow-custom:hover{
  323.      box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
  324. }
  325.     .shadow-custom{
  326.     box-shadow: rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;
  327. }
  328.     
  329. </style>
  330.   
  331. {% endblock  %}
  332. {% block body %}
  333.  
  334.  
  335. <div class="container" style="max-width: 1230px;">
  336.  <!--<section class="button">
  337.   <div class="container-lg py-2">
  338.     <button class="btn btn-dark btn-sm text-uppercase" onclick="myFunction()" id="btnValue" type="button">Dark mode</button>
  339.   </div>
  340. </section> -->        
  341. <section id="focus" class="focus-section">
  342.         <div class="container-lg py-5">
  343.             <div class="container px-0">
  344.                 <div class="row">
  345.                     <div class="col">
  346.                        <h1 style="font-size: 34px; color: black;" class="title-actualites ">Offres</h1>
  347.                       <hr class="custom-hr-1">
  348.                     </div>
  349.                  
  350.                 </div>
  351.             </div>
  352.             <div class="row row-cols-1 row-cols-md-3 g-4 mt-5 mb-2">
  353.             {% for news in newshome %}
  354.                 <div class="col">
  355.                     <div class="card shadow-sm h-100 shadow-custom">
  356.                         <div class="card-image">
  357.                             <div class="hover-text">
  358.                             <img class="img-article img-fluid" 
  359.                                      src="/uploads/coworking/{{ news.image }}"
  360.                                      class="card-img-top" 
  361.                                      alt="image">
  362.                                  
  363.                                 <div class="bottom-right-tag text-uppercase">
  364.                               
  365.                                 {% if news.dateFin|date('U') < 'now'|date('U') %}
  366.                               Pas active
  367.                             {% else %}
  368.                                Active 
  369.                             {% endif %}
  370.                                                             
  371.                                 </div>
  372.                             </div>
  373.                             <div class="image-overlay"></div>
  374.                         </div>
  375.                         <div class="card-body">
  376.                             <h3 class="card-title">{{ news.title }}</h3>
  377.                             <div class="text-left my-2">
  378.                                 <div class="sub-cat text-truncate"><span
  379.                                         class="badge rounded-pill bg-category text-uppercase">offre</span> <a
  380.                                         href="#">{{ news.underTitle }}</a></div>
  381.                             </div>
  382.                             <p class="card-text">{{ news.description }}.</p>
  383.                         </div>
  384.                         <div class="card-footer py-3">
  385.                             <div class="card-footer__info">
  386.                                 <span><i class="far fa-calendar-alt"></i> {{ news.dateDebut|date('d/m/Y')|default('Aucune date') }}</span>
  387.                                
  388.                                 <span class="read-more">
  389.                                      <span><i class="far fa-calendar-alt"></i> {{ news.dateFin|date('d/m/Y')|default('Aucune date') }}</span>
  390.                                 </span>
  391.                             </div>
  392.                         </div>
  393.                     </div>
  394.                 </div>
  395.                  
  396.              {% endfor   %}
  397.             </div>
  398.         </div>
  399.   
  400.    </section>
  401.     
  402.      
  403.       {% if newshome is not null %}
  404.         <div class="pagination">
  405.     {{ knp_pagination_render(newshome) }}
  406. </div>
  407.     {% endif %}
  408.  
  409.  
  410.     
  411. </div>
  412.  
  413.     
  414. {% endblock %}
  415. {% block javascripts %}
  416. {{ parent() }}
  417.  
  418.  
  419. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe" crossorigin="anonymous"></script>
  420. <script>
  421. /*function myFunction() {
  422.   var element = document.getElementById('focus');
  423.   element.classList.toggle("dark-mode");
  424.   var x = document.getElementById("btnValue");
  425.   if (x.innerHTML === "Dark mode") {
  426.     x.innerHTML = "Light mode";
  427.     x.classList.remove('btn-dark')
  428.     x.classList.toggle('btn-light')
  429.   } else {
  430.     x.innerHTML = "Dark mode";
  431.     x.classList.remove('btn-light')
  432.     x.classList.toggle('btn-dark')
  433.   }
  434. }*/
  435.  
  436. </script>
  437. {% endblock %}