немного правок по стартовой

This commit is contained in:
Tamara 2024-05-03 02:05:39 +03:00
parent 75691a564b
commit e36917e19b
3 changed files with 67 additions and 61 deletions

@ -96,75 +96,79 @@ const ExpandedLayout = ({
quizHeaderBlock, quizHeaderBlock,
quizMainBlock, quizMainBlock,
backgroundBlock, backgroundBlock,
}: LayoutProps) => ( }: LayoutProps) => {
<> const size = useRootContainerSize();
<Box const isTablet = size >= 700 && size < 1100;
sx={{ return (
height: "100%", <>
width: alignType === "center"? "100%": "42%",
display: "flex",
padding:
alignType === "center"
? "30px 35px"
: alignType === "left"
? "25px 0 31px 35px"
: "25px 35px 31px 0",
margin:
alignType === "center"
? "0 auto"
: alignType === "left"
? "0"
: "0 0 0 auto",
scrollbarWidth: "none",
"&::-webkit-scrollbar": {
width: 0,
},
overflowY: "auto",
}}
>
<Box <Box
sx={{ sx={{
minHeight: "calc(100% - 32px)", height: "100%",
position: "relative", width: alignType === "center" ? "100%" : isTablet ? "46%" : "42%",
width: "100%", display: "flex",
padding: padding:
alignType === "center" alignType === "center"
? "0" ? isTablet ? "30px 40px" : "30px 35px"
: alignType === "left" : alignType === "left"
? "0 40px 0 0" ? isTablet ? "25px 0 31px 40px" : "25px 0 31px 35px"
: "0 0 0 40px", : isTablet ? "25px 40px 31px 0" : "25px 35px 31px 0",
display: "flex", margin:
flexDirection: "column", alignType === "center"
justifyContent: "space-between", ? "0 auto"
alignItems: alignType === "center" ? "center" : "start", : alignType === "left"
borderRight: alignType === "left" ? "1px solid #9A9AAF80" : null, ? "0"
borderLeft: alignType === "right" ? "1px solid #9A9AAF80" : null, : "0 0 0 auto",
scrollbarWidth: "none", scrollbarWidth: "none",
"&::-webkit-scrollbar": { "&::-webkit-scrollbar": {
width: 0, width: 0,
}, },
overflowY: "auto",
}} }}
> >
{alignType !== "center" && quizHeaderBlock} <Box
{quizMainBlock} sx={{
minHeight: "calc(100% - 32px)",
position: "relative",
width: "100%",
padding:
alignType === "center"
? "0"
: alignType === "left"
? "0 40px 0 0"
: "0 0 0 40px",
display: "flex",
flexDirection: "column",
justifyContent: "space-between",
alignItems: alignType === "center" ? "center" : "start",
borderRight: alignType === "left" ? "1px solid #9A9AAF80" : null,
borderLeft: alignType === "right" ? "1px solid #9A9AAF80" : null,
scrollbarWidth: "none",
"&::-webkit-scrollbar": {
width: 0,
},
}}
>
{alignType !== "center" && quizHeaderBlock}
{quizMainBlock}
</Box>
</Box> </Box>
</Box> <Box
<Box sx={{
sx={{ position: "absolute",
position: "absolute", zIndex: -1,
zIndex: -1, left: 0,
left: 0, top: 0,
top: 0, height: "100%",
height: "100%", width: "100%",
width: "100%", overflow: "hidden",
overflow: "hidden", }}
}} >
> {backgroundBlock}
{backgroundBlock} </Box>
</Box> </>
</> );
); }
const CenteredLayout = ({ const CenteredLayout = ({
quizHeaderBlock, quizHeaderBlock,
@ -177,7 +181,7 @@ const CenteredLayout = ({
<Box <Box
sx={{ sx={{
overflow: "auto", overflow: "auto",
padding: "25px 25px 25px", padding: isTablet ? "25px 40px 25px" : "25px 25px 25px",
display: "flex", display: "flex",
flexDirection: "column", flexDirection: "column",
alignItems: "center", alignItems: "center",

@ -135,7 +135,7 @@ const ExpandedMobileLayout = ({
> >
<Box <Box
sx={{ sx={{
padding: "16px", padding: "20px",
height: "80%", height: "80%",
display: "flex", display: "flex",
flexGrow: 1, flexGrow: 1,
@ -200,7 +200,7 @@ const CenteredMobileLayout = ({
flexDirection: "column", flexDirection: "column",
justifyContent: "space-between", justifyContent: "space-between",
alignItems: "flex-start", alignItems: "flex-start",
padding: "10px 25px 25px", padding: "20px",
height: "100%", height: "100%",
overflowY: "auto", overflowY: "auto",
overflowX: "hidden", overflowX: "hidden",

@ -95,7 +95,8 @@ export const StartPageViewPublication = () => {
alignItems: "center", alignItems: "center",
flexWrap: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center"? "nowrap" : "wrap", flexWrap: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center"? "nowrap" : "wrap",
gap: isMobile? "20px" : "30px", gap: isMobile? "20px" : "30px",
mb: settings.cfg.startpageType === "centered" ? "25px" : "7px", mb: settings.cfg.startpageType === "centered" ? isMobile? "20px" : "25px" : "7px",
justifyContent: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" && isMobile? "center" : undefined
}} }}
> >
{settings.cfg.startpage.logo && {settings.cfg.startpage.logo &&
@ -136,6 +137,7 @@ export const StartPageViewPublication = () => {
alignItems: "center", alignItems: "center",
gap: "7px", gap: "7px",
textDecoration: "none", textDecoration: "none",
marginLeft: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" && !isTablet &&!isMobile ? "50px" : undefined
}} }}
> >
<NameplateLogo <NameplateLogo