Fix: responsiveness
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Dorian Zedler 2022-08-02 10:17:05 +02:00
parent 07ce90c3e1
commit 57cd6dd86f
Signed by: dorian
GPG key ID: 989DE36109AFA354
2 changed files with 37 additions and 12 deletions

View file

@ -17,13 +17,39 @@ import { Context } from '../data/Context';
*/ */
export default function Header() { export default function Header() {
const { title, containerMaxWidth } = useContext(Context); const { title, containerMaxWidth } = useContext(Context);
const logoContainerStyle = {
textDecoration: 'none',
color: 'inherit',
margin: '0 0 0 0',
width: 'fit-content',
padding: '0 0 0 0 !important',
};
return ( return (
<AppBar position='sticky'> <AppBar position='sticky'>
<Container maxWidth={containerMaxWidth} className='header-container'> <Container maxWidth={containerMaxWidth} className='header-container'>
<Toolbar className='header-container'> <Toolbar className='header-container'>
<Link to='/' style={{ textDecoration: 'none', color: 'inherit' }}> <Container
<img src='/badge-white.png' className='header-icon'></img> sx={{
</Link> ...logoContainerStyle,
display: { xs: 'none', md: 'block' },
}}
>
<Link to='/'>
<img src='/badge-white.png' className='header-icon'></img>
</Link>
</Container>
<Container
sx={{
...logoContainerStyle,
display: { xs: 'block', md: 'none' },
}}
>
<Link to='/'>
<img src='/logo192.png' className='header-icon'></img>
</Link>
</Container>
<Typography variant='h6'>{title}</Typography> <Typography variant='h6'>{title}</Typography>
{title === '' && <Skeleton height={20} width={200}></Skeleton>} {title === '' && <Skeleton height={20} width={200}></Skeleton>}
</Toolbar> </Toolbar>

View file

@ -11,6 +11,7 @@ import {
Card, Card,
CardContent, CardContent,
Chip, Chip,
Container,
Grid, Grid,
Skeleton, Skeleton,
Typography, Typography,
@ -84,7 +85,9 @@ export default function SpeedFlowchartPage() {
container container
spacing={2} spacing={2}
direction={{ xs: 'column-reverse', md: 'row' }} direction={{ xs: 'column-reverse', md: 'row' }}
className='speed-flowchart-container' sx={{
height: { md: 'calc(100vh - 64px - 16px - 16px)' },
}}
> >
{flowchartResult?.rounds.map((round, roundKey) => ( {flowchartResult?.rounds.map((round, roundKey) => (
<Grid <Grid
@ -110,11 +113,11 @@ export default function SpeedFlowchartPage() {
direction={'column'} direction={'column'}
> >
{round.pairs.length === 2 && ( {round.pairs.length === 2 && (
<div <Container
style={{ sx={{
position: 'absolute', position: 'absolute',
width: '100%', width: '100%',
display: 'flex', display: { xs: 'none', md: 'flex' },
justifyContent: 'center', justifyContent: 'center',
}} }}
> >
@ -123,14 +126,10 @@ export default function SpeedFlowchartPage() {
logoImage={'/logo192.png'} logoImage={'/logo192.png'}
logoWidth={100} logoWidth={100}
logoHeight={100} logoHeight={100}
bgColor={theme.palette.background.default}
fgColor={theme.palette.text.secondary}
size={250} size={250}
ecLevel={'H'} ecLevel={'H'}
eyeRadius={5}
qrStyle={'dots'}
/> />
</div> </Container>
)} )}
{round.pairs.map((pair, pairKey) => ( {round.pairs.map((pair, pairKey) => (
<Grid key={`flowchart-column-${roundKey}-pair-${pairKey}`} item> <Grid key={`flowchart-column-${roundKey}-pair-${pairKey}`} item>