GeezerVison is showing github.com — doc: make theme consistent across api and other docs · nodejs/node@032535e
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: BUILDING.md +6Lines changed: 6 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -462,6 +462,12 @@ make docopen |
462 | 462 | This will open a file URL to a one-page version of all the browsable HTML |
463 | 463 | documents using the default browser. |
464 | 464 |
|
| 465 | +```bash |
| 466 | +make docclean |
| 467 | +``` |
| 468 | + |
| 469 | +This will clean previously built doc. |
| 470 | + |
465 | 471 | To test if Node.js was built correctly: |
466 | 472 |
|
467 | 473 | ```bash |
|
Collapse file
Copy file name to clipboardExpand all lines: doc/api_assets/api.js +7-7Lines changed: 7 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
2 | 2 |
|
3 | 3 | { |
4 | 4 | function setupTheme() { |
5 | | - const kCustomPreference = 'customDarkTheme'; |
6 | | - const userSettings = sessionStorage.getItem(kCustomPreference); |
| 5 | + const storedTheme = localStorage.getItem('theme'); |
7 | 6 | const themeToggleButton = document.getElementById('theme-toggle-btn'); |
8 | 7 |
|
9 | | - if (userSettings === null && window.matchMedia) { |
| 8 | + // Follow operating system theme preference |
| 9 | + if (storedTheme === null && window.matchMedia) { |
10 | 10 | const mq = window.matchMedia('(prefers-color-scheme: dark)'); |
11 | 11 |
|
12 | 12 | if ('onchange' in mq) { |
|
28 | 28 | if (mq.matches) { |
29 | 29 | document.documentElement.classList.add('dark-mode'); |
30 | 30 | } |
31 | | - } else if (userSettings === 'true') { |
| 31 | + } else if (storedTheme === 'dark') { |
32 | 32 | document.documentElement.classList.add('dark-mode'); |
33 | 33 | } |
34 | 34 |
|
35 | 35 | if (themeToggleButton) { |
36 | 36 | themeToggleButton.hidden = false; |
37 | 37 | themeToggleButton.addEventListener('click', function() { |
38 | | - sessionStorage.setItem( |
39 | | - kCustomPreference, |
40 | | - document.documentElement.classList.toggle('dark-mode'), |
| 38 | + localStorage.setItem( |
| 39 | + 'theme', |
| 40 | + document.documentElement.classList.toggle('dark-mode') ? 'dark' : 'light', |
41 | 41 | ); |
42 | 42 | }); |
43 | 43 | } |
|
Collapse file
Copy file name to clipboardExpand all lines: doc/contributing/collaborator-guide.md +4-3Lines changed: 4 additions & 3 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -532,9 +532,10 @@ The TSC serves as the final arbiter where required. |
532 | 532 | [build](https://github.com/nodejs/build/issues) repositories, open new |
533 | 533 | issues. Run a new CI any time someone pushes new code to the pull request. |
534 | 534 | 4. Check that the commit message adheres to [commit message guidelines][]. |
535 | | -5. Add all necessary [metadata](#metadata) to commit messages before landing. If |
536 | | - you are unsure exactly how to format the commit messages, use the commit log |
537 | | - as a reference. See [this commit][commit-example] as an example. |
| 535 | +5. Add all necessary [metadata][git-node-metadata] to commit messages before |
| 536 | + landing. If you are unsure exactly how to format the commit messages, use |
| 537 | + the commit log as a reference. See [this commit][commit-example] as an |
| 538 | + example. |
538 | 539 |
|
539 | 540 | For pull requests from first-time contributors, be |
540 | 541 | [welcoming](#welcoming-first-time-contributors). Also, verify that their git |
|