From 1dc8e8bc1519e0b791e28efb4e935ad97e89826d Mon Sep 17 00:00:00 2001 From: Kyle Geib Date: Tue, 25 Jan 2022 13:32:31 -0500 Subject: [PATCH] ISSUE-031 - Improvements to the look of National Flag. Adjusted the sizing and spacing to better support larger chyron heights. --- .../Chyrons/Driver/ChyronDriver.tsx | 7 +++--- .../Chyrons/Driver/styles.ts | 3 ++- .../Common/AngledFlag/styles.ts | 24 +++++++------------ .../CustomWorkSpaces/AngledFlagWorkSpace.tsx | 2 +- 4 files changed, 15 insertions(+), 21 deletions(-) diff --git a/src/components/BroadcastGraphics/Chyrons/Driver/ChyronDriver.tsx b/src/components/BroadcastGraphics/Chyrons/Driver/ChyronDriver.tsx index 62c6fdf..c0c223d 100644 --- a/src/components/BroadcastGraphics/Chyrons/Driver/ChyronDriver.tsx +++ b/src/components/BroadcastGraphics/Chyrons/Driver/ChyronDriver.tsx @@ -20,7 +20,6 @@ import { theme } from "../../../../shared/theme"; export function ChyronDriver() { // TODO - Get driver details from Redux. const driver = drivers["hamilton"]; - const baseWidth = 582; const baseHeight = 72; @@ -49,14 +48,14 @@ export function ChyronDriver() { - ); diff --git a/src/components/BroadcastGraphics/Chyrons/Driver/styles.ts b/src/components/BroadcastGraphics/Chyrons/Driver/styles.ts index 2463aa7..48b46c3 100644 --- a/src/components/BroadcastGraphics/Chyrons/Driver/styles.ts +++ b/src/components/BroadcastGraphics/Chyrons/Driver/styles.ts @@ -121,10 +121,11 @@ Spacer.displayName = "Spacer"; type FlagContainerProps = { height: Px, width: Px, + right: Px, }; export const FlagContainer = styled.div` position: absolute; - right: -65px; + right: ${({ right }) => `${right}px`}; display: flex; align-items: center; diff --git a/src/components/BroadcastGraphics/Common/AngledFlag/styles.ts b/src/components/BroadcastGraphics/Common/AngledFlag/styles.ts index caad24d..796e178 100644 --- a/src/components/BroadcastGraphics/Common/AngledFlag/styles.ts +++ b/src/components/BroadcastGraphics/Common/AngledFlag/styles.ts @@ -24,6 +24,7 @@ export const Container = styled.div` transparent 100% ); `; +Container.displayName = "Container"; type NationalFlagProps = { height: Px, @@ -31,21 +32,14 @@ type NationalFlagProps = { export const NationalFlag = styled.img` max-inline-size: unset; height: ${({ height }) => `${height}px`}; - clip-path: polygon(50% 0, 100% 0, 100% 30%, 60% 100%, 0 100%, 0 100%); + clip-path: polygon(50% 0, 100% 0, 100% 30%, 66% 100%, 0 100%, 0 100%); mask-image: linear-gradient( - to right, + 60deg, transparent 0%, black 15%, black 85%, transparent 100% ); - mask-image: radial-gradient( - circle at center, - black 0%, - black 80%, - transparent 96%, - transparent 100% - ); `; NationalFlag.displayName = "NationalFlag"; @@ -60,19 +54,19 @@ export const Sheen = styled.div` width: ${({ girth }) => `${girth}px`}; background: linear-gradient( - to top, - transparent 0%, - transparent 20%, + 25deg, + black 0%, + black 25%, rgba(255, 255, 255, 0.15) 45%, rgba(255, 255, 255, 0.15) 55%, - transparent 80%, - transparent 100% + black 75%, + black 100% ); font-size: ${({ height }) => `${height}px`}; // Hack to let me use em. box-shadow: 0.02em 0 0.005em 0.015em rgba(0, 0, 0, 0.2), - 1em 0 0 1em rgba(0, 0, 0, 0.1); + 1em 0 0 1em rgba(0, 0, 0, 0.5); transform: skew(-45deg, 0deg) translateX(${({ x }) => `${x}px`}); border-left: 0.015em solid rgba(255, 255, 255, 0.25); diff --git a/src/components/Workspaces/CustomWorkSpaces/AngledFlagWorkSpace.tsx b/src/components/Workspaces/CustomWorkSpaces/AngledFlagWorkSpace.tsx index 454b880..3fce2ad 100644 --- a/src/components/Workspaces/CustomWorkSpaces/AngledFlagWorkSpace.tsx +++ b/src/components/Workspaces/CustomWorkSpaces/AngledFlagWorkSpace.tsx @@ -6,7 +6,7 @@ export function AngledFlagWorkSpace() {