File tree Expand file tree Collapse file tree 3 files changed +9
-22
lines changed Expand file tree Collapse file tree 3 files changed +9
-22
lines changed Original file line number Diff line number Diff line change @@ -19,14 +19,11 @@ $info = #1C90F3
19
19
20
20
$radius = 2px
21
21
$content-padding-top = 30px
22
-
23
- // header settings
24
22
$header-inner-height = 41px
25
23
$heading-padding-vertical = 10px
26
24
$header-height = $header-inner-height + $heading-padding-vertical * 2
27
25
$mobile-header-height = 40px
28
- // prevent headers from being covered by the top nav upon navigation
29
- $heading-link-padding-top = $header-height + $content-padding-top
30
- $mobile-heading-link-padding-top = $mobile-header-height + $content-padding-top
26
+ $heading-link-padding-top = $content-padding-top
27
+ $mobile-heading-link-padding-top = $content-padding-top
31
28
$h2-margin-top = 45px
32
29
$h3-margin-top = 52px
Original file line number Diff line number Diff line change 51
51
h1
52
52
margin : 0 0 1em
53
53
h2 , h3
54
- pointer-events : none
55
- a
56
- pointer-events : auto
57
- color : $dark
58
54
& :before
59
55
content : ""
60
56
display : block
65
61
margin : $h2-margin-top 0 .8em
66
62
padding-bottom : .7em
67
63
border-bottom : 1px solid $border
64
+ z-index : - 1
68
65
h3
69
66
margin : $h3-margin-top 0 1.2em
70
67
position : relative
68
+ z-index : - 1
71
69
& :after
72
70
content : "#"
73
71
color : $green
Original file line number Diff line number Diff line change 1
1
( function ( ) {
2
+
2
3
initMobileMenu ( )
3
4
if ( PAGE_TYPE ) {
4
5
initVersionSelect ( )
25
26
} )
26
27
}
27
28
28
- function createSourceSearchPath ( query ) {
29
+ function createSourceSearchPath ( query ) {
29
30
query = query
30
31
. replace ( / \( [ ^ \) ] * ?\) / g, '' )
31
32
. replace ( / ( V u e \. ) ( \w + ) / g, '$1$2" OR "$2' )
247
248
}
248
249
}
249
250
if ( last )
250
- setActive ( last . id , ! hoveredOverSidebar )
251
+ setActive ( last . id , ! hoveredOverSidebar )
251
252
}
252
253
253
254
function makeLink ( h ) {
333
334
function makeHeaderClickable ( link ) {
334
335
var wrapper = link . querySelector ( 'a' )
335
336
wrapper . setAttribute ( 'data-scroll' , '' )
336
-
337
- // transform DOM structure from
338
- // `<h2><a></a>Header</a>` to <h2><a>Header</a></h2>`
339
- // to make the link clickable
340
- var nodes = link . childNodes
341
- for ( var i = 0 ; i < nodes . length ; i ++ ) {
342
- var node = nodes [ i ]
343
- if ( node !== wrapper ) {
344
- wrapper . appendChild ( node )
345
- }
346
- }
337
+ link . parentNode . insertBefore ( wrapper , link )
338
+ wrapper . appendChild ( link )
347
339
}
348
340
}
349
341
} ) ( )
You can’t perform that action at this time.
0 commit comments