Skip to content
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

fix: add dark-theme to notes and textbook page #115

Merged
merged 4 commits into from
Dec 9, 2024

Conversation

hinakhadim
Copy link
Collaborator

@hinakhadim hinakhadim commented Dec 6, 2024

This PR adds dark-theme to notes and textbook page

Before

1.Notes Page

image

2.Textbook Page

image

After

1.Notes Page

image ----------------------------------------------------------------------------------------------- image ----------------------------------------------------------------------------------------------- image ----------------------------------------------------------------------------------------------- image ----------------------------------------------------------------------------------------------- image

2. Textbook page

[The white page of pdf is rendered via pdfViewer/Canvas. It cannot be converted to dark in dark-mode.]
image

color: $dark;
border-color: $primary;
}
.wrapper-course-material[aria-label="Course Material"] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: any reason for moving it out of all body selectors?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, The wrapper-course-material is available on all pages (instructors, teams, wiki, static-page). so, if there is notes page and textbook page, we have to add body.notes for Notes page. For textbook page, there is no such class with body tag (it has <body classname="indigo-dark-theme lang_en ltc" /> these classes). So, to apply on textbook page, I've made it generic and moved out of body classes. Also made it specific to tabs using the aria-label attribute.

Copy link
Contributor

@DawoudSheraz DawoudSheraz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a changelog entry

@hinakhadim hinakhadim force-pushed the fix/teams-notes-page branch from 375cfb4 to e7a49d1 Compare December 9, 2024 08:34
Copy link
Contributor

@Danyal-Faheem Danyal-Faheem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I tested these changes locally and they seem to be working as expected.

@hinakhadim hinakhadim merged commit c97f383 into release Dec 9, 2024
1 check passed
@hinakhadim hinakhadim deleted the fix/teams-notes-page branch December 9, 2024 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants