mirror of
https://github.com/expressjs/expressjs.com.git
synced 2026-02-21 19:41:33 +00:00
chore: ♻️ remove jquery (#1964)
* add scroll-to-top and scroll class toggle with vanilla JS * add language detection * add i18n * Fix bug: there was no class hidden in CSS. Notice was hidden by hide(). Now HTML hidden attribute is used to hide notice using CSS. This improves A11y. * fix flashing of i18n notice and improve a11y * add menu highlighting on scroll * ♻️ remove jquery * defer app.js Co-authored-by: Sebastian Beltran <bjohansebas@gmail.com> * remove DOMContentLoaded and fix root margin to 25% --------- Co-authored-by: bjohansebas <103585995+bjohansebas@users.noreply.github.com>
This commit is contained in:
@@ -474,7 +474,7 @@ pre:has(code) button.failed {
|
||||
}
|
||||
}
|
||||
|
||||
/* top button */
|
||||
/* scroll to top button */
|
||||
|
||||
.scroll #top {
|
||||
opacity: .5;
|
||||
@@ -611,6 +611,7 @@ table ul {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* i18n box */
|
||||
.doc-notice {
|
||||
padding-block: 1rem;
|
||||
padding-inline: 2.5rem;
|
||||
@@ -618,6 +619,11 @@ table ul {
|
||||
border-radius: 0 6px 6px 0;
|
||||
background: var(--notice-bg);
|
||||
border-left: 3px solid var(--notice-accent);
|
||||
margin-inline: auto;
|
||||
margin-block-start: 2rem;
|
||||
position: relative;
|
||||
grid-area: i18n;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.doc-notice a{
|
||||
@@ -625,6 +631,10 @@ table ul {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.doc-notice[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.doc-info {
|
||||
background: var(--info-bg);
|
||||
border-left: 3px solid var(--info-accent);
|
||||
@@ -645,13 +655,6 @@ table ul {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#i18n-notice-box {
|
||||
margin-inline: auto;
|
||||
margin-block-start: 2rem;
|
||||
position: relative;
|
||||
grid-area: i18n;
|
||||
}
|
||||
|
||||
#close-i18n-notice-box {
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
|
||||
Reference in New Issue
Block a user