Skip to content

Commit ea4a362

Browse files
fix(docs): add scroll to right sidebar
1 parent 26a7b93 commit ea4a362

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

docs/src/app/@theme/styles/themes.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ $nb-themes: nb-register-theme((
7979
$nb-themes: nb-register-theme((
8080
// custom
8181
content-width: 1440px,
82-
settings-col-width: 16rem,
83-
settings-col-margin: 1.875rem,
82+
settings-col-width: 19rem,
83+
settings-col-margin: 0.375rem,
8484
color-gray-light: #ced5dd,
8585
color-fg-heading-light: #8994a3,
8686
code-block-bg: linear-gradient(225deg, #333c66 0%, #1d2447 100%),

docs/src/app/documentation/page/page.component.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ <h1 class="page-header h4">
3232
<ngd-page-tabs [tabs]="currentItem?.tabs"></ngd-page-tabs>
3333
<ngd-page-toc [toc]="currentItem?.toc"></ngd-page-toc>
3434

35-
<ngd-akveo-services-banner *ngIf="!isTabs" height=240 width=176 ctaId="38b7285f-759c-4b4e-aedc-6391d3af697c"></ngd-akveo-services-banner>
36-
<ngd-akveo-services-banner *ngIf="isTabs" height=120 width=88 ctaId="ec4c1bf6-491c-484a-9d88-60912f897d0a"></ngd-akveo-services-banner>
35+
<ngd-akveo-services-banner height=230 width=256 ctaId="38b7285f-759c-4b4e-aedc-6391d3af697c"></ngd-akveo-services-banner>
3736
</div>
3837
</div>

docs/src/app/documentation/page/page.component.scss

+9-1
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,16 @@
258258

259259
.fixed-panel {
260260
position: fixed;
261-
top: 7.5rem;
261+
top: 6rem;
262262
width: inherit;
263+
overflow-y: auto;
264+
height: calc(100vh - 6rem);
265+
padding: 1.5rem 1.5rem 0;
266+
267+
@include nb-scrollbars(
268+
nb-theme(sidebar-scrollbar-color),
269+
nb-theme(sidebar-scrollbar-background-color),
270+
nb-theme(sidebar-scrollbar-width));
263271
}
264272
}
265273
}

docs/src/app/documentation/page/page.component.ts

-4
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ export class NgdPageComponent implements OnInit, AfterContentChecked, OnDestroy
4040
.some((item) => ['markdown', 'component', 'tabbed'].includes(item.block));
4141
}
4242

43-
get isTabs() {
44-
return this.currentItem && this.currentItem.type === 'tabs';
45-
}
46-
4743
ngOnInit() {
4844
this.handlePageNavigation();
4945
this.window.history.scrollRestoration = 'manual';

0 commit comments

Comments
 (0)