Skip to content

Commit 16021cd

Browse files
Merge pull request #292 from oss-slu/Add-PixelStreaming-Theatre
Added pixel stream theatre and minor landing page fixes
2 parents 7e6b588 + b76020f commit 16021cd

File tree

4 files changed

+127
-17
lines changed

4 files changed

+127
-17
lines changed

frontend/src/App.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import FuzzyDashboard from './components/FuzzyDashboard';
77
import ReportDashboard from './components/ReportDashboard';
88
import LandingPage from './LandingPage';
99
import AboutUs from './pages/AboutUs';
10+
import Stream from './pages/Stream';
1011
import NavigationBar from './pages/NavigationBar';
1112
import Footer from './pages/Footer';
1213
import './styles.css';
@@ -27,6 +28,7 @@ function App() {
2728
<Route exact path='/report-dashboard' element={<ReportDashboard />} />
2829
<Route exact path='/' element={<LandingPage />} />
2930
<Route exact path='/aboutus' element={<AboutUs />} />
31+
<Route exact path='/stream' element={<Stream />} />
3032
<Route exact path='*' element={<NotFound />} />
3133
</Routes>
3234
<Footer />

frontend/src/LandingPage.jsx

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -141,23 +141,6 @@ export default function LandingPage() {
141141

142142
return (
143143
<div className={classes.landingPage}>
144-
<nav className={classes.nav}>
145-
<Link to='/' className={classes.siteTitle}></Link>
146-
<ul className={classes.navList}>
147-
<li className={classes.navListItem}>
148-
<Box component='span' onClick={handleAccordionToggle}></Box>
149-
150-
<Box component='span'>
151-
<Button
152-
className={classes.aboutLink}
153-
onClick={() => setOpen(true)}
154-
style={{ color: '#fff' }}
155-
></Button>
156-
</Box>
157-
</li>
158-
</ul>
159-
</nav>
160-
161144
<Box
162145
component="section"
163146
sx={{

frontend/src/pages/NavigationBar.jsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ function NavigationBar() {
104104
Simulation
105105
</Link>
106106
</li>
107+
<li className={classes.navListItem}>
108+
<Link to="/stream" className = {classes.navLink} style={{ textDecoration: location.pathname === "/stream" ? "underline" : "none" }}>
109+
Stream
110+
</Link>
111+
</li>
107112
<li className={classes.navListItem}>
108113
<Link to="/aboutus" className = {classes.navLink} style={{ textDecoration: location.pathname === "/aboutus" ? "underline" : "none" }}>
109114
About Us

frontend/src/pages/Stream.jsx

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
import React from 'react';
2+
import { Alert, Box, Chip, Container, Stack, Typography } from '@mui/material';
3+
import { makeStyles } from '@mui/styles';
4+
import LiveTvIcon from '@mui/icons-material/LiveTv';
5+
6+
const useStyles = makeStyles(() => ({
7+
page: {
8+
minHeight: '100vh',
9+
background: 'linear-gradient(180deg, #e0f2fe 0%, #f8fafc 100%)',
10+
padding: '2.5rem 1.25rem 4rem',
11+
position: 'relative',
12+
overflow: 'hidden',
13+
},
14+
heading: {
15+
color: '#0f172a',
16+
fontWeight: 800,
17+
},
18+
subheading: {
19+
color: '#475569',
20+
lineHeight: 1.6,
21+
},
22+
theatreFrame: {
23+
width: '100%',
24+
minHeight: 540,
25+
borderRadius: 24,
26+
border: '1px solid #dbeafe',
27+
background: 'linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%)',
28+
boxShadow: '0 4px 14px rgba(15, 23, 42, 0.06)',
29+
display: 'flex',
30+
alignItems: 'center',
31+
justifyContent: 'center',
32+
position: 'relative',
33+
overflow: 'hidden',
34+
'@media (max-width: 900px)': {
35+
minHeight: 390,
36+
},
37+
'@media (max-width: 600px)': {
38+
minHeight: 280,
39+
borderRadius: 18,
40+
},
41+
},
42+
scanLines: {
43+
position: 'absolute',
44+
inset: 0,
45+
background:
46+
'repeating-linear-gradient(0deg, rgba(148, 163, 184, 0.12) 0px, rgba(148, 163, 184, 0.12) 1px, transparent 1px, transparent 6px)',
47+
pointerEvents: 'none',
48+
},
49+
placeholderCard: {
50+
width: 'min(90%, 820px)',
51+
borderRadius: 18,
52+
background: '#ffffff',
53+
border: '1px solid #dbeafe',
54+
padding: '2.5rem 1.75rem',
55+
textAlign: 'center',
56+
boxShadow: '0 10px 24px rgba(15, 23, 42, 0.08)',
57+
zIndex: 2,
58+
'@media (max-width: 600px)': {
59+
padding: '1.5rem 1rem',
60+
},
61+
},
62+
icon: {
63+
fontSize: '3rem',
64+
color: '#1d4ed8',
65+
marginBottom: '0.8rem',
66+
},
67+
placeholderTitle: {
68+
color: '#0f172a',
69+
fontWeight: 700,
70+
marginBottom: '0.75rem',
71+
},
72+
placeholderText: {
73+
color: '#475569',
74+
lineHeight: 1.7,
75+
marginBottom: '1.25rem',
76+
},
77+
}));
78+
79+
function Stream() {
80+
const classes = useStyles();
81+
82+
return (
83+
<Box className={classes.page}>
84+
<Container maxWidth='lg'>
85+
<Stack spacing={0.5} sx={{ mb: 3 }}>
86+
<Typography variant='h4' component='h1' className={classes.heading}>
87+
Stream
88+
</Typography>
89+
<Typography className={classes.subheading}>
90+
View live Pixel Streaming output for your simulation runs. This player area will switch
91+
from offline placeholder to live feed when the stream service is connected.
92+
</Typography>
93+
</Stack>
94+
95+
<Box className={classes.theatreFrame}>
96+
<Box className={classes.scanLines} />
97+
<Box className={classes.placeholderCard}>
98+
<LiveTvIcon className={classes.icon} />
99+
<Typography variant='h5' component='h2' className={classes.placeholderTitle}>
100+
Stream Offline
101+
</Typography>
102+
<Typography className={classes.placeholderText}>
103+
Pixel Streaming is currently unavailable. Start the simulator and connect the stream
104+
backend to activate this player.
105+
</Typography>
106+
<Stack direction='row' spacing={1} justifyContent='center' sx={{ mb: 2 }}>
107+
<Chip label='Pixel Streaming' color='primary' variant='outlined' size='small' />
108+
<Chip label='Status: Offline' color='warning' variant='outlined' size='small' />
109+
</Stack>
110+
<Alert severity='info' variant='outlined' sx={{ textAlign: 'left' }}>
111+
When online, this area will render the simulator video stream in this same frame.
112+
</Alert>
113+
</Box>
114+
</Box>
115+
</Container>
116+
</Box>
117+
);
118+
}
119+
120+
export default Stream;

0 commit comments

Comments
 (0)