src/Flexy/FrontBundle/Themes/CoWorking/templates/pages/offres.html.twig line 1
{% extends '@Flexy/FrontBundle/Themes/CoWorking/templates/layout.html.twig' %}
{% block stylesheets %}
{{ parent() }}
<style>
@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");
@import url("https://use.fontawesome.com/releases/v5.13.0/css/all.css");
@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");
:root {
/* GENERAL FONT */
--font1: "Titillium Web", sans-serif;
--font2: "Roboto", sans-serif;
/* GENERAL COLOR */
--bg-col-1: #0059b3;
--bg-col-2: #dc3545;
--bg-col-3: #fff;
--bg-col-4: #024c96;
--tx-color-1: #fff;
--tx-color-2: #000;
--tx-color-3: #0059b3;
// FOCUS START
/* READ MORE COLOR */
--tx-rm-color-1: #fff;
--bg-rm-color-1: #fff;
/* TAG BOTTOM-RIGHT COLOR */
/* FOOTER CARD COLOR */
--bg-ft-col-1: #0059b3;
--tx-ft-color-1: #fff;
// focus section
--tx-focus-section-title: #212529;
--bg-focus-card-overlay: rgba(0, 89, 179, 0.5);
--tx-focus-hover: #fff;
--tx-focus-font-weight: 400;
--tx-focus-tag-color-1: #fff;
--bg-focus-tag-color-1: #0059b3;
--bg-focus-cat: #0059b3;
--tx-focus-cat: #fff;
--bg-focus-footer: #0059b3;
--tx-focus-footer: #fff;
--bg-focus-card: #fff;
--tx-focus-card: #000;
//button arrow & archive
--tx-button: #fff;
--bg-button: #0059b3;
}
/*start dark mode css*/
.dark-mode {
/* GENERAL COLOR */
--bg-col-1: #121212;
--tx-color-1: #fff;
//button arrow & archive
--tx-button: #fff;
--bg-button: #272727;
--bg-button-border: #272727;
--bg-button-hover: #fff;
--tx-button-hover: #272727;
--bg-button-focus: #0f0f0f40;
//focus-section
--tx-focus-section-title: #fff;
--bg-focus-section: #121212;
--bg-focus-card-overlay: rgba(0, 0, 0, 0.5);
--tx-focus-hover: #fff;
--bg-focus-card: #272727;
--tx-focus-card: #fff;
--tx-focus-font-weight: 100;
--tx-focus-tag-color-1: #fff;
--bg-focus-tag-color-1: #272727;
--tx-focus-cat: #272727;
--bg-focus-cat: #fff;
--tx-focus-tag-a: #fff;
--bg-focus-footer: #272727;
--tx-focus-footer: #fff;
--focus-border-card: 0;
}
/* end dark mode css */
.btn-archive {
color: var(--tx-button);
background: var(--bg-button);
border-color: var(--bg-button-border);
-webkit-transition: all 0.3s linear 0s;
transition: all 0.3s linear 0s;
&:hover {
color: var(--tx-button-hover);
background-color: var(--bg-button-hover);
border-color: var(--bg-button-hover);
}
&:focus {
-webkit-box-shadow: 0 0 0 0.25rem var(--bg-button-focus);
box-shadow: 0 0 0 0.25rem var(--bg-button-focus);
}
}
.shadow-custom {
box-shadow: rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;
}
.focus-section {
background: var(--bg-focus-section);
font-family: var(--font1);
-webkit-transition: all 0.3s linear 0s;
transition: all 0.3s linear 0s;
.title-section {
font-weight: 700;
text-transform: uppercase;
color: var(--tx-focus-section-title);
}
.card {
font-size: 1rem;
/*border: var(--focus-border-card);*/
.card-body {
background: var(--bg-focus-card);
color: var(--tx-focus-card);
.card-text {
font-weight: var(--tx-focus-font-weight);
}
}
.card-image {
position: relative;
.image-overlay {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 100%;
width: 100%;
opacity: 0;
transition: 0.5s ease;
}
&:hover .image-overlay {
opacity: 1;
}
}
.text-img-over {
position: relative;
.overlay {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 100%;
width: 100%;
opacity: 0;
transition: 0.5s ease;
background: var(--bg-focus-card-overlay);
}
&:hover .overlay {
opacity: 1;
}
}
.social-hover {
color: var(--tx-focus-hover);
font-size: 30px;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
text-align: center;
.fa-share-alt {
color: var(--tx-focus-hover);
&:hover {
color: var(--tx-color-1);
}
}
}
.hover-text {
position: relative;
text-align: center;
color: var(--tx-focus-hover);
}
.bottom-right-tag {
position: absolute;
bottom: 0;
right: 0;
background: #dfb150;
padding: 5px 10px 5px 10px;
border-top-left-radius: calc(0.25rem - 1px);
font-size: 0.8rem;
font-weight: 200;
color: var(--tx-focus-tag-color-1);
z-index: 1;
a {
color: var(--tx-focus-tag-color-1);
text-decoration: none;
}
a:hover {
color: var(--tx-focus-tag-color-1);
text-decoration: underline;
}
}
.sub-cat {
font-weight: 600;
font-size: 1rem;
.bg-category {
background: var(--bg-focus-cat);
color: var(--tx-focus-cat);
}
a {
color: var(--tx-focus-tag-a);
}
}
.card-title {
font-family: var(--font1);
font-weight: 600;
font-size: 1.3rem;
/* height: 73px;
overflow: hidden; */
}
.card-footer {
background: #dfb150;
color: var(--tx-focus-footer);
.card-footer__info {
font-size: 1rem;
font-weight: 300;
position: relative;
}
}
.read-more {
position: absolute;
right: 0;
font-weight: 600;
}
.read-more-1 {
text-decoration: none;
position: relative;
color: var(--tx-focus-footer);
}
.read-more-1::after {
content: "";
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 2px;
background: var(--bg-rm-color-1);
transform: scaleX(0);
transform-origin: left;
transition: transform 250ms ease-in;
}
.read-more-1:hover {
color: var(--tx-focus-footer);
}
.read-more-1:hover::after {
transform: scaleX(1);
transform-origin: right;
color: var(--tx-focus-footer);
}
.read-more-2 {
text-decoration: none;
position: relative;
margin-right: 15px;
color: var(--tx-focus-footer);
}
.read-more-2::after {
content: "";
/* You should use \ and not /*/
font-family: "Font Awesome 5 Free";
/* This is the correct font-family*/
position: absolute;
right: -18px;
bottom: 0;
color: var(--tx-focus-footer);
}
.read-more-2:hover {
color: var(--tx-focus-footer);
}
.read-more-2:hover::after {
transform: translate(3px, 0);
transition: all 0.1s ease-in;
color: var(--tx-focus-footer);
}
.read-more-3 {
text-decoration: none;
position: relative;
color: var(--tx-focus-footer);
}
.read-more-3:hover {
color: var(--tx-focus-footer);
text-decoration: underline;
}
}
}
.custom-hr-1{
width: 3%;
border: 3px solid #555;
margin: 4px;
}
.pagination {
display: flex;
justify-content: center;
margin-top: 20px;
}
.pagination li {
margin: 0 5px;
list-style: none;
}
.pagination li a {
text-decoration: none;
padding: 8px 12px;
border: 1px solid #FFCB00; /* Ajout de la couleur principale */
border-radius: 5px;
color: #FFCB00; /* Texte en couleur principale */
font-weight: 600;
transition: background-color 0.3s, color 0.3s;
}
.pagination li a:hover {
background-color: #FFCB00; /* Couleur au survol */
color: white; /* Texte en blanc au survol */
}
.pagination li.active a {
background-color: #FFCB00; /* Couleur principale pour l'élément actif */
color: white; /* Texte en blanc */
border: none; /* Supprimer la bordure */
}
.pagination li.disabled {
display: none; /* Cacher les boutons désactivés */
}
.shadow-custom:hover{
box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
}
.shadow-custom{
box-shadow: rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;
}
</style>
{% endblock %}
{% block body %}
<div class="container" style="max-width: 1230px;">
<!--<section class="button">
<div class="container-lg py-2">
<button class="btn btn-dark btn-sm text-uppercase" onclick="myFunction()" id="btnValue" type="button">Dark mode</button>
</div>
</section> -->
<section id="focus" class="focus-section">
<div class="container-lg py-5">
<div class="container px-0">
<div class="row">
<div class="col">
<h1 style="font-size: 34px; color: black;" class="title-actualites ">Offres</h1>
<hr class="custom-hr-1">
</div>
</div>
</div>
<div class="row row-cols-1 row-cols-md-3 g-4 mt-5 mb-2">
{% for news in newshome %}
<div class="col">
<div class="card shadow-sm h-100 shadow-custom">
<div class="card-image">
<div class="hover-text">
<img class="img-article img-fluid"
src="/uploads/coworking/{{ news.image }}"
class="card-img-top"
alt="image">
<div class="bottom-right-tag text-uppercase">
{% if news.dateFin|date('U') < 'now'|date('U') %}
Pas active
{% else %}
Active
{% endif %}
</div>
</div>
<div class="image-overlay"></div>
</div>
<div class="card-body">
<h3 class="card-title">{{ news.title }}</h3>
<div class="text-left my-2">
<div class="sub-cat text-truncate"><span
class="badge rounded-pill bg-category text-uppercase">offre</span> <a
href="#">{{ news.underTitle }}</a></div>
</div>
<p class="card-text">{{ news.description }}.</p>
</div>
<div class="card-footer py-3">
<div class="card-footer__info">
<span><i class="far fa-calendar-alt"></i> {{ news.dateDebut|date('d/m/Y')|default('Aucune date') }}</span>
<span class="read-more">
<span><i class="far fa-calendar-alt"></i> {{ news.dateFin|date('d/m/Y')|default('Aucune date') }}</span>
</span>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</section>
{% if newshome is not null %}
<div class="pagination">
{{ knp_pagination_render(newshome) }}
</div>
{% endif %}
</div>
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe" crossorigin="anonymous"></script>
<script>
/*function myFunction() {
var element = document.getElementById('focus');
element.classList.toggle("dark-mode");
var x = document.getElementById("btnValue");
if (x.innerHTML === "Dark mode") {
x.innerHTML = "Light mode";
x.classList.remove('btn-dark')
x.classList.toggle('btn-light')
} else {
x.innerHTML = "Dark mode";
x.classList.remove('btn-light')
x.classList.toggle('btn-dark')
}
}*/
</script>
{% endblock %}