main page changes
This commit is contained in:
1
assets/icons/telegram.svg
Normal file
1
assets/icons/telegram.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg role="img" viewBox="0 0 512 512" width="24" height="24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="m196.03,328.68 l162,118.8c16.8,10.8 31.2,4.8 36,-16.8l66,-309.6c6,-26.4 -10.8,-38.4 -28.8,-30L46.03,239.88c-25.2,9.6 -25.2,25.2 -4.8,31.2l99.6,31.2 228,-145.2c10.8,-6 20.4,-3.6 13.2,4.8"/></svg>
|
||||
|
After Width: | Height: | Size: 319 B |
@@ -1,3 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="706" height="689" fill="none" viewBox="0 0 706 689">
|
||||
<path fill="#D9D9D9" d="M229.7 31.7a78 78 0 0 1 98.3-22l14.4 7.6a78 78 0 0 0 63.7 4l15.5-5.9a78 78 0 0 1 95.6 34.9l6 10.8a78 78 0 0 0 52.9 38.4l12.6 2.4a78 78 0 0 1 62.6 82.6l-.7 9.2a78 78 0 0 0 23.8 62.3l6.7 6.5a78 78 0 0 1 8 103.8l-6.6 8.5a78 78 0 0 0-14.2 64.7l2.2 10a78 78 0 0 1-49 90.4l-14 5.2a78 78 0 0 0-45.7 45.4l-5.2 13.6a78 78 0 0 1-88.4 48.7l-16.8-3.4a78 78 0 0 0-62 13.8l-13.7 10.2a78 78 0 0 1-100.7-6.6l-10.5-10.1a78 78 0 0 0-60.7-21.7l-15 1.3a78 78 0 0 1-82.6-61l-2.2-10.1a78 78 0 0 0-40.4-52.5l-9.5-5a78 78 0 0 1-36.9-97.3l3.4-8.8a78 78 0 0 0-5-66.5l-4.5-8a78 78 0 0 1 21.7-101.3l10.3-7.6A78 78 0 0 0 74.7 161l.9-12.4a78 78 0 0 1 71.7-72.1l16.5-1.3a78 78 0 0 0 56-30.5l10-13Z"/>
|
||||
<path fill="#98b1fe" d="M229.7 31.7a78 78 0 0 1 98.3-22l14.4 7.6a78 78 0 0 0 63.7 4l15.5-5.9a78 78 0 0 1 95.6 34.9l6 10.8a78 78 0 0 0 52.9 38.4l12.6 2.4a78 78 0 0 1 62.6 82.6l-.7 9.2a78 78 0 0 0 23.8 62.3l6.7 6.5a78 78 0 0 1 8 103.8l-6.6 8.5a78 78 0 0 0-14.2 64.7l2.2 10a78 78 0 0 1-49 90.4l-14 5.2a78 78 0 0 0-45.7 45.4l-5.2 13.6a78 78 0 0 1-88.4 48.7l-16.8-3.4a78 78 0 0 0-62 13.8l-13.7 10.2a78 78 0 0 1-100.7-6.6l-10.5-10.1a78 78 0 0 0-60.7-21.7l-15 1.3a78 78 0 0 1-82.6-61l-2.2-10.1a78 78 0 0 0-40.4-52.5l-9.5-5a78 78 0 0 1-36.9-97.3l3.4-8.8a78 78 0 0 0-5-66.5l-4.5-8a78 78 0 0 1 21.7-101.3l10.3-7.6A78 78 0 0 0 74.7 161l.9-12.4a78 78 0 0 1 71.7-72.1l16.5-1.3a78 78 0 0 0 56-30.5l10-13Z"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 803 B After Width: | Height: | Size: 803 B |
@@ -30,20 +30,17 @@
|
||||
}
|
||||
|
||||
.backdropOnText {
|
||||
background-color: var(--background);
|
||||
padding: 0.5rem 8px;
|
||||
box-decoration-break: clone;
|
||||
-webkit-box-decoration-break: clone;
|
||||
}
|
||||
|
||||
.backdropOnText {
|
||||
background-color: var(--background);
|
||||
padding: 0 8px;
|
||||
box-decoration-break: clone;
|
||||
-webkit-box-decoration-break: clone;
|
||||
z-index: 1 !important;
|
||||
position: relative;
|
||||
box-shadow: 0px 5px 0px var(--background);
|
||||
}
|
||||
|
||||
.backdropTextHelper {
|
||||
@@ -55,7 +52,7 @@
|
||||
}
|
||||
|
||||
.backdropTextHelper .backdropOnText {
|
||||
box-shadow: 00px -5px 0px var(--background);
|
||||
// box-shadow: 00px -5px 0px var(--background);
|
||||
}
|
||||
|
||||
.content {
|
||||
|
||||
1
components/telegramLink/index.tsx
Normal file
1
components/telegramLink/index.tsx
Normal file
@@ -0,0 +1 @@
|
||||
export * from './telegramLink';
|
||||
14
components/telegramLink/telegramLink.module.scss
Normal file
14
components/telegramLink/telegramLink.module.scss
Normal file
@@ -0,0 +1,14 @@
|
||||
.linkWrapper {
|
||||
display: inline-flex;
|
||||
height: min-content;
|
||||
}
|
||||
|
||||
.link {
|
||||
display: inline-flex;
|
||||
padding: 18px;
|
||||
cursor: none;
|
||||
}
|
||||
|
||||
.linkIcon {
|
||||
color: var(--on-background);
|
||||
}
|
||||
30
components/telegramLink/telegramLink.tsx
Normal file
30
components/telegramLink/telegramLink.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import styles from './telegramLink.module.scss';
|
||||
import Link, { LinkProps } from 'next/link';
|
||||
import TelegramIcon from '@/assets/icons/telegram.svg';
|
||||
import clsx from 'clsx';
|
||||
import { CursorEffect } from '@/components/cursor';
|
||||
|
||||
type TelegramLinkProps = Omit<LinkProps, 'href'> & { className?: string };
|
||||
|
||||
export function TelegramLink(props: TelegramLinkProps) {
|
||||
const { className: restClassName, ...restProps } = props;
|
||||
|
||||
return (
|
||||
<CursorEffect
|
||||
effectDistance={48}
|
||||
effectForce={4}
|
||||
cursorPadding={0}
|
||||
className={clsx(styles.linkWrapper)}
|
||||
>
|
||||
<Link
|
||||
{...restProps}
|
||||
className={clsx(styles.link, restClassName)}
|
||||
target="_blank"
|
||||
href="https://t.me/ridebus"
|
||||
prefetch={false}
|
||||
>
|
||||
<TelegramIcon className={styles.linkIcon} />
|
||||
</Link>
|
||||
</CursorEffect>
|
||||
);
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import useScroll from '@/utils/useScroll';
|
||||
import { CursorEffect } from '@/components/cursor';
|
||||
import Link from 'next/link';
|
||||
import { useRouter } from 'next/router';
|
||||
import { TelegramLink } from '../telegramLink';
|
||||
|
||||
type TopBarProps = {
|
||||
notHide?: boolean;
|
||||
@@ -46,6 +47,7 @@ export function TopBar(props: TopBarProps) {
|
||||
)}
|
||||
<GooglePlayLink className={styles.googlePlayLink} />
|
||||
<GithubLink />
|
||||
<TelegramLink />
|
||||
<LangSwitcher />
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
right: -280px;
|
||||
bottom: 100px;
|
||||
bottom: 300px;
|
||||
transform-origin: right center;
|
||||
transform: rotate(356deg);
|
||||
gap: 9px;
|
||||
@@ -110,7 +110,7 @@
|
||||
bottom: 200px;
|
||||
}
|
||||
.bigCitiesLine {
|
||||
bottom: 50px;
|
||||
bottom: 150px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,3 +130,19 @@
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 500px) {
|
||||
.card {
|
||||
height: 390px;
|
||||
}
|
||||
.smallCitiesLine {
|
||||
bottom: 160px;
|
||||
|
||||
svg {
|
||||
width: 170px;
|
||||
}
|
||||
}
|
||||
.bigCitiesLine {
|
||||
bottom: 75px;
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import CityBigEn from '@/assets/images/city-big-en.svg';
|
||||
import CityPolotskSmallRu from '@/assets/images/city-polotsk-small-ru.svg';
|
||||
import CityNovopolotskSmallRu from '@/assets/images/city-novopolotsk-small-ru.svg';
|
||||
import CityBigRu from '@/assets/images/city-big-ru.svg';
|
||||
import maskUrl from '@/assets/images/cities-star-mask.svg?url';
|
||||
import Mask from '@/assets/images/cities-star-mask.svg';
|
||||
import ridebusImage from '@/assets/images/cities-backdrop.jpg';
|
||||
import Image from 'next/image';
|
||||
import useFrame from '@/utils/useFrame';
|
||||
@@ -104,13 +104,12 @@ function BigCitiesLine() {
|
||||
|
||||
export function CitiesCard() {
|
||||
const t = useLocale(locales);
|
||||
const ridebusImageMaskRef = useRef<HTMLDivElement>(null);
|
||||
const ridebusImageMask = useRef<HTMLDivElement>(null);
|
||||
const ridebusImageRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
useFrame((delta, time) => {
|
||||
if (ridebusImageMaskRef.current && ridebusImageRef.current) {
|
||||
ridebusImageMaskRef.current.style.transform = `rotate(${-(time * 0.005) % 360}deg) translate3D(0px, 0px, 0px)`;
|
||||
ridebusImageRef.current.style.transform = `rotate(${(time * 0.005) % 360}deg) translate3D(0px, 0px, 0px)`;
|
||||
if (ridebusImageMask.current) {
|
||||
ridebusImageMask.current.style.transform = `rotate(${-(time * 0.005) % 360}deg) translate3D(0px, 0px, 0px)`;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -123,24 +122,10 @@ export function CitiesCard() {
|
||||
classes={{ subtitle: styles.description, title: styles.title }}
|
||||
>
|
||||
<div className={styles.mockupPhoneContainer}>
|
||||
<div
|
||||
className={styles.ridebusImageMask}
|
||||
ref={ridebusImageMaskRef}
|
||||
style={{
|
||||
maskImage: `url(${maskUrl.src})`,
|
||||
}}>
|
||||
<div ref={ridebusImageRef} className={styles.ridebusImageAnchor}>
|
||||
<Image
|
||||
className={styles.ridebusImage}
|
||||
height={800}
|
||||
width={800}
|
||||
placeholder="blur"
|
||||
alt=""
|
||||
src={ridebusImage}
|
||||
/>
|
||||
<div className={styles.ridebusImageMask}
|
||||
ref={ridebusImageMask}>
|
||||
<Mask />
|
||||
</div>
|
||||
</div>
|
||||
<SmallCitiesLine />
|
||||
<BigCitiesLine />
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
@@ -5,7 +5,7 @@ import clsx from 'clsx';
|
||||
import { manrope, caveat } from '@/styles/fonts';
|
||||
import ThinStarBig from '@/assets/images/thin-star-big.svg';
|
||||
import ThickRoundStar5 from '@/assets/images/thick-round-star-5.svg';
|
||||
import thickRoundStar6Url from '@/assets/images/thick-round-star-6.svg?url';
|
||||
import ThickRoundStar6 from '@/assets/images/thick-round-star-6.svg';
|
||||
import ridebusFlat from '@/assets/images/cities-backdrop.jpg';
|
||||
import Image from 'next/image';
|
||||
import { Gradients } from '@/components/gradients';
|
||||
@@ -22,12 +22,7 @@ const locales: LocalesMap = {
|
||||
<span>Приложение,</span>
|
||||
<span>которое</span>
|
||||
<span>поможет</span>
|
||||
<div>
|
||||
<span>вам</span>
|
||||
<div className={styles.thinStarBig}>
|
||||
<ThinStarBig />
|
||||
</div>
|
||||
</div>
|
||||
<span>с</span>
|
||||
<span className={styles.spendWord}>лёгкостью</span>
|
||||
<span>смотреть</span>
|
||||
@@ -43,12 +38,7 @@ const locales: LocalesMap = {
|
||||
<span>app</span>
|
||||
<span>that</span>
|
||||
<span>helps</span>
|
||||
<div>
|
||||
<span>you</span>
|
||||
<div className={styles.thinStarBig}>
|
||||
<ThinStarBig />
|
||||
</div>
|
||||
</div>
|
||||
<span className={styles.spendWord}>conveniently</span>
|
||||
<span>view</span>
|
||||
<span className={clsx(caveat.className, styles.wiselyWord)}>
|
||||
@@ -69,8 +59,7 @@ export default function Header() {
|
||||
const t = useLocale(locales);
|
||||
const sloganLineRef = useRef<HTMLSpanElement>(null);
|
||||
const transitionToBackgoundRef = useRef<HTMLDivElement>(null);
|
||||
const thickRoundStar6MaskRef = useRef<HTMLDivElement>(null);
|
||||
const thickRoundStar6ImageRef = useRef<HTMLImageElement>(null);
|
||||
const thickRoundStar6 = useRef<HTMLDivElement>(null);
|
||||
const thickRoundStar5 = useRef<HTMLDivElement>(null);
|
||||
const breakpoint600 = false;//useMediaQuery('(max-width: 600px)');
|
||||
|
||||
@@ -91,16 +80,12 @@ export default function Header() {
|
||||
transitionToBackgoundRef.current.style.height = `${scrollY + 300}px`;
|
||||
}
|
||||
|
||||
if (thickRoundStar6MaskRef.current && scrollY - 300 < window.innerHeight) {
|
||||
thickRoundStar6MaskRef.current.style.transform = `translate3D(0px, ${scrollY / 6}px, 0px) rotate(${scrollY / 8 + (time * 0.01) % 360}deg)`;
|
||||
}
|
||||
|
||||
if (thickRoundStar6ImageRef.current && scrollY - 300 < window.innerHeight) {
|
||||
thickRoundStar6ImageRef.current.style.transform = `rotate(${-scrollY / 8 - (time * 0.01) % 360}deg) translate3d(0,0,0)`;
|
||||
if (thickRoundStar6.current && scrollY - 300 < window.innerHeight) {
|
||||
thickRoundStar6.current.style.transform = `translate3D(0px, ${scrollY / 2}px, 0px) rotate(${scrollY / 8 + (time * 0.01) % 360}deg)`;
|
||||
}
|
||||
|
||||
if (thickRoundStar5.current && scrollY - 300 < window.innerHeight) {
|
||||
thickRoundStar5.current.style.transform = `translate3D(-50%, -50%,0) rotate(${-scrollY / 6 - 10}deg)`;
|
||||
thickRoundStar5.current.style.transform = `translate3D(0px, ${scrollY / 8}px, 0px) rotate(${scrollY / 8 + (time * 0.01) % 360}deg)`;
|
||||
}
|
||||
}, { accelerator: 0.06 });
|
||||
|
||||
@@ -108,19 +93,13 @@ export default function Header() {
|
||||
<Fragment>
|
||||
<header className={styles.header}>
|
||||
<TopBar />
|
||||
<div
|
||||
className={styles.thickRoundStar6}
|
||||
ref={thickRoundStar6MaskRef}
|
||||
style={{ maskImage: `url(${thickRoundStar6Url.src})` }}
|
||||
>
|
||||
<Image
|
||||
ref={thickRoundStar6ImageRef}
|
||||
height={400}
|
||||
width={400}
|
||||
placeholder="blur"
|
||||
alt=""
|
||||
src={ridebusFlat}
|
||||
/>
|
||||
<div className={styles.thickRoundStar6}
|
||||
ref={thickRoundStar6}>
|
||||
<ThickRoundStar6 />
|
||||
</div>
|
||||
<div className={styles.thickRoundStar5}
|
||||
ref={thickRoundStar5}>
|
||||
<ThickRoundStar5 />
|
||||
</div>
|
||||
<h1 className={clsx(styles.slogan, manrope.className)}>
|
||||
<span ref={sloganLineRef} className={styles.line1}>
|
||||
@@ -128,11 +107,6 @@ export default function Header() {
|
||||
</span>
|
||||
</h1>
|
||||
</header>
|
||||
<div className={styles.thickRoundStar5}>
|
||||
<div ref={thickRoundStar5}>
|
||||
<ThickRoundStar5 />
|
||||
</div>
|
||||
</div>
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
@@ -96,16 +96,14 @@
|
||||
top: 20vh;
|
||||
left: -125px;
|
||||
z-index: 0;
|
||||
mask-repeat: no-repeat;
|
||||
mask-size: contain;
|
||||
mask-position: 50%;
|
||||
width: 250px;
|
||||
height: 250px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #1d4fac;
|
||||
|
||||
img {
|
||||
div {
|
||||
position: absolute;
|
||||
width: 400px;
|
||||
height: 400px;
|
||||
@@ -114,18 +112,22 @@
|
||||
}
|
||||
|
||||
.thickRoundStar5 {
|
||||
position: relative;
|
||||
max-width: 1500px;
|
||||
width: 100%;
|
||||
margin: auto;
|
||||
z-index: 100000;
|
||||
position: absolute;
|
||||
top: 50vh;
|
||||
right: -100px;
|
||||
z-index: 0;
|
||||
width: 250px;
|
||||
height: 250px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #715573;
|
||||
|
||||
div {
|
||||
position: absolute;
|
||||
top: -50px;
|
||||
right: 50px;
|
||||
transform: translate(-50%, -50%) rotate(-10deg);
|
||||
color: #9f7ea1;
|
||||
width: 400px;
|
||||
height: 400px;
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,6 +258,13 @@
|
||||
left: -62px;
|
||||
top: 8vh;
|
||||
}
|
||||
|
||||
.thickRoundStar5 {
|
||||
width: 125px;
|
||||
height: 125px;
|
||||
right: -48px;
|
||||
top: 74vh;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 500px) {
|
||||
|
||||
Reference in New Issue
Block a user