2024-02-28 14:10:50 +00:00
|
|
|
import {
|
2024-04-03 12:42:12 +00:00
|
|
|
Box,
|
|
|
|
Button,
|
|
|
|
ButtonBase,
|
|
|
|
Link,
|
|
|
|
Paper,
|
|
|
|
Typography,
|
|
|
|
useTheme,
|
2024-02-28 14:10:50 +00:00
|
|
|
} from "@mui/material";
|
2024-02-29 08:13:51 +00:00
|
|
|
|
2024-05-05 22:07:15 +00:00
|
|
|
import { QuizPreviewLayoutByType } from "./QuizPreviewLayoutByType";
|
2024-02-28 14:10:50 +00:00
|
|
|
import YoutubeEmbedIframe from "../tools/YoutubeEmbedIframe";
|
|
|
|
|
2024-05-05 22:07:15 +00:00
|
|
|
import { useQuizData } from "@contexts/QuizDataContext";
|
|
|
|
import { useRootContainerSize } from "@contexts/RootContainerWidthContext";
|
2024-02-28 14:10:50 +00:00
|
|
|
|
2024-05-05 22:07:15 +00:00
|
|
|
import { useUADevice } from "@utils/hooks/useUADevice";
|
|
|
|
import { quizThemes } from "@utils/themes/Publication/themePublication";
|
2024-02-29 08:13:51 +00:00
|
|
|
|
2024-05-05 22:07:15 +00:00
|
|
|
import { NameplateLogo } from "@icons/NameplateLogo";
|
|
|
|
import { useQuizViewStore } from "@/stores/quizView";
|
|
|
|
import { DESIGN_LIST } from "@/utils/designList";
|
2024-02-28 14:10:50 +00:00
|
|
|
|
|
|
|
export const StartPageViewPublication = () => {
|
2024-04-03 12:42:12 +00:00
|
|
|
const theme = useTheme();
|
2024-04-16 19:19:22 +00:00
|
|
|
const { settings, show_badge, quizId, questions } = useQuizData();
|
2024-04-03 12:42:12 +00:00
|
|
|
const { isMobileDevice } = useUADevice();
|
|
|
|
const setCurrentQuizStep = useQuizViewStore(state => state.setCurrentQuizStep);
|
2024-02-28 14:10:50 +00:00
|
|
|
|
2024-05-02 13:13:41 +00:00
|
|
|
const size = useRootContainerSize();
|
|
|
|
const isMobile = size < 700;
|
|
|
|
const isTablet = size >= 700 && size < 1100;
|
2024-05-05 22:07:15 +00:00
|
|
|
console.log(settings)
|
2024-04-03 12:42:12 +00:00
|
|
|
const handleCopyNumber = () => {
|
|
|
|
navigator.clipboard.writeText(settings.cfg.info.phonenumber);
|
2024-05-05 22:07:15 +00:00
|
|
|
//@ts-ignore
|
|
|
|
let YM = window?.ym;
|
|
|
|
//@ts-ignore
|
|
|
|
let VP = window?._tmr;
|
|
|
|
if (YM !== undefined && settings.cfg.yandexMetricNumber !== undefined) {
|
|
|
|
YM(
|
|
|
|
settings.cfg.yandexMetricNumber,
|
|
|
|
"reachGoal",
|
|
|
|
"penaquiz-phone"
|
|
|
|
);
|
|
|
|
};
|
|
|
|
if (VP !== undefined && settings.cfg.vkMetricNumber !== undefined) {
|
|
|
|
VP.push({
|
|
|
|
type: "reachGoal",
|
|
|
|
id: settings.cfg.vkMetricNumber,
|
|
|
|
goal: "penaquiz-phone"
|
|
|
|
});
|
|
|
|
};
|
2024-04-03 12:42:12 +00:00
|
|
|
};
|
2024-02-28 14:10:50 +00:00
|
|
|
|
2024-04-03 12:42:12 +00:00
|
|
|
const background =
|
|
|
|
settings.cfg.startpage.background.type === "image" ? (
|
|
|
|
<img
|
|
|
|
src={
|
|
|
|
settings.cfg.startpage.background.desktop ||
|
|
|
|
DESIGN_LIST[settings.cfg.theme] ||
|
|
|
|
""
|
|
|
|
}
|
2024-02-28 14:10:50 +00:00
|
|
|
alt=""
|
2024-04-03 12:42:12 +00:00
|
|
|
style={{
|
|
|
|
display: "block",
|
|
|
|
width:
|
|
|
|
isMobile || settings.cfg.startpageType === "expanded"
|
|
|
|
? "100%"
|
|
|
|
: undefined,
|
|
|
|
height: "100%",
|
|
|
|
minWidth: "100%",
|
|
|
|
maxHeight: "100%",
|
|
|
|
objectFit: "cover",
|
|
|
|
overflow: "hidden",
|
2024-02-28 14:10:50 +00:00
|
|
|
}}
|
2024-04-03 12:42:12 +00:00
|
|
|
/>
|
|
|
|
) : 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" : "100%",
|
|
|
|
height:
|
|
|
|
settings.cfg.startpageType === "centered" ? "275px" : "100%",
|
|
|
|
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;
|
|
|
|
|
2024-04-29 12:45:33 +00:00
|
|
|
const quizHeaderBlock = (<Box
|
|
|
|
sx={{
|
|
|
|
margin:
|
|
|
|
settings.cfg.startpageType === "centered" ? "0 auto" : null,
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<Box
|
|
|
|
sx={{
|
|
|
|
display: "flex",
|
|
|
|
alignItems: "center",
|
2024-05-05 22:07:15 +00:00
|
|
|
flexWrap: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" ? "nowrap" : "wrap",
|
|
|
|
gap: isMobile ? "20px" : "30px",
|
|
|
|
mb: settings.cfg.startpageType === "centered" ? isMobile ? "20px" : "25px" : settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" && !isMobile ? 0 : "7px",
|
|
|
|
justifyContent: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" && isMobile ? "center" : undefined
|
2024-04-29 12:45:33 +00:00
|
|
|
}}
|
|
|
|
>
|
|
|
|
{settings.cfg.startpage.logo &&
|
|
|
|
<img
|
|
|
|
src={settings.cfg.startpage.logo}
|
|
|
|
style={{
|
2024-05-05 22:07:15 +00:00
|
|
|
maxHeight: isMobile ? "30px" : "40px",
|
|
|
|
maxWidth: isMobile ? "100px" : "110px",
|
2024-04-29 12:45:33 +00:00
|
|
|
objectFit: "cover",
|
|
|
|
}}
|
|
|
|
alt=""
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
<Typography
|
|
|
|
sx={{
|
|
|
|
fontSize: "12px",
|
|
|
|
color:
|
|
|
|
settings.cfg.startpageType === "expanded"
|
|
|
|
? "white"
|
|
|
|
: theme.palette.text.primary,
|
2024-05-05 22:07:15 +00:00
|
|
|
wordBreak: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" ? "normal" : "break-word",
|
2024-04-29 12:45:33 +00:00
|
|
|
}}
|
|
|
|
>
|
|
|
|
{settings.cfg.info.orgname}
|
|
|
|
</Typography>
|
|
|
|
</Box>
|
|
|
|
</Box>)
|
|
|
|
|
2024-05-02 13:13:41 +00:00
|
|
|
const PenaBadge = (
|
2024-05-05 22:07:15 +00:00
|
|
|
<Box
|
|
|
|
component={Link}
|
|
|
|
target={"_blank"}
|
|
|
|
href={
|
|
|
|
`https://${window.location.hostname.includes("s") ? "s" : ""}quiz.pena.digital/squiz/quiz/logo?q=${quizId}`
|
|
|
|
}
|
|
|
|
sx={{
|
|
|
|
display: "flex",
|
|
|
|
alignItems: "center",
|
|
|
|
gap: "7px",
|
|
|
|
textDecoration: "none",
|
|
|
|
marginLeft: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" && !isTablet && !isMobile ? "61px" : undefined
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<NameplateLogo
|
|
|
|
style={{
|
|
|
|
fontSize: "23px",
|
|
|
|
color:
|
|
|
|
settings.cfg.startpageType === "expanded"
|
|
|
|
? "#FFFFFF"
|
|
|
|
: quizThemes[settings.cfg.theme].isLight
|
|
|
|
? "#151515"
|
|
|
|
: "#FFFFFF",
|
2024-05-02 13:13:41 +00:00
|
|
|
}}
|
2024-05-05 22:07:15 +00:00
|
|
|
/>
|
|
|
|
{/*<Typography*/}
|
|
|
|
{/* sx={{*/}
|
|
|
|
{/* fontSize: "13px",*/}
|
|
|
|
{/* color:*/}
|
|
|
|
{/* settings.cfg.startpageType === "expanded"*/}
|
|
|
|
{/* ? "#F5F7FF"*/}
|
|
|
|
{/* : quizThemes[settings.cfg.theme].isLight*/}
|
|
|
|
{/* ? "#4D4D4D"*/}
|
|
|
|
{/* : "#F5F7FF",*/}
|
|
|
|
{/* whiteSpace: "nowrap",*/}
|
|
|
|
{/* }}*/}
|
|
|
|
{/*>*/}
|
|
|
|
{/* Сделано на PenaQuiz*/}
|
|
|
|
{/*</Typography>*/}
|
|
|
|
</Box>)
|
2024-05-02 13:13:41 +00:00
|
|
|
|
2024-04-16 19:19:22 +00:00
|
|
|
const realQuestionsCount = questions.filter((question) => question.type !== null && question.type !== "result").length;
|
|
|
|
|
2024-04-03 12:42:12 +00:00
|
|
|
return (
|
|
|
|
<Paper
|
|
|
|
className="settings-preview-draghandle"
|
|
|
|
sx={{
|
|
|
|
borderRadius: 0,
|
|
|
|
height: "100%",
|
2024-02-28 14:10:50 +00:00
|
|
|
width: "100%",
|
2024-04-03 12:42:12 +00:00
|
|
|
background:
|
2024-02-29 13:44:45 +00:00
|
|
|
settings.cfg.startpageType === "expanded"
|
2024-05-05 22:07:15 +00:00
|
|
|
? settings.cfg.startpage.position === "left" || isMobile && settings.cfg.startpage.position === "right"
|
|
|
|
? "linear-gradient(90deg, rgba(39, 38, 38, 0.95) 7.66%, rgba(42, 42, 46, 0.85) 42.12%, rgba(51, 54, 71, 0.4) 100%)"
|
2024-04-03 12:42:12 +00:00
|
|
|
: settings.cfg.startpage.position === "center"
|
2024-05-02 13:13:41 +00:00
|
|
|
? "linear-gradient(0deg, rgba(39, 38, 38, 0.95) 7.66%, rgba(42, 42, 46, 0.85) 42.12%, rgba(51, 54, 71, 0.4) 100%)"
|
2024-05-04 21:33:57 +00:00
|
|
|
: "linear-gradient(-90deg, rgba(39, 38, 38, 0.95) 7.66%, rgba(42, 42, 46, 0.85) 42.12%, rgba(51, 54, 71, 0.4) 100%)"
|
2024-04-03 12:42:12 +00:00
|
|
|
: theme.palette.background.default,
|
2024-02-28 14:10:50 +00:00
|
|
|
|
2024-04-03 12:42:12 +00:00
|
|
|
color: settings.cfg.startpageType === "expanded" ? "white" : "black",
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<QuizPreviewLayoutByType
|
2024-04-29 12:45:33 +00:00
|
|
|
quizHeaderBlock={quizHeaderBlock
|
2024-04-03 12:42:12 +00:00
|
|
|
}
|
|
|
|
quizMainBlock={
|
|
|
|
<>
|
|
|
|
<Box
|
|
|
|
sx={{
|
|
|
|
display: "flex",
|
|
|
|
flexDirection: "column",
|
2024-05-05 22:07:15 +00:00
|
|
|
justifyContent: settings.cfg.startpageType === "standard" && isMobile ? "start" : "center",
|
2024-04-03 12:42:12 +00:00
|
|
|
flexGrow: settings.cfg.startpageType === "centered" ? 0 : 1,
|
|
|
|
alignItems:
|
|
|
|
settings.cfg.startpageType === "centered"
|
|
|
|
? "center"
|
|
|
|
: settings.cfg.startpageType === "expanded"
|
|
|
|
? settings.cfg.startpage.position === "center"
|
|
|
|
? "center"
|
|
|
|
: "start"
|
|
|
|
: "start",
|
2024-05-04 21:33:57 +00:00
|
|
|
marginTop: settings.cfg.startpageType === "centered" ? "30px" : isMobile ? "0px" : "5px",
|
2024-05-05 22:07:15 +00:00
|
|
|
maxWidth: isMobile ? "100%" : settings.cfg.startpageType === "centered" ? "700px" : isTablet && settings.cfg.startpageType !== "expanded" && settings.cfg.startpage.position !== "center" ? "380px" : "531px",
|
2024-04-03 12:42:12 +00:00
|
|
|
}}
|
|
|
|
>
|
|
|
|
<Typography
|
|
|
|
sx={{
|
2024-04-30 18:57:25 +00:00
|
|
|
fontWeight: "700",
|
2024-05-04 21:33:57 +00:00
|
|
|
fontSize: isMobile ? "24px" : "27px",
|
2024-04-03 12:42:12 +00:00
|
|
|
fontStyle: "normal",
|
|
|
|
fontStretch: "normal",
|
2024-05-04 21:33:57 +00:00
|
|
|
lineHeight: isMobile ? "26.4px" : "normal",
|
2024-04-03 12:42:12 +00:00
|
|
|
overflowWrap: "break-word",
|
|
|
|
width: "100%",
|
|
|
|
textAlign:
|
|
|
|
settings.cfg.startpageType === "centered" ||
|
|
|
|
settings.cfg.startpage.position === "center"
|
|
|
|
? "center"
|
|
|
|
: "-moz-initial",
|
|
|
|
color:
|
|
|
|
settings.cfg.startpageType === "expanded"
|
|
|
|
? "white"
|
|
|
|
: theme.palette.text.primary,
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
{settings.name}
|
|
|
|
</Typography>
|
|
|
|
<Typography
|
|
|
|
sx={{
|
2024-05-04 21:33:57 +00:00
|
|
|
fontSize: isMobile ? "16px" : "17px",
|
2024-04-29 12:45:33 +00:00
|
|
|
fontWeight: "400",
|
2024-05-04 21:33:57 +00:00
|
|
|
lineHeight: isMobile ? "19.2px" : "normal",
|
2024-05-02 08:20:01 +00:00
|
|
|
margin: "12px 0 30px",
|
2024-04-03 12:42:12 +00:00
|
|
|
overflowWrap: "break-word",
|
|
|
|
width: "100%",
|
|
|
|
textAlign:
|
|
|
|
settings.cfg.startpageType === "centered" ||
|
|
|
|
settings.cfg.startpage.position === "center"
|
|
|
|
? "center"
|
|
|
|
: "-moz-initial",
|
|
|
|
color:
|
|
|
|
settings.cfg.startpageType === "expanded"
|
|
|
|
? "white"
|
|
|
|
: theme.palette.text.primary,
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
{settings.cfg.startpage.description}
|
|
|
|
</Typography>
|
|
|
|
<Box
|
|
|
|
width={
|
|
|
|
settings.cfg.startpageType === "standard" ? "100%" : "auto"
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<Button
|
|
|
|
variant="contained"
|
2024-04-16 19:19:22 +00:00
|
|
|
disabled={realQuestionsCount === 0}
|
2024-04-03 12:42:12 +00:00
|
|
|
sx={{
|
|
|
|
fontSize: "18px",
|
2024-04-29 12:45:33 +00:00
|
|
|
padding: "10px 20px",
|
2024-04-03 12:42:12 +00:00
|
|
|
width: "auto",
|
|
|
|
background: theme.palette.primary.main,
|
2024-04-29 12:45:33 +00:00
|
|
|
borderRadius: "12px",
|
2024-04-03 12:42:12 +00:00
|
|
|
}}
|
2024-05-05 22:07:15 +00:00
|
|
|
onClick={() => {
|
|
|
|
setCurrentQuizStep("question")
|
|
|
|
|
|
|
|
|
|
|
|
//@ts-ignore
|
|
|
|
let YM = window?.ym;
|
|
|
|
//@ts-ignore
|
|
|
|
let VP = window?._tmr;
|
|
|
|
if (YM !== undefined && settings.cfg.yandexMetricNumber !== undefined) {
|
|
|
|
YM(
|
|
|
|
settings.cfg.yandexMetricNumber,
|
|
|
|
"reachGoal",
|
|
|
|
"penaquiz-startquiz"
|
|
|
|
);
|
|
|
|
};
|
|
|
|
if (VP !== undefined && settings.cfg.vkMetricNumber !== undefined) {
|
|
|
|
VP.push({
|
|
|
|
type: "reachGoal",
|
|
|
|
id: settings.cfg.vkMetricNumber,
|
|
|
|
goal: "penaquiz-startquiz"
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}}
|
2024-04-03 12:42:12 +00:00
|
|
|
>
|
|
|
|
{settings.cfg.startpage.button.trim()
|
|
|
|
? settings.cfg.startpage.button
|
|
|
|
: "Пройти тест"}
|
|
|
|
</Button>
|
|
|
|
</Box>
|
2024-02-28 14:10:50 +00:00
|
|
|
|
2024-04-29 12:45:33 +00:00
|
|
|
</Box>
|
2024-04-03 12:42:12 +00:00
|
|
|
<Box
|
|
|
|
sx={{
|
|
|
|
display: "flex",
|
|
|
|
flexGrow:
|
|
|
|
settings.cfg.startpageType === "centered"
|
|
|
|
? isMobile
|
|
|
|
? 0
|
|
|
|
: 1
|
|
|
|
: 0,
|
2024-05-05 22:07:15 +00:00
|
|
|
gap: isMobile ? "30px" : "40px",
|
2024-04-03 12:42:12 +00:00
|
|
|
alignItems: "flex-end",
|
2024-05-05 22:07:15 +00:00
|
|
|
justifyContent: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" && isMobile || settings.cfg.startpageType === "centered" && isMobile ? "center" : "space-between",
|
2024-04-03 12:42:12 +00:00
|
|
|
width: "100%",
|
2024-04-30 18:57:25 +00:00
|
|
|
flexWrap: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" ? isMobile ? "wrap-reverse" : "nowrap" : "wrap",
|
2024-04-03 12:42:12 +00:00
|
|
|
}}
|
|
|
|
>
|
2024-04-30 18:57:25 +00:00
|
|
|
{settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" && !isMobile && quizHeaderBlock}
|
2024-05-05 22:07:15 +00:00
|
|
|
<Box sx={{
|
|
|
|
maxWidth: "300px",
|
2024-05-02 10:39:09 +00:00
|
|
|
display: settings.cfg.startpageType === "centered" && isMobile || settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" && isMobile ? "flex" : "block",
|
2024-04-29 12:45:33 +00:00
|
|
|
flexDirection: "column",
|
|
|
|
alignItems: "center",
|
2024-05-05 22:07:15 +00:00
|
|
|
order: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" ? "2" : "0"
|
|
|
|
}}>
|
2024-04-03 12:42:12 +00:00
|
|
|
{settings.cfg.info.site && (
|
2024-05-05 22:07:15 +00:00
|
|
|
<ButtonBase
|
|
|
|
onClick={async () => {
|
|
|
|
//@ts-ignore
|
|
|
|
let YM = window?.ym;
|
|
|
|
//@ts-ignore
|
|
|
|
let VP = window?._tmr;
|
|
|
|
if (YM !== undefined && settings.cfg.yandexMetricNumber !== undefined) {
|
|
|
|
await YM(
|
|
|
|
settings.cfg.yandexMetricNumber,
|
|
|
|
"reachGoal",
|
|
|
|
"penaquiz-email"
|
|
|
|
);
|
|
|
|
};
|
|
|
|
if (VP !== undefined && settings.cfg.vkMetricNumber !== undefined) {
|
|
|
|
await VP.push({
|
|
|
|
type: "reachGoal",
|
|
|
|
id: settings.cfg.vkMetricNumber,
|
|
|
|
goal: "penaquiz-email"
|
|
|
|
});
|
|
|
|
};
|
|
|
|
location.href = (
|
|
|
|
settings.cfg.info.site.includes("https")
|
|
|
|
? settings.cfg.info.site
|
|
|
|
: `https://${settings.cfg.info.site}`
|
|
|
|
).replace(/\s+/g, '')
|
|
|
|
}}
|
2024-04-29 12:45:33 +00:00
|
|
|
>
|
2024-04-03 12:42:12 +00:00
|
|
|
<Typography
|
|
|
|
sx={{
|
2024-05-02 10:39:09 +00:00
|
|
|
lineHeight: "19px",
|
2024-04-03 12:42:12 +00:00
|
|
|
fontSize: "16px",
|
2024-05-02 10:39:09 +00:00
|
|
|
textAlign: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" && !isMobile ? "end" : "none",
|
2024-04-03 12:42:12 +00:00
|
|
|
color: theme.palette.primary.main,
|
|
|
|
overflow: "hidden",
|
|
|
|
textOverflow: "ellipsis",
|
|
|
|
whiteSpace: "nowrap",
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
{settings.cfg.info.site}
|
|
|
|
</Typography>
|
2024-05-05 22:07:15 +00:00
|
|
|
</ButtonBase>
|
|
|
|
|
2024-04-03 12:42:12 +00:00
|
|
|
)}
|
|
|
|
{settings.cfg.info.clickable ? (
|
|
|
|
isMobileDevice ? (
|
|
|
|
<Link href={`tel:${settings.cfg.info.phonenumber}`}>
|
|
|
|
<Typography
|
|
|
|
sx={{
|
2024-05-02 10:39:09 +00:00
|
|
|
lineHeight: "19px",
|
|
|
|
textAlign: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" ? "end" : "none",
|
2024-04-03 12:42:12 +00:00
|
|
|
fontSize: "16px",
|
|
|
|
color:
|
|
|
|
settings.cfg.startpageType === "expanded"
|
|
|
|
? "#FFFFFF"
|
|
|
|
: theme.palette.text.primary,
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
{settings.cfg.info.phonenumber}
|
|
|
|
</Typography>
|
|
|
|
</Link>
|
|
|
|
) : (
|
|
|
|
<ButtonBase onClick={handleCopyNumber}>
|
|
|
|
<Typography
|
|
|
|
sx={{
|
2024-05-02 10:39:09 +00:00
|
|
|
textAlign: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" ? "end" : "none",
|
2024-04-03 12:42:12 +00:00
|
|
|
fontSize: "16px",
|
2024-05-02 10:39:09 +00:00
|
|
|
lineHeight: "19px",
|
2024-04-03 12:42:12 +00:00
|
|
|
color:
|
|
|
|
settings.cfg.startpageType === "expanded"
|
|
|
|
? "#FFFFFF"
|
|
|
|
: theme.palette.text.primary,
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
{settings.cfg.info.phonenumber}
|
|
|
|
</Typography>
|
|
|
|
</ButtonBase>
|
|
|
|
)
|
|
|
|
) : (
|
|
|
|
<Typography
|
|
|
|
sx={{
|
2024-05-02 10:39:09 +00:00
|
|
|
lineHeight: "19px",
|
|
|
|
textAlign: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" ? "end" : "none",
|
2024-04-03 12:42:12 +00:00
|
|
|
fontSize: "16px",
|
2024-05-02 08:20:01 +00:00
|
|
|
marginTop: "10px",
|
2024-04-03 12:42:12 +00:00
|
|
|
color:
|
|
|
|
settings.cfg.startpageType === "expanded"
|
|
|
|
? "#FFFFFF"
|
|
|
|
: theme.palette.text.primary,
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
{settings.cfg.info.phonenumber}
|
|
|
|
</Typography>
|
|
|
|
)}
|
|
|
|
<Typography
|
|
|
|
sx={{
|
2024-05-02 10:39:09 +00:00
|
|
|
lineHeight: "14px",
|
2024-04-03 12:42:12 +00:00
|
|
|
width: "100%",
|
|
|
|
overflowWrap: "break-word",
|
|
|
|
fontSize: "12px",
|
2024-05-02 10:39:09 +00:00
|
|
|
textAlign: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" ? "end" : "none",
|
2024-04-03 12:42:12 +00:00
|
|
|
maxHeight: "120px",
|
|
|
|
overflow: "auto",
|
2024-05-02 08:20:01 +00:00
|
|
|
marginTop: "10px",
|
2024-04-03 12:42:12 +00:00
|
|
|
"&::-webkit-scrollbar": { width: 0 },
|
|
|
|
color:
|
|
|
|
settings.cfg.startpageType === "expanded"
|
|
|
|
? "white"
|
|
|
|
: theme.palette.text.primary,
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
{settings.cfg.info.law}
|
|
|
|
</Typography>
|
|
|
|
</Box>
|
|
|
|
|
2024-05-02 13:13:41 +00:00
|
|
|
{show_badge && PenaBadge}
|
2024-04-03 12:42:12 +00:00
|
|
|
</Box>
|
|
|
|
</>
|
|
|
|
}
|
|
|
|
backgroundBlock={background}
|
|
|
|
startpageType={settings.cfg.startpageType}
|
|
|
|
alignType={settings.cfg.startpage.position}
|
|
|
|
/>
|
|
|
|
</Paper>
|
|
|
|
);
|
2024-02-28 14:10:50 +00:00
|
|
|
};
|