add crutch
This commit is contained in:
parent
dac5356d1d
commit
50a1617388
@ -8,6 +8,9 @@ type ContactTextBlockProps = {
|
|||||||
settings: QuizSettingsConfig;
|
settings: QuizSettingsConfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const pathOnly = window.location.pathname;
|
||||||
|
const isCrutchNoDraw = pathOnly === "/28525cd7-9ddf-4c4a-a55b-e3d2f7d47583";
|
||||||
|
|
||||||
export const ContactTextBlock: FC<ContactTextBlockProps> = ({ settings }) => {
|
export const ContactTextBlock: FC<ContactTextBlockProps> = ({ settings }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const isMobile = useRootContainerSize() < 850;
|
const isMobile = useRootContainerSize() < 850;
|
||||||
@ -47,7 +50,9 @@ export const ContactTextBlock: FC<ContactTextBlockProps> = ({ settings }) => {
|
|||||||
wordBreak: "break-word",
|
wordBreak: "break-word",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{settings.cfg.formContact.title || t("Fill out the form to receive your test results")}
|
{isCrutchNoDraw
|
||||||
|
? "Заполните форму, чтобы отправить ваши ответы"
|
||||||
|
: settings.cfg.formContact.title || t("Fill out the form to receive your test results")}
|
||||||
</Typography>
|
</Typography>
|
||||||
{settings.cfg.formContact.desc && (
|
{settings.cfg.formContact.desc && (
|
||||||
<Typography
|
<Typography
|
||||||
|
|||||||
@ -49,7 +49,6 @@ export const PointSystemResultList = () => {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
|
|||||||
@ -23,6 +23,8 @@ import { useQuizStore } from "@/stores/useQuizStore";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { NameplateLogoDark } from "@/assets/icons/NameplateLogoDark";
|
import { NameplateLogoDark } from "@/assets/icons/NameplateLogoDark";
|
||||||
|
|
||||||
|
const pathOnly = window.location.pathname;
|
||||||
|
const isCrutchNoDraw = pathOnly === "/28525cd7-9ddf-4c4a-a55b-e3d2f7d47583";
|
||||||
type ResultFormProps = {
|
type ResultFormProps = {
|
||||||
resultQuestion: QuizQuestionResult;
|
resultQuestion: QuizQuestionResult;
|
||||||
};
|
};
|
||||||
@ -295,6 +297,7 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => {
|
|||||||
>
|
>
|
||||||
{pointsSum} {t("of")} {totalQuestions}
|
{pointsSum} {t("of")} {totalQuestions}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
{!isCrutchNoDraw && (
|
||||||
<TextAccordion
|
<TextAccordion
|
||||||
headerText={
|
headerText={
|
||||||
<Typography
|
<Typography
|
||||||
@ -321,6 +324,7 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => {
|
|||||||
<PointSystemResultList />
|
<PointSystemResultList />
|
||||||
</Box>
|
</Box>
|
||||||
</TextAccordion>
|
</TextAccordion>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@ -19,6 +19,9 @@ import QuizVideo from "@/ui_kit/VideoIframe/VideoIframe";
|
|||||||
|
|
||||||
import { isProduction } from "@/utils/defineDomain";
|
import { isProduction } from "@/utils/defineDomain";
|
||||||
|
|
||||||
|
const pathOnly = window.location.pathname;
|
||||||
|
const isCrutchNoDraw = pathOnly === "/28525cd7-9ddf-4c4a-a55b-e3d2f7d47583";
|
||||||
|
|
||||||
export const StartPageViewPublication = () => {
|
export const StartPageViewPublication = () => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { settings, show_badge, quizId, questions } = useQuizStore();
|
const { settings, show_badge, quizId, questions } = useQuizStore();
|
||||||
@ -39,15 +42,6 @@ export const StartPageViewPublication = () => {
|
|||||||
yandexMetrics.phoneNumberOpened();
|
yandexMetrics.phoneNumberOpened();
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log("------------------------------------------------");
|
|
||||||
console.log("Background type:", settings.cfg.startpage.background.type);
|
|
||||||
console.log("Is image type:", settings.cfg.startpage.background.type === "image");
|
|
||||||
console.log("Is video type:", settings.cfg.startpage.background.type === "video");
|
|
||||||
console.log("Video URL:", settings.cfg.startpage.background.video);
|
|
||||||
console.log("Desktop background:", settings.cfg.startpage.background.desktop);
|
|
||||||
console.log("Startpage type:", settings.cfg.startpageType);
|
|
||||||
console.log("------------------------------------------------");
|
|
||||||
|
|
||||||
const background =
|
const background =
|
||||||
settings.cfg.startpage.background.type === "image" ? (
|
settings.cfg.startpage.background.type === "image" ? (
|
||||||
<img
|
<img
|
||||||
@ -277,8 +271,9 @@ export const StartPageViewPublication = () => {
|
|||||||
margin: "12px 0 30px",
|
margin: "12px 0 30px",
|
||||||
overflowWrap: "break-word",
|
overflowWrap: "break-word",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
textAlign:
|
textAlign: isCrutchNoDraw
|
||||||
settings.cfg.startpageType === "centered" || settings.cfg.startpage.position === "center"
|
? "justify"
|
||||||
|
: settings.cfg.startpageType === "centered" || settings.cfg.startpage.position === "center"
|
||||||
? "center"
|
? "center"
|
||||||
: "-moz-initial",
|
: "-moz-initial",
|
||||||
color: settings.cfg.startpageType === "expanded" ? "white" : theme.palette.text.primary,
|
color: settings.cfg.startpageType === "expanded" ? "white" : theme.palette.text.primary,
|
||||||
|
|||||||
@ -16,6 +16,8 @@ type VariantProps = {
|
|||||||
const pathOnly = window.location.pathname;
|
const pathOnly = window.location.pathname;
|
||||||
|
|
||||||
const isCrutchImg = pathOnly === "/28525cd7-9ddf-4c4a-a55b-e3d2f7d47583";
|
const isCrutchImg = pathOnly === "/28525cd7-9ddf-4c4a-a55b-e3d2f7d47583";
|
||||||
|
|
||||||
|
const isCrutchNoDraw = pathOnly === "/28525cd7-9ddf-4c4a-a55b-e3d2f7d47583";
|
||||||
// 23.02.2025
|
// 23.02.2025
|
||||||
const crutchlist = {
|
const crutchlist = {
|
||||||
115048: { x: 629, y: 491 },
|
115048: { x: 629, y: 491 },
|
||||||
@ -49,6 +51,7 @@ export const Variant = ({ currentQuestion }: VariantProps) => {
|
|||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const isMobile = useRootContainerSize() < 650;
|
const isMobile = useRootContainerSize() < 650;
|
||||||
const isTablet = useRootContainerSize() < 850;
|
const isTablet = useRootContainerSize() < 850;
|
||||||
|
const isDesctop = useRootContainerSize() > 900;
|
||||||
const answers = useQuizViewStore((state) => state.answers);
|
const answers = useQuizViewStore((state) => state.answers);
|
||||||
const ownVariants = useQuizViewStore((state) => state.ownVariants);
|
const ownVariants = useQuizViewStore((state) => state.ownVariants);
|
||||||
const updateOwnVariant = useQuizViewStore((state) => state.updateOwnVariant);
|
const updateOwnVariant = useQuizViewStore((state) => state.updateOwnVariant);
|
||||||
@ -145,14 +148,19 @@ export const Variant = ({ currentQuestion }: VariantProps) => {
|
|||||||
sx={{
|
sx={{
|
||||||
maxWidth: "400px",
|
maxWidth: "400px",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
height: "300px",
|
height: isCrutchNoDraw ? "500px" : "300px",
|
||||||
}}
|
}}
|
||||||
onClick={(event) => event.preventDefault()}
|
onClick={(event) => event.preventDefault()}
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
key={currentQuestion.id}
|
key={currentQuestion.id}
|
||||||
src={choiceImgUrlQuestion}
|
src={choiceImgUrlQuestion}
|
||||||
style={{ width: "100%", height: "100%", objectFit: isCrutchImg ? "contain" : "cover" }}
|
style={{
|
||||||
|
maxWidth: "100%",
|
||||||
|
width: isDesctop && isCrutchNoDraw ? "600px" : "100%",
|
||||||
|
height: "100%",
|
||||||
|
objectFit: isCrutchImg ? "contain" : "cover",
|
||||||
|
}}
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@ -13,6 +13,7 @@ const isProduction = !(
|
|||||||
|
|
||||||
//туризм больше не в исключениях
|
//туризм больше не в исключениях
|
||||||
if (!isProduction) domain = "https://s.hbpn.link";
|
if (!isProduction) domain = "https://s.hbpn.link";
|
||||||
// domain = "https://hbpn.link";
|
|
||||||
|
domain = "https://hbpn.link";
|
||||||
|
|
||||||
export { domain, isProduction };
|
export { domain, isProduction };
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user