This repository was archived by the owner on Dec 27, 2017. It is now read-only.
File tree 3 files changed +34
-17
lines changed
3 files changed +34
-17
lines changed Original file line number Diff line number Diff line change 25
25
}
26
26
}
27
27
28
+ @media (min-width : 768px ) and (max-width : 993px ) {
29
+ .navbar .dropdown-menu a {
30
+ color : #333 !important ;
31
+ }
32
+
33
+ .navbar-front .dropdown-menu {
34
+ background-color : $white ;
35
+ }
36
+ }
37
+
28
38
@media (min-width : 992px ) {
29
39
.navbar.affix-top {
30
40
bottom : 0 ;
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ var store = Store({
27
27
} ) ;
28
28
29
29
let ticketDiv = document . getElementById ( 'ticket' ) ;
30
- if ( ( typeof ticketDiv != "undefined" ) && ( ticketDiv != null ) ) {
30
+ if ( ( typeof ticketDiv !== "undefined" ) && ( ticketDiv != = null ) ) {
31
31
render ( (
32
32
< TicketButton
33
33
className = "btn btn-lg btn-hkosc button-front-mobile-ticket"
@@ -39,7 +39,7 @@ if ((typeof ticketDiv != "undefined") && (ticketDiv != null)) {
39
39
}
40
40
41
41
let timetableDiv = document . getElementById ( 'timetable' ) ;
42
- if ( ( typeof timetableDiv != "undefined" ) && ( timetableDiv != null ) ) {
42
+ if ( ( typeof timetableDiv !== "undefined" ) && ( timetableDiv != = null ) ) {
43
43
console . log ( "run here" ) ;
44
44
render ( (
45
45
< Provider store = { store } >
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- export default function ( ) {
3
+ var largeScreen = screen . width > 993 ;
4
4
5
- ! function ( ) {
6
- let $navbar = $ ( '.navbar-front' ) ;
7
- if ( $navbar . length === 0 ) return ;
8
- let drop = $ ( '#navbar-collapse' , $navbar ) ;
9
- $navbar . affix ( {
10
- offset : {
11
- top : $ ( '.jumbotron' ) . height ( ) + $navbar . height ( )
12
- }
13
- } ) ;
14
- $navbar . on ( 'affixed.bs.affix' , function ( ) {
5
+ export default function ( ) {
6
+ let $navbar = $ ( '.navbar-front' ) ;
7
+ if ( $navbar . length === 0 ) return ;
8
+ let drop = $ ( '#navbar-collapse' , $navbar ) ;
9
+ if ( ! largeScreen )
10
+ drop . removeClass ( 'dropup' ) ;
11
+ $navbar . affix ( {
12
+ offset : {
13
+ top : $ ( '.jumbotron' ) . height ( ) + $navbar . height ( )
14
+ }
15
+ } ) ;
16
+ $navbar . on ( 'affixed.bs.affix' , function ( ) {
17
+ if ( largeScreen )
15
18
drop . removeClass ( 'dropup' ) ;
16
- } ) ;
17
- $navbar . on ( 'affixed-top.bs.affix' , function ( ) {
19
+ } ) ;
20
+ $navbar . on ( 'affixed-top.bs.affix' , function ( ) {
21
+ if ( largeScreen )
18
22
drop . addClass ( 'dropup' ) ;
19
- } ) ;
20
- } ( jQuery ) ;
23
+ } ) ;
24
+
25
+ $ ( window ) . resize ( function ( ) {
26
+ largeScreen = screen . width > 993 ;
27
+ } ) ;
21
28
}
You can’t perform that action at this time.
0 commit comments