Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Pre-fare alert 2.0 frontend left screen #1787

Merged
Merged
2 changes: 2 additions & 0 deletions assets/css/pre_fare_v2.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
@import "v2/pre_fare/flex/paging_indicator";
@import "v2/pre_fare/full_line_map";
@import "v2/pre_fare/reconstructed_alert";
@import "v2/pre_fare/alert-banner";
@import "v2/pre_fare/prefare_single_screen_alert";
@import "v2/pre_fare/free_text";
@import "v2/pre_fare/shuttle_bus_info";

Expand Down
56 changes: 56 additions & 0 deletions assets/css/v2/pre_fare/alert-banner.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
.alert-banner {
font-family: Inter;
width: 100%;
font-size: 60px;
line-height: 72px;
font-weight: 600;
filter: drop-shadow(0px 30px 20px rgba(0, 0, 0, 0.25));

display: flex;
flex-wrap: wrap;

/* Background colors */
&--blue {
background-color: #B3C5E4;
}

&--red {
background-color: #F4BFBB;
}

&--orange {
background-color: #FADCB3;
}

&--yellow {
background-color: #FFF7BF;
}

&--green {
background-color: #B3DAC5;
}
}

.alert-banner__attention-text {
font-weight: 700;
}

.alert-banner__route-pill--short {
margin: 0 20px;
height: 96px;
}

.alert-banner__route-pill--long {
margin: 16.2px 0 .8px 0;
}

.alert-banner--large--two-routes {
padding: 31px 65px 42px 65px;
}
.alert-banner--large--one-route {
padding: 86px 74px 102px 74px;
}
.alert-banner--small {
padding: 64px 65px;
align-items: center;
}
182 changes: 182 additions & 0 deletions assets/css/v2/pre_fare/prefare_single_screen_alert.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
@mixin large-text {
font-size: 112px;
line-height: 120px;
font-weight: 700;
}

@mixin small-text {
font-size: 35px;
line-height: 42px;
font-weight: 600;
}

.pre-fare-alert__page {
display: flex;
flex-direction: column;
height: 100%;
}

.alert-container--single-page {
font-family: Inter;
flex-grow: 1;
min-height: 0;
width: 1080px;
padding: 0 32px 32px 32px;
box-sizing: border-box;

/* Alert contents */
.alert-card {
height: 100%;
display: flex;
flex-direction: column;
border-radius: 4px;
box-shadow: 0px 10px 20px 0px rgba(23, 31, 38, 0.25);
background-color: #E5E4E1;
}

.alert-card__body {
min-height: 0;
flex-grow: 1;
padding: 120px 56px 32px 56px;
box-sizing: border-box;
}

.alert-card__issue, .alert-card__remedy {
display: flex;
}
.alert-card__issue {
margin-bottom: 48px;
}
.alert-card__remedy {
margin-bottom: 32px;
&__text {
font-size: 74px;
font-weight: 600;
align-self: center;
}
}

.alert-card__issue__location {
@include small-text();
margin-top: 40px;
}

.alert-card__remedy__shuttle-icons {
display: flex;
flex-direction: column;
}

.alert-card__icon {
color: #171F26;
height: 124px;
min-width: 124px;
margin-right: 45px;
}

.alert-card__content-block__text {
font-weight: 700;
&--large {
@include large-text();
}
&--medium {
font-size: 86.4px;
line-height: 95px;
}
}

.alert-card__content-block--downstream {
.alert-card__content-block__text {
line-height: 108px;
}
}

.alert-card__pio-text__icon {
height: 192px;
color: #171F26;
margin-bottom: 48px;
}
.alert-card__pio-text__main-text {
font-size: 88px;
line-height: 105.6px;
font-weight: 700;
margin-bottom: 54px;
}
.alert-card__pio-text__secondary-text {
font-size: 68px;
line-height: 81px;
font-weight: 500;
&--small {
font-size: 55.1px;
line-height: 65.63px;
}
}

.alert-card__body__accessibility-info {
&--text {
margin-top: 22px;
@include small-text()
}
}

.alert-card__isa-icon {
height: 40px;
margin: auto 45px 0 auto;
}

.alert-card__footer {
flex-shrink: 0;
background: #CCCBC8;
border-radius: 0px 0px 4px 4px;
height: 84px;
display: flex;
align-items: center;
box-sizing: border-box;
padding: 20px 60px;
font-size: 32px;
}
.alert-card__footer__cause {
flex-grow: 1;
}
.alert-card__footer__datetime {
font-weight: 600;
}
}

.alert-container--right {
position: absolute;
top: 0;
left: 1080px;
}

.alert-card__content-block__route-pill {
height: 124px;
display: inline;
vertical-align: bottom;
margin-right: 9px;
&:last-of-type {
margin-right: 46px;
}
}

.alert-container--single-page {
/* Background colors */
&.alert-container--blue {
background-color: $line-color-blue;
}

&.alert-container--red {
background-color: $line-color-red;
}

&.alert-container--orange {
background-color: $line-color-orange;
}

&.alert-container--yellow {
background-color: $alert-yellow;
}

&.alert-container--green {
background-color: $line-color-green;
}
}
4 changes: 4 additions & 0 deletions assets/src/apps/v2/pre_fare.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ import SimulationScreenPage from "Components/v2/simulation_screen_page";
import SurgeBodyRight from "Components/v2/pre_fare/surge_body_right";
import ShuttleBusInfo from "Components/v2/shuttle_bus_info";
import BlueBikes from "Components/v2/blue_bikes";
import PreFareSingleScreenAlert from "Components/v2/pre_fare_single_screen_alert";

const TYPE_TO_COMPONENT = {
// Slots
screen_normal: NormalScreen,
screen_takeover: ScreenTakeover,
screen_split_takeover: ScreenSplitTakeover,
Expand All @@ -67,6 +69,7 @@ const TYPE_TO_COMPONENT = {
normal_header: NormalHeader,
one_large: OneLarge,
two_medium: TwoMedium,
// Widgets
placeholder: Placeholder,
evergreen_content: EvergreenContent,
elevator_status: ElevatorStatus,
Expand All @@ -75,6 +78,7 @@ const TYPE_TO_COMPONENT = {
no_data: NoData,
page_load_no_data: PageLoadNoData,
reconstructed_large_alert: ReconstructedAlert,
single_screen_alert: PreFareSingleScreenAlert,
reconstructed_takeover: ReconstructedTakeover,
cr_departures: CRDepartures,
overnight_cr_departures: OvernightCRDepartures,
Expand Down
Loading