File tree 2 files changed +11
-4
lines changed
src/client/theme-default/components
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import VPNavBarSocialLinks from './VPNavBarSocialLinks.vue'
12
12
import VPNavBarTitle from ' ./VPNavBarTitle.vue'
13
13
import VPNavBarTranslations from ' ./VPNavBarTranslations.vue'
14
14
15
- defineProps <{
15
+ const props = defineProps <{
16
16
isScreenOpen: boolean
17
17
}>()
18
18
@@ -31,6 +31,7 @@ watchPostEffect(() => {
31
31
' has-sidebar' : hasSidebar .value ,
32
32
' home' : frontmatter .value .layout === ' home' ,
33
33
' top' : y .value === 0 ,
34
+ ' screen-open' : props .isScreenOpen
34
35
}
35
36
})
36
37
</script >
@@ -74,7 +75,13 @@ watchPostEffect(() => {
74
75
height : var (--vp-nav-height );
75
76
pointer-events : none ;
76
77
white-space : nowrap ;
77
- transition : background-color 0.5s ;
78
+ transition : background-color 0.25s ;
79
+ }
80
+
81
+ .VPNavBar.screen-open {
82
+ transition : none ;
83
+ background-color : var (--vp-nav-bg-color );
84
+ border-bottom : 1px solid var (--vp-c-divider );
78
85
}
79
86
80
87
.VPNavBar :not (.home ) {
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ const isLocked = useScrollLock(inBrowser ? document.body : null)
37
37
<style scoped>
38
38
.VPNavScreen {
39
39
position : fixed ;
40
- top : calc (var (--vp-nav-height ) + var (--vp-layout-top-height , 0px ) + 1 px );
40
+ top : calc (var (--vp-nav-height ) + var (--vp-layout-top-height , 0px ));
41
41
/* rtl:ignore*/
42
42
right : 0 ;
43
43
bottom : 0 ;
@@ -47,7 +47,7 @@ const isLocked = useScrollLock(inBrowser ? document.body : null)
47
47
width : 100% ;
48
48
background-color : var (--vp-nav-screen-bg-color );
49
49
overflow-y : auto ;
50
- transition : background-color 0.5 s ;
50
+ transition : background-color 0.25 s ;
51
51
pointer-events : auto ;
52
52
}
53
53
You can’t perform that action at this time.
0 commit comments