DMOJ / online-judge

A modern open-source online judge and contest platform system.
https://dmoj.ca
GNU Affero General Public License v3.0
897 stars 349 forks source link

Dark mode online judge #2035

Open int-y1 opened 1 year ago

int-y1 commented 1 year ago

This is for the many users who requested dark mode. This issue is possibly a subset of #578.

A few general guidelines:

Important styling bugs:

Less important styling bugs:

When you're bored:

int-y1 commented 1 year ago

This issue has reached a milestone.

The site will serve dark mode if the user specifies ?dark in the URL. For example: https://dmoj.ca/problem/aplusb?dark This new feature is intended for developers who want to test in prod, and work on this issue. There is a lot of work remaining. Possible future milestones:

Xyene commented 1 year ago
Xyene commented 1 year ago

This is a subset of

Images need background-color: white; because the image may have transparency.

but we might want to address it separately, since images in problem statements may be fine with color inversion.

jdabtieu commented 1 year ago

This might be a little nitpicky, but purple text can be hard to read against the dark background image Lightening the color in dark mode to something like #a600a6 (from #800080) would help image Same for blue users, though I don't have a better suggestions for it image

Xyene commented 1 year ago

Here's a CSS export of pygment's github-dark theme: https://gist.github.com/Xyene/e0cac053b28507cd5e65478ae44eba22

This could be used in place of https://github.com/DMOJ/online-judge/blob/master/resources/pygment-github.css

image

Xyene commented 1 year ago

Screenshot_20230108-162850~2

Unsure if we want to just invert the spinner colors, or set a background on the row.

Ninjaclasher commented 1 year ago

image

Xyene commented 1 year ago

We should import more ace.js themes, upstream has many more dark themes than we do: https://ace.c9.io/build/kitchen-sink.html

Maybe we should add a "Default" editor theme, that does different things for light/dark mode?

Xyene commented 1 year ago
image
Xyene commented 1 year ago
image

instead of

image

Headers should be brighter than the content they are heading.

Riolku commented 1 year ago

image Here's a bug where the editor is dark even though experimental features aren't on.

jdabtieu commented 1 year ago

Header of the user-script editor is light when dark mode is on. Also not a bug, but could we get darker scrollbars in dark mode? image