mirror of
https://github.com/conventional-commits/conventionalcommits.org.git
synced 2026-03-22 12:44:37 -05:00
[PR #662] style: add dark mode theme with toggle functionality #643
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/conventional-commits/conventionalcommits.org/pull/662
Author: @Jorgagu
Created: 9/2/2025
Status: 🔄 Open
Base:
master← Head:style/dark-mode-theme-toggle📝 Commits (2)
3d4d460style: add dark mode theme with toggle functionalityd3ea270style: fix link color not changed in dark📊 Changes
12 files changed (+406 additions, -5 deletions)
View changed files
📝
themes/conventional-commits/layouts/partials/footer.html(+2 -1)📝
themes/conventional-commits/layouts/partials/head.html(+12 -1)📝
themes/conventional-commits/layouts/partials/header.html(+3 -0)➕
themes/conventional-commits/layouts/partials/theme-toggle.html(+7 -0)📝
themes/conventional-commits/package-lock.json(+2 -2)📝
themes/conventional-commits/package.json(+1 -1)➕
themes/conventional-commits/static/css/scss/abstracts/_theme-variables.scss(+41 -0)➕
themes/conventional-commits/static/css/scss/components/_theme-toggle.scss(+39 -0)📝
themes/conventional-commits/static/css/scss/style.scss(+3 -0)➕
themes/conventional-commits/static/css/scss/themes/_dark-mode.scss(+204 -0)📝
themes/conventional-commits/static/js/index.js(+2 -0)➕
themes/conventional-commits/static/js/theme-toggle.js(+90 -0)📄 Description
This pull request adds full support for light and dark themes to the site, including a user-toggleable theme switcher, persistent theme preference, and dynamic styling across all major components. It introduces new SCSS variables and theme-specific styles, updates markup to support theme switching, and adds the necessary JavaScript logic for toggling and storing the user's theme choice.
Theme support and switching:
ThemeTogglebutton (theme-toggle.html) to the site header and implemented its styling and logic, allowing users to switch between light and dark modes and persist their preference inlocalStorage. [1] [2] [3] [4] [5]theme-darkortheme-light) into the HTML root element on page load, based on user preference or system settings, and loaded the theme toggle script in the main HTML head.SCSS and CSS enhancements:
_theme-variables.scssand imported them into the main stylesheet, enabling consistent color management for both themes. [1] [2]_dark-mode.scssto ensure all components and markdown content are visually coherent in dark mode, including overrides for third-party markdown CSS and icon color switching.Visual improvements for theme-specific assets:
Version bump:
package.jsonandpackage-lock.jsonto version 1.1.0 to reflect the addition of theme support. [1] [2]Closes #607
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.