9 Commits

Author SHA1 Message Date
Antoine du Hamel
a6c5ce27d3
doc: improve accessibility of expandable lists
PR-URL: https://github.com/nodejs/node/pull/56749
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
2025-01-26 18:31:35 +00:00
Dima Demakov
d42949e79f
doc: remove flicker on page load on dark theme
Theme applying logic get loaded and executed in async mode, so often
there is a
delay in applying the proper theme to a page which leads to flicker on
dark theme. Resolved by moving critical logic to the page head

PR-URL: https://github.com/nodejs/node/pull/50942
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
2023-11-27 15:57:21 +00:00
Dima Demakov
62fc950e96
doc: make theme consistent across api and other docs
Since website based on 2 different repos, there was an inconsistency
in theme selection, so we had 2 independant theme props.
Now only one stored in local storage is a single source of truth

PR-URL: https://github.com/nodejs/node/pull/50877
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
2023-11-27 09:03:27 +00:00
Vidar Eldøy
b5000371c6
doc: save user preference for JS flavor
PR-URL: https://github.com/nodejs/node/pull/49526
Fixes: https://github.com/nodejs/node/issues/49508
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2023-09-10 00:06:53 +02:00
Antoine du Hamel
8103a6418e
doc: rename possibly confusing variable and CSS class
A "selector" usually refers to a CSS selector, when here it refers to a
checkbox.

PR-URL: https://github.com/nodejs/node/pull/49536
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2023-09-08 17:03:57 +02:00
jakecastelli
94ec71d385
tools: add button to copy code example to clipboard
PR-URL: https://github.com/nodejs/node/pull/46928
Refs: https://github.com/nodejs/node/issues/46894
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
2023-03-25 08:41:43 +00:00
Antoine du Hamel
c6dabe3083
doc: add lint rule to enforce trailing commas
PR-URL: https://github.com/nodejs/node/pull/45471
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2022-11-17 13:19:12 +00:00
Antoine du Hamel
528fef2285
doc: improve fragment (:target) anchors behavior on HTML version
This commit aims to improve the UX when navigating the docs using links
to subsections. Previously the browser would scroll down to the section
body, skipping the section heading. Using `scroll-margin-top` CSS
property, we can fix this behavior (at least on some browsers).

Links to other versions are now updated with the current targeted hash
to improve the UX when navigating from docs of one release line to
another.

I've also removed syntax not parsable by older browsers (arrow functions
and array destructuring) since the diff is pretty small and should
improve UX on those browsers.

PR-URL: https://github.com/nodejs/node/pull/42739
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-04-17 15:51:42 +01:00
Paolo Insogna
0f79a27462
doc: make header smaller and dropdown click-driven when JS is on
PR-URL: https://github.com/nodejs/node/pull/42165
Fixes: https://github.com/nodejs/node/issues/42286
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-03-22 21:31:56 +00:00