Adding Darkmode functionality with animations and icons#11
Open
epcgrs wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements a comprehensive dark mode feature for the Jekyll site with smooth animations and theme persistence. The implementation includes a toggle button in the header, automatic system preference detection, and consistent color theming across all components.
- Added theme toggle functionality with JavaScript logic for switching between light/dark modes
- Refactored CSS to use CSS variables for consistent theming across components
- Implemented smooth animations and icon transitions for the theme toggle button
Reviewed Changes
Copilot reviewed 7 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| assets/js/script.js | Implements complete dark mode toggle logic with localStorage persistence and system preference detection |
| assets/css/_global.scss | Refactors global styles to use CSS variables and adds theme-specific color schemes |
| assets/css/_header.scss | Updates navigation colors and adds styling for the theme toggle button with animations |
| assets/css/_footer.scss | Updates footer link colors to use new CSS variable system |
| _includes/header.html | Adds theme toggle button to site header |
| _includes/head.html | Includes inline SVG icons for sun/moon and enables JavaScript |
| Gemfile | Adds webrick gem for local development compatibility |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Collaborator
Author
|
Copilot code are broken the feature hahah, please ignore copilot review. |
Collaborator
Author
|
Preview: b0c2a21c9d97484bb6441b5b0fd977b0.1.mp4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a site-wide dark mode theme toggle for improved accessibility and user experience, along with related styling updates. It adds a toggle button to the header, implements the logic for switching themes, and updates CSS to support both light and dark modes using CSS variables. Additionally, it improves color consistency across navigation and footer elements.
Dark mode feature and theme toggle:
_includes/header.html) and included inline SVG icons for sun and moon in the document head (_includes/head.html). [1] [2]assets/js/script.jsfor toggling between dark and light themes, persisting user choice, and updating the theme icon accordingly.Styling updates for theme support:
assets/css/_global.scssto use CSS variables for background, text, and primary colors, supporting both dark and light modes via media queries and HTML classes.assets/css/_header.scssandassets/css/_footer.scssto use the new CSS variables for better consistency across themes. [1] [2]assets/css/_header.scss.Other changes:
webrickgem to theGemfileto ensure local development compatibility with Jekyll.