Skip to content

Add system light and dark theme support - #149

Open
ChinmayDaroliya wants to merge 1 commit into
google:masterfrom
ChinmayDaroliya:add-dark-theme
Open

ChinmayDaroliya wants to merge 1 commit into
google:masterfrom
ChinmayDaroliya:add-dark-theme

Conversation

@ChinmayDaroliya

Copy link
Copy Markdown

Description

Adds a theme selector to the GSoC Guides site with three options:

  • System — follows the user's system color scheme (default)
  • Light — uses the light theme
  • Dark — uses the dark theme

The selected theme is stored in localStorage so it persists across page refreshes.

Changes

  • Added a Theme dropdown to the top navigation.
  • Added theme switching logic in customscripts.js.
  • Added dark-theme styles in css/theme.css.
  • Added the theme stylesheet to the site's head include.
  • Added support for detecting system theme changes.

Testing

Tested locally with Docker/Jekyll.

Verified:

  • System theme
  • Light theme
  • Dark theme
  • Theme persistence after page refresh
  • System theme changes
  • Navigation/sidebar appearance
  • Theme dropdown appearance

Closes #127

@google-cla

google-cla Bot commented Sep 3, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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.

Add support for dark theme/mode

1 participant