File tree Expand file tree Collapse file tree 4 files changed +30
-11
lines changed Expand file tree Collapse file tree 4 files changed +30
-11
lines changed Original file line number Diff line number Diff line change 4
4
* See: https://www.gatsbyjs.org/docs/browser-apis/
5
5
*/
6
6
7
- const transitionDelay = 50 ;
7
+ const windowWidth = window . screen . width ;
8
+ const transitionDelay = windowWidth <= 480 ? 0 : 50 ;
8
9
9
10
exports . shouldUpdateScroll = ( { routerProps : { location } } ) => {
10
11
if ( ! location . hash || ! document . getElementById ( location . hash . substr ( 1 ) ) ) {
11
12
window . setTimeout ( ( ) => window . scrollTo ( 0 , 0 ) , transitionDelay ) ;
12
13
} else {
13
14
window . setTimeout (
14
15
( ) =>
15
- document
16
- . getElementById ( location . hash . substr ( 1 ) )
17
- . scrollIntoView ( { block : "start" , behavior : "smooth" } ) ,
16
+ document . getElementById ( location . hash . substr ( 1 ) ) . scrollIntoView ( {
17
+ block : "start" ,
18
+ behavior : transitionDelay <= 480 ? "auto" : "smooth"
19
+ } ) ,
18
20
transitionDelay
19
21
) ;
20
22
}
Original file line number Diff line number Diff line change @@ -68,14 +68,19 @@ class SideMenu extends React.Component {
68
68
} ) ;
69
69
} ) ;
70
70
71
+ const windowWidth = window . screen . width ;
72
+ console . log ( windowWidth ) ;
73
+ const transitionDelay = windowWidth <= 480 ? 0 : 50 ;
74
+
71
75
hash &&
72
76
document . getElementById ( hash . substr ( 1 ) ) !== null &&
73
77
window . setTimeout (
74
78
( ) =>
75
- document
76
- . getElementById ( hash . substr ( 1 ) )
77
- . scrollIntoView ( { block : "start" , behavior : "smooth" } ) ,
78
- 50
79
+ document . getElementById ( hash . substr ( 1 ) ) . scrollIntoView ( {
80
+ block : "start" ,
81
+ behavior : windowWidth <= 480 ? "auto" : "smooth"
82
+ } ) ,
83
+ transitionDelay
79
84
) ;
80
85
}
81
86
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ class apiPage extends React.Component {
101
101
< span className = "tag big bold mr-2 uppercase" >
102
102
{ mode }
103
103
</ span >
104
- < pre className = "whitespace-pre-line" >
104
+ < pre className = "whitespace-pre-line break-word " >
105
105
{ m . servers
106
106
? m . servers [ 0 ] . url
107
107
: "https://api.linode.com/v4" }
Original file line number Diff line number Diff line change 26
26
27
27
.endpoint-anchor {
28
28
position : relative;
29
- top : -84 px ;
29
+ top : -154 px ;
30
30
visibility : hidden;
31
31
}
32
32
33
+ @screen sm {
34
+ .endpoint-anchor {
35
+ top : -84px ;
36
+ }
37
+ }
38
+
33
39
.list-group ,
34
40
.list-group ul {
35
41
max-height : 0 ;
171
177
@apply border-grey-light mb-8;
172
178
}
173
179
180
+ .search-header input {
181
+ max-width : 100% ;
182
+ }
183
+
174
184
.search-header-wrapper {
175
185
position : sticky;
176
186
top : 65px ;
177
187
width : 100% ;
178
188
z-index : 1 ;
179
- padding : 1rem 1 rem 0 ;
189
+ padding : 1rem ;
180
190
background-color : # fff ;
191
+ border-bottom-width : 1px ;
192
+ @apply border-grey-light;
181
193
}
182
194
183
195
.search-results-list {
You can’t perform that action at this time.
0 commit comments