diff --git a/lib/components/ViewPublicationPage/StartPageViewPublication/StartPageDesktop.tsx b/lib/components/ViewPublicationPage/StartPageViewPublication/StartPageDesktop.tsx index 11061de..0915a7d 100644 --- a/lib/components/ViewPublicationPage/StartPageViewPublication/StartPageDesktop.tsx +++ b/lib/components/ViewPublicationPage/StartPageViewPublication/StartPageDesktop.tsx @@ -28,7 +28,8 @@ const StandartLayout = ({ quizMainBlock, backgroundBlock, }: LayoutProps) => { - const isTablet = useRootContainerSize() < 1100; + const size = useRootContainerSize(); + const isTablet = size >= 700 && size < 1100; const { settings } = useQuizData(); return ( @@ -59,7 +60,7 @@ const StandartLayout = ({ flexDirection: "column", justifyContent: "space-between", alignItems: "flex-start", - p: "25px", + p: isTablet? "25px" : alignType === 'left'? "25px 25px 25px 35px" : "25px 35px 25px 25px" , overflowY: "auto", background: settings.cfg.design && !quizThemes[settings.cfg.theme].isLight @@ -100,7 +101,7 @@ const ExpandedLayout = ({ {quizMainBlock} diff --git a/lib/components/ViewPublicationPage/StartPageViewPublication/index.tsx b/lib/components/ViewPublicationPage/StartPageViewPublication/index.tsx index 0efafba..5cfe129 100644 --- a/lib/components/ViewPublicationPage/StartPageViewPublication/index.tsx +++ b/lib/components/ViewPublicationPage/StartPageViewPublication/index.tsx @@ -27,8 +27,9 @@ export const StartPageViewPublication = () => { const { isMobileDevice } = useUADevice(); const setCurrentQuizStep = useQuizViewStore(state => state.setCurrentQuizStep); - const isMobile = useRootContainerSize() < 700; - const isTablet = useRootContainerSize() < 800; + const size = useRootContainerSize(); + const isMobile = size < 700; + const isTablet = size >= 700 && size < 1100; const handleCopyNumber = () => { navigator.clipboard.writeText(settings.cfg.info.phonenumber); @@ -93,7 +94,7 @@ export const StartPageViewPublication = () => { display: "flex", alignItems: "center", flexWrap: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center"? "nowrap" : "wrap", - gap:"30px", + gap: isMobile? "20px" : "30px", mb: settings.cfg.startpageType === "centered" ? "25px" : "7px", }} > @@ -101,7 +102,7 @@ export const StartPageViewPublication = () => { { ) + const PenaBadge = ( + + + + Сделано на PenaQuiz + + ) + const realQuestionsCount = questions.filter((question) => question.type !== null && question.type !== "result").length; return ( @@ -135,10 +177,10 @@ export const StartPageViewPublication = () => { background: settings.cfg.startpageType === "expanded" ? settings.cfg.startpage.position === "left" - ? "linear-gradient(90deg,#272626,transparent)" + ? "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%)" : settings.cfg.startpage.position === "center" - ? "linear-gradient(180deg,transparent,#272626)" - : "linear-gradient(270deg,#272626,transparent)" + ? "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%)" + : "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%)" : theme.palette.background.default, color: settings.cfg.startpageType === "expanded" ? "white" : "black", @@ -153,7 +195,7 @@ export const StartPageViewPublication = () => { sx={{ display: "flex", flexDirection: "column", - justifyContent: "center", + justifyContent: settings.cfg.startpageType === "standard" && isMobile? "start" : "center", flexGrow: settings.cfg.startpageType === "centered" ? 0 : 1, alignItems: settings.cfg.startpageType === "centered" @@ -164,13 +206,13 @@ export const StartPageViewPublication = () => { : "start" : "start", marginTop: settings.cfg.startpageType === "centered" ? "30px" : "5px", - width:settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" && !isMobile? "50%" : settings.cfg.startpageType === "centered" && !isMobile? "50%" : "100%", + maxWidth: isMobile? "100%" : settings.cfg.startpageType === "centered" ? "700px" : isTablet && settings.cfg.startpageType !== "expanded" && settings.cfg.startpage.position !== "center" ? "380px" : "531px", }} > { sx={{ fontSize: "17px", fontWeight: "400", - margin: "16px 0 30px", + margin: "12px 0 30px", overflowWrap: "break-word", width: "100%", textAlign: @@ -242,31 +284,31 @@ export const StartPageViewPublication = () => { ? 0 : 1 : 0, - gap: "20px", + gap: isMobile? "30px" : "40px", alignItems: "flex-end", - justifyContent: settings.cfg.startpageType === "centered" || settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" && isMobile? "center" : "space-between", + justifyContent: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" && isMobile || settings.cfg.startpageType === "centered" && isMobile ? "center" : "space-between", width: "100%", flexWrap: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" ? isMobile ? "wrap-reverse" : "nowrap" : "wrap", }} > {settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" && !isMobile && quizHeaderBlock} {settings.cfg.info.site && ( {settings.cfg.info.site} @@ -278,6 +320,8 @@ export const StartPageViewPublication = () => { { { ) : ( { )} { - {show_badge && ( - - - - Сделано на PenaQuiz - - - )} + {show_badge && PenaBadge} } diff --git a/lib/utils/themes/generic.ts b/lib/utils/themes/generic.ts index 33c01e1..77fb98b 100644 --- a/lib/utils/themes/generic.ts +++ b/lib/utils/themes/generic.ts @@ -1,5 +1,5 @@ -import { createTheme } from "@mui/material"; -import { fontFaces } from "./fontFace"; +import {createTheme} from "@mui/material"; +import {fontFaces} from "./fontFace"; declare module '@mui/material/Button' { interface ButtonPropsVariantOverrides { @@ -100,8 +100,8 @@ const theme = createTheme({ fontWeight: 500, }, fontFamily: [ - "Twemoji Country Flags", '"Lato"', + "Twemoji Country Flags", "-apple-system", "BlinkMacSystemFont", "Arial",