diff --git a/LICENSE b/LICENSE index c3e4a17b23bd52ebf78e0679c80d13716a5ff6f9..ecf56dd939067707192593a940c0001803a7b9c6 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2023 Marc-Antoine Manningham +Copyright 2024 Marc-Antoine Manningham Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Softwareâ€), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/aep-schedule-generator/src/algorithm/schedule.rs b/aep-schedule-generator/src/algorithm/schedule.rs index 9536339880ce6ff7ed0ae28c5b4aa64d6b2bf59f..3ffd7d989619de232a3ac7216da4d03c2d2a1bc0 100644 --- a/aep-schedule-generator/src/algorithm/schedule.rs +++ b/aep-schedule-generator/src/algorithm/schedule.rs @@ -86,7 +86,7 @@ impl<'a> ScheduleBuilder<'a> { let mut new_schedule = self.clone(); if let Some(theo_group) = new_course.get_theo_group(self.courses) { for period in &theo_group.periods { - if user_conflicts.conflict_in_day(period) { + if user_conflicts.user_conflict_in_day(period) { return None; } if new_schedule.week.conflict_in_day(period) { @@ -101,7 +101,7 @@ impl<'a> ScheduleBuilder<'a> { } if let Some(lab_group) = new_course.get_lab_group(self.courses) { for period in &lab_group.periods { - if user_conflicts.conflict_in_day(period) { + if user_conflicts.user_conflict_in_day(period) { return None; } if new_schedule.week.conflict_in_day(period) { diff --git a/aep-schedule-website/public/haikei.svg b/aep-schedule-website/public/haikei.svg deleted file mode 100644 index dd0d7ab70bccc69673eec66d0c200a3a8bfeb42a..0000000000000000000000000000000000000000 --- a/aep-schedule-website/public/haikei.svg +++ /dev/null @@ -1 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" width="200" height="2000" fill="none"><path d="M98.143-32.856h106.88v2052.025H98.143Z" style="fill:#f9f9f9;stroke-width:.522926"/><path fill="#001220" d="M43.9-9.784c22.534 80.863 6.105 193.303 6.299 291.35.642 95.808 6.711 190.957 4.669 286.775-2.043 95.595-12.198 191.635-14.882 287.22-2.743 95.82 1.926 190.964 3.56 286.78 1.692 95.593.291 191.632 1.867 287.224 1.576 95.816 6.011 190.962 6.128 286.778.117 95.592-4.202 191.631-6.303 239.652l-1.005 44.818 122.57 3.2V-6.107z"/><path fill="#003c4c" d="m72-6.443 2.263 88.156c6.07 48.02 8.092 104.26 7.217 199.854-.876 95.807-14.648 190.956-14.882 286.774-.175 95.595 13.248 191.635 15.699 287.22 2.393 95.82-6.128 190.964-10.622 286.78-4.493 95.592-4.843 191.632-.992 287.224 3.91 95.816 12.08 190.962 13.248 286.777 1.167 95.593-4.669 191.632-7.587 239.652l-3.559 45.769 94.017 2.25V-6.107z"/><path fill="#006b71" d="m81.86-6.108 11.802 128.184c4.313 46.85 9.685 99.044 4.316 194.64-5.31 95.807-16.79 155.807-16.557 251.625.176 95.595 7.179 191.635 11.556 287.22 4.377 95.82 6.128 190.964 6.711 286.78.584 95.592 0 191.632-3.618 287.224-3.56 95.816-10.213 190.962-13.306 286.777-3.093 95.593-1.977 188.875-2.51 235.713.116 42.008 1.003 34.84 1.538 50.068l85.01 1.89V-6.107z"/><path fill="#009c7e" d="m110.267-10.25 11.383 79.974c6.359 44.67 6.635 116.248 2.082 211.843-4.61 95.807-14.298 190.956-14.531 286.774-.175 95.595 9.163 191.635 12.08 287.22 2.918 95.82-.583 190.964-3.793 286.78-3.21 95.592-6.128 191.632-5.544 287.224.583 95.816 4.669 190.962 3.21 286.777-1.46 95.593-10.04 163.098-10.367 212.081-.184 27.567 2.142 64.185 5.602 75.321l48.96 8.147 7.453-55.897V-6.108Z"/><path fill="#6cc96a" d="M129.328-8.947C135.256 8 149.093 70.75 147.945 111.561c-.937 47.97-1.551 75.257-4.487 170.752-2.872 95.708-6.87 190.758-9.368 286.476-2.498 95.495-3.497 191.435-1.936 286.92 1.562 95.72 5.683 190.767 5.371 286.484-.312 95.491-5.059 191.431-6.557 286.925-1.437 95.716.437 190.762 4.059 286.478 3.685 95.494-.82 123.561.03 214.812.735 27.747-1.357 52.748-6.431 74.852l31.138.529 9.737-50.79V282.312c-1.861-77.142 11.848-126.602-.47-230.823 3.829-25.005-13.8-42.526-17.46-63.004z" style="stroke-width:.638779"/><path fill="#fff" d="M149.513-11.208c7.214 17.01 11.79 40.659 15.795 59.486 1.686 7.925 10.486 104.154 4.002 233.289-4.862 95.807-15.078 190.956-15.324 286.774-.184 95.595 9.662 191.635 12.74 287.22 3.076 95.82-.616 190.964-4 286.78-3.386 95.592-6.463 191.632-5.848 287.224.616 95.816 4.924 190.962 3.385 286.778-1.538 95.592-8.923 191.632-12.615 239.65-4.617 39.345-.11 35.737.93 48.902l66.15-.881V-6.108Z" style="stroke-width:.710426"/></svg> \ No newline at end of file diff --git a/aep-schedule-website/src/frontend/components/options/state.rs b/aep-schedule-website/src/frontend/components/options/state.rs index 7b2a8d11bc7ad28e68f8923a4caf8b59fc8a5f5c..0272c5cc3fdf881a911fd7328d9e353122037e67 100644 --- a/aep-schedule-website/src/frontend/components/options/state.rs +++ b/aep-schedule-website/src/frontend/components/options/state.rs @@ -105,7 +105,7 @@ impl From<&OptionState> for SchedulesOptions { max_nb_conflicts, evaluation, user_conflicts, - max_size: 50, + max_size: 20, } } } diff --git a/aep-schedule-website/style/constant.scss b/aep-schedule-website/style/constant.scss index 711390ea5d7f9e269134a6463c623d15efc870d9..fe36f9f0a9dde60e6a72009998b9240ee54fcd1c 100644 --- a/aep-schedule-website/style/constant.scss +++ b/aep-schedule-website/style/constant.scss @@ -1,7 +1,13 @@ -$background-color: #001220; -$highlight-color: #6cc96a; -$secondary-color: #a9d3c1; -$white: white; +$background-color: #151420; +$highlight-color: #F28A00; +$highlight-text: #0F1741; +$tern-color: #daa662; +$tern-text: #3b3b3b; +$secondary-color: #40477E; +$error-color: #DC3545; +$light-background: #F8F8F8; +$highlight-background: #FFFFFF; +$success: #0FCC3B; @keyframes fadeIn { 0% { diff --git a/aep-schedule-website/style/main.scss b/aep-schedule-website/style/main.scss index 4c14477f46a1ac6a43df9d259ee64041ff12f66b..a65f373675a02a8bbce7a7b91cbc883e0708f964 100644 --- a/aep-schedule-website/style/main.scss +++ b/aep-schedule-website/style/main.scss @@ -6,6 +6,8 @@ body { font-family: sans-serif; margin: 0; + min-height: calc(100vh - 3em); + $background-color: $light-background; } nav { @@ -23,7 +25,7 @@ nav { display: flex; box-sizing: border-box; position: fixed; - background-color: $white; + background-color: $highlight-background; top: 0; justify-content: flex-start; align-items: center; @@ -59,6 +61,15 @@ nav > a { main { display: flex; justify-content: flex-end; + margin-top: 3em; + min-height: calc(100vh - 3em); + background-color: $light-background; + @media screen and (max-width: 1000px) { + top: 0; + } + @media screen and (min-width: 1000px) { + top: 3em; + } } section { @@ -78,27 +89,22 @@ section { top: 0; width: 100%; height: 100%; - background-position: top -10vh right -2.69vh; } @media screen and (min-width: 1000px) { top: 3em; - height: calc(100% - 3em); + height: calc(100vh - 3em); width: 42%; - padding-right: 4vh; - background-position: top -10vh right 0vh; } + box-sizing: border-box; z-index: 20; position: fixed; left: 0; - color: white; + color: $light-background; display: flex; flex-direction: column; justify-items: center; background-color: $background-color; - background-image: url('../haikei.svg'); - background-size: 10% 142%; - background-repeat: no-repeat; - padding: 0em 0.69em; + padding: 0.2em 0.69em; gap: 0.5em; animation: 0.5s ease-out 0s 1 slideInFromLeft; } @@ -108,15 +114,16 @@ section { width: 100%; } @media screen and (min-width: 1000px) { - padding-top: 3em; - width: 52%; + width: 58%; } + + box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0.42em; - background-color: $white; + background-color: $light-background; } #go-back { @@ -137,7 +144,7 @@ section { align-items: center; justify-content: center; border: none; - color: white; + color: $highlight-text; border-radius: 100%; cursor: pointer; } diff --git a/aep-schedule-website/style/options.scss b/aep-schedule-website/style/options.scss index 0770fff0bf172a8432afd5c0fc5a19b8944d5854..6ec4fe9f40bc42cf51f219623052238c0737a92d 100644 --- a/aep-schedule-website/style/options.scss +++ b/aep-schedule-website/style/options.scss @@ -3,7 +3,7 @@ .submit { background-color: $highlight-color; border: none; - color: white; + color: $highlight-text; padding: 0.2em 0.5em; text-decoration: none; border-radius: 10px; @@ -18,7 +18,7 @@ } .card { - background-color: white; + background-color: $light-background; box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); color: $background-color; text-align: center; @@ -126,11 +126,11 @@ } .closed-group { - background-color: rgba(255, 69, 69, 0.69); + background-color: $error-color; } .input-item { - width: 95%; + width: 100%; display: flex; align-items: center; gap: 10px; @@ -154,9 +154,9 @@ } .tab-button { - background-color: $secondary-color; + background-color: $tern-color; border: none; - color: #556960; + color: $tern-text; margin-top: 5px; margin-right: 5px; text-align: center; @@ -167,12 +167,12 @@ .tab-width { flex-wrap: wrap; - width: 95%; + width: 100%; } .tab-selected { background-color: $highlight-color; - color: white; + color: $tern-text; } .close { @@ -192,11 +192,11 @@ } .selected-hour { - background-color: black; + background-color: $background-color; } .unselected-hour { - background-color: white; + background-color: $light-background; } .selection { diff --git a/aep-schedule-website/style/schedule.scss b/aep-schedule-website/style/schedule.scss index a021c599383b4cb35a704bb3f0a6445779f489e9..a312380915b1aec02a5aa7c0c40262be30bbfa3f 100644 --- a/aep-schedule-website/style/schedule.scss +++ b/aep-schedule-website/style/schedule.scss @@ -16,10 +16,6 @@ $days-height: 2em; $time-width: 1em; $days: $time-width 10px repeat(5, 1fr); -body { - background: #fff; -} - .schedule { width: 100%; display: grid; @@ -116,7 +112,7 @@ body { align-items: center; justify-content: center; border: none; - color: white; + color: $highlight-text; font-weight: bolder; border-radius: 10px; cursor: pointer;