Skip to content

Dark mode #1118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 91 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
7efeafe
Hid the Donate $4 button on the landing page
chaizhang Jan 31, 2025
aee5a70
tcf-style.css darkmode vars
jo-hya Feb 2, 2025
aa2e3f5
Change clock to inline svg and change clock icon color
chaizhang Feb 2, 2025
bdb5db6
Merge branch 'dark-mode' of https://github.com/thecourseforum/theCour…
chaizhang Feb 2, 2025
7071ae7
removed dash
jo-hya Feb 8, 2025
c98e25b
Landing page dark-mode half done
chaizhang Feb 9, 2025
1d7df12
Merge branch 'dark-mode' of https://github.com/thecourseforum/theCour…
chaizhang Feb 9, 2025
30e35e4
Merge branch 'dark-mode' of https://github.com/thecourseforum/theCour…
chaizhang Feb 9, 2025
8b6de80
color changes for profile page
blairezh Feb 16, 2025
19b91a8
dark mode for browse, department, and icons
jo-hya Feb 16, 2025
1ceddf6
Merge branch 'dark-mode' of https://github.com/thecourseforum/theCour…
jo-hya Feb 16, 2025
44416ea
added accurate colors to dark mode
jo-hya Feb 16, 2025
166dc02
Added basic dark mode variables for universal use
chaizhang Feb 23, 2025
b9b200c
dark mode changes to browse and department
jo-hya Mar 1, 2025
4d1273b
create review page css refactor
blairezh Mar 1, 2025
6a1768a
removed dark mode class
blairezh Mar 1, 2025
232cc4b
dark mode vars for profile
blairezh Mar 2, 2025
660fed8
dark mode var in review.css
blairezh Mar 2, 2025
bc2f018
review_stats dark mode var
blairezh Mar 2, 2025
d881d9d
Merge pull request #1042 from thecourseforum/dark-mode-joyce
jo-hya Mar 2, 2025
72d4d2b
partly styled landing page
chaizhang Mar 2, 2025
4f7597b
Updated the variables/headers in about.css and added additional heade…
Mar 2, 2025
6f5393e
Merge branch 'dark-mode' of https://github.com/thecourseforum/theCour…
Mar 2, 2025
7bfb4be
partly dark mode styled the landing page
chaizhang Mar 2, 2025
ac5ecd9
Merge branch 'dark-mode' of https://github.com/thecourseforum/theCour…
chaizhang Mar 2, 2025
1ddbe94
adeed variables, partially styled register page
namaikureishi Mar 2, 2025
6401997
finished dark mode for register form page
namaikureishi Mar 2, 2025
114a1c6
correction for dark mode body class dark mode
blairezh Mar 23, 2025
86aee34
Added navbar styling
zohaibk04 Mar 23, 2025
6add70c
darkmode button
blairezh Mar 23, 2025
8bce01b
merge main into dark-mode
blairezh Mar 24, 2025
766acd1
Added 'landing-page-background-color' variable to tcf-style.css for l…
chaizhang Mar 28, 2025
2df351a
Updated color for p from 'p-card-text-color' to 'basic-text-color'
chaizhang Mar 28, 2025
1a9bbde
Added 'main-color' to dark-mode colors
chaizhang Mar 28, 2025
3410d72
Updated tcf-style.css for dark-mode changes on the landing page
chaizhang Mar 28, 2025
34edf26
dark mode logic for browse/course pages
jo-hya Mar 29, 2025
e52612a
landing
jo-hya Mar 29, 2025
88a58cd
Merge branch 'dark-mode' of https://github.com/thecourseforum/theCour…
chaizhang Mar 30, 2025
4b1ba29
Fixes sidebar and landing icon coloring
zohaibk04 Apr 6, 2025
09c7ea7
Fixed navbar coloring on every page but landing
zohaibk04 Apr 6, 2025
d12ddca
Fixed chevrons on landing
zohaibk04 Apr 6, 2025
f442c69
white text variable in light mode
jo-hya Apr 6, 2025
5ec3fbb
Merge branch 'dark-mode' of https://github.com/thecourseforum/theCour…
jo-hya Apr 6, 2025
5950df2
Changed input border color to dark gray (#242424)
chaizhang Apr 12, 2025
dc982c7
Override autofill setting from User Agent Stylesheet
chaizhang Apr 12, 2025
559dfe1
Added modal background-color styling
chaizhang Apr 12, 2025
a17b39f
Added modal border color styling
chaizhang Apr 12, 2025
f7b9437
Made more dark-mode changes
chaizhang Apr 13, 2025
6a2a8ed
Made dark-mode changes to the course prof page
chaizhang Apr 13, 2025
460a603
Merge dev
chaizhang Apr 13, 2025
9f26f95
Added dark-mode styling to filter
chaizhang Apr 19, 2025
3934db6
fixing icons
jo-hya Apr 19, 2025
0e5a87f
Merge branch 'dark-mode' of https://github.com/thecourseforum/theCour…
jo-hya Apr 19, 2025
7031e99
Added dark-mode styling to the Clear All button in filter
chaizhang Apr 19, 2025
d13cb80
Merge branch 'dark-mode' of https://github.com/thecourseforum/theCour…
chaizhang Apr 19, 2025
1c2c53a
Fixed merge conflict on course prof page
chaizhang Apr 19, 2025
42b7137
Added dark-mode styling to enrollment info section on course prof page
chaizhang Apr 19, 2025
643f67f
Added dark-mode styling to schedule builder
chaizhang Apr 19, 2025
66995cf
Fixed dark mode box shadow effects on landing page
chaizhang Apr 19, 2025
cb07266
icon fixes
jo-hya Apr 19, 2025
fdbd31e
Merge branch 'dark-mode' of https://github.com/thecourseforum/theCour…
jo-hya Apr 19, 2025
4fbe69a
fix plus icon
jo-hya Apr 19, 2025
e809207
Styled the dark mode toggle button with placeholder emoji for now
chaizhang Apr 19, 2025
7ca3b03
Merge branch 'dark-mode' of https://github.com/thecourseforum/theCour…
chaizhang Apr 19, 2025
4fa776c
fixed my reviews page
jo-hya Apr 19, 2025
8e9c6f8
Merge branch 'dark-mode' of https://github.com/thecourseforum/theCour…
jo-hya Apr 19, 2025
5cf2582
vertical align
jo-hya Apr 19, 2025
f24e831
Fixed text color on schedule builder page
chaizhang Apr 19, 2025
d3dc88a
Merge branch 'dark-mode' of https://github.com/thecourseforum/theCour…
chaizhang Apr 19, 2025
4535da0
about us icons
jo-hya Apr 19, 2025
fc03169
copy
jo-hya Apr 19, 2025
6357ef8
Fixed discrepancies on light mode landing page caused by dark mode ch…
chaizhang Apr 19, 2025
40252fa
Merge branch 'dark-mode' of https://github.com/thecourseforum/theCour…
chaizhang Apr 19, 2025
a5c2f22
Fixed discrepancies on sidebar due to dark mode changed
chaizhang Apr 19, 2025
2b0fe5c
fixed social media icons
jo-hya Apr 19, 2025
90482cd
Merge branch 'dark-mode' of https://github.com/thecourseforum/theCour…
jo-hya Apr 19, 2025
86c60c8
Fixed light mode
chaizhang Apr 19, 2025
6d69df7
Merge branch 'dark-mode' of https://github.com/thecourseforum/theCour…
chaizhang Apr 19, 2025
c7c4760
search icon
jo-hya Apr 20, 2025
7fea594
Merge branch 'dark-mode' of https://github.com/thecourseforum/theCour…
jo-hya Apr 20, 2025
60818fa
Added inline SVG icons for dark mode toggle
chaizhang Apr 20, 2025
481a00e
Merge branch 'dark-mode' of https://github.com/thecourseforum/theCour…
chaizhang Apr 20, 2025
7c8a0c2
Fixed filter styling
chaizhang Apr 20, 2025
b80bfc1
Fixed section bars styling on course prof page
chaizhang Apr 20, 2025
e6b7309
Styled the right border of sidebar
chaizhang Apr 20, 2025
c02a748
Changed moon icon svg
chaizhang Apr 20, 2025
29b433e
Changed the size of the moon icon
chaizhang Apr 20, 2025
d759316
Fixed border styling on search results
chaizhang Apr 20, 2025
713e0ef
Fixed border-top styling discrepancies on search results
chaizhang Apr 20, 2025
3a93a83
Merge remote-tracking branch 'origin/dev' into dark-mode
chaizhang Apr 26, 2025
827e07f
Changed the sun icon svg
chaizhang Apr 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.1.1",
"prettier": "^3.2.5"
},
"dependencies": {
"thecourseforum": "file:"
}
}
13 changes: 10 additions & 3 deletions tcf_core/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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", {})
Expand Down
12 changes: 12 additions & 0 deletions tcf_website/static/about/about.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
43 changes: 31 additions & 12 deletions tcf_website/static/base/navbar.css
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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);
}
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -95,4 +114,4 @@
.dropdown-menu.settings {
min-width: 140px !important;
}
}
}
5 changes: 5 additions & 0 deletions tcf_website/static/base/sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
192 changes: 184 additions & 8 deletions tcf_website/static/base/tcf-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 {
Expand Down Expand Up @@ -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 */
Expand All @@ -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);
}
Expand Down Expand Up @@ -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;
}
Loading
Loading