diff --git a/package-lock.json b/package-lock.json index 8885b7c73..4dac6c3aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,9 @@ "name": "thecourseforum", "version": "2.0.0", "license": "GPL-3.0-or-later", + "dependencies": { + "thecourseforum": "file:" + }, "devDependencies": { "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", @@ -2503,6 +2506,10 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/thecourseforum": { + "resolved": "", + "link": true + }, "node_modules/tsconfig-paths": { "version": "3.15.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", diff --git a/package.json b/package.json index d4d2f3540..fae7dd867 100644 --- a/package.json +++ b/package.json @@ -25,5 +25,8 @@ "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-promise": "^6.1.1", "prettier": "^3.2.5" + }, + "dependencies": { + "thecourseforum": "file:" } } diff --git a/tcf_core/context_processors.py b/tcf_core/context_processors.py index 063cf550b..704013068 100644 --- a/tcf_core/context_processors.py +++ b/tcf_core/context_processors.py @@ -46,9 +46,16 @@ def history_cookies(request): def searchbar_context(request): """Provide context for the search bar.""" latest_semester = Semester.latest() - recent_semesters = Semester.objects.filter( - number__gte=latest_semester.number - 50 # 50 = 5 years * 10 semesters - ).order_by("-number") + # recent_semesters = Semester.objects.filter( + # number__gte=latest_semester.number - 50 # 50 = 5 years * 10 semesters + # ).order_by("-number") + + if latest_semester: + recent_semesters = Semester.objects.filter( + number__gte=latest_semester.number - 50 # 50 = 5 years * 10 semesters + ).order_by("-number") + else: + recent_semesters = Semester.objects.none() # Get saved filters from the session (or use defaults) saved_filters = request.session.get("search_filters", {}) diff --git a/tcf_website/static/about/about.css b/tcf_website/static/about/about.css index 353588fc5..fd9a3c05f 100644 --- a/tcf_website/static/about/about.css +++ b/tcf_website/static/about/about.css @@ -55,3 +55,15 @@ overflow: hidden; opacity: 0.8; } + +.jumbotron { + background-color: var(--input-background-color) !important; +} + +.text-muted { + color: var(--basic-text-color) !important; +} + +.card-text { + color: var(--basic-text-color) !important; +} \ No newline at end of file diff --git a/tcf_website/static/base/navbar.css b/tcf_website/static/base/navbar.css index add3b3892..bd2369ef0 100644 --- a/tcf_website/static/base/navbar.css +++ b/tcf_website/static/base/navbar.css @@ -1,7 +1,7 @@ /* Any css that involves the navbar should go in this file! - This way things are kept insolated and de-coupled from one - another, making components more maliable and maintainable. + This way things are kept isolated and de-coupled from one + another, making components more malleable and maintainable. */ .navbar { @@ -25,14 +25,8 @@ transition-timing-function: ease; } -.logo-container:hover { - transform: scale(1.05); -} - -.logo-container:active { - transform: scale(1.05); -} - +.logo-container:hover, +.logo-container:active, .logo-container:focus { transform: scale(1.05); } @@ -41,7 +35,6 @@ .logo-container { width: calc(var(--sidebar-width) - 16px); height: auto; - /* Animation */ padding-left: 0.55rem; /* centers logo in logo-container */ padding-right: 0rem; @@ -85,6 +78,32 @@ background-color: rgb(190, 190, 190); } +.dark-mode .navbar { + flex-wrap: nowrap; + background-color: var(--card-background-color); + color: var(--basic-text-color); +} +.navbar { + background-color: white; +} + +.dark-mode .navbar-toggler.menu { + border-color: var(--input-border-color); + background-color: var(--button-bg-color); +} + +.dark-mode .navbar-toggler.menu:hover { + background-color: #2a2a2a; +} + +.dark-mode .navbar-toggler.menu:active { + background-color: #333333; +} + +.dark-mode .navbar-toggler.menu:focus { + background-color: #2a2a2a; +} + @media (max-width: 768px) { .account-settings { display: none; @@ -95,4 +114,4 @@ .dropdown-menu.settings { min-width: 140px !important; } -} +} \ No newline at end of file diff --git a/tcf_website/static/base/sidebar.css b/tcf_website/static/base/sidebar.css index a1d2e44d3..1c2a601a7 100644 --- a/tcf_website/static/base/sidebar.css +++ b/tcf_website/static/base/sidebar.css @@ -84,3 +84,8 @@ body { .modal { z-index: 10000; } + +/* styles the right border of sidebar */ +.border-right { + border-right: 1px solid var(--input-border-color) !important; +} diff --git a/tcf_website/static/base/tcf-style.css b/tcf_website/static/base/tcf-style.css index f7d5f577a..0c943e83c 100644 --- a/tcf_website/static/base/tcf-style.css +++ b/tcf_website/static/base/tcf-style.css @@ -11,9 +11,45 @@ --shadow-color: #a6a6a6; /* Medium grey, used for shadows */ --shaded-color: #cfcfcf; /* Medium light grey, used for shading */ --background-color: #ebebeb; /* Light grey, used for backgrounds */ + --landing-page-background-color: #F8F9FA; + --card-background-color: #ffffff; + --navbar-color: #ffffff; + /* newly added */ + --basic-text-color: #212529; + --accent-text-white: #ffffff; /* White text color */ + /* changes the border color of the search bar on landing page */ + --input-border-color: #DEE2E6; + /* changes the color of the title and icons on the landing page */ + --title-color: #274f97; + --filter-input-background-color: white; + --icon-color-white: #ffffff; /* White icon color */ + --input-background-color: #EBEBEB; + --landing-page-input-background-color: white; + --filter-background-color: white; + + /* #f8f9fa is the og background color styled by .bg-light in _background_variant.scss */ /* Note: Can use Bootstrap "light" color and white color */ } +/* only main-color (tcf blue) and accent-color (tcf organge) are being utilized by the landing page */ +body.dark-mode { + +/* Added updated variables names */ + --background-color: black; /* Dark background color */ + --card-background-color: #333333; /* Dark card background */ + --input-background-color: #545454; /* Dark input background */ + --filter-input-background-color: #545454; /* Dark input background */ + --input-text-color: #a6a6a6; /* Light text in inputs */ + --accent-text-color: #d75626; /* Accent color for dark mode */ + --basic-text-color: white; /* White text color */ + --icon-color: white; /* Light icon color */ + --input-border-color: #5a5c5d; /* Lighter border color for inputs */ + --button-bg-color: #1e1e1e; /* Darker button background */ + --landing-page-background-color: black; /* replace tcf-blue as tcf logo text color */ + --title-color: white; /* make title and icons on landing page white */ + --filter-background-color: #333333; +} + /*************DEFAULT STYLES**************/ h1, h2, @@ -29,6 +65,36 @@ h6, .h6 { /* Default heading font: Lato (others are fallbacks) */ font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif; + /* Chai: initially didn't have a color element, this color element overrides color in _reboot.cscc */ + /* color: var(--h4-card-title-color); */ +} + +h1, .h1 { + color: var(--basic-text-color); +} + +h2, .h2 { + color: var(--basic-text-color); +} + +h4, .h4 { + color: var(--basic-text-color); +} + +h3, .h3 { + color: var(--basic-text-color); +} + +h5, .h5 { + color: var(--basic-text-color); +} + +h6, .h6 { + color: var(--basic-text-color); +} + +label { + color: var(--basic-text-color); } body { @@ -68,13 +134,16 @@ ul { /* Main color: Indigo/Dark blue */ .text-tcf-indigo { - color: var(--main-color); + color: var(--title-color); } + .bg-tcf-indigo { - background-color: var(--main-color); + /* background-color: var(--main-color); */ + /* Chai: this banner color should be tcf blue no matter if theme is light or dark */ + background-color: #274f97; } .border-tcf-indigo { - border-color: var(--main-color); + border-color: var(--title-color); } /* Secondary color: Light blue */ @@ -89,6 +158,7 @@ ul { .text-tcf-orange { color: var(--accent-color); } +/* colors specifically the 'Meet the full team' button */ .bg-tcf-orange { background-color: var(--accent-color); } @@ -124,8 +194,114 @@ ul { border-color: var(--background-color); } -/* Note: Can use Bootstrap "light" color - .text-light - .bg-light - .border-light -*/ +/* OVERRIDES scss stylings */ +/* Chai: background color on landing page is being styled by .bg-light in _background-variant.scss, has to have !important to override the !important in the scss */ +.bg-light { + background-color: var(--landing-page-background-color) !important; +} + +/* Chai: card background color is being styled by .card in _card.scss; color will be card-background-color when in dark-mode */ +.card { + background-color: var(--card-background-color) !important; + /* border: 1px solid var(--input-border-color); */ +} +.card.bg-tcf-orange { + background-color: var(--accent-color) !important; +} + + +p { + color: var(--basic-text-color); +} + +.form-control { + background-color: var(--input-background-color); + color: var(--input-text-color); + border: 1px solid var(--input-border-color); +} + +.form-control:focus { + background-color: var(--input-background-color); + color: var(--basic-text-color); +} + +.form-control::placeholder { + color: var(--input-text-color); +} + +/* overrides the input:-internal-autofill-selected setting from User Agent Stylesheet */ +input:-webkit-autofill { + -webkit-box-shadow: 0 0 0px 1000px var(--input-background-color) inset !important; + -webkit-text-fill-color: white !important; + transition: background-color 5000s ease-in-out 0s; +} + +.forcontrol:disabled { + background-color: var(--background-color); +} + +/* originally in borders.scss */ +.border { + border: 0.5px solid var(--input-border-color) !important; +} + +.modal-body { + background-color: var(--background-color); +} + +.modal-header { + background-color: var(--background-color); + border-bottom: 1px solid var(--input-border-color); +} + +.modal-footer { + background-color: var(--background-color); + border-top: 1px solid var(--input-border-color); +} + +.dropdown-menu { + background-color: var(--filter-background-color); +} + +.dropdown-item { + color: var(--basic-text-color); +} + +.dropdown-divider { + border-top: 1px solid var(--input-border-color); +} + +/* styles the input range bar on the write review page */ +input[type="range"] { + width: 100%; + height: 6px; + background: transparent; +} + +input[type="range"]::-webkit-slider-runnable-track { + height: 6px; + background: var(--input-background-color); /* Track color */ + border-radius: 3px; +} + +input[type="range"]::-webkit-slider-thumb { + -webkit-appearance: none; + height: 16px; + width: 16px; + background: var(--accent-color); + border-radius: 50%; + margin-top: -5px; /* aligns thumb with the track */ + cursor: pointer; +} + +#darkModeToggle { + background: none; + border: none; + font-size: 20px; + cursor: pointer; + color: var(--icon-color, #212529); /* Customizable */ +} + +#sunIcon { + vertical-align: middle; +} diff --git a/tcf_website/static/browse/browse.css b/tcf_website/static/browse/browse.css index 7ececb17e..ccaa7022c 100644 --- a/tcf_website/static/browse/browse.css +++ b/tcf_website/static/browse/browse.css @@ -1,3 +1,7 @@ +body.dark-mode { + color: var(--basic-text-color); +} + .schools { margin-top: 30px; } @@ -19,9 +23,14 @@ .school > .card-header { background-color: var(--secondary-color); - color: white; +} + +.school .card-header, +.school .card-header .card-title { + color: var(--accent-text-white) !important; } .school-body { padding: 1.25rem; } + diff --git a/tcf_website/static/course/course.css b/tcf_website/static/course/course.css new file mode 100644 index 000000000..7eef883a3 --- /dev/null +++ b/tcf_website/static/course/course.css @@ -0,0 +1,16 @@ +/* Global override: force all text to white */ +body { + color: var(--basic-text-color); +} + +.breadcrumb { + background-color: var(--card-background-color) !important; +} + +.bg-white { + background-color: var(--card-background-color) !important; +} + +#title { + color: var(--accent-text-white) !important; +} \ No newline at end of file diff --git a/tcf_website/static/course/course_professor.css b/tcf_website/static/course/course_professor.css index bc109ed04..0b907306e 100644 --- a/tcf_website/static/course/course_professor.css +++ b/tcf_website/static/course/course_professor.css @@ -7,9 +7,10 @@ font-size: 22px; } } -.course-instructor-header .instructor-menu { - box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.2); -} +/*.course-instructor-header .instructor-menu { + box-shadow: 1px 1px 10px rgba(255, 0, 0, 0.2); +}*/ + /* Change tooltip alignment */ @media (min-width: 768px) { .tooltip-inner { @@ -26,6 +27,11 @@ row-gap: 10px; } +body { + background-color: var(--background-color); + color: var(--basic-text-color); +} + .times-info-container { width: 100%; display: flex; @@ -46,7 +52,7 @@ display: flex; align-items: center; justify-content: center; - background-color: white; + background-color: var(--card-background-color); z-index: 0; } @@ -79,7 +85,7 @@ .rating-card { height: 100%; - background-color: white; + background-color: var(--card-background-color); width: 200px; display: flex; align-items: center; @@ -89,7 +95,7 @@ .rating-card-num { font-size: 42px; - color: #d75626; + color: var(--accent-color); } .rating-card-desc { @@ -100,7 +106,7 @@ display: flex; flex-direction: column; flex-grow: 1; - background-color: white; + background-color: var(--card-background-color); height: 100%; margin-left: 10px; padding-top: 6px; @@ -141,17 +147,22 @@ } .gpa-text { - color: #384676; + color: var(--main-color); font-size: 28px; margin: 0; } .students-text { - color: #56679d; + color: var(--secondary-color); font-size: 16px; margin: 0; } +body.dark-mode .gpa-text, +body.dark-mode .students-text { + color: var(--basic-text-color) !important; +} + .info-row { display: flex; align-items: center; @@ -170,8 +181,10 @@ .info-bar .progress { margin: 0; padding: 0; + background-color: var(--input-background-color); } .info-bar .progress-bar { + background-color: var(--secondary-color); margin: 0; padding: 0; } @@ -316,6 +329,26 @@ } } +.breadcrumb { + background-color: var(--card-background-color) !important; + color: var(--basic-text-color) !important; +} + +.bg-white { + background-color: var(--card-background-color) !important; +} + +.nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active { + color: var(--basic-text-color) !important; + background-color: var(--card-background-color) !important; + border-color: var(--card-background-color); + border-bottom: 1px solid var(--background-color); +} + +.nav-tabs { + border-bottom: 1px solid var(--background-color) !important; +} + .rotated { transform: rotateZ(90deg); } @@ -389,6 +422,7 @@ width: 100px; height: 8px; margin: 0; + background-color: var(--input-background-color); } .metric-text { @@ -413,14 +447,14 @@ } .sections-toggle { - display: flex; - align-items: stretch; - height: 34px; - border-radius: 6px; - overflow: hidden; - background-color: #f8f9fa; - position: relative; - padding: 2px; + display: flex; + align-items: stretch; + height: 34px; + border-radius: 6px; + overflow: hidden; + background-color: var(--input-background-color); + position: relative; + padding: 2px; } .section-count { @@ -445,7 +479,6 @@ margin-bottom: 4px; align-items: center; padding: 12px 16px; - background-color: white; border-radius: 6px; transition: all 0.2s ease; border: 1px solid transparent; @@ -476,8 +509,8 @@ } .section-row > div:last-child { - text-align: right; - color: #666; + text-align: right; + color: var(--basic-text-color); } .hidden-section { @@ -507,20 +540,21 @@ /* Section toggle */ .toggle-option { - padding: 0 20px; - cursor: pointer; - font-size: 13px; - font-weight: 500; - transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - display: flex; - align-items: center; - justify-content: center; - user-select: none; - color: #666; - position: relative; - z-index: 1; - border-radius: 4px; - min-width: 90px; + padding: 0 20px; + cursor: pointer; + font-size: 13px; + font-weight: 500; + transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); + display: flex; + align-items: center; + justify-content: center; + user-select: none; + color: var(--basic-text-color); + position: relative; + z-index: 1; + border-radius: 4px; + min-width: 90px; + /* background-color: var(---input-background-color); */ } .toggle-option:hover:not(.active) { diff --git a/tcf_website/static/course/javascript/course_data.js b/tcf_website/static/course/javascript/course_data.js index e898f0a60..df2d4305f 100644 --- a/tcf_website/static/course/javascript/course_data.js +++ b/tcf_website/static/course/javascript/course_data.js @@ -141,6 +141,10 @@ const loadData = (data) => { }; const createChart = (gradesData) => { + const cardBgColor = getComputedStyle(document.body) + .getPropertyValue("--card-background-color") + .trim(); + const chartData = { datasets: [ { @@ -157,6 +161,8 @@ const createChart = (gradesData) => { "#D75626", // C- "#BE4B20", // DFW ], + borderColor: cardBgColor, + borderWidth: 2, }, ], labels: ["A+", "A", "A-", "B+", "B", "B-", "C+", "C", "C-", "DFW"], @@ -167,6 +173,7 @@ const createChart = (gradesData) => { type: "bar", data: chartData, options: { + animation: { duration: 0 }, layout: { padding: { bottom: 20, @@ -240,10 +247,31 @@ const createChart = (gradesData) => { // eslint-disable-next-line no-new,no-undef Chart.register(ChartDataLabels); + // Set up a MutationObserver to update chart borderColor when the body class changes. + const observer = new MutationObserver((mutationsList) => { + for (const mutation of mutationsList) { + if (mutation.attributeName === "class") { + updateChartBorderColor(); + } + } + }); + observer.observe(document.body, { attributes: true }); + + function updateChartBorderColor() { + const newCardBgColor = getComputedStyle(document.body) + .getPropertyValue("--card-background-color") + .trim(); + if (myChart && myChart.config.data.datasets[0]) { + myChart.config.data.datasets[0].borderColor = newCardBgColor; + myChart.update({ duration: 0 }); + } + } + // Generate configuration for Pie Chart pieConfig = { type: "doughnut", data: chartData, options: { + animation: { duration: 0 }, maintainAspectRatio: false, plugins: { legend: { diff --git a/tcf_website/static/department/department.css b/tcf_website/static/department/department.css index e69de29bb..a0acac3c5 100644 --- a/tcf_website/static/department/department.css +++ b/tcf_website/static/department/department.css @@ -0,0 +1,11 @@ +body.dark-mode { + color: var(--basic-text-color); + } + +.bg-white { + background-color: var(--card-background-color) !important; +} + +.main-text { + color: var(--accent-text-white) !important; +} diff --git a/tcf_website/static/icons/icons.css b/tcf_website/static/icons/icons.css index 261a94203..ddd979ce3 100644 --- a/tcf_website/static/icons/icons.css +++ b/tcf_website/static/icons/icons.css @@ -1,338 +1,57 @@ -.fa { - display: inline-block; - font-style: normal; /* Reset any inherited styles */ - line-height: 1; /* Match text line height */ - /* vertical-align: middle; */ - width: 1em; - height: 1em; -} - +.fa, .fas { display: inline-block; - font-style: normal; /* Reset any inherited styles */ - line-height: 1; /* Match text line height */ - /* vertical-align: middle; */ - width: 1em; - height: 1em; -} - -.fa-clock { - width: 1em; - height: 1em; - background-image: url("../icons/img/fa-clock.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; - vertical-align: middle; -} - -.fa-arrow-right { - width: 1em; - height: 1em; - background-image: url("../icons/img/fa-arrow-right.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-search { - width: 1em; - height: 1em; - background-image: url("../icons/img/fa-search.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; - vertical-align: middle; -} - -.fa-book { - width: 1em; - height: 1em; - background-image: url("../icons/img/fa-book.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; - width: 1em; - height: 1em; - vertical-align: middle; - display: inline-block; - filter: invert(100%) brightness(150%); -} - -.fa-users { - width: 1em; - height: 1em; - background-image: url("../icons/img/fa-user.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; - width: 1em; - height: 1em; - vertical-align: middle; - display: inline-block; - filter: invert(100%) brightness(150%); -} - -.fa-graduation-cap { - width: 1em; - height: 1em; - background-image: url("../icons/img/fa-graduation-cap.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; - width: 1em; - height: 1em; - vertical-align: middle; - display: inline-block; - filter: invert(100%) brightness(150%); -} - -.fa-handshake { - width: 1em; - height: 1em; - background-image: url("../icons/img/fa-handshake.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; - width: 1em; - height: 1em; - vertical-align: middle; - display: inline-block; + font-style: normal; + line-height: 1; + width: 1em; + height: 1em; + background-repeat: no-repeat; + background-size: contain; + background-position: center; +} + +.fa-clock { background-image: url("../icons/img/fa-clock.svg"); } +.fa-arrow-right { background-image: url("../icons/img/fa-arrow-right.svg"); } +.fa-search { background-image: url("../icons/img/fa-search.svg"); vertical-align: middle;} +.fa-book { background-image: url("../icons/img/fa-book.svg"); vertical-align: middle;} +.fa-history-book { background-image: url("../icons/img/fa-book.svg"); filter: invert(100%) brightness(150%); vertical-align: middle;} +.fa-users { background-image: url("../icons/img/fa-user.svg"); filter: invert(100%) brightness(150%); vertical-align: middle;} +.fa-graduation-cap { background-image: url("../icons/img/fa-graduation-cap.svg"); filter: invert(100%) brightness(150%); vertical-align: middle;} +.fa-handshake { background-image: url("../icons/img/fa-handshake.svg"); filter: invert(100%) brightness(150%); vertical-align: middle;} +.fa-github { background-image: url("../icons/img/fa-github.svg"); } +.fa-user { background-image: url("../icons/img/fa-user.svg"); } +.fa-dumbbell { background-image: url("../icons/img/fa-dumbbell.svg"); } +.fa-chart-bar { background-image: url("../icons/img/fa-chart-bar.svg"); } +.fa-star { background-image: url("../icons/img/fa-star.svg"); } +.fa-calendar { background-image: url("../icons/img/fa-calendar.svg"); } +.fa-plus { background-image: url("../icons/img/fa-plus.svg"); filter: invert(100%) brightness(150%); vertical-align: middle;} +.fa-chevron-up { background-image: url("../icons/img/fa-chevron-up.svg"); } +.fa-chevron-down { background-image: url("../icons/img/fa-chevron-down.svg"); } +.fa-thumbs-up { background-image: url("../icons/img/fa-thumbs-up.svg"); } +.fa-thumbs-down { background-image: url("../icons/img/fa-thumbs-down.svg"); } +.fa-trash-o { background-image: url("../icons/img/fa-trash-o.svg"); } +.fa-hourglass-half { background-image: url("../icons/img/fa-hourglass-half.svg"); } +.fa-pencil { background-image: url("../icons/img/fa-pencil.svg"); } +.fa-instagram { background-image: url("../icons/img/fa-instagram.svg"); filter: invert(100%) brightness(150%); vertical-align: middle;} +.fa-discord { background-image: url("../icons/img/fa-discord.svg"); filter: invert(100%) brightness(150%); vertical-align: middle;} +.fa-facebook { background-image: url("../icons/img/fa-facebook.svg"); filter: invert(100%) brightness(150%); vertical-align: middle;} +.fa-instagram-lg { background-image: url("../icons/img/fa-instagram.svg"); width: 1.5em; height: 1.5em; filter: invert(100%) brightness(150%); vertical-align: middle;} +.fa-discord-lg { background-image: url("../icons/img/fa-discord.svg"); width: 1.5em; height: 1.5em; filter: invert(100%) brightness(150%); vertical-align: middle;} +.fa-facebook-lg { background-image: url("../icons/img/fa-facebook.svg"); width: 1.5em; height: 1.5em; filter: invert(100%) brightness(150%); vertical-align: middle;} +.fa-code { background-image: url("../icons/img/fa-code.svg"); } +.fa-list { background-image: url("../icons/img/fa-list.svg"); vertical-align: middle;} +.fa-user-friends { background-image: url("../icons/img/fa-user-friends.svg"); } +.fa-smile-beam { background-image: url("../icons/img/fa-smile-beam.svg"); } +.fa-frown-open { background-image: url("../icons/img/fa-frown-open.svg"); } +.fa-heart { background-image: url("../icons/img/fa-heart.svg"); } +.fa-copy { background-image: url("../icons/img/fa-copy.svg"); filter: invert(100%) brightness(150%);} +.fa-flask { background-image: url("../icons/img/fa-flask.svg"); } + +body.dark-mode .fa, +body.dark-mode .fas { filter: invert(100%) brightness(150%); } -.fa-github { - width: 1em; - height: 1em; - background-image: url("../icons/img/fa-github.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-user { - width: 1em; - height: 1em; - background-image: url("../icons/img/fa-user.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-dumbbell { - width: 1em; - height: 1em; - background-image: url("../icons/img/fa-dumbbell.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-chart-bar { - width: 1em; - height: 1em; - background-image: url("../icons/img/fa-chart-bar.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-star { - width: 1em; - height: 1em; - background-image: url("../icons/img/fa-star.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-calendar { - width: 1em; - height: 1em; - background-image: url("../icons/img/fa-calendar.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-plus { - width: 1em; - height: 1em; - background-image: url("../icons/img/fa-plus.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-chevron-up { - width: 1em; - height: 1em; - background-image: url("../icons/img/fa-chevron-up.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-chevron-down { - width: 1em; - height: 1em; - background-image: url("../icons/img/fa-chevron-down.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-chevron-up-white { - width: 1em; - height: 1em; - background-image: url("../icons/img/fa-chevron-up.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; - filter: invert(1); -} - -.fa-chevron-down-white { - width: 1em; - height: 1em; - background-image: url("../icons/img/fa-chevron-down.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; - filter: invert(1); -} - -.fa-thumbs-up { - width: 1em; - height: 1em; - background-image: url("../icons/img/fa-thumbs-up.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-thumbs-down { - width: 1em; - height: 1em; - background-image: url("../icons/img/fa-thumbs-down.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-trash-o { - width: 1em; - height: 1em; - background-image: url("../icons/img/fa-trash-o.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-hourglass-half { - width: 1em; - height: 1em; - background-image: url("../icons/img/fa-hourglass-half.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-pencil { - width: 1em; - height: 1em; - background-image: url("../icons/img/fa-pencil.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-instagram { - background-image: url("../icons/img/fa-instagram.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-discord { - background-image: url("../icons/img/fa-discord.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-facebook { - background-image: url("../icons/img/fa-facebook.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-code { - background-image: url("../icons/img/fa-code.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-list { - background-image: url("../icons/img/fa-list.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; - width: 1em; - height: 1em; - vertical-align: middle; - display: inline-block; +#search-button:hover .fa-search { filter: invert(100%) brightness(150%); -} - -.fa-user-friends { - background-image: url("../icons/img/fa-user-friends.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-smile-beam { - background-image: url("../icons/img/fa-smile-beam.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-frown-open { - background-image: url("../icons/img/fa-frown-open.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-heart { - background-image: url("../icons/img/fa-heart.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-copy { - background-image: url("../icons/img/fa-copy.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.fa-flask { - background-image: url("../icons/img/fa-flask.svg"); - background-repeat: no-repeat; - background-size: contain; - background-position: center; -} - -.invert-to-light { - filter: invert(1); -} - -.invert-to-dark { - filter: invert(0); -} +} \ No newline at end of file diff --git a/tcf_website/static/landing/landing.css b/tcf_website/static/landing/landing.css index c7e250cdc..d0f5f82f3 100644 --- a/tcf_website/static/landing/landing.css +++ b/tcf_website/static/landing/landing.css @@ -1,12 +1,22 @@ /* Html Classes */ +body { + background-color: var(--card-background-color); + color: var(--basic-text-color); +} + +body.dark-mode { + background-color: var(--background-color); + color: var(--basic-text-color); +} + .container-fluid { overflow: hidden; } /* Navbar */ nav.navbar { - background-color: white; + background-color: var(--navbar-color); } nav.navbar img.logo { @@ -50,11 +60,11 @@ header.masthead h1 { /* Features */ .features-icons .card { - box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4); + box-shadow: 1px 1px 2px var(--input-border-color); } .features-icons .card:hover { - box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4); + box-shadow: 1px 1px 4px var(--input-border-color); } .features-icons .features-icons-item { @@ -63,7 +73,7 @@ header.masthead h1 { .features-icons .features-icons-item .features-icons-icon { height: 7rem; - color: var(--main-color); + color: var(--title-color); } .features-icons .features-icons-item .features-icons-icon i { @@ -96,6 +106,14 @@ header.masthead h1 { overflow: hidden; } +.dark-mode .about-team .about-pfp { + background-color: var(--background-color); + overflow: hidden; +} + +.border { + border: 1px solid var(--input-border-color) !important; +} .about-team .about-pfp img { transition: all 0.5s ease; box-shadow: 5px 5px 0px var(--accent-color); @@ -109,14 +127,23 @@ header.masthead h1 { border: 0px; } +.dark-mode .about-member.card { + background-color: var(--background-color) !important; + color: var(--basic-text-color); +} + .about-team .about-link:hover { - box-shadow: 2px 2px 5px var(--main-color); + box-shadow: 2px 2px 5px var(--accent-color); } .about-link { font-size: 1.25rem; } +.about-link.card { + background-color: var(--accent-color) !important; + color: var(--basic-text-color) !important;} + /* About info box */ .about-team .about-info { /* border: 3px solid var(--accent-color); */ diff --git a/tcf_website/static/profile/profile.css b/tcf_website/static/profile/profile.css index e9ea58161..9f76368a1 100644 --- a/tcf_website/static/profile/profile.css +++ b/tcf_website/static/profile/profile.css @@ -1,3 +1,8 @@ + +.container-fluid { + background-color: var(--background-color); +} + .user_delete { align-items: end; } @@ -6,3 +11,21 @@ display: flex; justify-content: space-between; } + +h2, h4 { + color: var(--basic-text-color); + /*explicitly written to override scss file*/ + margin-top: 0; + margin-bottom: .5rem; + font-weight: 500; + line-height: 1.2; + font-size: 26px; +} + +.form-row { + color: var(--basic-text-color); +} + +.card { + background-color: var(--card-background-color); +} diff --git a/tcf_website/static/reviews/new_review.css b/tcf_website/static/reviews/new_review.css index cbe0fa7ea..5a1d5d5b8 100644 --- a/tcf_website/static/reviews/new_review.css +++ b/tcf_website/static/reviews/new_review.css @@ -5,8 +5,8 @@ } .new-review select:disabled { - color: var(--shadow-color); - background-color: var(--shaded-color); + color: var(--input-text-color); + background-color: var(--background-color); } .required-field::after { @@ -27,3 +27,8 @@ #progressbar-message { margin-bottom: 0px; } + +h1, label, p { + color: var(--basic-text-color); +} + diff --git a/tcf_website/static/reviews/pagination.css b/tcf_website/static/reviews/pagination.css index 1819e7431..1afd6d60b 100644 --- a/tcf_website/static/reviews/pagination.css +++ b/tcf_website/static/reviews/pagination.css @@ -12,13 +12,13 @@ padding: 8px 12px; margin: 0 5px; text-decoration: none; - color: var(--main-color); - border: 1px solid #ddd; + color: var(--basic-text-color); + border: 1px solid var(--input-border-color); border-radius: 5px; transition: background-color 0.3s, color 0.3s; - background-color: white; + background-color: var(--card-background-color); } .pagination a:hover { diff --git a/tcf_website/static/reviews/review.css b/tcf_website/static/reviews/review.css index 43566f1bd..34e380fbf 100644 --- a/tcf_website/static/reviews/review.css +++ b/tcf_website/static/reviews/review.css @@ -24,20 +24,36 @@ .review .upvote, .review .downvote { font-size: 1.3rem; - color: #aaa; + color: var(--shadow-color); cursor: pointer; } .review .upvote.active, .review .upvote:hover { - color: dodgerblue; + color: var(--main-color); } .review .downvote.active, .review .downvote:hover { - color: rgb(215, 86, 38); + color: var(--accent-color); } .tooltip-inner { margin: 0; } + +.review-text-body { + color: var(--basic-text-color); +} + +.btn { + color: var(--basic-text-color); +} + +body.dark-mode .text-muted { + color: var(--basic-text-color) !important; +} + +body.dark-mode .text-dark { + color: var(--basic-text-color) !important; +} \ No newline at end of file diff --git a/tcf_website/static/reviews/review_stats.css b/tcf_website/static/reviews/review_stats.css index 000dc351d..683f6886b 100644 --- a/tcf_website/static/reviews/review_stats.css +++ b/tcf_website/static/reviews/review_stats.css @@ -11,3 +11,7 @@ font-size: 20px; } } + +h1, h2 { + color: var(--basic-text-color); +} \ No newline at end of file diff --git a/tcf_website/static/schedule/schedule_editor.css b/tcf_website/static/schedule/schedule_editor.css index cee7d0adb..f65006d5f 100644 --- a/tcf_website/static/schedule/schedule_editor.css +++ b/tcf_website/static/schedule/schedule_editor.css @@ -34,10 +34,12 @@ .schedule_name_input_group > input { padding: 8px 12px; - border: 1px solid #ccc; + border: 1px solid var(--input-border-color); border-radius: 10px; box-shadow: 0 2px 4px rgba(39, 79, 151, 0.1); transition: all 0.3s ease; + background-color: var(--input-background-color); + color: var(--basic-text-color); } .schedule_name_input_group > input:focus { @@ -54,6 +56,7 @@ .table td { padding: 10px 15px; text-align: left; + color: var(--basic-text-color); } .table th:last-child, diff --git a/tcf_website/static/search/search.css b/tcf_website/static/search/search.css index f44462c5c..b33108eee 100644 --- a/tcf_website/static/search/search.css +++ b/tcf_website/static/search/search.css @@ -1,5 +1,9 @@ .search .search-results { - background-color: white; + background-color: var(--card-background-color); +} + +.text-muted { + color: var(--basic-text-color) !important; } .result-nav .btn-group { @@ -14,3 +18,15 @@ .search-course-description { color: var(--accent-color); } + +body.dark-mode{ + color: var(--basic-text-color) !important; +} + +body.dark-mode .list-group-item-light, +body.dark-mode .btn-light { + background-color: transparent !important; + color: var(--basic-text-color) !important; + border: none; + outline: none; +} \ No newline at end of file diff --git a/tcf_website/templates/about/about.html b/tcf_website/templates/about/about.html index 30c8105c1..c35fd94a8 100644 --- a/tcf_website/templates/about/about.html +++ b/tcf_website/templates/about/about.html @@ -37,7 +37,7 @@

theCourseForum

diff --git a/tcf_website/templates/base/base.html b/tcf_website/templates/base/base.html index f62c4c8b2..4b0799863 100644 --- a/tcf_website/templates/base/base.html +++ b/tcf_website/templates/base/base.html @@ -9,6 +9,7 @@ {% endblock %} {% block body %} +
{% include "base/sidebar.html" %} diff --git a/tcf_website/templates/base/navbar.html b/tcf_website/templates/base/navbar.html index 106d7ffda..53233ecc7 100644 --- a/tcf_website/templates/base/navbar.html +++ b/tcf_website/templates/base/navbar.html @@ -5,7 +5,7 @@ {% endblock %}
-
{% endif %} + + + + \ No newline at end of file diff --git a/tcf_website/templates/base/sidebar.html b/tcf_website/templates/base/sidebar.html index 5a50bd131..39ea12e2f 100644 --- a/tcf_website/templates/base/sidebar.html +++ b/tcf_website/templates/base/sidebar.html @@ -11,7 +11,7 @@

-

Browse

+

Browse


@@ -23,7 +23,7 @@

-

Review

+

Review


{% else %} @@ -33,7 +33,7 @@

-

Review

+

Review


{% endif %} @@ -46,7 +46,7 @@

{% if request.resolver_match.url_name == 'schedule' %}active{% endif %}"> New

-

Schedule

+

Schedule


{% else %} @@ -55,7 +55,7 @@