doc: add "Skip to content" button

PR-URL: https://github.com/nodejs/node/pull/56750
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
This commit is contained in:
Antoine du Hamel 2025-01-26 19:41:45 +01:00 committed by GitHub
parent a6c5ce27d3
commit f1196ee3bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 0 deletions

View File

@ -122,6 +122,19 @@ a.type {
font-size: .9em;
}
.skip-to-content {
position: fixed;
top: -300%;
}
.skip-to-content:focus {
display: block;
top: 0;
left: 0;
background-color: var(--green1);
padding: 1rem;
z-index: 999999;
}
#content {
position: relative;
}

View File

@ -26,6 +26,7 @@
__JS_FLAVORED_DYNAMIC_CSS__
</head>
<body class="alt apidoc" id="api-section-__FILENAME__">
<a href="#apicontent" class="skip-to-content">Skip to content</a>
<div id="content" class="clearfix">
<div role="navigation" id="column2" class="interior">
<div id="intro" class="interior">