|
| 1 | +@import '~styles/utils/modules-entry'; |
| 2 | + |
| 3 | +// Colors from https://material.io/design/color/ |
| 4 | +$route-colors: ( |
| 5 | + A: #e53935, |
| 6 | + B: #8e24aa, |
| 7 | + C: #1e88e5, |
| 8 | + D: #558b2f, |
| 9 | + BTC: #6d4c41, |
| 10 | +); |
| 11 | + |
| 12 | +.iconWrapper { |
| 13 | + $color: #0092da; |
| 14 | + |
| 15 | + .hitArea { |
| 16 | + opacity: 0; |
| 17 | + width: 100%; |
| 18 | + height: 100%; |
| 19 | + border-radius: 50%; |
| 20 | + background: rgba($color, 0.3); |
| 21 | + box-shadow: 0 0 8px rgba($color, 0.3); |
| 22 | + transition: opacity 0.25s; |
| 23 | + |
| 24 | + // Highlight the bus stops when editing |
| 25 | + &.editing { |
| 26 | + opacity: 1; |
| 27 | + border: 1px solid #000; |
| 28 | + background: rgba(#000, 0.3); |
| 29 | + } |
| 30 | + } |
| 31 | + |
| 32 | + &:hover .hitArea { |
| 33 | + opacity: 1; |
| 34 | + } |
| 35 | + |
| 36 | + .routeWrapper { |
| 37 | + position: absolute; |
| 38 | + top: 6px; |
| 39 | + left: calc(100% - 4px); |
| 40 | + width: 100px; |
| 41 | + line-height: 1.3; |
| 42 | + pointer-events: none; // So the entire 100px width will not be selectable when there's only one route |
| 43 | + |
| 44 | + &.left { |
| 45 | + right: calc(100% - 4px); |
| 46 | + left: auto; |
| 47 | + text-align: right; |
| 48 | + } |
| 49 | + } |
| 50 | + |
| 51 | + .route { |
| 52 | + display: inline-block; |
| 53 | + padding: 2px 3px; |
| 54 | + margin-right: 4px; |
| 55 | + border-radius: 1px; |
| 56 | + font-weight: bold; |
| 57 | + font-size: 9px; |
| 58 | + line-height: 1; |
| 59 | + color: #fff; |
| 60 | + pointer-events: auto; |
| 61 | + } |
| 62 | +} |
| 63 | + |
| 64 | +// Popup styles |
| 65 | +.heading { |
| 66 | + margin-bottom: 0.5rem; |
| 67 | + font-weight: bold; |
| 68 | + font-size: 0.9rem; |
| 69 | +} |
| 70 | + |
| 71 | +.timings { |
| 72 | + margin-bottom: 0.2rem; |
| 73 | + |
| 74 | + td { |
| 75 | + font-size: 0.85rem; |
| 76 | + white-space: nowrap; |
| 77 | + |
| 78 | + strong { |
| 79 | + color: theme-color(success); |
| 80 | + } |
| 81 | + } |
| 82 | + |
| 83 | + .routeHeading { |
| 84 | + vertical-align: middle; |
| 85 | + color: #fff; |
| 86 | + } |
| 87 | +} |
| 88 | + |
| 89 | +.refreshBtn { |
| 90 | + width: 100%; |
| 91 | + padding: 3px 0; |
| 92 | + |
| 93 | + .refreshIcon { |
| 94 | + margin-right: 0.6rem; |
| 95 | + |
| 96 | + :global { |
| 97 | + animation: spin 2s infinite linear paused; |
| 98 | + } |
| 99 | + } |
| 100 | + |
| 101 | + &.isLoading .refreshIcon { |
| 102 | + animation-play-state: running; |
| 103 | + } |
| 104 | +} |
| 105 | + |
| 106 | +// Define a color for each route |
| 107 | +.routeA1 { |
| 108 | + background: map-get($route-colors, 'A'); |
| 109 | +} |
| 110 | + |
| 111 | +.routeA2 { |
| 112 | + background: darken(map-get($route-colors, 'A'), 12); |
| 113 | +} |
| 114 | + |
| 115 | +.routeB1 { |
| 116 | + background: map-get($route-colors, 'B'); |
| 117 | +} |
| 118 | + |
| 119 | +.routeB2 { |
| 120 | + background: lighten(map-get($route-colors, 'B'), 15); |
| 121 | +} |
| 122 | + |
| 123 | +.routeC { |
| 124 | + background: map-get($route-colors, 'C'); |
| 125 | +} |
| 126 | + |
| 127 | +.routeD1 { |
| 128 | + background: map-get($route-colors, 'D'); |
| 129 | +} |
| 130 | + |
| 131 | +.routeD2 { |
| 132 | + background: lighten(map-get($route-colors, 'D'), 10); |
| 133 | +} |
| 134 | + |
| 135 | +.routeBTC1 { |
| 136 | + background: map-get($route-colors, 'BTC'); |
| 137 | +} |
| 138 | + |
| 139 | +.routeBTC2 { |
| 140 | + background: lighten(map-get($route-colors, 'BTC'), 15); |
| 141 | +} |
0 commit comments