File tree Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 72
72
position : absolute;
73
73
right : 0 ;
74
74
padding : var (--ds-space-1 );
75
- height : calc (100% - var (--ds-space-1 ));
75
+ height : calc (100% - var (--ds-space-2 ));
76
76
margin-top : 0.15em ;
77
77
z-index : 10 ;
78
78
}
Original file line number Diff line number Diff line change 34
34
listItem . dataset . level = level
35
35
listItem . className = '!m-0'
36
36
link . className =
37
- `block py-1 pr-1 !no-underline ! text-secondary
37
+ `block py-1 pr-1 !no-underline text-body-small
38
38
hover:!text-link [&.is-active]:!text-link [&.is-active]:border-[var(--ds-primary-main)] border-l-2`
39
39
if ( level === 1 ) link . classList . add ( 'pl-2' , 'text-button' )
40
40
if ( level === 2 ) link . classList . add ( 'pl-4' , '!text-tertiary' )
Original file line number Diff line number Diff line change 45
45
/>
46
46
47
47
<script >
48
- document .documentElement .setAttribute (' data-theme' , localStorage .getItem (' theme' ) ||
49
- window .matchMedia (' (prefers-color-scheme: dark)' ).matches ? ' dark' : ' light' || ' light' )
48
+ function getTheme () {
49
+ var localStorage = window .localStorage .getItem (" theme" );
50
+ var prefersDark = window .matchMedia (" (prefers-color-scheme: dark)" ).matches ;
51
+ if (localStorage) return localStorage;
52
+ if (prefersDark) return " dark" ;
53
+ return " light" ;
54
+ }
55
+ document .documentElement .setAttribute (" data-theme" , getTheme ());
50
56
</script >
51
57
52
58
<link rel =" stylesheet" href =" https://cdn.jsdelivr.net/npm/@docsearch/css@3" />
Original file line number Diff line number Diff line change 1
1
{{ #with page.navigation }}
2
- <nav id =" side-nav" class =" h-full bg-level1 overflow-y-scroll flex flex-col w-[18.5rem] py -4 px-2"
2
+ <nav id =" side-nav" class =" h-full bg-level1 overflow-y-scroll flex flex-col w-[18.5rem] pt -4 px-2"
3
3
{{ #if page.component }} data-component =" {{ page.component.name }} "
4
4
data-version =" {{ page.version }} " {{ /if }} >
5
5
{{> nav-tree navigation =this }}
You can’t perform that action at this time.
0 commit comments