ImperialCollegeLondon / natural_number_game

Building the natural numbers in Lean 3. The original natural number game, now frozen. See README for Lean 4 information.
Apache License 2.0
292 stars 73 forks source link

Night Mode #62

Open ericrbg opened 4 years ago

ericrbg commented 4 years ago

It'd be nice if we could have night mode for this too. Would make it a lot easier on my eyes.

Dorson commented 4 years ago

Yes, Night Mode is great to have in the evening time ! :+1:

Recently I coded a flexible color mode switch with groups of CSS color variables and simple JS functions.

Works with CSS color variables in one file, one JS color switch function in the settings, and one JS event call function to remember the user color preference.

Try it on the GitHub demo page:

https://dorson.github.io/CSS-Dark-Mode-and-color-switch/

Feel free to copy, fork, adopt, re-use, etc... :+1:

Have fun !

kbuzzard commented 4 years ago

Unfortunately i don't know what CSS is, and the html files are generated automatically for me by a computer. @mpedramfar ?

Dorson commented 4 years ago

Unfortunately i don't know what CSS is

CSS = is Cascading Style Sheets = HTML style rules.

The separate language for making HTML styles for how the HTML pages or apps look like. Browsers use the default CSS values, if no CSS rules were defined.

It can be a mess at first. Like painting while learning the new language grammar rules for the painting itself.

As an alternative to the Dark Mode one can also just use the color of pale white greenish background color #fcfefc to reduce the glow of the screen.

Some shops use that to present products on non white background. It's a statistically successful color for them.

Something like that in any part of the HTML page would work.

<style>
html , body { background-color: #fcfefc ;  } 
</style>
mpedramfar commented 4 years ago

This is an issue for the Lean-game-maker repository. I'm a bit busy now, but I'll add the night-mode in the next commit sometime this week or possibly the next week.