Merge branch 'dev' into 'staging'

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

See merge request frontend/squzanswerer!134
This commit is contained in:
Nastya 2024-05-03 12:48:11 +00:00
commit 299f402ff0
3 changed files with 67 additions and 61 deletions

@ -96,19 +96,22 @@ const ExpandedLayout = ({
quizHeaderBlock, quizHeaderBlock,
quizMainBlock, quizMainBlock,
backgroundBlock, backgroundBlock,
}: LayoutProps) => ( }: LayoutProps) => {
const size = useRootContainerSize();
const isTablet = size >= 700 && size < 1100;
return (
<> <>
<Box <Box
sx={{ sx={{
height: "100%", height: "100%",
width: alignType === "center"? "100%": "42%", width: alignType === "center" ? "100%" : isTablet ? "46%" : "42%",
display: "flex", display: "flex",
padding: padding:
alignType === "center" alignType === "center"
? "30px 35px" ? isTablet ? "30px 40px" : "30px 35px"
: alignType === "left" : alignType === "left"
? "25px 0 31px 35px" ? isTablet ? "25px 0 31px 40px" : "25px 0 31px 35px"
: "25px 35px 31px 0", : isTablet ? "25px 40px 31px 0" : "25px 35px 31px 0",
margin: margin:
alignType === "center" alignType === "center"
? "0 auto" ? "0 auto"
@ -165,6 +168,7 @@ const ExpandedLayout = ({
</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