diff --git a/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/blue-side-banner.png b/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/blue-side-banner.png new file mode 100644 index 00000000..0557d844 Binary files /dev/null and b/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/blue-side-banner.png differ diff --git a/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/blue-top-banner.png b/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/blue-top-banner.png new file mode 100644 index 00000000..65efe565 Binary files /dev/null and b/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/blue-top-banner.png differ diff --git a/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/blue-win-banner.png b/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/blue-win-banner.png new file mode 100644 index 00000000..293de580 Binary files /dev/null and b/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/blue-win-banner.png differ diff --git a/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/fg-logo-lg.png b/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/fg-logo-lg.png new file mode 100644 index 00000000..bac398e2 Binary files /dev/null and b/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/fg-logo-lg.png differ diff --git a/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/fg-logo-md.png b/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/fg-logo-md.png new file mode 100644 index 00000000..95dfb3e2 Binary files /dev/null and b/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/fg-logo-md.png differ diff --git a/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/global-bg.png b/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/global-bg.png new file mode 100644 index 00000000..bfc0a5b8 Binary files /dev/null and b/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/global-bg.png differ diff --git a/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/red-side-banner.png b/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/red-side-banner.png new file mode 100644 index 00000000..48ec1258 Binary files /dev/null and b/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/red-side-banner.png differ diff --git a/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/red-top-banner.png b/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/red-top-banner.png new file mode 100644 index 00000000..d8cf315c Binary files /dev/null and b/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/red-top-banner.png differ diff --git a/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/red-win-banner.png b/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/red-win-banner.png new file mode 100644 index 00000000..764e94bd Binary files /dev/null and b/front-end/src/apps/audience-display/displays/seasons/fgc_default/assets/red-win-banner.png differ diff --git a/front-end/src/apps/audience-display/displays/seasons/fgc_default/components/alliance-preview.tsx b/front-end/src/apps/audience-display/displays/seasons/fgc_default/components/alliance-preview.tsx new file mode 100644 index 00000000..6ac1c22f --- /dev/null +++ b/front-end/src/apps/audience-display/displays/seasons/fgc_default/components/alliance-preview.tsx @@ -0,0 +1,95 @@ +import styled from '@emotion/styled'; +import { FC } from 'react'; +import RED_BANNER from '../assets/red-side-banner.png'; +import BLUE_BANNER from '../assets/blue-side-banner.png'; +import { + Alliance, + BLUE_STATION, + MatchParticipant, + Ranking, + Team +} from '@toa-lib/models'; +import { CountryFlag } from './country-flag'; + +const Container = styled.div` + width: 100%; + height: 100%; + display: flex; + flex-direction: row; +`; + +const Banner = styled.img` + width: auto; + height: 100%; +`; + +const AllianceContainer = styled.div((props: { size: number }) => ({ + width: '100%', + height: '100%', + 'background-color': '#ffffff', + display: 'grid', + 'grid-template-rows': `repeat(${props.size}, 1fr)` +})); + +const TeamContainer = styled.div` + border-bottom: 3px solid #cacaca; + font-weight: bold; + font-size: 3vh; + gap: 16px; + padding-left: 16px; + padding-right: 16px; + display: flex; + align-items: center; +`; + +const CountryText = styled.div` + width: 5vw; +`; + +const RankText = styled.div` + margin-left: auto; +`; + +interface AllianceTeamProps { + team: Team; + rank?: Ranking; +} + +const AllianceTeam: FC = ({ team, rank }) => { + return ( + + + [{team.country}] +
{team.teamNameLong}
+ {rank && #{rank.rank}} +
+ ); +}; + +interface Props { + alliance: Alliance; + participants: MatchParticipant[]; + ranks: Ranking[]; +} + +export const AlliancePreview: FC = ({ + alliance, + participants, + ranks +}) => { + const allianceParticipants = participants.filter((p) => + alliance === 'red' ? p.station < BLUE_STATION : p.station >= BLUE_STATION + ); + return ( + + + + {allianceParticipants.map((p) => { + const rank = ranks.find((r) => r.teamKey === p.teamKey); + if (!p.team) return null; + return ; + })} + + + ); +}; diff --git a/front-end/src/apps/audience-display/displays/seasons/fgc_default/components/country-flag.tsx b/front-end/src/apps/audience-display/displays/seasons/fgc_default/components/country-flag.tsx new file mode 100644 index 00000000..d9eb8603 --- /dev/null +++ b/front-end/src/apps/audience-display/displays/seasons/fgc_default/components/country-flag.tsx @@ -0,0 +1,14 @@ +import styled from '@emotion/styled'; +import { FC } from 'react'; + +interface Props { + cc: string; +} + +const Flag = styled.div` + background-color: #000000; +`; + +export const CountryFlag: FC = ({ cc }) => { + return ; +}; diff --git a/front-end/src/apps/audience-display/displays/seasons/fgc_default/components/info-bar.tsx b/front-end/src/apps/audience-display/displays/seasons/fgc_default/components/info-bar.tsx new file mode 100644 index 00000000..9ea085bb --- /dev/null +++ b/front-end/src/apps/audience-display/displays/seasons/fgc_default/components/info-bar.tsx @@ -0,0 +1,44 @@ +import styled from '@emotion/styled'; +import { FC } from 'react'; + +const Container = styled.div` + background-color: #ffffff; + width: 16vw; + height: 5vh; + display: flex; + justify-content: center; + align-items: center; + font-weight: bold; + font-size: 2vw; +`; + +const LeftText = styled.div` + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + background-color: #cacaca; +`; + +const RightText = styled.div` + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; +`; + +interface Props { + left: string | number; + right: string | number; +} + +export const InfoBar: FC = ({ left, right }) => { + return ( + + {left.toString().toUpperCase()} + {right.toString()} + + ); +}; diff --git a/front-end/src/apps/audience-display/displays/seasons/fgc_default/match-preview.tsx b/front-end/src/apps/audience-display/displays/seasons/fgc_default/match-preview.tsx index d0ba08c6..d17d4529 100644 --- a/front-end/src/apps/audience-display/displays/seasons/fgc_default/match-preview.tsx +++ b/front-end/src/apps/audience-display/displays/seasons/fgc_default/match-preview.tsx @@ -1,6 +1,69 @@ import { FC } from 'react'; import { DisplayProps } from '../../displays'; +import styled from '@emotion/styled'; +import FGC_BG from './assets/global-bg.png'; +import FGC_LOGO from './assets/fg-logo-lg.png'; +import { InfoBar } from './components/info-bar'; +import { AlliancePreview } from './components/alliance-preview'; -export const MatchPreview: FC = () => { - return
FGC Match Preview
; +const Container = styled.div` + background-image: url(${FGC_BG}); + background-size: cover; + width: 100vw; + height: 100vh; + overflow: hidden; + display: grid; + grid-template-rows: 20vh 7vh 30vh 30vh; + grid-template-areas: + 'logo' + 'info' + 'red' + 'blue'; + row-gap: 2vh; + padding: 3vh 20vw; +`; + +const LogoContainer = styled.div` + grid-area: logo; + height: 100%; + width: 100%; + text-align: center; +`; + +const Logo = styled.img` + max-height: 100%; + width: auto; +`; + +const InfoContainer = styled.div` + grid-area: info; + display: flex; + justify-content: space-evenly; + align-items: center; +`; + +export const MatchPreview: FC = ({ match, ranks }) => { + const matchParts = match.name.split(' '); + const matchNumber = matchParts[matchParts.length - 1]; + return ( + + + + + + + + + + + + ); };