File tree 6 files changed +25
-6
lines changed
6 files changed +25
-6
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,10 @@ function getTutorialSidebar() {
74
74
items : [
75
75
{ text : 'Conventional Routing' , link : '/guide/conventional-route' } ,
76
76
{ text : 'Using MDX' , link : '/guide/use-mdx' } ,
77
- { text : 'Custom Page' , link : '/guide/custom-page' }
77
+ { text : 'Custom Page' , link : '/guide/custom-page' } ,
78
+ { text : 'SPA Mode' , link : '/guide/spa-mode' } ,
79
+ { text : 'Static Assets' , link : '/guide/static-assets' } ,
80
+ { text : 'Extension' , link : '/guide/extension' }
78
81
]
79
82
}
80
83
] ;
Original file line number Diff line number Diff line change @@ -11,3 +11,19 @@ export const createHash = (info: string): string => {
11
11
}
12
12
return createHashFunc ( 'sha256' ) . update ( info ) . digest ( 'hex' ) . slice ( 0 , 8 ) ;
13
13
} ;
14
+
15
+ export const parseUrl = (
16
+ url : string
17
+ ) : {
18
+ url : string ;
19
+ query : string ;
20
+ hash : string ;
21
+ } => {
22
+ const [ withoutHash , hash = '' ] = url . split ( '#' ) ;
23
+ const [ cleanedUrl , query = '' ] = withoutHash . split ( '?' ) ;
24
+ return {
25
+ url : cleanedUrl ,
26
+ query,
27
+ hash
28
+ } ;
29
+ } ;
Original file line number Diff line number Diff line change 1
1
import { inBrowser } from './utils' ;
2
2
3
- const DEFAULT_NAV_HEIGHT = 72 ;
3
+ const DEFAULT_NAV_HEIGHT = 60 ;
4
4
5
5
// Control the scroll behavior of the browser when user clicks on a link
6
6
if ( inBrowser ( ) ) {
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ function isBottom() {
10
10
) ;
11
11
}
12
12
13
- const NAV_HEIGHT = 72 ;
13
+ const NAV_HEIGHT = 60 ;
14
14
15
15
export function useAsideAnchor (
16
16
prevActiveLinkRef : React . MutableRefObject < HTMLAnchorElement | null > ,
Original file line number Diff line number Diff line change 21
21
.island-doc h6 ::before {
22
22
display : block;
23
23
content : '' ;
24
- margin-top : -70 px ;
25
- height : 70 px ;
24
+ margin-top : -56 px ;
25
+ height : 56 px ;
26
26
visibility : hidden;
27
27
pointer-events : none;
28
28
}
Original file line number Diff line number Diff line change 323
323
: root {
324
324
--island-nav-height : var (--island-nav-height-mobile );
325
325
--island-nav-height-mobile : 56px ;
326
- --island-nav-height-desktop : 72 px ;
326
+ --island-nav-height-desktop : 60 px ;
327
327
}
328
328
329
329
@media (min-width : 960px ) {
You can’t perform that action at this time.
0 commit comments