diff --git a/src/components/Results/Results.tsx b/src/components/Results/Results.tsx
index 595df33d..2d92e0b8 100644
--- a/src/components/Results/Results.tsx
+++ b/src/components/Results/Results.tsx
@@ -37,7 +37,14 @@ export const Results: FC = () => {
return (
{resultsIsLoading && }
-
+
{results.map((result, index) => (
))}
diff --git a/src/components/Results/ResultsRow.tsx b/src/components/Results/ResultsRow.tsx
index a32f443e..3d2b2dad 100644
--- a/src/components/Results/ResultsRow.tsx
+++ b/src/components/Results/ResultsRow.tsx
@@ -1,4 +1,4 @@
-import {Box, Stack, Typography} from '@mui/material'
+import {Box, Stack, Theme, Typography, useMediaQuery} from '@mui/material'
import Tooltip from '@mui/material/Tooltip'
import {FC} from 'react'
@@ -42,9 +42,11 @@ export interface Result {
export const ResultsRow: FC<{result: Result}> = ({result}) => {
const {solutions, rank_changed, rank_start, registration, subtotal, total} = result
+ const smUp = useMediaQuery((theme) => theme.breakpoints.up('sm'))
+
return (
// `display: 'contents'` je taka HTML verzia fragmentu - tento div sa v strukture nepocita pre ucely parent gridu,
- // miesto toho sa pouzivaju jednotlive children. preto aj hover tu targetuje children divy, lebo parent v podstate nema velkost
+ // miesto toho sa pouzivaju jednotlive children. preto aj hover tu targetuje children divy, lebo parent v podstate nema velkost.
// takisto `justifyContent: 'center'` je na vsetkych elementoch osobitne
div': {bgcolor: 'black', color: 'white'}}}>
= ({result}) => {
pl: 1,
}}
>
-
- {rank_changed && rank_start + '.'}
-
+ {rank_changed && rank_start + '.'}
-
-
+
+
{registration.profile.first_name + ' ' + registration.profile.last_name}
-
- {registration.school.name + ' ' + registration.school.street + ' ' + registration.school.city}
+
+ {smUp
+ ? `${registration.school.name} ${registration.school.street} ${registration.school.city}`
+ : registration.school.abbreviation}
-
+ {/* reused resultsName font */}
+
{registration.grade.tag}
-
+
{solutions.map((series, index) => (
{series.map((solution, index) => (
-
+
{solution.points}
))}
-
+
{subtotal[index]}
@@ -95,9 +106,7 @@ export const ResultsRow: FC<{result: Result}> = ({result}) => {
pr: 1,
}}
>
-
- {total}
-
+ {total}
diff --git a/src/theme.ts b/src/theme.ts
index c02adc28..b8a58c65 100644
--- a/src/theme.ts
+++ b/src/theme.ts
@@ -12,6 +12,11 @@ declare module '@mui/material/styles' {
postTitle: React.CSSProperties
postBody: React.CSSProperties
postDate: React.CSSProperties
+ resultsOrder: React.CSSProperties
+ resultsName: React.CSSProperties
+ resultsSchool: React.CSSProperties
+ resultsScore: React.CSSProperties
+ resultsTotal: React.CSSProperties
}
// allow configuration using `createTheme`
@@ -24,6 +29,11 @@ declare module '@mui/material/styles' {
postTitle?: React.CSSProperties
postBody?: React.CSSProperties
postDate?: React.CSSProperties
+ resultsOrder?: React.CSSProperties
+ resultsName?: React.CSSProperties
+ resultsSchool?: React.CSSProperties
+ resultsScore?: React.CSSProperties
+ resultsTotal?: React.CSSProperties
}
}
@@ -38,6 +48,11 @@ declare module '@mui/material/Typography' {
postTitle: true
postBody: true
postDate: true
+ resultsOrder: true
+ resultsName: true
+ resultsSchool: true
+ resultsScore: true
+ resultsTotal: true
// disable these variants
h4: false
h5: false
@@ -146,6 +161,30 @@ const _theme = createTheme({
textTransform: 'uppercase',
fontWeight: 300,
},
+ resultsOrder: {
+ ...font.style,
+ fontWeight: 800,
+ fontStyle: 'italic',
+ },
+ resultsName: {
+ ...font.style,
+ textTransform: 'uppercase',
+ fontWeight: 800,
+ fontStyle: 'italic',
+ },
+ resultsSchool: {
+ ...font.style,
+ fontWeight: 400,
+ },
+ resultsScore: {
+ ...font.style,
+ fontWeight: 400,
+ },
+ resultsTotal: {
+ ...font.style,
+ fontWeight: 800,
+ fontStyle: 'italic',
+ },
},
components: {
MuiTypography: {
@@ -161,6 +200,11 @@ const _theme = createTheme({
postTitle: 'h1',
postBody: 'span',
postDate: 'span',
+ resultsOrder: 'span',
+ resultsName: 'span',
+ resultsSchool: 'span',
+ resultsScore: 'span',
+ resultsTotal: 'span',
},
},
},
@@ -335,5 +379,50 @@ export const theme: Theme = {
[xl]: {fontSize: pxToRem(20)},
lineHeight: 1.5,
},
+ resultsOrder: {
+ ..._theme.typography.resultsOrder,
+ fontSize: pxToRem(20), // design
+ [sm]: {fontSize: pxToRem(26)},
+ [md]: {fontSize: pxToRem(26)},
+ [lg]: {fontSize: pxToRem(32)},
+ [xl]: {fontSize: pxToRem(48)}, // design
+ lineHeight: 1.5,
+ },
+ resultsName: {
+ ..._theme.typography.resultsName,
+ fontSize: pxToRem(11), // design
+ [sm]: {fontSize: pxToRem(16)},
+ [md]: {fontSize: pxToRem(20)},
+ [lg]: {fontSize: pxToRem(24)},
+ [xl]: {fontSize: pxToRem(30)}, // design
+ lineHeight: 1.5,
+ },
+ resultsSchool: {
+ ..._theme.typography.resultsSchool,
+ fontSize: pxToRem(10), // design
+ [sm]: {fontSize: pxToRem(11)},
+ [md]: {fontSize: pxToRem(12)},
+ [lg]: {fontSize: pxToRem(13)},
+ [xl]: {fontSize: pxToRem(14)}, // design
+ lineHeight: 1.5,
+ },
+ resultsScore: {
+ ..._theme.typography.resultsScore,
+ fontSize: pxToRem(10), // design
+ [sm]: {fontSize: pxToRem(12)},
+ [md]: {fontSize: pxToRem(14)},
+ [lg]: {fontSize: pxToRem(16)},
+ [xl]: {fontSize: pxToRem(18)}, // design
+ lineHeight: 1.5,
+ },
+ resultsTotal: {
+ ..._theme.typography.resultsTotal,
+ fontSize: pxToRem(20), // design
+ [sm]: {fontSize: pxToRem(22)},
+ [md]: {fontSize: pxToRem(24)},
+ [lg]: {fontSize: pxToRem(26)},
+ [xl]: {fontSize: pxToRem(30)}, // design
+ lineHeight: 1.5,
+ },
},
}