Skip to content

Commit 1b97f8d

Browse files
committed
Add new sidebar
1 parent 0486562 commit 1b97f8d

File tree

12 files changed

+112
-77
lines changed

12 files changed

+112
-77
lines changed

poetry.lock

+26-27
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sphinx_scylladb_theme/extensions/navigation.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313

1414
@functools.lru_cache(maxsize=None)
1515
def _get_navigation_expand_image(soup: BeautifulSoup) -> Tag:
16-
retval = soup.new_tag(
17-
"i", attrs={"class": "scylla-icon scylla-icon--chevron-right"}
18-
)
16+
retval = soup.new_tag("i", attrs={"class": "scylla-icon scylla-icon--expand"})
1917
return retval
2018

2119

sphinx_scylladb_theme/static/css/main.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Loading
Loading

src/css/base/variables/_colors.scss

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ $color-border-admonition-warning: $color-cinnabar;
4343
$color-border-button: $color-martinique;
4444
$color-border-dropdown-contribute: $color-waikawa-gray;
4545
$color-border-footer-top: transparentize($color-black, 0.9);
46+
$color-border-sidebar-item: $color-royal-blue;
4647
$color-border-table: $color-alto;
4748
$color-border-table-header: $color-san-marino;
4849
$color-border-tabs-active: $color-dodger-blue;

src/css/components/_hero.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
}
3030

3131
&__img {
32-
opacity: 0.2;
32+
opacity: 0.3;
3333
position: absolute;
3434
right: -18px;
3535
top: 20px;

src/css/components/_icons.scss

+10
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@
113113
background-image: url("../img/icons/icon-knowledge-base.svg");
114114
}
115115

116+
&--less {
117+
background-image: url("../img/icons/icon-less.svg");
118+
filter: none;
119+
}
120+
116121
&--live-test {
117122
background-image: url("../img/icons/icon-live-test.svg");
118123
}
@@ -169,6 +174,11 @@
169174
background-image: url("../img/icons/icon-partners.svg");
170175
}
171176

177+
&--plus {
178+
background-image: url("../img/icons/icon-plus.svg");
179+
filter: none;
180+
}
181+
172182
&--pricing {
173183
background-image: url("../img/icons/icon-pricing.svg");
174184
}

src/css/components/_side-nav.scss

+38-43
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
display: none;
33
background: $color-white;
44
height: 100vh;
5+
max-height: calc(100vh - #{$header-height});
56
line-height: 24px;
67
overflow-y: auto;
78
position: fixed;
@@ -16,31 +17,21 @@
1617
overflow-wrap: break-word;
1718
max-width: 90%;
1819

19-
a {
20-
color: $color-typography-base;
21-
&:hover {
22-
color: $color-typography-base-link;
23-
font-weight: 400;
24-
}
25-
}
26-
27-
ul {
28-
margin: 0;
29-
}
30-
3120
/* Override icons extension */
3221
label,
3322
label i {
3423
padding: 0;
3524
margin: 0;
3625
}
3726

38-
label .scylla-icon {
39-
display: none;
40-
height: 14px;
41-
width: 8px;
42-
filter: invert(81%) sepia(20%) saturate(128%) hue-rotate(177deg)
43-
brightness(90%) contrast(89%);
27+
label {
28+
margin-left: 8px;
29+
}
30+
31+
.scylla-icon--expand {
32+
height: 17px;
33+
width: 17px;
34+
@extend .scylla-icon--plus;
4435
}
4536

4637
.toctree-checkbox {
@@ -56,49 +47,53 @@
5647
~ ul {
5748
display: block;
5849
}
59-
~ label i {
60-
transform: rotate(90deg);
50+
~ label .scylla-icon--expand {
51+
@extend .scylla-icon--less;
6152
}
6253
}
6354
}
6455

6556
/* Override autogenerated toctree by Sphinx */
57+
ul {
58+
margin: 0;
59+
}
60+
61+
a {
62+
color: $color-typography-base;
63+
&:hover {
64+
color: $color-typography-base-link;
65+
font-weight: 400;
66+
}
67+
}
68+
6669
li {
67-
align-items: center;
68-
display: flex;
69-
flex-wrap: wrap;
7070
list-style: none;
7171
padding: 0;
72-
padding-bottom: 18px;
72+
padding-bottom: 24px;
7373

74-
&.has-children.current-page {
75-
padding-bottom: 0;
76-
}
74+
&.has-children {
75+
a {
76+
max-width: 80%;
77+
}
7778

78-
> a {
79-
flex: 1;
79+
&.current {
80+
padding-bottom: 20px;
81+
}
8082
}
8183

8284
&.current-page {
8385
& > a {
8486
color: $color-typography-base-link;
85-
font-weight: 700;
86-
}
87-
88-
& > .toctree-checkbox:checked ~ label i {
89-
margin-right: 2px;
90-
filter: invert(38%) sepia(71%) saturate(6789%) hue-rotate(231deg)
91-
brightness(90%) contrast(95%);
9287
}
9388
}
9489

9590
ul {
9691
width: 100%;
97-
margin-top: 20px;
98-
margin-bottom: 20px;
92+
margin-top: 18px;
9993

10094
li {
101-
padding: 4px 0 4px 10px;
95+
border-left: 1px solid $color-border-sidebar-item;
96+
padding: 4px 0 4px 13px;
10297
}
10398

10499
ul {
@@ -121,6 +116,10 @@
121116
}
122117
}
123118

119+
.layout--has-banner .side-nav {
120+
max-height: calc(100vh - #{$promo-banner-header-height});
121+
}
122+
124123
@media screen and (min-width: $large) {
125124
.side-nav {
126125
display: block;
@@ -137,10 +136,6 @@
137136
&__content {
138137
padding-bottom: $footer-height;
139138
max-width: 100%;
140-
141-
label .scylla-icon {
142-
display: block;
143-
}
144139
}
145140

146141
&__search {

src/css/components/_topic-box.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
bottom: 0;
7171
top: 0;
7272
bottom: 0px;
73-
opacity: 0.2;
73+
opacity: 0.3;
7474
}
7575
}
7676

@@ -117,7 +117,7 @@
117117
bottom: -12px;
118118
height: 140px;
119119
margin: 0;
120-
opacity: 0.2;
120+
opacity: 0.3;
121121
position: absolute;
122122
right: -5px;
123123
}

0 commit comments

Comments
 (0)