fix: StartPage PC and tablet design
This commit is contained in:
parent
112d13acd0
commit
33e0492719
@ -24,7 +24,7 @@ export const StartPageViewPublication = () => {
|
|||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { settings } = useQuizData();
|
const { settings } = useQuizData();
|
||||||
const { isMobileDevice } = useUADevice();
|
const { isMobileDevice } = useUADevice();
|
||||||
const isMobile = useRootContainerSize() < 650;
|
const isMobile = useRootContainerSize() < 700;
|
||||||
const isTablet = useRootContainerSize() < 800;
|
const isTablet = useRootContainerSize() < 800;
|
||||||
|
|
||||||
const handleCopyNumber = () => {
|
const handleCopyNumber = () => {
|
||||||
@ -102,6 +102,7 @@ export const StartPageViewPublication = () => {
|
|||||||
sx={{
|
sx={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
|
flexWrap: "wrap",
|
||||||
gap: "30px",
|
gap: "30px",
|
||||||
mb: "7px",
|
mb: "7px",
|
||||||
}}
|
}}
|
||||||
@ -145,7 +146,7 @@ export const StartPageViewPublication = () => {
|
|||||||
? "center"
|
? "center"
|
||||||
: "start"
|
: "start"
|
||||||
: "start",
|
: "start",
|
||||||
mt: "28px",
|
marginTop: "28px",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@ -216,6 +217,7 @@ export const StartPageViewPublication = () => {
|
|||||||
sx={{
|
sx={{
|
||||||
mt: "46px",
|
mt: "46px",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
|
flexGrow: settings.cfg.startpageType === "centered" ? 1 : 0,
|
||||||
gap: "20px",
|
gap: "20px",
|
||||||
alignItems: "flex-end",
|
alignItems: "flex-end",
|
||||||
justifyContent: "space-between",
|
justifyContent: "space-between",
|
||||||
@ -223,12 +225,7 @@ export const StartPageViewPublication = () => {
|
|||||||
flexWrap: "wrap",
|
flexWrap: "wrap",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<Box sx={{ maxWidth: isTablet ? "240px" : "300px" }}>
|
||||||
sx={{
|
|
||||||
maxWidth: isTablet ? "240px" : "300px",
|
|
||||||
marginBottom: "10px",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{settings.cfg.info.site && (
|
{settings.cfg.info.site && (
|
||||||
<Link mb="16px" href={settings.cfg.info.site}>
|
<Link mb="16px" href={settings.cfg.info.site}>
|
||||||
<Typography
|
<Typography
|
||||||
@ -323,7 +320,6 @@ export const StartPageViewPublication = () => {
|
|||||||
/>
|
/>
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
fontSize: "20px",
|
|
||||||
color:
|
color:
|
||||||
settings.cfg.startpageType === "expanded" && !isMobile
|
settings.cfg.startpageType === "expanded" && !isMobile
|
||||||
? "#F5F7FF"
|
? "#F5F7FF"
|
||||||
@ -360,7 +356,8 @@ function QuizPreviewLayoutByType({
|
|||||||
startpageType: QuizStartpageType;
|
startpageType: QuizStartpageType;
|
||||||
alignType: QuizStartpageAlignType;
|
alignType: QuizStartpageAlignType;
|
||||||
}) {
|
}) {
|
||||||
const isMobile = useRootContainerSize() < 650;
|
const isTablet = useRootContainerSize() < 1100;
|
||||||
|
const isMobile = useRootContainerSize() < 700;
|
||||||
|
|
||||||
function StartPageMobile() {
|
function StartPageMobile() {
|
||||||
return (
|
return (
|
||||||
@ -379,6 +376,7 @@ function QuizPreviewLayoutByType({
|
|||||||
sx={{
|
sx={{
|
||||||
width: "100%",
|
width: "100%",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
|
flexGrow: 1,
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
justifyContent: "space-between",
|
justifyContent: "space-between",
|
||||||
alignItems: "flex-start",
|
alignItems: "flex-start",
|
||||||
@ -399,6 +397,7 @@ function QuizPreviewLayoutByType({
|
|||||||
sx={{
|
sx={{
|
||||||
height: "80%",
|
height: "80%",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
|
flexGrow: 1,
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
justifyContent: "space-between",
|
justifyContent: "space-between",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
@ -439,7 +438,6 @@ function QuizPreviewLayoutByType({
|
|||||||
: "row-reverse",
|
: "row-reverse",
|
||||||
flexGrow: 1,
|
flexGrow: 1,
|
||||||
justifyContent: isMobile ? "flex-end" : undefined,
|
justifyContent: isMobile ? "flex-end" : undefined,
|
||||||
height: "100%",
|
|
||||||
minHeight: "100vh",
|
minHeight: "100vh",
|
||||||
"&::-webkit-scrollbar": { width: 0 },
|
"&::-webkit-scrollbar": { width: 0 },
|
||||||
overflow: "auto",
|
overflow: "auto",
|
||||||
@ -479,31 +477,30 @@ function QuizPreviewLayoutByType({
|
|||||||
{isMobile ? (
|
{isMobile ? (
|
||||||
<StartPageMobile />
|
<StartPageMobile />
|
||||||
) : (
|
) : (
|
||||||
<Box
|
<Box>
|
||||||
sx={{
|
|
||||||
overflow: "auto",
|
|
||||||
position: "relative",
|
|
||||||
display: "flex",
|
|
||||||
justifyContent: startpageAlignTypeToJustifyContent[alignType],
|
|
||||||
flexGrow: 1,
|
|
||||||
height: "100%",
|
|
||||||
"&::-webkit-scrollbar": { width: 0 },
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
|
minHeight: "100vh",
|
||||||
width: "40%",
|
width: "40%",
|
||||||
position: "relative",
|
|
||||||
padding: "16px",
|
padding: "16px",
|
||||||
zIndex: 3,
|
zIndex: 3,
|
||||||
display: "flex",
|
|
||||||
flexDirection: "column",
|
|
||||||
justifyContent: "space-between",
|
|
||||||
alignItems: alignType === "center" ? "center" : "start",
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{quizHeaderBlock}
|
<Box
|
||||||
{quizMainBlock}
|
sx={{
|
||||||
|
padding: "16px",
|
||||||
|
minHeight: "calc(100vh - 32px)",
|
||||||
|
position: "relative",
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
justifyContent: "space-between",
|
||||||
|
alignItems: alignType === "center" ? "center" : "start",
|
||||||
|
borderRight: "1px solid #9A9AAF80",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{quizHeaderBlock}
|
||||||
|
{quizMainBlock}
|
||||||
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
@ -535,9 +532,8 @@ function QuizPreviewLayoutByType({
|
|||||||
padding: "16px",
|
padding: "16px",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
justifyContent: "space-between",
|
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
height: "100%",
|
minHeight: "100vh",
|
||||||
"&::-webkit-scrollbar": { width: 0 },
|
"&::-webkit-scrollbar": { width: 0 },
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@ -545,11 +541,12 @@ function QuizPreviewLayoutByType({
|
|||||||
{backgroundBlock && (
|
{backgroundBlock && (
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
width: "60%",
|
width: "100%",
|
||||||
height: "275px",
|
maxWidth: "844px",
|
||||||
// overflow: "hidden",
|
height: isTablet ? "530px" : "306px",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
|
"& > img": { width: "100%", borderRadius: "12px" },
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{backgroundBlock}
|
{backgroundBlock}
|
||||||
|
Loading…
Reference in New Issue
Block a user