diff --git a/Assets/functions.php b/Assets/functions.php index 8cc18d2..1434cd0 100644 --- a/Assets/functions.php +++ b/Assets/functions.php @@ -390,3 +390,15 @@ function getSpecificRaccourcis($bdd, $id) } return $return; } + +function getGuides($bdd) { + $results = mysqli_query($bdd, "SELECT * FROM `guides`"); + + $return = []; + + while ($row = mysqli_fetch_assoc($results)) { + $return[] = $row; + } + + return $return; +} \ No newline at end of file diff --git a/event.php b/event.php index bbaa6a9..fbe739f 100644 --- a/event.php +++ b/event.php @@ -15,7 +15,7 @@ if (!isset($_SESSION['connected']) || $_SESSION['connected'] == false) { $titre = getEventName($bdd, $_GET['event']); $images = getEventImages($bdd, $_GET['event']); $couvertureImg = getEventBigImage($bdd, $_GET['event']); -$prefixe = $config["LOCAL_IMG_PREFIXE"]."gallerie/"; +$prefixe = $config["LOCAL_IMG_PREFIXE"] . "gallerie/"; ?> @@ -28,46 +28,6 @@ $prefixe = $config["LOCAL_IMG_PREFIXE"]."gallerie/"; - - @@ -78,64 +38,20 @@ $prefixe = $config["LOCAL_IMG_PREFIXE"]."gallerie/";
0 && isset($columns[$col][$row - 1]) && $columns[$col][$row - 1] === $imagePath) { - return false; - } - - if ($col > 0) { - // Gauche - if (isset($columns[$col - 1][$row]) && $columns[$col - 1][$row] === $imagePath) { - return false; - } - // Diagonale Haut-Gauche - if ($row > 0 && isset($columns[$col - 1][$row - 1]) && $columns[$col - 1][$row - 1] === $imagePath) { - return false; - } - // Diagonale Bas-Gauche - if (isset($columns[$col - 1][$row + 1]) && $columns[$col - 1][$row + 1] === $imagePath) { - return false; - } - } - return true; - } - - // Construction de la structure de données - for ($col = 0; $col < $nbColumns; $col++) { - $columns[$col] = []; - - for ($row = 0; $row < $rowsPerColumn; $row++) { - shuffle($images); - $placed = false; - - foreach ($images as $img) { - if (canPlace($columns, $col, $row, $prefixe . $img['chemin'])) { - $columns[$col][$row] = $img['chemin']; - $placed = true; - break; - } - } - - if (!$placed && !empty($images)) { - $columns[$col][$row] = $prefixe.$images[0]['chemin']; - } - } - } - - // Affichage manuel sans classes Bootstrap conflictuelles - for ($col = 0; $col < $nbColumns; $col++): ?> + for ($col = 0; $col < $nbColumns; $col++): + $startIndex = ($col * $offset) % $totalImages; + ?>
- - Image évènement - + + Image évènement +
diff --git a/guides.php b/guides.php index 75b64a5..fe0c094 100644 --- a/guides.php +++ b/guides.php @@ -3,6 +3,8 @@ include("./Assets/functions.php"); $config = json_decode(file_get_contents("./Assets/config.json"), true); $bdd = connectBDD("localhost", $config["BDD_USER"], $config["BDD_PASSWD"], $config["BDD_NAME"]); $page = 'Guides'; + +$guides = getGuides($bdd); ?> @@ -16,6 +18,15 @@ $page = 'Guides'; +
+ +
+

+ Image de couverture +
+ +
+ diff --git a/login.php b/login.php index 8407e01..2fe6047 100644 --- a/login.php +++ b/login.php @@ -40,5 +40,6 @@ if(isset($_POST['user']) && isset($_POST['password']) && isset($_GET['redirect_t +

En cas d'oubli de votre mot de passe, veuillez contacter Blandine Lemaire au 20117

\ No newline at end of file diff --git a/logout.php b/logout.php new file mode 100644 index 0000000..f08dd68 --- /dev/null +++ b/logout.php @@ -0,0 +1,5 @@ + - - - - Intranet de l'APEI - - - - - - -

Évènements de

+ + + + Intranet de l'APEI + + + + -
-
- - "> + + + +

Évènements de

+ +
+
+ +
+ +
+ + + + - - - \ No newline at end of file diff --git a/styles-scripts/event.css b/styles-scripts/event.css index 017db68..5e20b2d 100644 --- a/styles-scripts/event.css +++ b/styles-scripts/event.css @@ -54,4 +54,45 @@ body { flex: 100%; max-width: 100%; } +} + +/* Nettoyage des styles pour éviter les conflits Bootstrap sur le reste de la page */ +body { + overflow-x: hidden; + /* Sécurité anti-scroll horizontal */ + margin: 0; + padding: 0; +} + +.custom-grid-container { + width: 100%; + padding: 0 15px; + /* Évite que les images collent aux bords de l'écran */ + box-sizing: border-box; +} + +/* Clearfix pour contenir les éléments en float */ +.custom-grid-container::after { + content: ""; + display: table; + clear: both; +} + +.custom-column { + float: left; + width: 25%; + box-sizing: border-box; + padding: 5px; + /* Espacement entre les images */ +} + +.custom-column img { + width: 100%; + display: block; + margin-bottom: 10px; +} + +h1 { + padding: 20px 15px; + margin: 0; } \ No newline at end of file diff --git a/styles-scripts/guides.css b/styles-scripts/guides.css new file mode 100644 index 0000000..8bda2c7 --- /dev/null +++ b/styles-scripts/guides.css @@ -0,0 +1,14 @@ + .grid-container { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); + gap: 1rem; + padding: 1rem; + } + + .card { + background: #f0f0f0; + border: 2px solid #ccc; + padding: 20px; + /* text-align: center; */ + border-radius: 8px; + } \ No newline at end of file diff --git a/styles-scripts/photos.css b/styles-scripts/photos.css index b5661eb..4f749b0 100644 --- a/styles-scripts/photos.css +++ b/styles-scripts/photos.css @@ -96,4 +96,56 @@ img { font-size: 3rem; font-weight: bold; text-align: center; +} + +.event-banner { + position: relative; + height: 220px; + margin-bottom: 25px; + border-radius: 12px; + overflow: hidden; + + background-size: cover; /* empêche la déformation */ + background-position: center; /* centre l'image */ + background-repeat: no-repeat; + + display: flex; + align-items: center; + justify-content: center; + + transition: transform 0.2s ease; +} + +.event-banner:hover { + transform: scale(1.02); +} + +.event-overlay { + position: absolute; + inset: 0; + background: rgba(0,0,0,0.45); +} + +.event-text { + position: relative; + color: white; + text-align: center; + z-index: 2; +} + +.event-text h2 { + font-weight: 600; + margin-bottom: 5px; +} + +/* lien invisible */ +.event-banner-link { + text-decoration: none; + color: inherit; + display: block; +} + +.event-banner-link:hover { + text-decoration: none; + color: inherit; } \ No newline at end of file diff --git a/viewAllEvents.php b/viewAllEvents.php new file mode 100644 index 0000000..ef9cc85 --- /dev/null +++ b/viewAllEvents.php @@ -0,0 +1,55 @@ + + + + + + + + Intranet de l'APEI + + + + + + + + +
+ + + + +
+
+ +
+

+

+
+
+
+ + + +
+ + + \ No newline at end of file