Preview/discount pages

This commit is contained in:
Денис Катаев 2024-02-21 06:24:50 +00:00 committed by Victor Ershov
parent 2d4d76477a
commit ca220dfdf7
29 changed files with 114 additions and 29 deletions

View File

@ -95,6 +95,7 @@ import AdditionalDiscount from "../pages/AdditionalDiscount";
import TrialPaymentWithDiscount from "../pages/TrialPaymentWithDiscount"; import TrialPaymentWithDiscount from "../pages/TrialPaymentWithDiscount";
import MarketingLanding from "../pages/EmailLetters/MarketingLanding"; import MarketingLanding from "../pages/EmailLetters/MarketingLanding";
import MarketingTrialPayment from "../pages/EmailLetters/MarketingTrialPayment"; import MarketingTrialPayment from "../pages/EmailLetters/MarketingTrialPayment";
import { ScrollToTop } from "@/hooks/scrollToTop";
const isProduction = import.meta.env.MODE === "production"; const isProduction = import.meta.env.MODE === "production";
@ -525,6 +526,7 @@ function Layout({ setIsSpecialOfferOpen }: LayoutProps): JSX.Element {
return ( return (
<div className="container"> <div className="container">
<ScrollToTop />
{showHeader ? ( {showHeader ? (
<Header <Header
openMenu={() => setIsMenuOpen(true)} openMenu={() => setIsMenuOpen(true)}

View File

@ -9,6 +9,7 @@
.icon { .icon {
width: 96px; width: 96px;
height: 96px;
} }
.text { .text {

View File

@ -33,6 +33,7 @@
.profile-picture { .profile-picture {
width: 96px; width: 96px;
height: 96px;
border-radius: 100%; border-radius: 100%;
object-fit: cover; object-fit: cover;
object-position: center; object-position: center;

View File

@ -12,7 +12,11 @@ function PaymentFailPage(): JSX.Element {
return ( return (
<section className={`${styles.page} page`}> <section className={`${styles.page} page`}>
<img src="/ExclamationIcon.png" alt="Exclamation Icon" /> <img
src="/ExclamationIcon.png"
alt="Exclamation Icon"
style={{ minHeight: "180px" }}
/>
<div className={styles.text}> <div className={styles.text}>
<Title variant="h1">{t("auweb.pay_bad.title")}</Title> <Title variant="h1">{t("auweb.pay_bad.title")}</Title>
<p className={styles.list}>{t("auweb.pay_bad.text1")}</p> <p className={styles.list}>{t("auweb.pay_bad.text1")}</p>

View File

@ -18,7 +18,11 @@ function PaymentSuccessPage(): JSX.Element {
return ( return (
<section className={`${styles.page} page`}> <section className={`${styles.page} page`}>
<img src="/SuccessIcon.png" alt="Success Icon" /> <img
src="/SuccessIcon.png"
alt="Success Icon"
style={{ minHeight: "98px" }}
/>
<div className={styles.text}> <div className={styles.text}>
<Title variant="h1">{t("auweb.pay_good.title")}</Title> <Title variant="h1">{t("auweb.pay_good.title")}</Title>
<p>{t("auweb.pay_good.text1")}</p> <p>{t("auweb.pay_good.text1")}</p>

View File

@ -16,7 +16,7 @@ function AdditionalDiscount() {
<Title variant="h2" className={styles.title}> <Title variant="h2" className={styles.title}>
Save 65% off! Save 65% off!
</Title> </Title>
<img src="/friends.webp" alt="Friends" /> <img src="/friends.webp" alt="Friends" style={{ minHeight: "180px" }} />
<div className={styles["discount-point"]}> <div className={styles["discount-point"]}>
<img src="/fire.png" alt="Fire" /> <img src="/fire.png" alt="Fire" />
<p className={styles["discount-point-description"]}> <p className={styles["discount-point-description"]}>

View File

@ -36,6 +36,7 @@
.discount-point > img { .discount-point > img {
width: 48px; width: 48px;
height: 48px;
} }
.discount-point-description { .discount-point-description {

View File

@ -22,7 +22,7 @@ function AllRightPage() {
return ( return (
<section className={`${styles.page} page`}> <section className={`${styles.page} page`}>
<img src="/sun.svg" alt="The sun" /> <img src="/sun.svg" alt="The sun" style={{ minHeight: "188px" }} />
<div> <div>
<Title variant="h1" className={styles.title}> <Title variant="h1" className={styles.title}>
All right! <br /> You keep your emotions in check{" "} All right! <br /> You keep your emotions in check{" "}

View File

@ -13,6 +13,7 @@
background-size: cover; background-size: cover;
color: #fff; color: #fff;
padding-top: 64px; padding-top: 64px;
background-color: #171717;
} }
.title { .title {

View File

@ -17,7 +17,7 @@ function AlmostTherePage() {
return ( return (
<section className={`${styles.page} page`}> <section className={`${styles.page} page`}>
<img src="/magnifier.svg" alt="The magnifier" /> <img src="/magnifier.svg" alt="The magnifier" style={{ minHeight: "220px" }} />
<div> <div>
<Title variant="h1" className={styles.title}> <Title variant="h1" className={styles.title}>
Almost there! <br /> Now let's tailor your plan by understanding the{" "} Almost there! <br /> Now let's tailor your plan by understanding the{" "}

View File

@ -22,7 +22,7 @@ function BothPage() {
return ( return (
<section className={`${styles.page} page`}> <section className={`${styles.page} page`}>
<img src="/both.svg" alt="The both" /> <img src="/both.svg" alt="The both" style={{ minHeight: "255px" }} />
<div> <div>
<Title variant="h1" className={styles.title}> <Title variant="h1" className={styles.title}>
Wonderful! <br /> Wonderful! <br />

View File

@ -34,6 +34,7 @@
.eye-image { .eye-image {
width: 100%; width: 100%;
max-width: 180px; max-width: 180px;
min-height: 180px;
} }
.top-section { .top-section {

View File

@ -37,22 +37,34 @@ function MarketingLanding() {
</p> </p>
<img <img
className={styles.image} className={styles.image}
style={{ marginTop: 0 }} style={{ marginTop: 0, minHeight: "282px" }}
src="/aboutPlan.webp" src="/aboutPlan.webp"
alt="About plan" alt="About plan"
/> />
<Title className={styles.title}>Highlights of your plan:</Title> <Title className={styles.title}>Highlights of your plan:</Title>
<img className={styles.image} src="/messanging.webp" alt="Messanging" /> <img
className={styles.image}
src="/messanging.webp"
alt="Messanging"
style={{ minHeight: "214px" }}
/>
<img <img
className={styles.image} className={styles.image}
src="/horoscopePhone.webp" src="/horoscopePhone.webp"
alt="Horoscope phone" alt="Horoscope phone"
style={{ minHeight: "315px" }}
/>
<img
className={styles.image}
src="/guide.webp"
alt="Guide"
style={{ minHeight: "323px" }}
/> />
<img className={styles.image} src="/guide.webp" alt="Guide" />
<img <img
className={styles.image} className={styles.image}
src="/understanding.webp" src="/understanding.webp"
alt="Understanding" alt="Understanding"
style={{ minHeight: "323px" }}
/> />
<ComparePrices /> <ComparePrices />
<PointsList <PointsList
@ -72,7 +84,12 @@ function MarketingLanding() {
<LastWeek /> <LastWeek />
<MoneyBack /> <MoneyBack />
<GuardPayments /> <GuardPayments />
<img className={styles.payments} src="/payments.svg" alt="Payments" /> <img
className={styles.payments}
src="/payments.svg"
alt="Payments"
style={{ minHeight: "140px" }}
/>
<footer className={styles.footer}> <footer className={styles.footer}>
<MainButton className={styles.button} onClick={handleNext}> <MainButton className={styles.button} onClick={handleNext}>
Continue Continue

View File

@ -1,7 +1,6 @@
.page { .page {
background-color: #fff0f0; background-color: #fff0f0;
padding: 60px 45px; padding: 60px 45px;
min-width: 100vw;
height: fit-content; height: fit-content;
min-height: 100dvh; min-height: 100dvh;
} }

View File

@ -17,7 +17,11 @@ function GoalSetupPage() {
return ( return (
<section className={`${styles.page} page`}> <section className={`${styles.page} page`}>
<img src="/starry-sky.svg" alt="The starry sky" /> <img
src="/starry-sky.svg"
alt="The starry sky"
style={{ minHeight: "197px" }}
/>
<div> <div>
<Title variant="h1" className={styles.title}> <Title variant="h1" className={styles.title}>
Great! You just set your first goal! Great! You just set your first goal!

View File

@ -6,14 +6,16 @@
justify-content: start; justify-content: start;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
gap: 20px; gap: 16px;
background: url("/moon_phases.webp"); background: url("/moon_phases.webp");
background-position-y: bottom; background-position-y: bottom;
background-position-x: center; background-position-x: center;
background-size: cover; background-size: cover;
background-repeat: no-repeat; background-repeat: no-repeat;
color: #fff; color: #fff;
padding-top: 64px; padding-top: 48px;
padding-bottom: 96px;
background-color: #171717;
} }
.title { .title {
@ -56,5 +58,5 @@
min-height: fit-content; min-height: fit-content;
border-radius: 12px; border-radius: 12px;
font-weight: 400; font-weight: 400;
margin-top: 30px; margin-top: 20px;
} }

View File

@ -26,7 +26,11 @@ function NoBirthtimePage() {
return ( return (
<section className={`${styles.page} page`}> <section className={`${styles.page} page`}>
<img src="/starry-clock.svg" alt="The clock" /> <img
src="/starry-clock.svg"
alt="The clock"
style={{ minHeight: "230px" }}
/>
<div> <div>
<Title variant="h1" className={styles.title}> <Title variant="h1" className={styles.title}>
No problem! You can still find plenty of great insights without No problem! You can still find plenty of great insights without

View File

@ -22,7 +22,11 @@ function NotAlonePage() {
return ( return (
<section className={`${styles.page} page`}> <section className={`${styles.page} page`}>
<img src="/umbrella.svg" alt="The starry key" /> <img
src="/umbrella.svg"
alt="The starry key"
style={{ minHeight: "227px" }}
/>
<div> <div>
<Title variant="h1" className={styles.title}> <Title variant="h1" className={styles.title}>
Youre not alone. <br /> A lot of{" "} Youre not alone. <br /> A lot of{" "}

View File

@ -22,7 +22,7 @@ function PartnerRightPlacePage() {
return ( return (
<section className={`${styles.page} page`}> <section className={`${styles.page} page`}>
<img src="/darts.svg" alt="The darts" /> <img src="/darts.svg" alt="The darts" style={{ minHeight: "251px" }} />
<div> <div>
<Title variant="h1" className={styles.title}> <Title variant="h1" className={styles.title}>
Youve come to the right place, <br /> Youve come to the right place, <br />

View File

@ -22,7 +22,11 @@ function PartnerThingPage() {
return ( return (
<section className={`${styles.page} page`}> <section className={`${styles.page} page`}>
<img src="/compass.svg" alt="The compass" /> <img
src="/compass.svg"
alt="The compass"
style={{ minHeight: "227px" }}
/>
<div> <div>
<Title variant="h1" className={styles.title}> <Title variant="h1" className={styles.title}>
<span style={{ color: "#f2c94c" }}>{zodiacSign}</span>, heres the <span style={{ color: "#f2c94c" }}>{zodiacSign}</span>, heres the

View File

@ -22,7 +22,7 @@ function PartnerTotallyNormalPage() {
return ( return (
<section className={`${styles.page} page`}> <section className={`${styles.page} page`}>
<img src="/clouds.svg" alt="The clouds" /> <img src="/clouds.svg" alt="The clouds" style={{ minHeight: "175px" }} />
<div> <div>
<Title variant="h1" className={styles.title}> <Title variant="h1" className={styles.title}>
Its totally normal to feel nervous,{" "} Its totally normal to feel nervous,{" "}

View File

@ -10,9 +10,9 @@ import { textVariables } from "@/data";
function QuestionnaireIntermediatePage() { function QuestionnaireIntermediatePage() {
const navigate = useNavigate(); const navigate = useNavigate();
const { problems } = useSelector(selectors.selectQuestionnaire); const { problems } = useSelector(selectors.selectQuestionnaire);
const path = window.location.href.split("/").pop(); const path = window.location.href.split("/").filter(Boolean).pop();
const backgroundImages = const backgroundImages =
textVariables[path as keyof typeof textVariables].backgroundImages; textVariables[path as keyof typeof textVariables]?.backgroundImages;
const backgroundImage = const backgroundImage =
backgroundImages && backgroundImages[problems] backgroundImages && backgroundImages[problems]
? backgroundImages[problems] ? backgroundImages[problems]
@ -24,7 +24,9 @@ function QuestionnaireIntermediatePage() {
const handleNext = () => { const handleNext = () => {
if (path === "works-traits") { if (path === "works-traits") {
return navigate(`${routes.client.questionnaire()}/personalityTraits/relateToStatement`); return navigate(
`${routes.client.questionnaire()}/personalityTraits/relateToStatement`
);
} }
navigate(`${routes.client.questionnaire()}/partnerProfile/partnerGender`); navigate(`${routes.client.questionnaire()}/partnerProfile/partnerGender`);
}; };
@ -36,7 +38,11 @@ function QuestionnaireIntermediatePage() {
backgroundImage: `url(${backgroundImage})`, backgroundImage: `url(${backgroundImage})`,
}} }}
> >
<img src="/starry_key.svg" alt="The starry key" /> <img
src="/starry_key.svg"
alt="The starry key"
style={{ minHeight: "138px" }}
/>
<div> <div>
{path && ( {path && (
<Title variant="h1" className={styles.title}> <Title variant="h1" className={styles.title}>

View File

@ -17,7 +17,11 @@ function RelationshipAlmostTherePage() {
return ( return (
<section className={`${styles.page} page`}> <section className={`${styles.page} page`}>
<img src="/magnifier.svg" alt="The magnifier" /> <img
src="/magnifier.svg"
alt="The magnifier"
style={{ minHeight: "220px" }}
/>
<div> <div>
<Title variant="h1" className={styles.title}> <Title variant="h1" className={styles.title}>
Almost there! Now let's begin tailoring your plan by understanding Almost there! Now let's begin tailoring your plan by understanding

View File

@ -56,12 +56,12 @@ function RelationshipZodiacInfoPage() {
<section className={`${styles.page} page`}> <section className={`${styles.page} page`}>
<div className={styles["image-container"]}> <div className={styles["image-container"]}>
<img <img
src={`/questionnaire/zodiacs/${gender}/${zodiacSign.toLowerCase()}.webp`} src={`/questionnaire/zodiacs/${gender}/${zodiacSign?.toLowerCase()}.webp`}
alt="The zodiac signs" alt="The zodiac signs"
/> />
<img src="/plus.svg" alt="Plus" /> <img src="/plus.svg" alt="Plus" />
<img <img
src={`/questionnaire/zodiacs/${partnerGender}/${partnerZodiacSign.toLowerCase()}.webp`} src={`/questionnaire/zodiacs/${partnerGender}/${partnerZodiacSign?.toLowerCase()}.webp`}
alt="The zodiac signs" alt="The zodiac signs"
/> />
</div> </div>

View File

@ -53,6 +53,7 @@
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
gap: 4px;
} }
.discount { .discount {

View File

@ -22,7 +22,11 @@ function WithHeadPage() {
return ( return (
<section className={`${styles.page} page`}> <section className={`${styles.page} page`}>
<img src="/scalesHead.svg" alt="The scales" /> <img
src="/scalesHead.svg"
alt="The scales"
style={{ minHeight: "255px" }}
/>
<div> <div>
<Title variant="h1" className={styles.title}> <Title variant="h1" className={styles.title}>
Based on our data, 39% of{" "} Based on our data, 39% of{" "}

View File

@ -22,7 +22,11 @@ function WithHeartPage() {
return ( return (
<section className={`${styles.page} page`}> <section className={`${styles.page} page`}>
<img src="/scalesHeart.svg" alt="The scales" /> <img
src="/scalesHeart.svg"
alt="The scales"
style={{ minHeight: "255px" }}
/>
<div> <div>
<Title variant="h1" className={styles.title}> <Title variant="h1" className={styles.title}>
Based on our data, 49% of{" "} Based on our data, 49% of{" "}

16
src/hooks/scrollToTop.tsx Normal file
View File

@ -0,0 +1,16 @@
import { useEffect } from "react";
import { useLocation } from "react-router-dom";
export const ScrollToTop = () => {
const { pathname } = useLocation();
useEffect(() => {
window.scrollTo({
top: 0,
left: 0,
behavior: "smooth",
});
}, [pathname]);
return null;
};

View File

@ -184,6 +184,7 @@ div[class^="divider"] {
#root { #root {
height: 100%; height: 100%;
min-width: 100vw;
} }
a, a,