Commit 2f7dcb6
authored
docs: light mode dark mode (#8050)
* feat(docs): add ThemeScript component to root
* feat(docs): enhance theme toggle functionality and styles
- Added dark mode support in global CSS with new color variables.
- Refactored ThemeScript component to improve theme preference handling.
- Updated theme toggle components to accept class props for better styling.
- Simplified theme toggle logic in ThemeToggle component.
- Removed deprecated ThemeScript import from root component.
- Cleaned up unused CSS styles related to theme toggle.
* feat: enhance dark mode support and clean up theme toggle components
- Added CSS rules for dark mode image filtering and temporary workarounds.
- Updated theme toggle components to remove unused imports and streamline code.
- Introduced light mode styles for ecosystem elements based on user preferences.
* feat: improve dark mode styles and remove unused theme toggle components
- Added dark mode styles for various components including code sandbox and API documentation.
- Removed sun-and-moon theme toggle components and associated CSS to streamline the codebase.
- Updated theme icon styles for better responsiveness and consistency.
* fix: update SVG logos to use consistent fill color for dark mode
* refactor: streamline theme handling and remove unused dark mode styles
- Removed dark mode CSS rules from global styles and various components to simplify the codebase.
- Updated theme toggle logic to improve responsiveness and ensure consistent theme application based on user preferences.
- Enhanced theme script to handle theme attributes more robustly.
* refactor: update SVG logos to use 'currentColor' for fill attribute
- Changed the fill attribute in Discord, GitHub, and Twitter logo SVGs from a specific color to 'currentColor' for better adaptability in different themes.
- Cleaned up unnecessary CSS rules in the API styles to enhance maintainability.
* refactor: reorganize theme handling and remove deprecated theme script
- Moved the ThemeScript import to the theme-toggle component for better structure.
- Removed the obsolete theme-script file to clean up the codebase.
- Updated the colorSchemeChangeListener import to reflect the new file structure.
* refactor: enhance theme toggle component for better responsiveness
- Updated the theme toggle button styles to improve layout and alignment.
- Added conditional text display for theme preference on smaller screens.
- Adjusted visibility of theme icons based on screen size for a cleaner UI.
* refactor: extract theme loading logic into a separate module
- Created a new load-theme.js file to encapsulate the theme loading logic.
- Updated ThemeScript component to import and utilize the new loadThemeScript for improved code organization and maintainability.
* refactor: remove IIFE from load-theme.js for cleaner code structure
- Eliminated the immediately invoked function expression (IIFE) in load-theme.js to simplify the theme loading logic.
- Improved readability and maintainability of the theme loading process.1 parent ab51dea commit 2f7dcb6
File tree
15 files changed
+195
-205
lines changed- packages/docs/src/components
- header
- router-head
- svgs
- theme-toggle
15 files changed
+195
-205
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | | - | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | | - | |
55 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
56 | 61 | | |
57 | 62 | | |
58 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
Lines changed: 0 additions & 13 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
0 commit comments