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

Enhance Quarkus Docs page with Dark mode #1809

Closed
gian1200 opened this issue Oct 3, 2023 · 17 comments · Fixed by #1962 or #1979
Closed

Enhance Quarkus Docs page with Dark mode #1809

gian1200 opened this issue Oct 3, 2023 · 17 comments · Fixed by #1962 or #1979

Comments

@gian1200
Copy link

gian1200 commented Oct 3, 2023

Description

As stated in the title, to enable a Dark mode option for the docs page. Nothing fancy nor complicated, but focusing on readability.

OS sync for initial configuration would be a nice to have thing, but not necessary.

Current docs:
https://quarkus.io/guides/cache
image

Implementation ideas

Maybe something similar to GitHub's Dark dimmed: grey (non black background and non white text).

GitHub:
image

I know colors are a preference and relative, but if some people like a darker (or lighter) mode, maybe it can be expanded to:

  • Lighter (whiter or current)
  • Light (current or darker current)
  • Dark (grey)
  • Darker (black)
@quarkus-bot
Copy link

quarkus-bot bot commented Oct 4, 2023

/cc @MichalMaler (documentation), @ebullient (documentation), @inoxx03 (documentation), @michelle-purcell (documentation), @rolfedh (documentation), @sheilamjones (documentation), @sunayna15 (documentation)

@gsmet gsmet transferred this issue from quarkusio/quarkus Oct 6, 2023
@gsmet
Copy link
Member

gsmet commented Oct 6, 2023

I moved the issue to the website project. /cc @insectengine this might be a good idea. If I'm not mistaken @jponge had fun with this for the Mutiny website: https://smallrye.io/smallrye-mutiny/2.5.1/ .

@jponge
Copy link
Member

jponge commented Oct 6, 2023

Mutiny uses MkDocs Material so the dark mode was built-in and I just had to choose colors 🤣

@holly-cummins
Copy link
Contributor

Watching this for http://extensions.quarkus.io and http://docs.quarkiverse.io, too.

@insectengine
Copy link
Collaborator

Put this on my work queue to look at but will need to prioritize.

This would need to be a site wide thing (not just on docs) so it will be a larger lift.

@roby2014
Copy link

Bump, need this.

@The-Funk
Copy link

I get the occasional light induced migraines so dark mode is enabled on my machine everywhere I can find it. Glad to see someone already put in this request.

@insectengine
Copy link
Collaborator

I submitted a draft PR with a dark mode for the site. It's a clean approach that detects the user's OS settings and sets either light or dark mode. I didn't include a switcher to avoid extra javascript and visual clutter on the page.

#1908

Note" While I've created dark mode versions of images on the content pages, we'll have to sort out how to swap images in the documentation to have dark mode friendly images via ascidoc.

@gsmet @maxandersen @holly-cummins

@maxandersen
Copy link
Member

@holly-cummins @insectengine remind me where we landed on this? my memory is broken :)

@insectengine
Copy link
Collaborator

#1962

^ This PR addresses the outstanding issues.

  1. Added color mode switcher in navigation (that changes to show state: light, dark, system).
  2. Fixed pre code color issue in darkmode
  3. Added solution for images in blog/guides with transparency in dark mode.

Outstanding issue: Still need Guides index fix for icons in dark mode
@yrodiere @ia3andy < How is the image swap working for the main guides page going?

@yrodiere
Copy link
Member

yrodiere commented May 7, 2024

@yrodiere @ia3andy < How is the image swap working for the main guides page going?

@marko-bekhta ^

@marko-bekhta
Copy link
Contributor

Just double checked it and the build with quarkusio/search.quarkus.io#241 is in production. The guides layout is updated and the guide icons will be of the main text color:

.qs-guide-icon svg {
    width: 70px;
    margin: 1rem 0px 0px;
    fill: var(--main-text-color);
}

@insectengine
Copy link
Collaborator

@maxandersen - the change above removes the last known blocker.

@yrodiere
Copy link
Member

@gsmet @insectengine Are you sure this change is complete? It seems configuration tables were overlooked... ?

image

https://quarkus.io/guides/building-native-image#configuration-reference

@marko-bekhta
Copy link
Contributor

Noticed a slight mismatch in the tooltip label and actual theme switch sequence:
theme-switch
next: in the tooltip doesn't match the theme the button actually switches to 🙈

@gsmet
Copy link
Member

gsmet commented May 15, 2024

@insectengine I let you have a look at the two issues above. Especially to the first one as it's a bit time sensitive.

@The-Funk
Copy link

@insectengine thank you for your work on this. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
10 participants