File tree Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -455,8 +455,8 @@ iframe {
455
455
}
456
456
}
457
457
458
- .theme-doc-sidebar-container [class ^= 'sidebarLogo_' ] {
459
458
border-bottom : 1px solid var (--next-prev-border-color );
459
+ .theme-doc-sidebar-container [class ^= 'sidebarLogo_' ] {
460
460
margin : 0 ;
461
461
}
462
462
@@ -1493,6 +1493,7 @@ pre[class*='language-'] code span.token {
1493
1493
/* Mobile Navigation */
1494
1494
.navbar-sidebar {
1495
1495
background-color : var (--main-bg-color );
1496
+ z-index : 1000 ;
1496
1497
}
1497
1498
1498
1499
.navbar-sidebar__back {
Original file line number Diff line number Diff line change 3
3
background-color : var (--sidebar-bg-color ) !important ;
4
4
width : 100% ;
5
5
overflow-y : auto;
6
- padding-top : 5rem ;
6
+ }
7
+
8
+ .custom-sidebar__logo {
9
+ display : grid;
10
+ place-items : center;
11
+ padding : 1rem ;
12
+ height : 5rem ;
13
+ width : 100% ;
14
+ text-align : center;
15
+ }
16
+
17
+ .custom-sidebar__logo svg {
18
+ max-height : 100% ;
19
+ max-width : 80% ;
20
+ object-fit : contain;
7
21
}
8
22
9
23
.custom-sidebar__content {
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import { useLocation } from '@docusaurus/router' ;
3
+ import { useColorMode } from '@docusaurus/theme-common' ;
3
4
import type { PropSidebarItem } from '@docusaurus/plugin-content-docs' ;
4
5
import Link from '@docusaurus/Link' ;
5
6
import {
@@ -9,6 +10,9 @@ import {
9
10
type Category ,
10
11
} from '../utils' ;
11
12
import '../CustomSidebar.css' ;
13
+ import LogoLight from '@site/static/img/pql-logo-large.svg' ;
14
+ import LogoDark from '@site/static/img/pql-logo-large-dark-mode.svg' ;
15
+
12
16
13
17
interface ContentProps {
14
18
path : string ;
@@ -17,6 +21,7 @@ interface ContentProps {
17
21
18
22
export default function Content ( { sidebar } : ContentProps ) {
19
23
const location = useLocation ( ) ;
24
+ const { colorMode } = useColorMode ( ) ;
20
25
const categories : Category [ ] = buildCategories ( sidebar ) ;
21
26
22
27
const renderSidebarItem = ( item : PropSidebarItem ) : React . ReactElement => {
@@ -80,6 +85,11 @@ export default function Content({ sidebar }: ContentProps) {
80
85
role = "navigation"
81
86
aria-label = "Documentation sidebar"
82
87
>
88
+ < div className = "custom-sidebar__logo" >
89
+ < Link to = "/index" >
90
+ { colorMode === 'dark' ? < LogoDark /> : < LogoLight /> }
91
+ </ Link >
92
+ </ div >
83
93
< div className = "custom-sidebar__content" >
84
94
{ categories . map ( renderCategory ) }
85
95
</ div >
You can’t perform that action at this time.
0 commit comments