-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feature] Crowding widget frontend (#1838)
* Added car svgs * Build out TrainCrowding frontend, with styles * Don't use Solari arrow -- not reliable sizing * Prettified! * Improved typing in train_crowding, backend bugfix * Rename closed car atom * Rebuilt the lookup table. Renamed vars in camelCase * Prettier + removed nested ternaries --------- Co-authored-by: Jon Zimbel <[email protected]>
- Loading branch information
1 parent
cd4f330
commit 927d5cc
Showing
33 changed files
with
758 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
.crowding-widget { | ||
&__header { | ||
display: flex; | ||
flex-direction: column; | ||
padding: 72px; | ||
height: 578px; | ||
background-color: #171f26; | ||
color: #e5e4e1; | ||
box-sizing: border-box; | ||
} | ||
&__body { | ||
display: flex; | ||
flex-direction: column; | ||
height: 920px; | ||
background-color: #d9d6d0; | ||
box-shadow: 0px 8px 12px 0px rgba(0, 0, 0, 0.32); | ||
} | ||
&__footer { | ||
display: flex; | ||
background-color: #cccbc8; | ||
height: 422px; | ||
} | ||
} | ||
|
||
.crowding-widget__header__top-row { | ||
display: flex; | ||
|
||
.t-logo { | ||
padding: 4px; | ||
} | ||
|
||
.normal-header-time { | ||
@include font--body-2; | ||
margin-left: auto; | ||
} | ||
} | ||
|
||
.crowding-widget__header__destination-sentence { | ||
@include font--heading-3; | ||
margin-top: auto; | ||
.destination { | ||
padding-left: 109px; | ||
} | ||
} | ||
|
||
.crowding-widget__footer__segment { | ||
@include font--body-1; | ||
padding: 71px 72px; | ||
flex: 1 1; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
} | ||
|
||
.crowding-widget__footer__key-row { | ||
@include font--body-2; | ||
display: inline-flex; | ||
align-items: center; | ||
.key-icon { | ||
padding-right: 72px; | ||
} | ||
} | ||
|
||
.crowding-widget__train-row { | ||
display: flex; | ||
justify-content: space-between; | ||
padding: 161px 52px 58px 52px; | ||
} | ||
|
||
@keyframes up-arrow { | ||
from { | ||
transform: translateY(0); | ||
} | ||
50% { | ||
transform: translateY(-20px); | ||
} | ||
to { | ||
transform: translateY(0); | ||
} | ||
} | ||
|
||
@keyframes up-left-arrow { | ||
from { | ||
transform: translateY(0); | ||
} | ||
50% { | ||
transform: translateY(-12px) translateX(-12px); | ||
} | ||
to { | ||
transform: translateY(0); | ||
} | ||
} | ||
|
||
@keyframes up-right-arrow { | ||
from { | ||
transform: translateY(0) rotate(90deg); | ||
} | ||
50% { | ||
transform: translateY(-12px) translateX(12px) rotate(90deg); | ||
} | ||
to { | ||
transform: translateY(0) rotate(90deg); | ||
} | ||
} | ||
|
||
.crowding-widget__you-are-here-arrow { | ||
width: 180px; | ||
height: 180px; | ||
&--up { | ||
animation: up-arrow 1.2s infinite ease-in-out; | ||
} | ||
&--up-left { | ||
animation: up-left-arrow 1.2s infinite ease-in-out; | ||
} | ||
&--up-right { | ||
animation: up-right-arrow 1.2s infinite ease-in-out; | ||
} | ||
} | ||
|
||
.crowding-widget__you-are-here-text { | ||
@include font--subtitle; | ||
width: 1080px; | ||
box-sizing: border-box; | ||
margin-top: auto; | ||
padding: 0 72px 108px 72px; | ||
text-align: left; | ||
&--right-align { | ||
text-align: right; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.full-screen { | ||
width: 3240px; | ||
height: 1920px; | ||
margin-left: auto; | ||
margin-right: auto; | ||
position: relative; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from "react"; | ||
|
||
import Widget, { WidgetData } from "Components/v2/widget"; | ||
|
||
interface Props { | ||
full_screen: WidgetData; | ||
} | ||
|
||
const FullScreen: React.ComponentType<Props> = ({ | ||
full_screen: fullScreen, | ||
}) => { | ||
return ( | ||
<div className="full-screen"> | ||
<Widget data={fullScreen} /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default FullScreen; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.