File tree 2 files changed +20
-5
lines changed
2 files changed +20
-5
lines changed Original file line number Diff line number Diff line change 4
4
@touchstart =" onTouchStart"
5
5
@touchend =" onTouchEnd" >
6
6
<Navbar v-if =" shouldShowNavbar" @toggle-sidebar =" toggleSidebar" />
7
+ <div class =" sidebar-mask" @click =" toggleSidebar(false)" ></div >
7
8
<Sidebar :items =" sidebarItems" @toggle-sidebar =" toggleSidebar" />
8
9
<div class =" custom-layout" v-if =" $page.frontmatter.layout" >
9
10
<component :is =" $page.frontmatter.layout" />
Original file line number Diff line number Diff line change 29
29
box-sizing border-box
30
30
border-bottom 1px solid $borderColor
31
31
32
+ .sidebar-mask
33
+ position fixed
34
+ z-index 9
35
+ top 0
36
+ left 0
37
+ width 100vw
38
+ height 100vh
39
+ display none
40
+
32
41
.sidebar
33
42
font-size 15px
34
43
background-color #f f f
@@ -153,11 +162,16 @@ th, td
153
162
.custom-layout
154
163
padding-top $navbarHeight
155
164
156
- .theme-container.no-navbar
157
- .content :not (.custom )
158
- h1 , h2 , h3 , h4 , h5 , h6
159
- margin-top 1.5rem
160
- padding-top 0
165
+ .theme-container
166
+ & .sidebar-open
167
+ .sidebar-mask
168
+ display : block
169
+ & .no-navbar
170
+ .content :not (.custom )
171
+ h1 , h2 , h3 , h4 , h5 , h6
172
+ margin-top 1.5rem
173
+ padding-top 0
174
+
161
175
162
176
@media (min-width : ($MQMobile + 1px ))
163
177
.theme-container.no-sidebar
You can’t perform that action at this time.
0 commit comments