2024-02-05 10:10:02 +00:00
|
|
|
|
import { Box, Button, ButtonBase, Link, Paper, Typography, useTheme } from "@mui/material";
|
2023-12-16 14:55:56 +00:00
|
|
|
|
import { useUADevice } from "../../utils/hooks/useUADevice";
|
2024-02-02 14:35:02 +00:00
|
|
|
|
import { notReachable } from "../../utils/notReachable";
|
|
|
|
|
import YoutubeEmbedIframe from "./tools/YoutubeEmbedIframe";
|
2024-01-30 16:49:33 +00:00
|
|
|
|
|
2023-12-18 11:56:32 +00:00
|
|
|
|
import { NameplateLogo } from "@icons/NameplateLogo";
|
2024-01-30 16:49:33 +00:00
|
|
|
|
import { QuizStartpageAlignType, QuizStartpageType } from "@model/settingsData";
|
2024-02-02 14:35:02 +00:00
|
|
|
|
import { useQuizData } from "@utils/hooks/useQuizData";
|
|
|
|
|
import { quizThemes } from "@utils/themes/Publication/themePublication";
|
2024-02-05 10:10:02 +00:00
|
|
|
|
import { useRootContainerSize } from "../../contexts/RootContainerWidthContext";
|
2024-02-12 10:58:51 +00:00
|
|
|
|
import { setCurrentQuizStep } from "@stores/quizView";
|
2023-12-29 00:58:19 +00:00
|
|
|
|
|
2023-12-16 14:55:56 +00:00
|
|
|
|
|
2024-02-08 13:42:31 +00:00
|
|
|
|
export const StartPageViewPublication = () => {
|
2024-01-30 16:49:33 +00:00
|
|
|
|
const theme = useTheme();
|
2024-02-02 14:35:02 +00:00
|
|
|
|
const { settings } = useQuizData();
|
2024-01-30 16:49:33 +00:00
|
|
|
|
const { isMobileDevice } = useUADevice();
|
2024-02-05 10:10:02 +00:00
|
|
|
|
const isMobile = useRootContainerSize() < 650;
|
2024-02-13 22:45:27 +00:00
|
|
|
|
const isTablet = useRootContainerSize() < 800;
|
2023-12-29 00:58:19 +00:00
|
|
|
|
|
2024-01-30 16:49:33 +00:00
|
|
|
|
const handleCopyNumber = () => {
|
|
|
|
|
navigator.clipboard.writeText(settings.cfg.info.phonenumber);
|
|
|
|
|
};
|
2023-12-16 14:55:56 +00:00
|
|
|
|
|
2024-01-30 16:49:33 +00:00
|
|
|
|
const background =
|
|
|
|
|
settings.cfg.startpage.background.type === "image" ? (
|
|
|
|
|
settings.cfg.startpage.background.desktop ? (
|
2023-12-18 11:56:32 +00:00
|
|
|
|
<img
|
2024-01-30 16:49:33 +00:00
|
|
|
|
src={settings.cfg.startpage.background.desktop}
|
|
|
|
|
alt=""
|
|
|
|
|
style={{
|
|
|
|
|
width: "100%",
|
|
|
|
|
height: "100%",
|
|
|
|
|
objectFit: "cover",
|
|
|
|
|
overflow: "hidden",
|
|
|
|
|
}}
|
2023-12-18 11:56:32 +00:00
|
|
|
|
/>
|
2024-01-30 16:49:33 +00:00
|
|
|
|
) : null
|
|
|
|
|
) : settings.cfg.startpage.background.type === "video" ? (
|
|
|
|
|
settings.cfg.startpage.background.video ? (
|
|
|
|
|
<YoutubeEmbedIframe
|
|
|
|
|
videoUrl={settings.cfg.startpage.background.video}
|
|
|
|
|
containerSX={{
|
|
|
|
|
width:
|
|
|
|
|
settings.cfg.startpageType === "centered"
|
|
|
|
|
? "550px"
|
|
|
|
|
: settings.cfg.startpageType === "expanded"
|
|
|
|
|
? "100vw"
|
|
|
|
|
: "100%",
|
|
|
|
|
height:
|
|
|
|
|
settings.cfg.startpageType === "centered"
|
|
|
|
|
? "275px"
|
2024-02-08 13:42:31 +00:00
|
|
|
|
: "100%",
|
2024-01-30 16:49:33 +00:00
|
|
|
|
borderRadius: settings.cfg.startpageType === "centered" ? "10px" : "0",
|
|
|
|
|
overflow: "hidden",
|
|
|
|
|
"& iframe": {
|
|
|
|
|
width: "100%",
|
|
|
|
|
height: "100%",
|
|
|
|
|
transform:
|
|
|
|
|
settings.cfg.startpageType === "centered"
|
|
|
|
|
? ""
|
|
|
|
|
: settings.cfg.startpageType === "expanded"
|
|
|
|
|
? "scale(1.5)"
|
|
|
|
|
: "scale(2.4)",
|
|
|
|
|
},
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
) : null
|
|
|
|
|
) : null;
|
2023-12-29 00:58:19 +00:00
|
|
|
|
|
2024-01-05 17:00:30 +00:00
|
|
|
|
return (
|
2024-01-30 16:49:33 +00:00
|
|
|
|
<Paper
|
|
|
|
|
className="settings-preview-draghandle"
|
2024-01-05 17:00:30 +00:00
|
|
|
|
sx={{
|
2024-02-08 13:42:31 +00:00
|
|
|
|
height: "100%",
|
|
|
|
|
width: "100%",
|
2024-01-30 16:49:33 +00:00
|
|
|
|
background:
|
|
|
|
|
settings.cfg.startpageType === "expanded" && !isMobile
|
|
|
|
|
? settings.cfg.startpage.position === "left"
|
|
|
|
|
? "linear-gradient(90deg,#272626,transparent)"
|
|
|
|
|
: settings.cfg.startpage.position === "center"
|
|
|
|
|
? "linear-gradient(180deg,transparent,#272626)"
|
|
|
|
|
: "linear-gradient(270deg,#272626,transparent)"
|
|
|
|
|
: theme.palette.background.default,
|
|
|
|
|
|
|
|
|
|
color: settings.cfg.startpageType === "expanded" ? "white" : "black",
|
2024-01-05 17:00:30 +00:00
|
|
|
|
}}
|
|
|
|
|
>
|
2024-01-30 16:49:33 +00:00
|
|
|
|
<QuizPreviewLayoutByType
|
|
|
|
|
quizHeaderBlock={
|
|
|
|
|
<Box p={settings.cfg.startpageType === "standard" ? "" : "16px"}>
|
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
|
display: "flex",
|
|
|
|
|
alignItems: "center",
|
|
|
|
|
gap: "20px",
|
|
|
|
|
mb: "7px",
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{settings.cfg.startpage.logo && (
|
|
|
|
|
<img
|
|
|
|
|
src={settings.cfg.startpage.logo}
|
|
|
|
|
style={{
|
|
|
|
|
height: "37px",
|
|
|
|
|
maxWidth: "43px",
|
|
|
|
|
objectFit: "cover",
|
|
|
|
|
}}
|
|
|
|
|
alt=""
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
<Typography
|
|
|
|
|
sx={{
|
|
|
|
|
fontSize: "14px",
|
|
|
|
|
color: settings.cfg.startpageType === "expanded"
|
|
|
|
|
&& !isMobile ? "white" : theme.palette.text.primary
|
|
|
|
|
}}
|
|
|
|
|
>{settings.cfg.info.orgname}</Typography>
|
|
|
|
|
</Box>
|
|
|
|
|
<Link mb="16px" href={settings.cfg.info.site}>
|
2024-02-11 15:35:45 +00:00
|
|
|
|
<Typography
|
|
|
|
|
sx={{
|
|
|
|
|
fontSize: "16px",
|
|
|
|
|
color: theme.palette.primary.main,
|
|
|
|
|
overflow: "hidden",
|
|
|
|
|
textOverflow: "ellipsis",
|
|
|
|
|
whiteSpace: "nowrap",
|
2024-02-13 22:45:27 +00:00
|
|
|
|
maxWidth: isTablet ? "200px" : "300px"
|
2024-02-11 15:35:45 +00:00
|
|
|
|
}}>
|
2024-01-30 16:49:33 +00:00
|
|
|
|
{settings.cfg.info.site}
|
|
|
|
|
</Typography>
|
|
|
|
|
</Link>
|
|
|
|
|
</Box>
|
|
|
|
|
}
|
|
|
|
|
quizMainBlock={
|
|
|
|
|
<>
|
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
|
display: "flex",
|
|
|
|
|
flexDirection: "column",
|
|
|
|
|
justifyContent: "center",
|
|
|
|
|
alignItems:
|
|
|
|
|
settings.cfg.startpageType === "centered"
|
|
|
|
|
? "center"
|
|
|
|
|
: settings.cfg.startpageType === "expanded"
|
|
|
|
|
? settings.cfg.startpage.position === "center"
|
|
|
|
|
? "center"
|
|
|
|
|
: "start"
|
|
|
|
|
: "start",
|
|
|
|
|
mt: "28px",
|
|
|
|
|
width: "100%",
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Typography
|
|
|
|
|
sx={{
|
|
|
|
|
fontWeight: "bold",
|
|
|
|
|
fontSize: "26px",
|
|
|
|
|
fontStyle: "normal",
|
|
|
|
|
fontStretch: "normal",
|
|
|
|
|
lineHeight: "1.2",
|
|
|
|
|
overflowWrap: "break-word",
|
|
|
|
|
width: "100%",
|
|
|
|
|
textAlign: settings.cfg.startpageType === "centered" ? "center" : "-moz-initial",
|
|
|
|
|
color: settings.cfg.startpageType === "expanded" && !isMobile ? "white" : theme.palette.text.primary
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{settings.name}
|
|
|
|
|
</Typography>
|
|
|
|
|
<Typography
|
|
|
|
|
sx={{
|
|
|
|
|
fontSize: "16px",
|
|
|
|
|
m: "16px 0",
|
|
|
|
|
overflowWrap: "break-word",
|
|
|
|
|
width: "100%",
|
|
|
|
|
textAlign: settings.cfg.startpageType === "centered" ? "center" : "-moz-initial",
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{settings.cfg.startpage.description}
|
|
|
|
|
</Typography>
|
|
|
|
|
<Box width={settings.cfg.startpageType === "standard" ? "100%" : "auto"}>
|
|
|
|
|
<Button
|
|
|
|
|
variant="contained"
|
|
|
|
|
sx={{
|
|
|
|
|
fontSize: "16px",
|
|
|
|
|
padding: "10px 15px",
|
|
|
|
|
width: settings.cfg.startpageType === "standard" ? "100%" : "auto",
|
|
|
|
|
}}
|
2024-02-08 13:42:31 +00:00
|
|
|
|
onClick={() => setCurrentQuizStep("question")}
|
2024-01-30 16:49:33 +00:00
|
|
|
|
>
|
|
|
|
|
{settings.cfg.startpage.button.trim() ? settings.cfg.startpage.button : "Пройти тест"}
|
|
|
|
|
</Button>
|
|
|
|
|
</Box>
|
|
|
|
|
</Box>
|
2023-12-29 00:58:19 +00:00
|
|
|
|
|
2024-01-30 16:49:33 +00:00
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
|
mt: "46px",
|
|
|
|
|
display: "flex",
|
|
|
|
|
alignItems: "center",
|
|
|
|
|
justifyContent: "space-between",
|
|
|
|
|
width: "100%",
|
2024-02-11 15:35:45 +00:00
|
|
|
|
flexDirection: "column"
|
2024-01-30 16:49:33 +00:00
|
|
|
|
}}
|
|
|
|
|
>
|
2024-02-13 22:45:27 +00:00
|
|
|
|
<Box sx={{ maxWidth: isTablet ? "240px" : "300px" }}>
|
2024-01-30 16:49:33 +00:00
|
|
|
|
{settings.cfg.info.clickable ? (
|
|
|
|
|
isMobileDevice ? (
|
|
|
|
|
<Link href={`tel:${settings.cfg.info.phonenumber}`}>
|
|
|
|
|
<Typography sx={{ fontSize: "16px", color: theme.palette.primary.main }}>
|
|
|
|
|
{settings.cfg.info.phonenumber}
|
|
|
|
|
</Typography>
|
|
|
|
|
</Link>
|
|
|
|
|
) : (
|
|
|
|
|
<ButtonBase onClick={handleCopyNumber}>
|
|
|
|
|
<Typography sx={{ fontSize: "16px", color: theme.palette.primary.main }}>
|
|
|
|
|
{settings.cfg.info.phonenumber}
|
|
|
|
|
</Typography>
|
|
|
|
|
</ButtonBase>
|
|
|
|
|
)
|
|
|
|
|
) : (
|
|
|
|
|
<Typography sx={{ fontSize: "16px", color: theme.palette.primary.main }}>
|
|
|
|
|
{settings.cfg.info.phonenumber}
|
|
|
|
|
</Typography>
|
|
|
|
|
)}
|
|
|
|
|
<Typography sx={{
|
|
|
|
|
width: "100%",
|
|
|
|
|
overflowWrap: "break-word",
|
2024-02-11 15:35:45 +00:00
|
|
|
|
fontSize: "12px",
|
|
|
|
|
textAlign: "end",
|
|
|
|
|
maxHeight: "120px",
|
|
|
|
|
overflow: "auto",
|
2024-01-30 16:49:33 +00:00
|
|
|
|
color:
|
|
|
|
|
settings.cfg.startpageType === "expanded" && !isMobile
|
|
|
|
|
? "white"
|
|
|
|
|
: theme.palette.text.primary,
|
|
|
|
|
}}>
|
|
|
|
|
{settings.cfg.info.law}
|
|
|
|
|
</Typography>
|
|
|
|
|
</Box>
|
2023-12-16 14:55:56 +00:00
|
|
|
|
|
2024-01-30 16:49:33 +00:00
|
|
|
|
<Box
|
2024-02-11 19:48:59 +00:00
|
|
|
|
component={Link}
|
|
|
|
|
target={"_blank"}
|
|
|
|
|
href={"https://quiz.pena.digital"}
|
2024-01-30 16:49:33 +00:00
|
|
|
|
sx={{
|
|
|
|
|
display: "flex",
|
|
|
|
|
alignItems: "center",
|
2024-02-11 19:48:59 +00:00
|
|
|
|
gap: "15px",
|
|
|
|
|
textDecoration: "none"
|
2024-01-30 16:49:33 +00:00
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<NameplateLogo style={{ fontSize: "34px", color: settings.cfg.startpageType === "expanded" && !isMobile ? "#FFFFFF" : (quizThemes[settings.cfg.theme].isLight ? "#151515" : "#FFFFFF") }} />
|
|
|
|
|
<Typography sx={{ fontSize: "20px", color: settings.cfg.startpageType === "expanded" && !isMobile ? "#F5F7FF" : (quizThemes[settings.cfg.theme].isLight ? "#4D4D4D" : "#F5F7FF"), whiteSpace: "nowrap", }}>
|
|
|
|
|
Сделано на PenaQuiz
|
|
|
|
|
</Typography>
|
|
|
|
|
</Box>
|
|
|
|
|
</Box>
|
|
|
|
|
</>
|
|
|
|
|
}
|
|
|
|
|
backgroundBlock={background}
|
|
|
|
|
startpageType={settings.cfg.startpageType}
|
|
|
|
|
alignType={settings.cfg.startpage.position}
|
|
|
|
|
/>
|
|
|
|
|
</Paper>
|
|
|
|
|
);
|
|
|
|
|
};
|
2023-12-29 00:58:19 +00:00
|
|
|
|
|
|
|
|
|
|
2024-01-30 16:49:33 +00:00
|
|
|
|
function QuizPreviewLayoutByType({
|
|
|
|
|
quizHeaderBlock,
|
|
|
|
|
quizMainBlock,
|
|
|
|
|
backgroundBlock,
|
|
|
|
|
startpageType,
|
|
|
|
|
alignType,
|
|
|
|
|
}: {
|
|
|
|
|
quizHeaderBlock: JSX.Element;
|
|
|
|
|
quizMainBlock: JSX.Element;
|
|
|
|
|
backgroundBlock: JSX.Element | null;
|
|
|
|
|
startpageType: QuizStartpageType;
|
|
|
|
|
alignType: QuizStartpageAlignType;
|
|
|
|
|
}) {
|
2024-02-05 10:10:02 +00:00
|
|
|
|
const isMobile = useRootContainerSize() < 650;
|
|
|
|
|
|
2024-01-30 16:49:33 +00:00
|
|
|
|
function StartPageMobile() {
|
|
|
|
|
return (
|
2024-01-05 17:00:30 +00:00
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
2024-01-30 16:49:33 +00:00
|
|
|
|
display: "flex",
|
|
|
|
|
flexDirection: "column-reverse",
|
|
|
|
|
flexGrow: 1,
|
|
|
|
|
justifyContent: "flex-end",
|
2024-02-08 13:42:31 +00:00
|
|
|
|
height: "100%",
|
2024-01-30 16:49:33 +00:00
|
|
|
|
"&::-webkit-scrollbar": { width: 0 },
|
2024-01-05 17:00:30 +00:00
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Box
|
2024-01-30 16:49:33 +00:00
|
|
|
|
sx={{
|
|
|
|
|
width: "100%",
|
|
|
|
|
display: "flex",
|
|
|
|
|
flexDirection: "column",
|
|
|
|
|
justifyContent: "space-between",
|
|
|
|
|
alignItems: "flex-start",
|
|
|
|
|
p: "25px",
|
2024-02-11 15:35:45 +00:00
|
|
|
|
height: "80%",
|
|
|
|
|
overflowY: "auto",
|
|
|
|
|
overflowX: "hidden"
|
2024-01-30 16:49:33 +00:00
|
|
|
|
}}
|
2024-01-05 17:00:30 +00:00
|
|
|
|
>
|
2024-01-30 16:49:33 +00:00
|
|
|
|
{quizHeaderBlock}
|
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
|
height: "80%",
|
|
|
|
|
display: "flex",
|
|
|
|
|
flexDirection: "column",
|
|
|
|
|
justifyContent: "space-between",
|
|
|
|
|
width: "100%"
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{quizMainBlock}
|
|
|
|
|
</Box>
|
|
|
|
|
</Box>
|
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
|
width: "100%",
|
|
|
|
|
overflow: "hidden",
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{backgroundBlock}
|
2024-01-05 17:00:30 +00:00
|
|
|
|
</Box>
|
|
|
|
|
</Box>
|
2024-01-30 16:49:33 +00:00
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2023-12-29 00:58:19 +00:00
|
|
|
|
|
2024-01-30 16:49:33 +00:00
|
|
|
|
|
|
|
|
|
switch (startpageType) {
|
|
|
|
|
case null:
|
|
|
|
|
case "standard": {
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
{isMobile ? (
|
|
|
|
|
<StartPageMobile />
|
|
|
|
|
) : (
|
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
|
display: "flex",
|
|
|
|
|
flexDirection: alignType === "left" ? (isMobile ? "column-reverse" : "row") : "row-reverse",
|
|
|
|
|
flexGrow: 1,
|
|
|
|
|
justifyContent: isMobile ? "flex-end" : undefined,
|
2024-02-08 13:42:31 +00:00
|
|
|
|
height: "100%",
|
2024-01-30 16:49:33 +00:00
|
|
|
|
"&::-webkit-scrollbar": { width: 0 },
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
|
width: isMobile ? "100%" : "40%",
|
|
|
|
|
display: "flex",
|
|
|
|
|
flexDirection: "column",
|
|
|
|
|
justifyContent: "space-between",
|
|
|
|
|
alignItems: "flex-start",
|
|
|
|
|
p: "25px",
|
|
|
|
|
height: isMobile ? "80%" : undefined
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{quizHeaderBlock}
|
|
|
|
|
{quizMainBlock}
|
|
|
|
|
</Box>
|
|
|
|
|
|
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
|
width: isMobile ? "100%" : "60%",
|
|
|
|
|
overflow: "hidden",
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{backgroundBlock}
|
|
|
|
|
</Box>
|
|
|
|
|
</Box>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
</>
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
case "expanded": {
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
{isMobile ? (
|
|
|
|
|
<StartPageMobile />
|
|
|
|
|
) : (
|
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
|
position: "relative",
|
|
|
|
|
display: "flex",
|
|
|
|
|
justifyContent: startpageAlignTypeToJustifyContent[alignType],
|
|
|
|
|
flexGrow: 1,
|
|
|
|
|
height: "100%",
|
|
|
|
|
"&::-webkit-scrollbar": { width: 0 },
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
|
width: "40%",
|
|
|
|
|
position: "relative",
|
|
|
|
|
padding: "16px",
|
|
|
|
|
zIndex: 3,
|
|
|
|
|
display: "flex",
|
|
|
|
|
flexDirection: "column",
|
|
|
|
|
justifyContent: "space-between",
|
|
|
|
|
alignItems: alignType === "center" ? "center" : "start",
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{quizHeaderBlock}
|
|
|
|
|
{quizMainBlock}
|
|
|
|
|
</Box>
|
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
|
position: "absolute",
|
|
|
|
|
zIndex: -1,
|
|
|
|
|
left: 0,
|
|
|
|
|
top: 0,
|
|
|
|
|
height: "100%",
|
|
|
|
|
width: "100%",
|
|
|
|
|
overflow: "hidden",
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{backgroundBlock}
|
|
|
|
|
</Box>
|
|
|
|
|
</Box>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
</>
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
case "centered": {
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
{isMobile ? (
|
|
|
|
|
<StartPageMobile />
|
|
|
|
|
) : (
|
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
|
padding: "16px",
|
|
|
|
|
display: "flex",
|
|
|
|
|
flexDirection: "column",
|
|
|
|
|
justifyContent: "space-between",
|
|
|
|
|
alignItems: "center",
|
|
|
|
|
height: "100%",
|
|
|
|
|
"&::-webkit-scrollbar": { width: 0 },
|
|
|
|
|
overflow: "hidden",
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{quizHeaderBlock}
|
|
|
|
|
{backgroundBlock && (
|
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
|
width: "60%",
|
|
|
|
|
overflow: "hidden",
|
|
|
|
|
display: "flex",
|
|
|
|
|
justifyContent: "center"
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{backgroundBlock}
|
|
|
|
|
</Box>
|
|
|
|
|
)}
|
|
|
|
|
{quizMainBlock}
|
|
|
|
|
</Box>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
</>
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
default:
|
|
|
|
|
notReachable(startpageType);
|
2023-12-16 14:55:56 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-12-29 00:58:19 +00:00
|
|
|
|
|
2023-12-16 14:55:56 +00:00
|
|
|
|
const startpageAlignTypeToJustifyContent: Record<QuizStartpageAlignType, "start" | "center" | "end"> = {
|
2024-01-30 16:49:33 +00:00
|
|
|
|
left: "start",
|
|
|
|
|
center: "center",
|
|
|
|
|
right: "end",
|
2023-12-16 14:55:56 +00:00
|
|
|
|
};
|