File tree Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Expand file tree Collapse file tree 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
@@ -149,11 +158,16 @@ th, td
149
158
.custom-layout
150
159
padding-top $navbarHeight
151
160
152
- .theme-container.no-navbar
153
- .content :not (.custom )
154
- h1 , h2 , h3 , h4 , h5 , h6
155
- margin-top 1.5rem
156
- padding-top 0
161
+ .theme-container
162
+ & .sidebar-open
163
+ .sidebar-mask
164
+ display : block
165
+ & .no-navbar
166
+ .content :not (.custom )
167
+ h1 , h2 , h3 , h4 , h5 , h6
168
+ margin-top 1.5rem
169
+ padding-top 0
170
+
157
171
158
172
@media (min-width : ($MQMobile + 1px ))
159
173
.theme-container.no-sidebar
You can’t perform that action at this time.
0 commit comments