8 files changed
+57
-5
No files matched your search
+1
-1
@@ -24,7 +24,7 @@
|
|||||||
work correctly both with client-side routing and a non-root public URL.
|
work correctly both with client-side routing and a non-root public URL.
|
||||||
Learn how to configure a non-root public URL by running `npm run build`.
|
Learn how to configure a non-root public URL by running `npm run build`.
|
||||||
-->
|
-->
|
||||||
<title>React App</title>
|
<title>F1 World Broadcast Emulator Project</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { MockupBlock } from "../../Common/MockupBlock.styled";
|
import { MockupBlock } from "../../Common/MockupBlock.styled";
|
||||||
|
import VideoFeed from "../VideoFeed/VideoFeed";
|
||||||
import { LayoutGrid, LayoutGridItem } from "./styles";
|
import { LayoutGrid, LayoutGridItem } from "./styles";
|
||||||
|
|
||||||
type LayoutProps = {
|
type LayoutProps = {
|
||||||
@@ -16,9 +17,7 @@ export function Layout({ headerHeight }: LayoutProps) {
|
|||||||
</LayoutGridItem>
|
</LayoutGridItem>
|
||||||
|
|
||||||
<LayoutGridItem column={2} row={1} columnSpan={5} rowSpan={6} >
|
<LayoutGridItem column={2} row={1} columnSpan={5} rowSpan={6} >
|
||||||
<MockupBlock
|
<VideoFeed />
|
||||||
color="#c5c5c5"
|
|
||||||
>Video Feed</MockupBlock>
|
|
||||||
</LayoutGridItem>
|
</LayoutGridItem>
|
||||||
|
|
||||||
<LayoutGridItem column={1} row={7} rowSpan={3}>
|
<LayoutGridItem column={1} row={7} rowSpan={3}>
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
import { VideoFeedFrame, BackgroundImageDiv } from "./styles";
|
||||||
|
|
||||||
|
import bg from "../../../public/images/misc/bg-standin.jpg";
|
||||||
|
|
||||||
|
export default function VideoFeed() {
|
||||||
|
return <VideoFeedFrame centered>
|
||||||
|
<BackgroundImageDiv src={bg} />
|
||||||
|
</VideoFeedFrame>;
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from "./VideoFeed";
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
import styled, { css } from "styled-components";
|
||||||
|
|
||||||
|
type VideoFeedFrameProps = {
|
||||||
|
centered?: boolean,
|
||||||
|
};
|
||||||
|
export const VideoFeedFrame = styled.div<VideoFeedFrameProps>`
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
background-color: ${p => p.theme.colors.videoFrameBG};
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
${({ centered = false }) => centered && css`
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
> div {
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
|
`}
|
||||||
|
`;
|
||||||
|
VideoFeedFrame.displayName = "VideoFeedFrame";
|
||||||
|
|
||||||
|
export const BackgroundImage = styled.img`
|
||||||
|
height: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
`;
|
||||||
|
BackgroundImage.displayName = "BackgroundImage";
|
||||||
|
|
||||||
|
type BackgroundImageDivProps = {
|
||||||
|
src: string,
|
||||||
|
}
|
||||||
|
export const BackgroundImageDiv = styled.div<BackgroundImageDivProps>`
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
background-image: ${({ src }) => `url("${src}")`};
|
||||||
|
background-size: contain;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: 0% 50%;
|
||||||
|
`;
|
||||||
|
BackgroundImageDiv.displayName = "BackgroundImageDiv";
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 487 KiB |
@@ -14,7 +14,7 @@ export default function Broadcast() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FullScreenContainer minHeight={728} minWidth={1200}>
|
<FullScreenContainer minHeight={700} minWidth={900}>
|
||||||
<RouteHeader ref={ref} title="Broadcast Page" />
|
<RouteHeader ref={ref} title="Broadcast Page" />
|
||||||
<Layout headerHeight={height} />
|
<Layout headerHeight={height} />
|
||||||
</FullScreenContainer>
|
</FullScreenContainer>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ export const theme = {
|
|||||||
blue: "#387af5",
|
blue: "#387af5",
|
||||||
pink: "#eb57a3",
|
pink: "#eb57a3",
|
||||||
grey: "#aaa",
|
grey: "#aaa",
|
||||||
|
videoFrameBG: "#333",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user