diff --git a/admin.php b/admin.php new file mode 100644 index 0000000000000000000000000000000000000000..d4991e246c884a8f5b1b1876c7e9e1930d139466 --- /dev/null +++ b/admin.php @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<html lang="fr"> + +<head> + <title>UFHOUR - Admin</title> + + <!-- Head --> + <?php require("assets/php/head.php"); ?> +</head> + +<body> + <main> + <header> + <h1>UFHOUR</h1> + <p><?= $locale["subtitle"]; ?></p> + </header> + <h2><?=$locale["admin_login"]; ?></h2> + <hr> + + <form> + <label><?= $locale["username"]; ?> + <input type="text" name="username" required> + </label> + <label><?= $locale["password"]; ?> + <input type="password" name="password" required> + </label> + + <button type="submit"><?= $locale["login_action"]; ?></button> + </form> + </main> + + <?php include "assets/php/cookies.php"; ?> + <?php include "assets/php/nav.php"; ?> +</body> + +</html> \ No newline at end of file diff --git a/assets/css/cookies.css b/assets/css/cookies.css index 0d2640540f7cb15a28a84f88875a1c4ccb7f1248..cd29634081ba3c9209f9733ec161b02bd172f2b1 100644 --- a/assets/css/cookies.css +++ b/assets/css/cookies.css @@ -1,22 +1,25 @@ #cookies { position: fixed; - bottom: 1.5rem; - left: 1.8rem; + bottom: 1rem; + left: 1rem; display: flex; gap: 1rem; } -#cookies > div { - background: rgb(255, 255, 255); - display: flex; - align-items: center; - text-align: right; - gap: 1rem; - width: 23rem; +#cookies::after { + content: ""; + display: block; + position: absolute; + right: -10%; + bottom: 0; + border-radius: 50px; + width: 30px; + height: 30px; + background-color: var(--marblue); +} - margin-top: 1.1rem; - border-radius: 20px 300px 300px 500px; - padding: 0.8rem 1rem; +#cookies > div { + display: none; } #cookies > div > p { @@ -27,7 +30,7 @@ } #cookies > img { - height: 5rem; + height: 4rem; } #cookies button { @@ -40,7 +43,37 @@ #wip { position: fixed; - top: 2rem; - left: 2rem; - height: 150px; -} \ No newline at end of file + top: -15px; + left: 5rem; + height: 100px; +} + +@media screen and (min-width: 768px) { + #cookies { + position: fixed; + bottom: 1.5rem; + left: 1.8rem; + display: flex; + gap: 1rem; + } + #cookies::after { + display: none; + } + + #cookies > div { + background: rgb(255, 255, 255); + display: flex; + align-items: center; + text-align: right; + gap: 1rem; + width: 23rem; + + margin-top: 1.1rem; + border-radius: 20px 300px 300px 500px; + padding: 0.8rem 1rem; + } + + #cookies > img { + height: 5rem; + } +} diff --git a/assets/css/form.css b/assets/css/form.css index a1ce897e0ec378bd8604d7b91112df7a53f53ef4..0306b4d48848fdbc6bc229e425c6fb46d6636110 100644 --- a/assets/css/form.css +++ b/assets/css/form.css @@ -8,7 +8,8 @@ main > form { padding: 1.5rem; border-radius: 10px; max-width: 100vw; - margin: 10px 10px; + margin-left: 10px; + margin-right: 10px; } @media screen and (min-width: 768px) { diff --git a/assets/css/main.css b/assets/css/main.css index c0ae3f3d68ab8cdd49cd56e0f9030b8d1ad7dd6b..9ee107b805bead615f474f3b9e37e76504861039 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -25,7 +25,7 @@ main { background: rgba(0, 0, 0, 0.9); position: fixed; - padding-bottom: 5rem; + padding-bottom: 7rem; display: flex; flex-direction: column; @@ -34,13 +34,25 @@ main { gap: 1rem; } +h2 { + margin-top: 0rem; +} + +hr { + width: 10rem; + display: none; +} + @media screen and (min-width: 576px) { main { + padding-top: 2rem; justify-content: center; } -} - + hr { + display: block; + } +} header * { font-family: "Roboto Mono", sans-serif; @@ -70,8 +82,6 @@ header > h1 { } } - - header > p { text-align: center; font-weight: 300; diff --git a/assets/css/result.css b/assets/css/result.css index c5072636c63a1b5e1e9a3ce083c83b4f42fe3844..ebf29ed4a45b077c5b8b65e51dfda7b47fe3e947 100644 --- a/assets/css/result.css +++ b/assets/css/result.css @@ -1,5 +1,7 @@ .result { display: flex; + flex-wrap: wrap; + justify-content: space-between; gap: 2rem; background: var(--smoke); diff --git a/assets/css/search.css b/assets/css/search.css index 156a348ec05e73df7539e7c008f4381726ad977c..a8b1c04fa50a5c10a9c96b9ad537a5a2fd91a59f 100644 --- a/assets/css/search.css +++ b/assets/css/search.css @@ -1,17 +1,38 @@ section { - display: flex; - flex-direction: column; - gap: 0.5rem; - overflow:hidden; overflow-y:scroll; - height: 55vh; - width: 40rem; - border-radius: 10px; + display: flex; + flex-direction: column; + gap: 0.5rem; + overflow: hidden; + overflow-y: scroll; + height: 100%; + max-width: 100vw; + box-sizing: border-box; + border-radius: 10px; + margin-left: 10px; + margin-right: 10px; +} + +section > .result { + justify-content: center; } h2 { - margin-top: 2rem; + margin-top: 0rem; } hr { - width: 10rem; -} \ No newline at end of file + width: 10rem; + display: none; +} + +@media screen and (min-width: 768px) { + section { + max-width: none; + width: 700px; + margin: none; + } + + section > .result { + justify-content: space-between; + } +} diff --git a/assets/locale/fr.php b/assets/locale/fr.php index 73ab57361a2b3454f6c3403b7cd4b9de7a7b0527..3e4dfc3cbbcf93cc83c80ce2b6d98266fb457a78 100644 --- a/assets/locale/fr.php +++ b/assets/locale/fr.php @@ -18,6 +18,10 @@ $locale = [ "cookies_info" => "Ce site utilises des cookies afin d'assurer son bon fonctionnement.", "cookies_details" => "Détails", "from_to" => "à ", - "floor_ground" => "Rez de chaussée", - "floor" => "étage" + "floor_ground" => "RDC", + "floor" => "étage", + "username" => "Nom d'utilisateur", + "password" => "Mot de passe", + "admin_login" => "Connexion au tableau d'admin", + "login_action" => "S'authentifier" ]; \ No newline at end of file diff --git a/assets/php/nav.php b/assets/php/nav.php index 8468dd5bfdc4ac45ab4f7b1177f4264cad5e3ff7..b6bed2b9ae7b762f0b9a9b2378da16af62d0e55a 100644 --- a/assets/php/nav.php +++ b/assets/php/nav.php @@ -14,7 +14,7 @@ <li><a href="/index.php"><?= $locale["nav_home"]; ?></a></li> <li><a><?= $locale["nav_feedback"]; ?></a></li> <li><a><?= $locale["nav_about"]; ?></a></li> - <li><a><?= $locale["nav_admin"]; ?></a></li> + <li><a href="/admin.php"><?= $locale["nav_admin"]; ?></a></li> </ul> <button> <i class="material-icons">menu</i> diff --git a/index.php b/index.php index 5209e2468097761a7da4aa0f06fa39907442a645..59ca9b7e747d1fac30c476fc2203ce42b173c0db 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html lang="en"> +<html lang="fr"> <head> <title>UFHOUR</title> @@ -34,7 +34,7 @@ <select name="room_type"> <option value="tp"><?= $locale["room_tp"]; ?></option> <option value="td"><?= $locale["room_td"]; ?></option> - <option value="amphi"><?= $locale["room_amphi"]; ?></option> + <!-- <option value="amphi"><?= $locale["room_amphi"]; ?></option> --> </select> </label> diff --git a/search.php b/search.php index 7628167d1cfc48583c94a76a808fb5dd9950ee87..ee294018afaf06c344d7e0624e1a2bf1078c6f9e 100644 --- a/search.php +++ b/search.php @@ -17,7 +17,8 @@ try { $query = $pdo->prepare("SELECT id, type, start_time, end_time, location FROM schedule NATURAL JOIN rooms WHERE type LIKE :type AND date(date) = date(:date) - AND time(end_time) > time(:start_time) AND time(start_time) < time(:end_time)"); + AND time(end_time) > time(:start_time) AND time(start_time) < time(:end_time) + ORDER BY start_time"); /** * QUERY DESCRIPTION : @@ -59,10 +60,10 @@ try { ?> <!DOCTYPE html> -<html lang="en"> +<html lang="fr"> <head> - <title>UFHOUR</title> + <title>UFHOUR - Search</title> <!-- Head --> <?php require("assets/php/head.php"); ?>