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

Automatic dark mode #61

Closed
wants to merge 5 commits into from
Closed

Automatic dark mode #61

wants to merge 5 commits into from

Conversation

NDevTK
Copy link
Contributor

@NDevTK NDevTK commented Nov 5, 2020

@terjanq terjanq self-requested a review November 6, 2020 13:09
@terjanq
Copy link
Member

terjanq commented Nov 6, 2020

I tried deploying the website with BookTheme = 'dark' and it doesn't seem any darker. I guess hugo-book that we are currently using doesn't come with the dark theme by default 😢 alex-shpak/hugo-book#59

@terjanq
Copy link
Member

terjanq commented Nov 6, 2020

Also found this: alex-shpak/hugo-book#151

@NDevTK
Copy link
Contributor Author

NDevTK commented Nov 6, 2020

It seems to work with the latest code but not v8 release.

@NDevTK
Copy link
Contributor Author

NDevTK commented Nov 6, 2020

Maybe https://github.com/alex-shpak/hugo-book could be a submodule to make updates easier

@terjanq
Copy link
Member

terjanq commented Nov 6, 2020

Looks like this commit removed the submodule be09c54 to allow template tweaks. @manuelvsousa any ideas how to enable dark mode?

@NDevTK
Copy link
Contributor Author

NDevTK commented Nov 6, 2020

Maybe if the "book" theme was forked

@NDevTK
Copy link
Contributor Author

NDevTK commented Nov 6, 2020

@NDevTK
Copy link
Contributor Author

NDevTK commented Nov 6, 2020

Should work now :D

@manuelvsousa
Copy link
Member

manuelvsousa commented Nov 6, 2020

Yeah, sorry. I should have the theme update strategy documented in the README. The theme is not a submodule because we made changes to it, so the only way is to manually merge the future versions of the theme and solve any conflicts. What we could do is add the theme as a subtree which will help in future updates. I can take this one, and apply the correct strategy.

About the dark theme. I have mixed feelings. Firstly, It's not part of the hugo-book core theme so it's not merged in release tags (we are using v8 I believe). Second, as a dark theme user, I tested the dark theme and it's a bit ugly :C We are using tables, emojis, snippets, and colored shortcodes that don't adapt with the dark color and makes it harder to read. The biggest problem is that I can't go back to the light color because my browser is marked as dark default :S

@NDevTK
Copy link
Contributor Author

NDevTK commented Nov 6, 2020

The css for theme-dark could be edited to make it look better.
Maybe offer an option to toggle between them.

@manuelvsousa
Copy link
Member

The css for theme-dark could be edited to make it look better.
Maybe offer an option to toggle between them.

Sure :D If you have the time and the will go ahead, you have my support! Let's just make sure we don't make this into something that will annoy the reader. Colours are not our biggest priority. I would also wait until PR #66 and #65 get sorted out (See #66 (comment)).

@NDevTK
Copy link
Contributor Author

NDevTK commented Nov 6, 2020

@manuelvsousa it is apart of the hugo-book repo alex-shpak/hugo-book@4e34988 its just not in a release yet.

This PR maybe pointless if your getting the new commits from alex-shpak/hugo-book. I might be able to create a toggle but not make it look nice :/

@manuelvsousa
Copy link
Member

manuelvsousa commented Nov 6, 2020

I believe the author said it's not going to make it into the core theme (alex-shpak/hugo-book#59 (comment))

We can make custom changes, and we already did. If we want to update to future versions of the theme we can just pull the subtree, merge the new files and everything should work just fine. Unless change core stuff we are not going to have a lot of problems.

@NDevTK
Copy link
Contributor Author

NDevTK commented Nov 6, 2020

That was last year and dark mode has been removed from the plugins list

@NDevTK
Copy link
Contributor Author

NDevTK commented Nov 6, 2020

I will wait for #66 before continuing as this uses the new code from the theme. (This PR does work currently)
Anyone got suggestions for how to improve the current dark mode?

@NDevTK NDevTK closed this Nov 10, 2020
@NDevTK NDevTK deleted the patch-3 branch November 10, 2020 18:05
@NDevTK NDevTK mentioned this pull request Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants