Commit e9dd4a9 1 parent 201b584 commit e9dd4a9 Copy full SHA for e9dd4a9
File tree 2 files changed +41
-48
lines changed
2 files changed +41
-48
lines changed Original file line number Diff line number Diff line change 73
73
.right {
74
74
text-align : right;
75
75
padding-right : 1% !important ;
76
+ vertical-align : middle;
76
77
}
77
78
78
79
/* Responsive styles */
83
84
}
84
85
85
86
.departureNested {
86
- max-width : 25% !important ;
87
- width : 25% !important ;
88
- min-width : 25% !important ;
89
- text-align : center ;
90
- font-size : calc (1vw + 3px ) !important ;
91
- position : absolute;
92
- margin-left : calc (1vw - 13px );
93
- border : none !important ;
94
- padding-top : 1% ;
95
- padding-left : 3% !important ;
96
- padding-right : 3% !important ;
97
- padding-bottom : 1% !important ;
98
- line-height : inherit;
99
- height : 1.5vw ;
87
+ display : flex;
88
+ flex-direction : column;
89
+ justify-content : center;
90
+ align-items : center;
91
+ width : 30% ;
92
+ font-size : calc (1vw + 3px );
93
+ text-align : center;
94
+ height : 100% ;
100
95
}
101
96
97
+ .departureCancelled ,
98
+ .departureDelayed ,
102
99
.departureSev {
103
- background-color : purple !important ;
104
- color : white !important ;
105
- margin-top : calc (2vw + 2px );
100
+ margin : 0 ;
101
+ padding : 2px 0 ;
106
102
font-weight : bold;
103
+ color : white;
104
+ min-width : 100% ;
107
105
}
108
106
109
107
.departureCancelled {
110
- background-color : red !important ;
111
- color : white;
112
- font-weight : bold;
113
- margin-top : calc (0.5vw - 7px );
114
- z-index : 999 ;
108
+ background-color : red;
115
109
}
116
110
117
111
.departureDelayed {
118
112
background-color : # ff8503 ;
119
- color : white;
120
- font-weight : bold;
121
- margin-top : calc (0.5vw - 7px );
113
+ }
114
+
115
+ .departureSev {
116
+ background-color : purple;
122
117
}
123
118
124
119
.loading-container {
Original file line number Diff line number Diff line change @@ -473,31 +473,29 @@ function App() {
473
473
</ >
474
474
) }
475
475
< td key = { `departure-${ index } -${ destIndex } -${ depIndex } ` } className = 'right' >
476
- { departure . sev && (
477
- < div
478
- key = { `sev-${ index } -${ destIndex } -${ depIndex } ` }
479
- className = 'departureNested departureSev'
480
- >
481
- { TEXT_SEV }
482
- </ div >
483
- ) }
484
- { departure . cancelled && (
485
- < div
486
- key = { `cancelled-${ index } -${ destIndex } -${ depIndex } ` }
487
- className = 'departureNested departureCancelled blinking'
488
- >
489
- { TEXT_CANCELLED }
476
+ < div style = { { display : 'flex' , alignItems : 'center' } } >
477
+ < div className = 'departureNested' >
478
+ { departure . cancelled ? (
479
+ < div key = { `cancelled-${ index } -${ destIndex } -${ depIndex } ` } className = 'departureCancelled blinking' >
480
+ { TEXT_CANCELLED }
481
+ </ div >
482
+ ) : (
483
+ departure . delayInMinutes > 0 && (
484
+ < div key = { `delayed-${ index } -${ destIndex } -${ depIndex } ` } className = 'departureDelayed' >
485
+ { TEXT_DELAYED }
486
+ </ div >
487
+ )
488
+ ) }
489
+ { departure . sev && (
490
+ < div key = { `sev-${ index } -${ destIndex } -${ depIndex } ` } className = 'departureSev' >
491
+ { TEXT_SEV }
492
+ </ div >
493
+ ) }
490
494
</ div >
491
- ) }
492
- { ( departure . delayInMinutes > 0 && ! departure . cancelled ) && (
493
- < div
494
- key = { `delayed-${ index } -${ destIndex } -${ depIndex } ` }
495
- className = 'departureNested departureDelayed'
496
- >
497
- { TEXT_DELAYED }
495
+ < div style = { { marginLeft : 'auto' } } >
496
+ { calculateRemainingTime ( departure . realtimeDepartureTime ) }
498
497
</ div >
499
- ) }
500
- { calculateRemainingTime ( departure . realtimeDepartureTime ) }
498
+ </ div >
501
499
</ td >
502
500
</ tr >
503
501
) ) }
You can’t perform that action at this time.
0 commit comments