-
Notifications
You must be signed in to change notification settings - Fork 505
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
[WIP] Dark theme #372
base: master
Are you sure you want to change the base?
[WIP] Dark theme #372
Conversation
@@ -31,12 +32,33 @@ function refreshAsides() { | |||
|
|||
// Find the span the aside should be anchored next to. | |||
var name = aside.attr("name"); | |||
var span = $("span[name='" + name + "']"); | |||
var span = $("span[name='" + name.replace("'", "\\'") + "']"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a case in which the value of name
was won't
, and this whole selector would have become span[name='won't']
, which is a syntax error. This change tries to prevent such cases.
if (span.position()) { | ||
aside.offset({top: span.position().top - 3}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were cases where span.position()
returned undefined. I didn't investigate it deeper, I just patched it this way, so it does not happen anymore.
@munificent? You explicitly mentioned you won't be actively maintaining this repository anymore. But I thought of mentioning you, as I believe this PR is a must-have and helps in reading the book easier. |
Hi. This PR:
TODO:
asset/dark-styles.scss
file to use meaningful variables and better order of styles.ONLINE DEMO
https://aghardeshir.github.io/game-programming-patterns/html/command.html
VIDEO DEMO
dark-theme-for-game-programming-patterns.webm
VIDEO DEMO FOR READING THEME FROM SYSTEM SETTINGS
dark-theme-from-system.webm