Skip to content

Commit 81310b7

Browse files
authored
feat: make version sticky in sidebar (#1584)
1 parent cc4a60b commit 81310b7

File tree

6 files changed

+38
-18
lines changed

6 files changed

+38
-18
lines changed

.eslintrc.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

eslint.config.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const js = require("@eslint/js");
2+
const globals = require("globals");
3+
4+
module.exports = [
5+
js.configs.recommended,
6+
{
7+
languageOptions: {
8+
ecmaVersion: 12,
9+
sourceType: "module",
10+
globals: {
11+
...globals.browser,
12+
...globals.node,
13+
...globals.es2021,
14+
},
15+
},
16+
rules: {
17+
"no-undef": 0,
18+
},
19+
},
20+
];

sphinx_scylladb_theme/static/css/main.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sphinx_scylladb_theme/static/js/main.bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sphinx_scylladb_theme/static/js/runtime.bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/css/components/_side-nav.scss

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@
3333
}
3434

3535
&__title {
36-
position: sticky;
37-
top: 0;
38-
z-index: 100;
39-
4036
a {
4137
background-color: var(--brand-product);
4238
height: $product-title-height;
@@ -273,6 +269,10 @@
273269
&__versions {
274270
padding: $spacer-xs;
275271
padding-bottom: 0;
272+
273+
&:empty {
274+
padding: 0;
275+
}
276276
}
277277

278278
&__search {
@@ -328,9 +328,18 @@
328328
left: initial;
329329
width: $secondary-side-nav-width;
330330
z-index: 25;
331+
overflow: hidden;
332+
333+
.side-nav-content {
334+
flex-grow: 1;
335+
height: 0;
336+
}
331337

332338
&__content {
333339
max-width: 100%;
340+
overflow-y: auto;
341+
flex-grow: 1;
342+
height: 0;
334343
}
335344

336345
&__search {
@@ -353,6 +362,8 @@
353362

354363
.side-nav-content {
355364
background: radial-gradient(100% 100px at top center, var(--brand-product) 0px, transparent 100%);
365+
display: flex;
366+
flex-direction: column;
356367
}
357368

358369
@media screen and (min-width: $xlarge) {
@@ -362,7 +373,6 @@
362373
.side-nav-content {
363374
height: 0;
364375
flex-grow: 1;
365-
overflow-y: auto;
366376
}
367377

368378
&--collapsed {

0 commit comments

Comments
 (0)