-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a6f1e9c
commit 63b5e2a
Showing
15 changed files
with
214 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
VITE_URL="robo-school" | ||
VITE_NODE_ENV="development" | ||
VITE_NODE_ENV="production" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
import { FC } from "react" | ||
import { motion } from "framer-motion" | ||
import { FC, LegacyRef, forwardRef } from "react" | ||
import { IBefore } from "../before.data" | ||
|
||
const BeforeItem: FC<IBefore> = ({ text, title }) => { | ||
return ( | ||
<section className='before__item'> | ||
<h1>{title}</h1> | ||
<p>{text}</p> | ||
</section> | ||
) | ||
} | ||
|
||
const MBeforeItem: FC<IBefore> = forwardRef( | ||
({ text, title }, ref: LegacyRef<HTMLElement>) => { | ||
return ( | ||
<section className='before__item' ref={ref}> | ||
<h1>{title}</h1> | ||
<p>{text}</p> | ||
</section> | ||
) | ||
} | ||
) | ||
const BeforeItem = motion(MBeforeItem) | ||
export default BeforeItem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { IMG_URL } from "../../../constants/sys" | ||
|
||
const Img = () => { | ||
return ( | ||
<div className='img'> | ||
<img | ||
className='feedback__img' | ||
src={`${IMG_URL}procent.svg`} | ||
alt='Procents' | ||
/> | ||
</div> | ||
) | ||
} | ||
|
||
export default Img |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { motion } from "framer-motion" | ||
import { textAnim } from "../../../constants/animation" | ||
|
||
const Text = () => { | ||
return ( | ||
<motion.section | ||
className='feedback__text' | ||
initial='hidden' | ||
viewport={{ amount: 0.2, once: true }} | ||
whileInView='visible' | ||
> | ||
<motion.h1 variants={textAnim} custom={1}> | ||
Запишитесь на курс со скидкой 10% | ||
</motion.h1> | ||
<motion.p variants={textAnim} custom={2}> | ||
Акция действительна до 10 марта 2022 года | ||
</motion.p> | ||
</motion.section> | ||
) | ||
} | ||
|
||
export default Text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
import { FC } from "react" | ||
import { motion } from "framer-motion" | ||
import { FC, LegacyRef, forwardRef } from "react" | ||
import { IStatistic } from "../statistics.data" | ||
|
||
const Statistic: FC<IStatistic> = ({ count, text }) => { | ||
return ( | ||
<section className='statistic'> | ||
<h1>{count.toLocaleString()}</h1> | ||
<p>{text}</p> | ||
</section> | ||
) | ||
} | ||
|
||
const MStatistic: FC<IStatistic> = forwardRef( | ||
({ count, text }, ref: LegacyRef<HTMLElement>) => { | ||
return ( | ||
<section className='statistic' ref={ref}> | ||
<h1>{count.toLocaleString()}</h1> | ||
<p>{text}</p> | ||
</section> | ||
) | ||
} | ||
) | ||
const Statistic = motion(MStatistic) | ||
export default Statistic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
import { FC } from "react" | ||
import { motion } from "framer-motion" | ||
import { FC, LegacyRef, forwardRef } from "react" | ||
import Button from "../../ui/Button/Button" | ||
import { IPacket } from "../packet.data" | ||
import "./Packet.sass" | ||
const Packet: FC<IPacket> = ({ description, isActive, price, rang }) => { | ||
return ( | ||
<article className={isActive ? "packet active" : "packet"}> | ||
<h3 className='packet__rang'>– {rang} –</h3> | ||
<div className='packet__text'> | ||
<div> | ||
<h1>{price.toLocaleString()} ₽</h1> | ||
<p>{description}</p> | ||
const MPacket: FC<IPacket> = forwardRef( | ||
({ description, isActive, price, rang }, ref: LegacyRef<HTMLElement>) => { | ||
return ( | ||
<article className={isActive ? "packet active" : "packet"} ref={ref}> | ||
<h3 className='packet__rang'>– {rang} –</h3> | ||
<div className='packet__text'> | ||
<div> | ||
<h1>{price.toLocaleString()} ₽</h1> | ||
<p>{description}</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div className='packet__btn-cont'> | ||
<Button>Оставить заявку</Button> | ||
</div> | ||
</article> | ||
) | ||
} | ||
|
||
<div className='packet__btn-cont'> | ||
<Button>Оставить заявку</Button> | ||
</div> | ||
</article> | ||
) | ||
} | ||
) | ||
const Packet = motion(MPacket) | ||
export default Packet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,25 @@ | ||
import { ButtonHTMLAttributes, FC, PropsWithChildren } from "react" | ||
import { motion } from "framer-motion" | ||
import { | ||
ButtonHTMLAttributes, | ||
FC, | ||
LegacyRef, | ||
PropsWithChildren, | ||
forwardRef, | ||
} from "react" | ||
import "./Button.sass" | ||
const Button: FC< | ||
PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>> | ||
> = ({ children, className, ...rest }) => { | ||
return ( | ||
<button {...rest} className={className ? `${className} btn` : "btn"}> | ||
{children} | ||
</button> | ||
const MButton: FC<PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>>> = | ||
forwardRef( | ||
({ children, className, ...rest }, ref: LegacyRef<HTMLButtonElement>) => { | ||
return ( | ||
<button | ||
ref={ref} | ||
{...rest} | ||
className={className ? `${className} btn` : "btn"} | ||
> | ||
{children} | ||
</button> | ||
) | ||
} | ||
) | ||
} | ||
|
||
const Button = motion(MButton) | ||
export default Button |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
import type { PropsWithChildren } from "react" | ||
import "./Title.sass" | ||
export default function Title({ children }: PropsWithChildren) { | ||
return <h1 className='title'>{children}</h1> | ||
import { motion } from "framer-motion" | ||
import { FC, LegacyRef, ReactNode, forwardRef } from "react" | ||
interface IProps { | ||
children: ReactNode | ||
ref: LegacyRef<HTMLHeadingElement> | ||
} | ||
const MTitle: FC<IProps> = forwardRef(({ children, ref }) => { | ||
return ( | ||
<h1 className='title' ref={ref}> | ||
{children} | ||
</h1> | ||
) | ||
}) | ||
const Title = motion(MTitle) | ||
export default Title |
Oops, something went wrong.