slider evenements et corrections

vues
Alexis Feron 1 year ago
parent 34996bd157
commit f33b1f5f47

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

@ -50,7 +50,28 @@ class UtilisateurControleur
protected function accueil()
{
global $twig;
echo $twig->render('accueil.html', []);
/* Temporaire (le temps d'avoir en base) */
$eventsList = [
[
'imagePath' => 'assets/event1.png',
'nom' => 'Événement 1',
'description' => 'Description de l\'événement 1',
'date' => '01/01/2023'
],
[
'imagePath' => 'assets/event2.png',
'nom' => 'Événement 2',
'description' => 'Description de l\'événement 2',
'date' => '02/01/2023'
],
[
'imagePath' => 'assets/event3.png',
'nom' => 'Événement 3',
'description' => 'Description de l\'événement 3',
'date' => '03/01/2023'
]
];
echo $twig->render('accueil.html', ["eventsList"=>$eventsList]);
}
protected function consulterProfilLimite()

@ -8,7 +8,6 @@
.main {
color: #212121;
font-size: 1rem;
padding-top: 70px;
}
.title-banner{
@ -22,7 +21,7 @@
}
.banner {
position: relative; /* La classe parente doit avoir une position relative */
position: relative;
}
.title-banner {
@ -51,3 +50,73 @@
font-size: 15px;
color: #fff;
}
.slideshow-container {
position: relative;
max-width: 70%;
margin: 0 auto;
padding: 30px;
}
.slide {
width: 100%;
height: 350px;
border-radius: 20px;
border: #212121 1px solid;
}
.slide-content {
display: flex;
width: 100%;
}
.slide-img,
.slide-info {
width: 50%;
overflow: hidden;
}
.slide-info{
padding: 15px;
}
.slide-title{
font-size: 20px;
font-weight: bold;
}
.slide-info .button{
color: #00DBFF;
font-size: 14px;
padding: 5px;
text-transform: uppercase;
border-radius: 15px;
border: #00DBFF 2px solid;
display: inline-block;
margin-top: 10px;
}
.slide-img img{
height: 350px;
border-radius: 20px;
}
.prevButton, .nextButton {
position: absolute;
top: 50%;
transform: translateY(-50%);
font-size: 24px;
background-color: black;
color: white;
padding: 8px 16px;
border: none;
cursor: pointer;
}
.prevButton {
left: 0;
}
.nextButton {
right: 0;
}

@ -9,12 +9,16 @@
a{
text-decoration: none;
}
body{
display: block;
background: #fff;
}
.content{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
min-height: calc(100vh - 70px);
background: #fff;
}

@ -11,10 +11,15 @@ a{
}
body{
display: block;
background: #fff;
}
.content{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
min-height: calc(100vh - 70px);
background: #fff;
}

@ -11,8 +11,10 @@ a {
height: 70px;
background: #fff;
color: #212121;
position: fixed;
position: sticky;
top: 0;
left: 0;
z-index: 100;
}
.navbar-container .logo-container a {

@ -17,20 +17,51 @@
<div class="description">Nous sommes danciens étudiants à lIUT dAubière qui aimerions créer un réseau d'anciens étudiants au travers d'un réseau alumni du département Informatique.</div>
</div>
</div>
<h1>Accueil</h1>
<p>Vous êtes sur la page d'accueil</p>
<p>Vous pouvez vous connecter ou vous inscrire</p>
<p>Vous pouvez aussi consulter les articles</p>
<p>Vous pouvez aussi consulter les annonces</p>
<div class="slideshow-container">
{% for event in eventsList %}
<div class="slide">
<div class="slide-img">
<img src="{{ event.imagePath }}">
</div>
<div class="slide-info">
<div class="slide-date">{{event.date}}</div>
<div class="slide-title">{{event.nom}}</div>
<div class="slide-description">{{event.description}}</div>
<a href="index.php?action=" class="button">S'inscrire</a>
</div>
</div>
{% endfor %}
<button class="prevButton" onclick="plusDivs(-1)">&#10094;</button>
<button class="nextButton" onclick="plusDivs(1)">&#10095;</button>
</div>
</div>
</body>
</html>
<script>
let bar = document.querySelector('.bars'), navItem = document.querySelector('.nav-items');
bar.addEventListener('click', () => {
navItem.classList.toggle('active');
});
</script>
</html>
var slideIndex = 1;
showDivs(slideIndex);
function plusDivs(n) {
showDivs(slideIndex += n);
}
function showDivs(n) {
var i;
var x = document.getElementsByClassName("slide");
if (n > x.length) {slideIndex = 1}
if (n < 1) {slideIndex = x.length}
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
x[slideIndex-1].style.display = "flex";
}
</script>

@ -7,6 +7,8 @@
<link rel="stylesheet" type="text/css" href="css/connexion.css">
</head>
<body>
{% include 'menu.html' %}
<div class="content">
<div class="container">
<form action="" method="POST">
<h3>Connexion</h3>
@ -45,5 +47,5 @@
</div>
<script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>
</body>
</div></body>
</html>

@ -7,6 +7,8 @@
<link rel="stylesheet" type="text/css" href="css/inscription.css">
</head>
<body>
{% include 'menu.html' %}
<div class="content">
<div class="container">
<form action="" method="POST">
<h3>S'inscrire</h3>
@ -53,5 +55,6 @@
</div>
<script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>
<script noModule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>
</div>
</body>
</html>
Loading…
Cancel
Save