diff --git a/package.json b/package.json index 23d7e00..201da6e 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "next": "^12.1.5", "next-real-viewport": "^0.7.0", "next-seo": "^5.4.0", + "next-themes": "^0.2.0", "react": "^18.0.0", "react-datocms": "^3.0.12", "react-device-detect": "^2.2.2", diff --git a/public/images/about/about-light.jpg b/public/images/about/about-light.jpg new file mode 100644 index 0000000..9a95fc7 Binary files /dev/null and b/public/images/about/about-light.jpg differ diff --git a/public/images/benefit-bg-light.png b/public/images/benefit-bg-light.png new file mode 100644 index 0000000..3e34c26 Binary files /dev/null and b/public/images/benefit-bg-light.png differ diff --git a/public/images/blog/blog-light.png b/public/images/blog/blog-light.png new file mode 100644 index 0000000..d642961 Binary files /dev/null and b/public/images/blog/blog-light.png differ diff --git a/public/images/careers/careers-light.jpg b/public/images/careers/careers-light.jpg new file mode 100644 index 0000000..c0f345d Binary files /dev/null and b/public/images/careers/careers-light.jpg differ diff --git a/public/images/community/hero/community-light.jpg b/public/images/community/hero/community-light.jpg new file mode 100644 index 0000000..cdfcc19 Binary files /dev/null and b/public/images/community/hero/community-light.jpg differ diff --git a/public/images/head-light.png b/public/images/head-light.png new file mode 100644 index 0000000..68a48cc Binary files /dev/null and b/public/images/head-light.png differ diff --git a/public/images/hero-mobile-light.png b/public/images/hero-mobile-light.png new file mode 100644 index 0000000..fa79585 Binary files /dev/null and b/public/images/hero-mobile-light.png differ diff --git a/public/images/pre-footer-mobile-light.png b/public/images/pre-footer-mobile-light.png new file mode 100644 index 0000000..8b4b926 Binary files /dev/null and b/public/images/pre-footer-mobile-light.png differ diff --git a/public/images/press/press-light.jpg b/public/images/press/press-light.jpg new file mode 100644 index 0000000..ee1c145 Binary files /dev/null and b/public/images/press/press-light.jpg differ diff --git a/public/images/products/products-light.jpg b/public/images/products/products-light.jpg new file mode 100644 index 0000000..fe17b60 Binary files /dev/null and b/public/images/products/products-light.jpg differ diff --git a/public/videos/Banner-Home-Light.mp4 b/public/videos/Banner-Home-Light.mp4 new file mode 100644 index 0000000..d140faa Binary files /dev/null and b/public/videos/Banner-Home-Light.mp4 differ diff --git a/public/videos/banner-about-light.mp4 b/public/videos/banner-about-light.mp4 new file mode 100644 index 0000000..f50c67f Binary files /dev/null and b/public/videos/banner-about-light.mp4 differ diff --git a/public/videos/banner-about-light.webm b/public/videos/banner-about-light.webm new file mode 100644 index 0000000..f004de5 Binary files /dev/null and b/public/videos/banner-about-light.webm differ diff --git a/public/videos/banner-careers-light.mp4 b/public/videos/banner-careers-light.mp4 new file mode 100644 index 0000000..67ae100 Binary files /dev/null and b/public/videos/banner-careers-light.mp4 differ diff --git a/public/videos/banner-careers-light.webm b/public/videos/banner-careers-light.webm new file mode 100644 index 0000000..3e4d1ac Binary files /dev/null and b/public/videos/banner-careers-light.webm differ diff --git a/public/videos/banner-community-light.mp4 b/public/videos/banner-community-light.mp4 new file mode 100644 index 0000000..b180408 Binary files /dev/null and b/public/videos/banner-community-light.mp4 differ diff --git a/public/videos/banner-community-light.webm b/public/videos/banner-community-light.webm new file mode 100644 index 0000000..69304aa Binary files /dev/null and b/public/videos/banner-community-light.webm differ diff --git a/public/videos/banner-press-light.mp4 b/public/videos/banner-press-light.mp4 new file mode 100644 index 0000000..9a3e3b6 Binary files /dev/null and b/public/videos/banner-press-light.mp4 differ diff --git a/public/videos/banner-press-light.webm b/public/videos/banner-press-light.webm new file mode 100644 index 0000000..4310ab1 Binary files /dev/null and b/public/videos/banner-press-light.webm differ diff --git a/public/videos/banner-products-light.mp4 b/public/videos/banner-products-light.mp4 new file mode 100644 index 0000000..1a87fdd Binary files /dev/null and b/public/videos/banner-products-light.mp4 differ diff --git a/public/videos/banner-products-light.webm b/public/videos/banner-products-light.webm new file mode 100644 index 0000000..36319cd Binary files /dev/null and b/public/videos/banner-products-light.webm differ diff --git a/src/components/common/footer/footer.module.scss b/src/components/common/footer/footer.module.scss index 4511a13..fedfc46 100644 --- a/src/components/common/footer/footer.module.scss +++ b/src/components/common/footer/footer.module.scss @@ -62,7 +62,7 @@ &::before { background: radial-gradient( ellipse farthest-corner at center center, - rgb(4 4 4 / 0.05) 45%, + rgb(4 4 4 / 0) 45%, var(--color-black) 0 ); width: 120%; @@ -367,3 +367,23 @@ } } } + +[data-theme='light'] { + .pre__footer { + &--section { + video { + mix-blend-mode: darken; + } + + @include respond-to('mobile') { + background-image: url('/images/pre-footer-mobile-light.png'); + } + } + } + + .footer { + a { + color: var(--color-white); + } + } +} diff --git a/src/components/common/footer/index.tsx b/src/components/common/footer/index.tsx index e90f17f..687e247 100644 --- a/src/components/common/footer/index.tsx +++ b/src/components/common/footer/index.tsx @@ -1,5 +1,6 @@ import clsx from 'clsx' import { useRouter } from 'next/router' +import { useTheme } from 'next-themes' import { useEffect, useRef, useState } from 'react' import MailchimpSubscribe from 'react-mailchimp-subscribe' @@ -81,11 +82,27 @@ const SimpleForm = ({ } export const Footer = () => { + const { theme, setTheme } = useTheme() + const router = useRouter() const videoRef = useRef(null) const [show, setShow] = useState(true) const [is404, setIs404] = useState(false) + const [themeLabel, setThemeLabel] = useState('') + + useEffect(() => { + setThemeLabel(theme === 'dark' ? 'Dark mode' : 'Light mode') + }, [theme]) + + useEffect(() => { + if (!videoRef.current) return + + videoRef.current.src = + theme === 'dark' + ? '/videos/hero-grid.mp4' + : '/videos/Banner-Home-Light.mp4' + }, [theme]) useEffect(() => { if ( @@ -136,7 +153,7 @@ export const Footer = () => { preload="true" ref={videoRef} > - + @@ -254,7 +271,8 @@ export const Footer = () => { Terms of Use

- Dark Mode + {themeLabel}{' '} +

diff --git a/src/components/common/header/header.module.scss b/src/components/common/header/header.module.scss index 8a81b16..94c7c60 100644 --- a/src/components/common/header/header.module.scss +++ b/src/components/common/header/header.module.scss @@ -94,8 +94,19 @@ display: block; } + .themer { + display: flex; + color: var(--color-white); + font-family: var(--font-tt-hoves); + gap: tovw(10px, 'default', 8px); + place-content: center; + place-items: center; + padding-bottom: tovw(20px, 'mobile', 20px); + width: 100%; + } + .button { - margin: tovw(55px, 'mobile') 0 tovw(44px, 'mobile') 0; + margin: tovw(55px, 'mobile') 0 tovw(30px, 'mobile') 0; width: 100%; text-align: center; @@ -144,3 +155,37 @@ } } } + +[data-theme='light'] { + .header { + backdrop-filter: unset; + background-color: var(--color-black); + + ul li a { + color: var(--color-white); + } + + &__mobile { + p { + color: var(--color-black); + } + + .themer { + color: var(--color-black); + } + + .button { + @include respond-to('mobile') { + border: tovw(1px, 'default', 1px) solid var(--color-black); + color: var(--color-black); + } + } + } + } + + .social { + a { + filter: invert(100%); + } + } +} diff --git a/src/components/common/header/index.tsx b/src/components/common/header/index.tsx index c4680c1..df66e4b 100644 --- a/src/components/common/header/index.tsx +++ b/src/components/common/header/index.tsx @@ -1,12 +1,14 @@ import clsx from 'clsx' import NextLink from 'next/link' import { useRouter } from 'next/router' +import { useTheme } from 'next-themes' import * as React from 'react' import Burger from '~/components/icons/burguer' import { Logo } from '~/components/icons/logo' import { Button, ButtonLink } from '~/components/primitives/button' import Link from '~/components/primitives/link' +import Switch from '~/components/primitives/switch' import { useIsomorphicLayoutEffect } from '~/hooks/use-isomorphic-layout-effect' import { useMeasure } from '~/hooks/use-measure' import { DURATION, gsap } from '~/lib/gsap' @@ -20,6 +22,13 @@ const HeaderMobile = React.forwardRef< JSX.IntrinsicElements['div'] >(({ className, ...props }, ref) => { const router = useRouter() + const { theme, setTheme } = useTheme() + + const [themeLabel, setThemeLabel] = React.useState('') + + React.useEffect(() => { + setThemeLabel(theme === 'dark' ? 'Dark mode' : 'Light mode') + }, [theme]) const isActive = (href: string) => { const slug = router.query.slug as string @@ -53,6 +62,9 @@ const HeaderMobile = React.forwardRef< > Join Us +
+ {themeLabel} +
    {ConnectLinks.length > 0 && ConnectLinks.map((link, index) => ( diff --git a/src/components/common/modal/modal.module.scss b/src/components/common/modal/modal.module.scss index 11feb25..4a57724 100644 --- a/src/components/common/modal/modal.module.scss +++ b/src/components/common/modal/modal.module.scss @@ -25,7 +25,7 @@ height: 100vh; background-color: rgb(0 0 0 / 0.5); z-index: 50; - backdrop-filter: blur(2px); + backdrop-filter: blur(5px); animation: fadein 800ms; } } @@ -39,3 +39,11 @@ opacity: 1; } } + +[data-theme='light'] { + .modal { + &__bg { + background: rgb(251 251 251 / 0.35); + } + } +} diff --git a/src/components/icons/burguer.tsx b/src/components/icons/burguer.tsx index ba06cf5..fbf17bf 100644 --- a/src/components/icons/burguer.tsx +++ b/src/components/icons/burguer.tsx @@ -79,17 +79,21 @@ const Burger = ({ xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" > - + - + ) } diff --git a/src/components/icons/socials.tsx b/src/components/icons/socials.tsx index 8f07af3..2f9593c 100644 --- a/src/components/icons/socials.tsx +++ b/src/components/icons/socials.tsx @@ -31,7 +31,7 @@ const Telegram = ({ gradientUnits="userSpaceOnUse" > - + @@ -67,7 +67,7 @@ const Twitter = ({ gradientUnits="userSpaceOnUse" > - + @@ -99,7 +99,7 @@ const Reddit = ({ className, fill }: { className?: string; fill?: string }) => { gradientUnits="userSpaceOnUse" > - + @@ -178,7 +178,7 @@ const Facebook = ({ gradientUnits="userSpaceOnUse" > - + @@ -222,7 +222,7 @@ const Instagram = ({ gradientUnits="userSpaceOnUse" > - + - + - + diff --git a/src/components/primitives/button/button.module.scss b/src/components/primitives/button/button.module.scss index 4d2998b..6b9ea31 100644 --- a/src/components/primitives/button/button.module.scss +++ b/src/components/primitives/button/button.module.scss @@ -66,7 +66,7 @@ &--primary { border-color: var(--color-accent); - box-shadow: 0 0 tovw(50px, 'default', 16px) var(--color-accent); + box-shadow: 0 0 tovw(25px, 'default', 16px) var(--color-accent); background: var(--color-accent); &:hover, @@ -92,3 +92,11 @@ } } } + +[data-theme='light'] { + .button { + &--primary { + color: var(--color-black); + } + } +} diff --git a/src/components/primitives/link/link.module.scss b/src/components/primitives/link/link.module.scss index 90d6c85..0be26f6 100644 --- a/src/components/primitives/link/link.module.scss +++ b/src/components/primitives/link/link.module.scss @@ -127,3 +127,16 @@ } } } + +[data-theme='light'] { + .link { + color: var(--color-accent); + + &--default, + &--nav { + .icon svg { + fill: red !important; + } + } + } +} diff --git a/src/components/primitives/switch/index.tsx b/src/components/primitives/switch/index.tsx index 4abe107..0ab2c4a 100644 --- a/src/components/primitives/switch/index.tsx +++ b/src/components/primitives/switch/index.tsx @@ -1,9 +1,17 @@ import s from './switch.module.scss' -const Switch = () => { +interface Props { + setTheme: (theme: string) => void + theme: string | undefined +} + +const Switch = ({ setTheme, theme }: Props) => { return ( ) diff --git a/src/components/primitives/switch/switch.module.scss b/src/components/primitives/switch/switch.module.scss index 077fdfd..6349585 100644 --- a/src/components/primitives/switch/switch.module.scss +++ b/src/components/primitives/switch/switch.module.scss @@ -33,17 +33,17 @@ width: tovw(9px, 'default', 9px); left: tovw(1px, 'default', 1px); bottom: tovw(1px, 'default', 1px); - background-color: white; + background-color: var(--color-white); border-radius: 50%; transition: var(--normal-transition); } input:checked + .slider { - border: tovw(2px, 'default', 2px) solid var(--color-black); - background-color: var(--color-white); + background-color: transparent; + border: tovw(2px, 'default', 2px) solid var(--color-white); } input:checked + .slider::before { - background-color: var(--color-black); + background-color: var(--color-white); transform: translateX(tovw(11.5px, 'default', 11px)); } diff --git a/src/components/sections/about/hero/hero.module.scss b/src/components/sections/about/hero/hero.module.scss index bdc9610..d12a1b0 100644 --- a/src/components/sections/about/hero/hero.module.scss +++ b/src/components/sections/about/hero/hero.module.scss @@ -200,3 +200,22 @@ width: 100%; height: tovw(740px, 'default', 740px); } + +[data-theme='light'] { + .video_container { + mix-blend-mode: darken; + + &::after { + display: none; + } + } + + .hero__container { + filter: brightness(103%); + mix-blend-mode: darken; + } + + .gradient { + display: hidden; + } +} diff --git a/src/components/sections/about/hero/index.tsx b/src/components/sections/about/hero/index.tsx index fa8c4c3..a78774e 100644 --- a/src/components/sections/about/hero/index.tsx +++ b/src/components/sections/about/hero/index.tsx @@ -1,3 +1,6 @@ +import { useTheme } from 'next-themes' +import { useEffect, useRef, useState } from 'react' + import { Arrow } from '~/components/icons/arrow' import Line from '~/components/icons/line' import { Container } from '~/components/layout/container' @@ -19,11 +22,40 @@ interface Props { } const Hero = ({ data }: Props) => { + const { theme } = useTheme() + + const [webmSource, setWebmSource] = useState('') + const [mp4Source, setMp4Source] = useState('') + + useEffect(() => { + if (theme === 'dark') { + setWebmSource('/videos/banner-about.webm') + setMp4Source('/videos/banner-about.mp4') + } + + if (theme === 'light') { + setWebmSource('/videos/banner-about-light.webm') + setMp4Source('/videos/banner-about-light.mp4') + } + }, [theme]) + + const aboutHeroMobileRef = useRef(null) + + useEffect(() => { + if (!aboutHeroMobileRef.current) return + + aboutHeroMobileRef.current.src = + theme === 'dark' + ? '/images/about/about.jpg' + : '/images/about/about-light.jpg' + }, [theme]) + return (
    hero
    diff --git a/src/components/sections/about/related/related.module.scss b/src/components/sections/about/related/related.module.scss index 48a4d9f..5fcd888 100644 --- a/src/components/sections/about/related/related.module.scss +++ b/src/components/sections/about/related/related.module.scss @@ -137,3 +137,30 @@ z-index: -1; } } + +[data-theme='light'] { + .gradient { + display: none; + } + + .events { + &::after, + &::before { + @include respond-to('mobile') { + background: linear-gradient( + 90deg, + rgb(251 251 251 / 0) 0%, + rgb(251 251 251 / 0.55) 35%, + rgb(251 251 251 / 1) 95% + ); + } + + background: linear-gradient( + 90deg, + rgb(251 251 251 / 0) 0%, + rgb(251 251 251 / 0.95) 35%, + rgb(251 251 251 / 1) 65% + ); + } + } +} diff --git a/src/components/sections/about/roadmap/roadmap.module.scss b/src/components/sections/about/roadmap/roadmap.module.scss index a1ede65..c44197f 100644 --- a/src/components/sections/about/roadmap/roadmap.module.scss +++ b/src/components/sections/about/roadmap/roadmap.module.scss @@ -92,6 +92,7 @@ background-color: var(--color-white); border-radius: 50%; box-shadow: 0px 0px tovw(16px, 'default', 16px) var(--color-white); + z-index: 5; } } @@ -186,9 +187,9 @@ border-left: 2px solid var(--color-white); border-image-source: linear-gradient( 180deg, - rgb(255 255 255 / 1) 0%, - rgb(255 255 255 / 1) 85%, - rgb(4 4 4 / 1) 100% + var(--color-white) 0%, + var(--color-white) 85%, + var(--color-black) 100% ); } @@ -198,11 +199,22 @@ border-image-slice: 1; border-image-source: linear-gradient( 90deg, - rgb(255 255 255 / 1) 0%, - rgb(255 255 255 / 1) 85%, - rgb(4 4 4 / 1) 100% + var(--color-white) 0%, + var(--color-white) 85%, + var(--color-black) 100% ); } } } } + +[data-theme='light'] { + .section .container { + .roadmap .block { + .dot { + background-color: var(--color-accent); + box-shadow: 0px 0px tovw(16px, 'default', 16px) var(--color-accent); + } + } + } +} diff --git a/src/components/sections/about/whitepaper/whitepaper.module.scss b/src/components/sections/about/whitepaper/whitepaper.module.scss index 83af4fc..5ee4ed3 100644 --- a/src/components/sections/about/whitepaper/whitepaper.module.scss +++ b/src/components/sections/about/whitepaper/whitepaper.module.scss @@ -84,3 +84,16 @@ } } } + +[data-theme='light'] { + .section .container { + a { + color: var(--color-accent); + } + + .whitepaper__img { + filter: invert(100%); + z-index: -1; + } + } +} diff --git a/src/components/sections/blog/hero/hero.module.scss b/src/components/sections/blog/hero/hero.module.scss index 25f34f2..c2d334f 100644 --- a/src/components/sections/blog/hero/hero.module.scss +++ b/src/components/sections/blog/hero/hero.module.scss @@ -92,3 +92,13 @@ } } } + +[data-theme='light'] { + .section { + background: unset; + } + + .hero__container { + mix-blend-mode: darken; + } +} diff --git a/src/components/sections/blog/hero/index.tsx b/src/components/sections/blog/hero/index.tsx index ed29c5a..27789a7 100644 --- a/src/components/sections/blog/hero/index.tsx +++ b/src/components/sections/blog/hero/index.tsx @@ -1,3 +1,6 @@ +import { useTheme } from 'next-themes' +import { useEffect, useRef } from 'react' + import { BlogCard } from '~/components/common/card' import { Container } from '~/components/layout/container' import Section from '~/components/layout/section' @@ -11,20 +14,30 @@ interface HeroProps { } const Hero = ({ featuredPost }: HeroProps) => { + const { theme } = useTheme() + + const blogHeroRef = useRef(null) + const blogHeroMobileRef = useRef(null) + + useEffect(() => { + if (!blogHeroRef.current) return + if (!blogHeroMobileRef.current) return + + blogHeroRef.current.src = + theme === 'dark' ? '/images/blog/blog.png' : '/images/blog/blog-light.png' + blogHeroMobileRef.current.src = + theme === 'dark' ? '/images/blog/blog.png' : '/images/blog/blog-light.png' + }, [theme]) + return (
    + hero hero - hero
    diff --git a/src/components/sections/blog/post-hero/hero.module.scss b/src/components/sections/blog/post-hero/hero.module.scss index 25f3660..5234843 100644 --- a/src/components/sections/blog/post-hero/hero.module.scss +++ b/src/components/sections/blog/post-hero/hero.module.scss @@ -54,3 +54,9 @@ gap: tovw(8px, 'default', 8px); } } + +[data-theme='light'] { + .section { + background: unset; + } +} diff --git a/src/components/sections/blog/shares/shares.module.scss b/src/components/sections/blog/shares/shares.module.scss index 22fe203..c93b1bb 100644 --- a/src/components/sections/blog/shares/shares.module.scss +++ b/src/components/sections/blog/shares/shares.module.scss @@ -26,7 +26,7 @@ a { display: flex; transition: filter 200ms; - border: tovw(1px, 'default', 1px) solid #fff; + border: tovw(1px, 'default', 1px) solid var(--color-white); border-radius: tovw(30px, 'default', 20px); background-color: var(--color-black); cursor: pointer; diff --git a/src/components/sections/careers/hero/hero.module.scss b/src/components/sections/careers/hero/hero.module.scss index 3705d4d..dace632 100644 --- a/src/components/sections/careers/hero/hero.module.scss +++ b/src/components/sections/careers/hero/hero.module.scss @@ -21,43 +21,73 @@ } } - .hero__container { + .video_container { @include respond-to('mobile') { - min-height: tovw(400px, 'mobile', 510px); + min-height: unset; } - display: flex; - place-content: center; - min-height: tovw(750px, 'default', 366px); + position: relative; + align-self: center; + width: 75%; + margin-left: tovw(165px, 'default', 125px); + min-height: tovw(790px, 'default', 380px); + margin-top: tovw(-30px, 'default'); + padding-top: tovw(30px, 'default', 20px); - .hero { + video { @include respond-to('mobile') { display: none; } + width: 100%; margin: auto; - width: tovw(1380px, 'default', 700px); - padding-left: tovw(60px, 'default', 20px); - margin-top: tovw(-30px, 'default', -30px); - mix-blend-mode: screen; + z-index: 1; + } - &__mobile { - @include respond-to('mobile') { - display: flex; - margin: tovw(50px, 'mobile', 120px) 0 tovw(50px, 'mobile', 70px) - tovw(-30px, 'mobile', -30px); - width: 140%; - mix-blend-mode: screen; - place-self: center; - mask-image: linear-gradient( - 0deg, - rgb(255 255 255 / 0) 0%, - rgb(0 0 0) 25% - ); - } + &::after { + position: absolute; + top: 0; + left: 0; + z-index: 1; + background: radial-gradient( + ellipse, + rgb(3 3 3 / 0) 40%, + rgb(3 3 3 / 1) 62%, + rgb(3 3 3 / 1) 100% + ); + transform: translateX(-25%); + width: 200%; + height: 100%; + content: ''; + } + } - display: none; + .hero__container { + @include respond-to('mobile') { + display: flex; + place-content: center; + min-height: tovw(750px, 'default', 366px); + min-height: tovw(400px, 'mobile', 510px); + } + + display: none; + + .hero__mobile { + @include respond-to('mobile') { + display: flex; + margin: tovw(50px, 'mobile', 120px) 0 tovw(50px, 'mobile', 70px) + tovw(-30px, 'mobile', -30px); + width: 140%; + mix-blend-mode: screen; + place-self: center; + mask-image: linear-gradient( + 0deg, + rgb(255 255 255 / 0) 0%, + rgb(0 0 0) 25% + ); } + + display: none; } } @@ -162,3 +192,26 @@ height: tovw(740px, 'default', 740px); } } + +[data-theme='light'] { + .video_container { + mix-blend-mode: darken; + + &::after { + background: radial-gradient( + ellipse, + rgb(251 251 251 / 0) 40%, + rgb(251 251 251 / 1) 62%, + rgb(251 251 251 / 1) 100% + ); + } + } + + .hero__container { + mix-blend-mode: darken; + } + + .gradient { + display: none; + } +} diff --git a/src/components/sections/careers/hero/index.tsx b/src/components/sections/careers/hero/index.tsx index 40a68a5..8ba056b 100644 --- a/src/components/sections/careers/hero/index.tsx +++ b/src/components/sections/careers/hero/index.tsx @@ -1,3 +1,6 @@ +import { useTheme } from 'next-themes' +import { useEffect, useRef, useState } from 'react' + import { Arrow } from '~/components/icons/arrow' import Line from '~/components/icons/line' import { Container } from '~/components/layout/container' @@ -14,21 +17,57 @@ interface Props { } const Hero = ({ data }: Props) => { + const { theme } = useTheme() + + const [webmSource, setWebmSource] = useState('') + const [mp4Source, setMp4Source] = useState('') + + useEffect(() => { + if (theme === 'dark') { + setWebmSource('/videos/banner-careers-light.webm') + setMp4Source('/videos/banner-careers-light.mp4') + } + + if (theme === 'light') { + setWebmSource('/videos/banner-careers-light.webm') + setMp4Source('/videos/banner-careers-light.mp4') + } + }, [theme]) + + const careersHeroMobileRef = useRef(null) + + useEffect(() => { + if (!careersHeroMobileRef.current) return + + careersHeroMobileRef.current.src = + theme === 'dark' + ? '/images/careers/careers.png' + : '/images/careers/careers-light.jpg' + }, [theme]) + return (
    +
    + +
    hero - hero
    diff --git a/src/components/sections/careers/values/values.module.scss b/src/components/sections/careers/values/values.module.scss index d67d061..9c5e0ff 100644 --- a/src/components/sections/careers/values/values.module.scss +++ b/src/components/sections/careers/values/values.module.scss @@ -145,3 +145,12 @@ z-index: -1; } } + +[data-theme='light'] { + .features { + img { + filter: invert(100%) saturate(50%) hue-rotate(180deg); + mix-blend-mode: darken !important; + } + } +} diff --git a/src/components/sections/careers/why/why.module.scss b/src/components/sections/careers/why/why.module.scss index 7f2674e..08b2517 100644 --- a/src/components/sections/careers/why/why.module.scss +++ b/src/components/sections/careers/why/why.module.scss @@ -81,3 +81,11 @@ } } } + +[data-theme='light'] { + .features { + img { + filter: invert(100%); + } + } +} diff --git a/src/components/sections/community/events/events.module.scss b/src/components/sections/community/events/events.module.scss index 6f56297..fb597ce 100644 --- a/src/components/sections/community/events/events.module.scss +++ b/src/components/sections/community/events/events.module.scss @@ -150,3 +150,17 @@ } } } + +[data-theme='light'] { + .events__container { + &::after, + &::before { + background: linear-gradient( + 90deg, + rgb(251 251 251 / 0) 0%, + rgb(251 251 251 / 0.95) 35%, + rgb(251 251 251 / 1) 65% + ); + } + } +} diff --git a/src/components/sections/community/hero/hero.module.scss b/src/components/sections/community/hero/hero.module.scss index e8a3143..1d8a5c7 100644 --- a/src/components/sections/community/hero/hero.module.scss +++ b/src/components/sections/community/hero/hero.module.scss @@ -201,3 +201,26 @@ } } } + +[data-theme='light'] { + .video__container { + mix-blend-mode: darken; + + &::after { + background: radial-gradient( + ellipse, + rgb(251 251 251 / 0) 25%, + rgb(251 251 251 / 0.9648) 60%, + rgb(251 251 251 / 1) 95% + ); + } + } + + .hero__container { + mix-blend-mode: darken; + } + + .gradient { + display: hidden; + } +} diff --git a/src/components/sections/community/hero/index.tsx b/src/components/sections/community/hero/index.tsx index e2074e3..a1bb017 100644 --- a/src/components/sections/community/hero/index.tsx +++ b/src/components/sections/community/hero/index.tsx @@ -1,3 +1,6 @@ +import { useTheme } from 'next-themes' +import { useEffect, useRef, useState } from 'react' + import { Arrow } from '~/components/icons/arrow' import Section from '~/components/layout/section' import { ButtonLink } from '~/components/primitives/button' @@ -17,11 +20,40 @@ interface Props { } const Hero = ({ data }: Props) => { + const { theme } = useTheme() + + const [webmSource, setWebmSource] = useState('') + const [mp4Source, setMp4Source] = useState('') + + const communityHeroMobileRef = useRef(null) + + useEffect(() => { + if (!communityHeroMobileRef.current) return + + communityHeroMobileRef.current.src = + theme === 'dark' + ? '/images/community/hero/community.jpg' + : '/images/community/hero/community-light.jpg' + }, [theme]) + + useEffect(() => { + if (theme === 'dark') { + setWebmSource('/videos/banner-community.webm') + setMp4Source('/videos/banner-community.mp4') + } + + if (theme === 'light') { + setWebmSource('/videos/banner-community-light.webm') + setMp4Source('/videos/banner-community-light.mp4') + } + }, [theme]) + return (
    hero
    diff --git a/src/components/sections/community/socials/index.tsx b/src/components/sections/community/socials/index.tsx index 19776e6..6a794d9 100644 --- a/src/components/sections/community/socials/index.tsx +++ b/src/components/sections/community/socials/index.tsx @@ -1,5 +1,7 @@ import clsx from 'clsx' import Link from 'next/link' +import { useTheme } from 'next-themes' +import { useEffect, useRef } from 'react' import Line from '~/components/icons/line' import { @@ -27,6 +29,9 @@ interface Props { socialsImage: { url: string } + socialsImageLight: { + url: string + } socialsTwitter: string socialsDiscord: string socialsDiscourse: string @@ -39,14 +44,25 @@ interface Props { } const Socials = ({ data, alternative }: Props) => { + const { theme } = useTheme() + + const planetImageRef = useRef(null) + + useEffect(() => { + if (!planetImageRef.current) return + + planetImageRef.current.src = + theme === 'dark' ? data?.socialsImage?.url : data?.socialsImageLight?.url + }, [theme, data]) + return (
    Planet
    diff --git a/src/components/sections/community/socials/socials.module.scss b/src/components/sections/community/socials/socials.module.scss index 4e2d8f4..339ac53 100644 --- a/src/components/sections/community/socials/socials.module.scss +++ b/src/components/sections/community/socials/socials.module.scss @@ -138,7 +138,7 @@ a { display: flex; transition: filter 200ms; - border: tovw(1px, 'default', 1px) solid #fff; + border: tovw(1px, 'default', 1px) solid var(--color-white); border-radius: tovw(30px, 'default', 20px); background-color: var(--color-black); cursor: pointer; diff --git a/src/components/sections/contact/form/form.module.scss b/src/components/sections/contact/form/form.module.scss index f488303..d51916a 100644 --- a/src/components/sections/contact/form/form.module.scss +++ b/src/components/sections/contact/form/form.module.scss @@ -160,3 +160,16 @@ } } } + +[data-theme='light'] { + .section .container { + background: rgb(251 251 251 / 0.6); + box-shadow: 0px 2px 60px rgb(0 0 0 / 0.2); + + input, + textarea, + select { + color: var(--color-white); + } + } +} diff --git a/src/components/sections/contact/hero/hero.module.scss b/src/components/sections/contact/hero/hero.module.scss index 3931f02..2a7745c 100644 --- a/src/components/sections/contact/hero/hero.module.scss +++ b/src/components/sections/contact/hero/hero.module.scss @@ -181,3 +181,11 @@ height: tovw(740px, 'default', 740px); } } + +[data-theme='light'] { + .body { + a svg { + filter: invert(100%); + } + } +} diff --git a/src/components/sections/homepage/benefits/benefit/benefit.module.scss b/src/components/sections/homepage/benefits/benefit/benefit.module.scss index aae6b02..5e58b9c 100644 --- a/src/components/sections/homepage/benefits/benefit/benefit.module.scss +++ b/src/components/sections/homepage/benefits/benefit/benefit.module.scss @@ -19,15 +19,15 @@ top: 0; left: 0; opacity: 0.5; - z-index: 1; background: linear-gradient( 134.38deg, - #fff 4.91%, - rgb(255 255 255 / 0) 108.92% + var(--color-white) 4.91%, + var(--color-black) 108.92% ); width: tovw(38px, 'default', 38px); height: tovw(27px, 'default', 27px); content: ''; + z-index: -1; } svg { diff --git a/src/components/sections/homepage/benefits/benefits.module.scss b/src/components/sections/homepage/benefits/benefits.module.scss index 944de2c..d5a05df 100644 --- a/src/components/sections/homepage/benefits/benefits.module.scss +++ b/src/components/sections/homepage/benefits/benefits.module.scss @@ -111,7 +111,6 @@ padding-right: tovw(69px, 'default', 69px); width: 100%; max-width: tovw(1080px, 'default', 730px); - mix-blend-mode: difference; > ul { margin-top: tovw(88px, 'default', 72px); @@ -223,6 +222,29 @@ overflow: hidden; top: 39.2%; left: 20.7%; - mix-blend-mode: screen; z-index: -1; + mix-blend-mode: screen; +} + +[data-theme='light'] { + .section { + .background { + background-image: url('/images/benefit-bg-light.png'); + } + + .ball { + background-color: var(--color-black); + box-shadow: 0px 4px 115px 15px #0000f4, + 0px 0px 70px 20px var(--color-black), + inset -39px -20px 100px rgb(0 0 244 / 0.73); + mix-blend-mode: darken; + } + } + + .benefit { + &__image { + filter: invert(100%) saturate(0%); + mix-blend-mode: darken; + } + } } diff --git a/src/components/sections/homepage/hero/hero.module.scss b/src/components/sections/homepage/hero/hero.module.scss index d79fb29..f7c492e 100644 --- a/src/components/sections/homepage/hero/hero.module.scss +++ b/src/components/sections/homepage/hero/hero.module.scss @@ -56,23 +56,12 @@ height: 101%; content: ''; pointer-events: none; + @supports (aspect-ratio: 16 / 9) { aspect-ratio: 16 / 9; } } - &::before { - background: radial-gradient( - ellipse farthest-corner at center center, - rgb(4 4 4 / 0.25) 44%, - var(--color-black) 0 - ); - width: 120%; - height: 115%; - filter: blur(tovw(40px, 'default', 30px)); - will-change: filter, transform; - } - .line { margin: tovw(10px, 'default', 10px) auto tovw(23px, 'default', 20px) auto; width: tovw(3px, 'default', 2px); @@ -112,3 +101,15 @@ width: 100%; } } + +[data-theme='light'] { + .section { + video { + mix-blend-mode: darken; + } + + @include respond-to('mobile') { + background-image: url('/images/hero-mobile-light.png'); + } + } +} diff --git a/src/components/sections/homepage/hero/index.tsx b/src/components/sections/homepage/hero/index.tsx index 49bb2f9..6ce7a22 100644 --- a/src/components/sections/homepage/hero/index.tsx +++ b/src/components/sections/homepage/hero/index.tsx @@ -1,5 +1,6 @@ import clsx from 'clsx' -import { useRef } from 'react' +import { useTheme } from 'next-themes' +import { useEffect, useRef } from 'react' import Line from '~/components/icons/line' import Section from '~/components/layout/section' @@ -23,6 +24,8 @@ interface props { const Hero = ({ data }: props) => { const videoRef = useRef(null) + const { theme } = useTheme() + useIsomorphicLayoutEffect(() => { if (!videoRef.current) return videoRef.current.addEventListener( @@ -35,6 +38,16 @@ const Hero = ({ data }: props) => { false ) }, []) + + useEffect(() => { + if (!videoRef.current) return + + videoRef.current.src = + theme === 'dark' + ? '/videos/hero-grid.mp4' + : '/videos/Banner-Home-Light.mp4' + }, [theme]) + return (
    { />
    -
    +
    {blogData.map((item: any, i: Key) => ( { + const { theme } = useTheme() + const carouselRef = useRef(null) + const imageRef = useRef(null) + const mobileImageRef = useRef(null) + + useEffect(() => { + if (!imageRef.current) return + if (!mobileImageRef.current) return + + imageRef.current.src = + theme === 'dark' ? '/images/head.png' : '/images/head-light.png' + mobileImageRef.current.src = + theme === 'dark' ? '/images/head.png' : '/images/head-light.png' + }, [theme]) + const { vw } = useRealViewport() const [ref] = useKeenSlider({ mode: 'free-snap', @@ -119,7 +135,7 @@ const WhatOthersSay = ({ data, testimonialsData }: Props) => {
    - Head + Head
    {testimonialsData.map((testimonial) => { return ( @@ -137,7 +153,7 @@ const WhatOthersSay = ({ data, testimonialsData }: Props) => {
    - Head + Head
    {testimonialsData.map((testimonial) => { return ( diff --git a/src/components/sections/homepage/what-others-say/item/item.module.scss b/src/components/sections/homepage/what-others-say/item/item.module.scss index 21b5f37..8f0490d 100644 --- a/src/components/sections/homepage/what-others-say/item/item.module.scss +++ b/src/components/sections/homepage/what-others-say/item/item.module.scss @@ -21,7 +21,7 @@ margin: tovw(-210px) 0 0 tovw(-210px); border: tovw(1.5px, 'default', 1px) solid var(--color-grey-light); border-radius: tovw(8px, 'default', 8px); - background-color: rgb(0 0 0 / 0.9); + background-color: var(--color-black); padding: tovw(24px, 'default', 22px); width: tovw(420px); height: tovw(270px, 'default', 270px); diff --git a/src/components/sections/newsroom/hero/hero.module.scss b/src/components/sections/newsroom/hero/hero.module.scss index 390328e..784b27a 100644 --- a/src/components/sections/newsroom/hero/hero.module.scss +++ b/src/components/sections/newsroom/hero/hero.module.scss @@ -213,3 +213,22 @@ height: tovw(740px, 'default', 740px); } } + +[data-theme='light'] { + .video_container { + mix-blend-mode: darken; + + &::after { + display: none; + } + } + + .hero__container { + mix-blend-mode: darken; + filter: brightness(115%); + } + + .gradient { + display: none; + } +} diff --git a/src/components/sections/newsroom/hero/index.tsx b/src/components/sections/newsroom/hero/index.tsx index 88da279..f93ee91 100644 --- a/src/components/sections/newsroom/hero/index.tsx +++ b/src/components/sections/newsroom/hero/index.tsx @@ -1,3 +1,6 @@ +import { useTheme } from 'next-themes' +import { useEffect, useRef, useState } from 'react' + import { Arrow } from '~/components/icons/arrow' import Line from '~/components/icons/line' import { Container } from '~/components/layout/container' @@ -17,11 +20,40 @@ interface Props { } const Hero = ({ data }: Props) => { + const { theme } = useTheme() + + const [webmSource, setWebmSource] = useState('') + const [mp4Source, setMp4Source] = useState('') + + useEffect(() => { + if (theme === 'dark') { + setWebmSource('/videos/banner-press.webm') + setMp4Source('/videos/banner-press.mp4') + } + + if (theme === 'light') { + setWebmSource('/videos/banner-press-light.webm') + setMp4Source('/videos/banner-press-light.mp4') + } + }, [theme]) + + const pressHeroMobileRef = useRef(null) + + useEffect(() => { + if (!pressHeroMobileRef.current) return + + pressHeroMobileRef.current.src = + theme === 'dark' + ? '/images/press/press.png' + : '/images/press/press-light.jpg' + }, [theme]) + return (
    hero
    diff --git a/src/components/sections/newsroom/media/media.module.scss b/src/components/sections/newsroom/media/media.module.scss index d5b86ed..bbf2009 100644 --- a/src/components/sections/newsroom/media/media.module.scss +++ b/src/components/sections/newsroom/media/media.module.scss @@ -2,7 +2,7 @@ .section { @include respond-to('mobile') { - padding-bottom: 0; + padding: 0; } position: relative; @@ -60,6 +60,37 @@ width: 100%; } + &::after, + &::before { + @include respond-to('mobile') { + display: block; + position: absolute; + right: tovw(-20px, 'default', -20px); + height: 100%; + content: ''; + background: linear-gradient( + 90deg, + rgb(3 3 3 / 0) 0%, + rgb(3 3 3 / 0.55) 35%, + rgb(3 3 3 / 1) 95% + ); + width: tovw(20px, 'mobile', 20px); + } + + display: none; + } + + &::before { + @include respond-to('mobile') { + content: initial; + } + + right: initial; + left: tovw(-180px); + transform: scaleX(-1); + z-index: 5; + } + .image__container { cursor: pointer; position: relative; @@ -130,6 +161,7 @@ } .videolabel { + color: var(--color-white); display: block; font-family: var(--font-tt-hoves); font-size: tovw(40px, 'default', 18px); @@ -137,3 +169,26 @@ line-height: 120%; letter-spacing: -0.02em; } + +[data-theme='light'] { + .container .media__block { + &::after, + &::before { + @include respond-to('mobile') { + background: linear-gradient( + 90deg, + rgb(251 251 251 / 0) 0%, + rgb(251 251 251 / 0.55) 35%, + rgb(251 251 251 / 1) 95% + ); + } + + background: linear-gradient( + 90deg, + rgb(251 251 251 / 0) 0%, + rgb(251 251 251 / 0.95) 35%, + rgb(251 251 251 / 1) 65% + ); + } + } +} diff --git a/src/components/sections/newsroom/press/press.module.scss b/src/components/sections/newsroom/press/press.module.scss index 64905a5..ce68d6f 100644 --- a/src/components/sections/newsroom/press/press.module.scss +++ b/src/components/sections/newsroom/press/press.module.scss @@ -135,3 +135,17 @@ } } } + +[data-theme='light'] { + .events__container { + &::after, + &::before { + background: linear-gradient( + 90deg, + rgb(251 251 251 / 0) 0%, + rgb(251 251 251 / 0.95) 35%, + rgb(251 251 251 / 1) 65% + ); + } + } +} diff --git a/src/components/sections/partners/contact/contact.module.scss b/src/components/sections/partners/contact/contact.module.scss index 24dbde5..58651c3 100644 --- a/src/components/sections/partners/contact/contact.module.scss +++ b/src/components/sections/partners/contact/contact.module.scss @@ -223,3 +223,18 @@ } } } + +[data-theme='light'] { + .section .container { + .form__container { + background: rgb(251 251 251 / 0.6); + box-shadow: 0px 2px 60px rgb(0 0 0 / 0.2); + } + + input, + textarea, + select { + color: var(--color-white); + } + } +} diff --git a/src/components/sections/partners/opportunities/index.tsx b/src/components/sections/partners/opportunities/index.tsx index c062350..e1bd404 100644 --- a/src/components/sections/partners/opportunities/index.tsx +++ b/src/components/sections/partners/opportunities/index.tsx @@ -37,6 +37,21 @@ interface Props { label: string link: string }[] + oportunitiesImage01: { + url: string + } + oportunitiesImage02: { + url: string + } + oportunitiesImage03: { + url: string + } + oportunitiesImage04: { + url: string + } + oportunitiesImage05: { + url: string + } } } @@ -47,7 +62,7 @@ const Opportunities = ({ data }: Props) => {
    validators
    @@ -57,7 +72,7 @@ const Opportunities = ({ data }: Props) => { validators
    @@ -78,7 +93,7 @@ const Opportunities = ({ data }: Props) => {
    validators
    @@ -88,7 +103,7 @@ const Opportunities = ({ data }: Props) => { validators
    @@ -109,7 +124,7 @@ const Opportunities = ({ data }: Props) => {
    validators
    @@ -119,7 +134,7 @@ const Opportunities = ({ data }: Props) => { validators
    @@ -140,7 +155,7 @@ const Opportunities = ({ data }: Props) => {
    validators
    @@ -150,7 +165,7 @@ const Opportunities = ({ data }: Props) => { {' '} validators
    @@ -171,7 +186,7 @@ const Opportunities = ({ data }: Props) => {
    validators
    @@ -181,7 +196,7 @@ const Opportunities = ({ data }: Props) => { validators
    diff --git a/src/components/sections/partners/opportunities/opportunities.module.scss b/src/components/sections/partners/opportunities/opportunities.module.scss index db969c1..bac44ea 100644 --- a/src/components/sections/partners/opportunities/opportunities.module.scss +++ b/src/components/sections/partners/opportunities/opportunities.module.scss @@ -158,3 +158,17 @@ } } } + +[data-theme='light'] { + .container .block { + .item_image { + filter: invert(100%) saturate(50%) hue-rotate(180deg); + mix-blend-mode: darken !important; + + &__mobile { + filter: invert(100%) saturate(50%) hue-rotate(180deg); + mix-blend-mode: darken !important; + } + } + } +} diff --git a/src/components/sections/products/app/app.module.scss b/src/components/sections/products/app/app.module.scss index 9c609c2..7055c80 100644 --- a/src/components/sections/products/app/app.module.scss +++ b/src/components/sections/products/app/app.module.scss @@ -79,3 +79,9 @@ } } } + +[data-theme='light'] { + .section div:first-child { + mix-blend-mode: darken; + } +} diff --git a/src/components/sections/products/app/index.tsx b/src/components/sections/products/app/index.tsx index d2ad8dc..44e811b 100644 --- a/src/components/sections/products/app/index.tsx +++ b/src/components/sections/products/app/index.tsx @@ -1,3 +1,6 @@ +import { useTheme } from 'next-themes' +import { useEffect, useRef } from 'react' + import { Container } from '~/components/layout/container' import Section from '~/components/layout/section' import Heading from '~/components/primitives/heading' @@ -14,20 +17,37 @@ interface Props { appMobileImg: { url: string } + appImgLight: { + url: string + } + appMobileImgLight: { + url: string + } } } const AppSection = ({ data }: Props) => { + const { theme } = useTheme() + + const appImgRef = useRef(null) + const appImgMobileRef = useRef(null) + + useEffect(() => { + if (!appImgRef.current) return + if (!appImgMobileRef.current) return + + appImgRef.current.src = + theme === 'dark' ? data?.appImg?.url : data?.appImgLight?.url + appImgMobileRef.current.src = + theme === 'dark' ? data?.appMobileImg?.url : data?.appMobileImgLight?.url + }, [theme, data]) + return (
    - app - app + app + app
    diff --git a/src/components/sections/products/hero/hero.module.scss b/src/components/sections/products/hero/hero.module.scss index d781c54..5c12b29 100644 --- a/src/components/sections/products/hero/hero.module.scss +++ b/src/components/sections/products/hero/hero.module.scss @@ -29,7 +29,7 @@ align-self: center; position: relative; width: 82%; - min-height: tovw(920px, 'default', 435px); + min-height: tovw(925px, 'default', 435px); margin-top: tovw(-165px, 'default'); margin-bottom: tovw(-140px, 'default'); padding-top: tovw(30px, 'default', 20px); @@ -68,11 +68,17 @@ width: 200%; mix-blend-mode: screen; place-self: center; + min-height: tovw(328px, 'mobile', 340px); mask-image: linear-gradient( 0deg, rgb(255 255 255 / 0) 0%, rgb(0 0 0) 25% ); + + img { + margin: auto; + width: 100%; + } } display: none; @@ -231,3 +237,22 @@ height: tovw(740px, 'default', 740px); } } + +[data-theme='light'] { + .video_container { + mix-blend-mode: darken; + + &::after { + display: none; + } + } + + .hero__mobile { + mix-blend-mode: darken; + filter: brightness(110%); + } + + .gradient { + display: none; + } +} diff --git a/src/components/sections/products/hero/index.tsx b/src/components/sections/products/hero/index.tsx index cbce06c..4a61536 100644 --- a/src/components/sections/products/hero/index.tsx +++ b/src/components/sections/products/hero/index.tsx @@ -1,4 +1,5 @@ -import { useRef } from 'react' +import { useTheme } from 'next-themes' +import { useEffect, useRef, useState } from 'react' import { Arrow } from '~/components/icons/arrow' import { Container } from '~/components/layout/container' @@ -24,36 +25,54 @@ interface Props { } const Hero = ({ data }: Props) => { - const heroVideoRef = useRef(null) + const { theme } = useTheme() - // const loop = () => { - // heroVideoRef.current?.play() - // } + const [webmSource, setWebmSource] = useState('') + const [mp4Source, setMp4Source] = useState('') + + const productsHeroMobileRef = useRef(null) + + useEffect(() => { + if (!productsHeroMobileRef.current) return + + productsHeroMobileRef.current.src = + theme === 'dark' + ? '/images/products/products.jpg' + : '/images/products/products-light.jpg' + }, [theme]) + + useEffect(() => { + if (theme === 'dark') { + setWebmSource('/videos/banner-products.webm') + setMp4Source('/videos/banner-products.mp4') + } + + if (theme === 'light') { + setWebmSource('/videos/banner-products-light.webm') + setMp4Source('/videos/banner-products-light.mp4') + } + }, [theme]) return (
    - hero +
    + hero +
    diff --git a/src/components/sections/products/network/index.tsx b/src/components/sections/products/network/index.tsx index 0d72a37..9a4006d 100644 --- a/src/components/sections/products/network/index.tsx +++ b/src/components/sections/products/network/index.tsx @@ -1,4 +1,7 @@ // import { Arrow } from '~/components/icons/arrow' +import { useTheme } from 'next-themes' +import { useEffect, useRef } from 'react' + import { Container } from '~/components/layout/container' import Section from '~/components/layout/section' import Heading from '~/components/primitives/heading' @@ -18,10 +21,33 @@ interface Props { networkMobileImg: { url: string } + networkImgLight: { + url: string + } + networkMobileImgLight: { + url: string + } } } const Network = ({ data }: Props) => { + const { theme } = useTheme() + + const networkImgRef = useRef(null) + const networkImgMobileRef = useRef(null) + + useEffect(() => { + if (!networkImgRef.current) return + if (!networkImgMobileRef.current) return + + networkImgRef.current.src = + theme === 'dark' ? data?.networkImg?.url : data?.networkImgLight?.url + networkImgMobileRef.current.src = + theme === 'dark' + ? data?.networkMobileImg?.url + : data?.networkMobileImgLight?.url + }, [theme, data]) + return (
    @@ -31,8 +57,8 @@ const Network = ({ data }: Props) => {

    {data?.networkDesc}

    network
    @@ -50,11 +76,7 @@ const Network = ({ data }: Props) => {
    - network + network
    ) diff --git a/src/components/sections/products/network/network.module.scss b/src/components/sections/products/network/network.module.scss index 92365be..fdba72d 100644 --- a/src/components/sections/products/network/network.module.scss +++ b/src/components/sections/products/network/network.module.scss @@ -124,3 +124,18 @@ } } } + +[data-theme='light'] { + .features { + img { + filter: invert(100%); + } + } + + .section .container { + .network__img, + .network__img__mobile { + mix-blend-mode: darken; + } + } +} diff --git a/src/components/sections/products/stack/index.tsx b/src/components/sections/products/stack/index.tsx index 68a9069..9bcd71d 100644 --- a/src/components/sections/products/stack/index.tsx +++ b/src/components/sections/products/stack/index.tsx @@ -1,3 +1,6 @@ +import { useTheme } from 'next-themes' +import { useEffect, useRef } from 'react' + import Line from '~/components/icons/line' import { Container } from '~/components/layout/container' import Section from '~/components/layout/section' @@ -18,15 +21,36 @@ interface Props { stackImage: { url: string } + stackImageLight: { + url: string + } stackSvgImg: { url: string } + stackSvgImgLight: { + url: string + } } } const Stack = ({ data }: Props) => { const stackData = data?.stackListData?.stackData + const { theme } = useTheme() + + const stackImgRef = useRef(null) + const stackSvgRef = useRef(null) + + useEffect(() => { + if (!stackImgRef.current) return + if (!stackSvgRef.current) return + + stackImgRef.current.src = + theme === 'dark' ? data?.stackImage?.url : data?.stackImageLight?.url + stackSvgRef.current.src = + theme === 'dark' ? data?.stackSvgImg?.url : data?.stackSvgImgLight?.url + }, [theme, data]) + return (
    @@ -53,14 +77,10 @@ const Stack = ({ data }: Props) => {
    + stack stack - stack
    diff --git a/src/components/sections/products/stack/stack.module.scss b/src/components/sections/products/stack/stack.module.scss index 45293aa..e3a6dfe 100644 --- a/src/components/sections/products/stack/stack.module.scss +++ b/src/components/sections/products/stack/stack.module.scss @@ -167,3 +167,16 @@ } } } + +[data-theme='light'] { + .section div:last-child { + .gradient { + background: linear-gradient( + 180deg, + rgb(132 132 132 / 0) 0%, + rgb(132 132 132 / 0.4) 48.91%, + rgb(132 132 132 / 0) 100% + ); + } + } +} diff --git a/src/components/sections/products/token/token.module.scss b/src/components/sections/products/token/token.module.scss index 148d635..310e2fb 100644 --- a/src/components/sections/products/token/token.module.scss +++ b/src/components/sections/products/token/token.module.scss @@ -128,3 +128,17 @@ } } } + +[data-theme='light'] { + .features { + img { + filter: invert(100%); + } + } + + .token__img, + .token__img__mobile { + filter: invert(100%) brightness(150%) opacity(90%); + mix-blend-mode: darken !important; + } +} diff --git a/src/components/sections/products/watchers/index.tsx b/src/components/sections/products/watchers/index.tsx index 578a6e2..5a8b4b4 100644 --- a/src/components/sections/products/watchers/index.tsx +++ b/src/components/sections/products/watchers/index.tsx @@ -1,3 +1,6 @@ +import { useTheme } from 'next-themes' +import { useEffect, useRef } from 'react' + import Line from '~/components/icons/line' import { Container } from '~/components/layout/container' import Section from '~/components/layout/section' @@ -11,9 +14,15 @@ interface Props { watchersImage: { url: string } + watchersImageLight: { + url: string + } watchersMobileImage: { url: string } + watchersMobileImageLight: { + url: string + } watchersItem01: string watchersItem02: string watchersItem03: string @@ -24,6 +33,25 @@ interface Props { } const Watchers = ({ data }: Props) => { + const { theme } = useTheme() + + const watchersImgRef = useRef(null) + const watchersMobileImgRef = useRef(null) + + useEffect(() => { + if (!watchersImgRef.current) return + if (!watchersMobileImgRef.current) return + + watchersImgRef.current.src = + theme === 'dark' + ? data?.watchersImage?.url + : data?.watchersImageLight?.url + watchersMobileImgRef.current.src = + theme === 'dark' + ? data?.watchersMobileImage?.url + : data?.watchersMobileImageLight?.url + }, [theme, data]) + return (
    @@ -32,8 +60,9 @@ const Watchers = ({ data }: Props) => {

    {data?.watchersP02}

    {data?.watchersListHead}

    network
    @@ -59,10 +88,10 @@ const Watchers = ({ data }: Props) => { variant="lg" dangerouslySetInnerHTML={{ __html: data?.watchersHeading }} /> - network
    diff --git a/src/components/sections/products/watchers/watchers.module.scss b/src/components/sections/products/watchers/watchers.module.scss index b45255e..bf38a3c 100644 --- a/src/components/sections/products/watchers/watchers.module.scss +++ b/src/components/sections/products/watchers/watchers.module.scss @@ -158,3 +158,15 @@ } } } + +[data-theme='light'] { + .container { + .watchers__img { + mix-blend-mode: darken; + } + + .watchers__img__mobile { + mix-blend-mode: darken; + } + } +} diff --git a/src/css/global.scss b/src/css/global.scss index 9a39c59..e51de60 100644 --- a/src/css/global.scss +++ b/src/css/global.scss @@ -14,12 +14,23 @@ --font-heading: var(--font-arthemys); // Colors - --color-accent: #0000f4; - --color-black: #040404; - --color-white: #fbfbfb; - --color-grey: #565656; - --color-grey-light: #8e8e8e; - --color-grey-lightness: #dedede; + &[data-theme='dark'] { + --color-accent: #0000f4; + --color-black: #040404; + --color-white: #fbfbfb; + --color-grey: #565656; + --color-grey-light: #8e8e8e; + --color-grey-lightness: #dedede; + } + + &[data-theme='light'] { + --color-accent: #0000f4; + --color-black: #fbfbfb; + --color-white: #040404; + --color-grey: #565656; + --color-grey-light: #8e8e8e; + --color-grey-lightness: #dedede; + } // Duration --duration-normal: 0.525s; @@ -156,7 +167,7 @@ p { transition: unset !important; &:hover { - border: tovw(1px, 'default', 1px) solid transparent !important; + border: tovw(1px, 'default', 1px) solid var(--color-grey) !important; } &--is-focused { @@ -232,3 +243,13 @@ p { color: var(--color-grey-light) !important; } } + +[data-theme='light'] { + [class$='-menu'] { + background: rgb(0 0 0 / 0.65) !important; + + @-moz-document url-prefix("") { + background-color: var(--color-white) !important; + } + } +} diff --git a/src/lib/cms/queries/community.js b/src/lib/cms/queries/community.js index 0af92d1..850ad39 100644 --- a/src/lib/cms/queries/community.js +++ b/src/lib/cms/queries/community.js @@ -52,6 +52,9 @@ const CommunitySocials = { socialsImage { url } + socialsImageLight { + url + } socialsTwitter socialsDiscord socialsDiscourse diff --git a/src/lib/cms/queries/partners.js b/src/lib/cms/queries/partners.js index 21ef386..40a611f 100644 --- a/src/lib/cms/queries/partners.js +++ b/src/lib/cms/queries/partners.js @@ -28,6 +28,21 @@ const PartnersOportunities = { oportunitiesItem03Links oportunitiesItem04Links oportunitiesItem05Links + oportunitiesImage01 { + url + } + oportunitiesImage02 { + url + } + oportunitiesImage03 { + url + } + oportunitiesImage04 { + url + } + oportunitiesImage05 { + url + } } }` } diff --git a/src/lib/cms/queries/products.js b/src/lib/cms/queries/products.js index 08b1b5b..31ee765 100644 --- a/src/lib/cms/queries/products.js +++ b/src/lib/cms/queries/products.js @@ -26,9 +26,15 @@ const ProductsWatchers = { watchersImage { url } + watchersImageLight { + url + } watchersMobileImage { url } + watchersMobileImageLight { + url + } watchersItem01 watchersItem02 watchersItem03 @@ -50,9 +56,15 @@ const ProductsStack = { stackImage { url } + stackImageLight { + url + } stackSvgImg { url } + stackSvgImgLight { + url + } } } ` @@ -73,6 +85,12 @@ const ProductsNetwork = { networkMobileImg { url } + networkImgLight { + url + } + networkMobileImgLight { + url + } } } ` @@ -90,6 +108,12 @@ const ProductsApp = { appMobileImg { url } + appImgLight { + url + } + appMobileImgLight { + url + } } } ` diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index dc1a31c..5f09ac4 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -3,6 +3,7 @@ import '~/css/global.scss' import { NextComponentType, NextPageContext } from 'next' import { AppProps } from 'next/app' import { RealViewportProvider } from 'next-real-viewport' +import { ThemeProvider } from 'next-themes' import * as React from 'react' import { QueryClient, QueryClientProvider } from 'react-query' @@ -62,11 +63,13 @@ const App = ({ Component, pageProps, ...rest }: AppProps) => { - - -
    - {getLayout({ Component, pageProps, ...rest })} -