PR-URL: https://github.com/nodejs/node/pull/53676
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
This commit fixes the alignment of the bullet points (green arrow) under
'Node.js <version> documentation' by drawing a triangle in CSS instead
of using an ASCII char.
PR-URL: https://github.com/nodejs/node/pull/52193
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
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>
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>
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>
This commit addresses a scrolling/flickering issue in the HTML version
of the docs. By adding `auto` to the `contain-intrinsic-size` CSS
property, we're asking the browser to remember the last-rendered size
for the element (once it's been rendered) instead of forcing the browser
to treat it as being 1px by 5000px when it goes offscreen.
PR-URL: https://github.com/nodejs/node/pull/48195
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
These MODP groups should not be used by new applications, and existing
applications should attempt to migrate to stronger groups (or different
key exchange mechanisms).
Some applications still rely on these particular groups, so Node.js will
likely maintain support, directly or indirectly, for the foreseeable
future.
Refs: https://github.com/nodejs/node/issues/44539
PR-URL: https://github.com/nodejs/node/pull/44588
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/44414
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
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>
This makes the version picker usable on mobile devices.
Previously, the version picker was difficult to select from. This
change makes the #gtoc > ul > li elements have a display
of `block` instead of `inline`.
PR-URL: https://github.com/nodejs/node/pull/39958
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Safari needs a vendor prefix on the appearance of the checkbox.
PR-URL: https://github.com/nodejs/node/pull/40135
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
There is a color contrast issue with links in light mode on the API
highlight background. This only appears in modules.md. This change fixes
it without introducing other contrast issues in either light or dark
mode. Previously, the color contrast for some text on modules.html was
failing WCAG AA in light mode.
PR-URL: https://github.com/nodejs/node/pull/39660
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Judging from https://github.com/logos, we are misusing the GitHub mark.
That page indicates to not change the color (we change it from black to
green). Less clear, it says "Use the Mark in social buttons to link to
your GitHub profile or project" which isn't exactly what we're doing but
also isn't not what we're doing?
This might be an indication of my eyesight getting worse as I get older,
but I think the size that we display the mark at by default makes it not
entirely recognizable as the GitHub mark. Lastly, there's the
philosophical issue of whether we should display a commercial entity's
mark on our web pages in this particular instance. (For me, the answer
is "maybe".)
All told, I think we can remove it without damaging usability on the
website, so let's do it.
PR-URL: https://github.com/nodejs/node/pull/39251
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Currently, in its dark mode, our website background color is #090C15 and
our anchor marks are #707070 for a contrast ratio of 3.94 to 1, falling
short of the WCAG AA 4.5 to 1. This changes the mark color in dark mode
only to #7A7A7A for a color contrast of 4.55 to 1.
PR-URL: https://github.com/nodejs/node/pull/39168
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
The CSS variables are not in any particular logical order as far as I
can tell, with certain items that would seem to go together not grouped.
This puts them in alphabetical order.
PR-URL: https://github.com/nodejs/node/pull/39169
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Fixes: https://github.com/nodejs/node/issues/38641
PR-URL: https://github.com/nodejs/node/pull/38652
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/37950
Reviewed-By: Pooja D P <Pooja.D.P@ibm.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Enable code example using both modern ESM syntax and legacy CJS syntax.
It adds a toggle on the web interface to let users switch from one
JavaScript flavor to the other.
PR-URL: https://github.com/nodejs/node/pull/37162
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Defer rendering sections of docs until they are displayed on
the user's screen.
PR-URL: https://github.com/nodejs/node/pull/37301
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/36313
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
* better vertical alignment with text
* slightly larger "key" size
* remove top light area (from box-shadow)
PR-URL: https://github.com/nodejs/node/pull/35497
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
I believe this is the last change to make in the docs for color contrast
accessibility per WCAG AA.
Currently, the current item in the nav is #43853d on a #333333
background for a color contrast of 2.8:1, failing WCAG AA. This swaps in
removes a confusing bottom border on the item, replacing it with
bolding to preserve the item's highlighting.
PR-URL: https://github.com/nodejs/node/pull/35141
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
A previous change altered the rendering of visited links. This restores
it.
PR-URL: https://github.com/nodejs/node/pull/35108
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>