Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: better background effect in lore page and other improvements #29

Merged
merged 46 commits into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
137ab2d
feat: animation setup
0xArdy Feb 13, 2023
f2fe7d2
feat: better animation
0xArdy Feb 13, 2023
6d22ccf
feat: mobile responsive improvements
0xArdy Feb 13, 2023
4f58366
feat: effect with styled components
0xArdy Feb 13, 2023
9cc8ddc
feat: intro animation
0xArdy Feb 16, 2023
dc95ecc
Merge branch 'dev' of github-defi:defi-wonderland/wonderland-web-priv…
0xArdy Feb 16, 2023
9c8cde3
feat: intro animation with the key shape
0xArdy Feb 20, 2023
a493122
feat: custom scrollbar
0xArdy Feb 20, 2023
6055381
Merge branch 'dev' of github-defi:defi-wonderland/wonderland-web-priv…
0xArdy Feb 20, 2023
50469e5
fix: team section
0xArdy Feb 20, 2023
830335a
fix: team section join-us link
0xArdy Feb 20, 2023
b89a41b
fix: less volatility in distortion text
0xArdy Feb 20, 2023
a0a7da0
fix: avoid rerender stars
0xArdy Feb 20, 2023
2470133
fix: less drag distance
0xArdy Feb 21, 2023
f529f51
fix(footer): scroll to top on click
0xArdy Feb 21, 2023
d784e46
fix: year and company name
0xArdy Feb 21, 2023
6a19f0b
feat: blog page setup
0xArdy Feb 21, 2023
61ac1ab
feat: add Inter font to blogpost page
0xArdy Feb 21, 2023
05cf6fc
feat: append date in blogpost and fix italic font
0xArdy Feb 21, 2023
11c10d8
fix: font weight
0xArdy Feb 21, 2023
2c1ad30
feat: better file distribution
0xArdy Feb 21, 2023
eb89903
merge with dev
0xArdy Feb 21, 2023
73b630f
feat: import blogs instead of use fetch
0xArdy Feb 21, 2023
d56bcc4
style: post responsive
0xArdy Feb 21, 2023
ceb04e3
style: responsive improvements
0xArdy Feb 21, 2023
678a409
fix: post imports
0xArdy Feb 21, 2023
f9be6e6
fix: blogs text
0xArdy Feb 21, 2023
3c7768b
style: symetric width
0xArdy Feb 21, 2023
a5c77ec
fix: landing page title position
0xArdy Feb 21, 2023
5548069
fix: title uppercase
0xArdy Feb 22, 2023
5383bd9
fix: posts number
0xArdy Feb 22, 2023
05e851f
fix: build
0xArdy Feb 22, 2023
da6a1fd
chore: blog order
0xArdy Feb 22, 2023
04c8f4c
style: blog format
0xArdy Feb 22, 2023
07e8a03
style: blog page cards
0xArdy Feb 22, 2023
2eea0bd
style: blog banner and some fixes
0xArdy Feb 22, 2023
4cf4c45
fix: routing and media queries
0xArdy Feb 22, 2023
9501e0d
fix: blog responsiviness
0xArdy Feb 22, 2023
b824e5a
fix: img max-width
0xArdy Feb 23, 2023
baa4fa1
style: better lore cone background
0xArdy Feb 24, 2023
0f8812a
style: remove opacity on arrows
0xArdy Feb 24, 2023
c0df99e
fix: ball position on mobile
0xArdy Feb 24, 2023
4a7da02
style: title position on landing page
0xArdy Feb 24, 2023
b35844d
fix: the navbar link doesn't get colored
0xArdy Feb 24, 2023
0ae1417
fix: landings title position
0xArdy Feb 24, 2023
c4f9ff7
merge with dev
0xArdy Feb 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed src/assets/Cono_bola.png
Binary file not shown.
Binary file added src/assets/cone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/hoop-bottom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/hoop-top.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 15 additions & 11 deletions src/containers/Navbar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useEffect, useState } from "react";
import { useLocation } from "react-router-dom";

import {
Expand All @@ -10,7 +11,6 @@ import {
} from "./Navbar.styles";
import wonderLogo from "/img/wonder-logo.svg";
import menuIcon from "~/assets/menu_icon.svg";
import { useState } from "react";

interface NavLink {
name: string;
Expand Down Expand Up @@ -48,13 +48,6 @@ export const Navbar = ({}: NavbarProps) => {
const [navLink, setNavLink] = useState(navLinks);
const { pathname } = useLocation();

const handleClick = (i: number) => {
setShowNavbar(!showNavbar);
const newNavLink = resetValues();
newNavLink[i].disabled = true;
setNavLink(newNavLink);
};

const resetValues = () => {
// reset values
const newNavLink = navLink.map((link) => ({
Expand All @@ -66,6 +59,20 @@ export const Navbar = ({}: NavbarProps) => {
return newNavLink;
};

useEffect(() => {
const newNavLink = resetValues();
let index: number | undefined;

newNavLink.forEach((link, i) => {
if (link.url === pathname) {
index = i;
}
});

if (index !== undefined) newNavLink[index].disabled = true;
setNavLink(newNavLink);
}, [pathname]);

return (
<StyledNavbar id={showNavbar ? "show" : ""}>
<LogoContainer>
Expand All @@ -90,9 +97,6 @@ export const Navbar = ({}: NavbarProps) => {
key={link.name}
disabled={link.disabled && !pathname.includes("/blog/")}
className={link.disabled ? "gradient" : ""}
onClick={() => {
handleClick(i);
}}
>
{link.name}
</NavLink>
Expand Down
8 changes: 7 additions & 1 deletion src/pages/Landing/HeroSection/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ const HeroDivider = styled.img`
`;

const StyledHeroSection = styled(Section)`
margin-bottom: 2.8rem;

& div {
position: absolute;
width: 100%;
Expand All @@ -20,10 +22,14 @@ const StyledHeroSection = styled(Section)`
}

@media screen and (max-width: ${MOBILE_MAX_WIDTH}) {
top: -2rem;
top: 0rem;
min-height: unset;
height: 50rem;
background-image: url("/img/hero/hero_mobile.png");

& div {
top: 5rem;
}
}
`;

Expand Down
10 changes: 10 additions & 0 deletions src/pages/Landing/TeamSection/TeamSection.styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,12 @@ export const CarouselContainer = styled(Carousel)`
top: unset;
bottom: -1.5rem;
left: 9rem;
opacity: 1;
background-image: url("/img/arrow_left.svg") !important;

&:hover {
opacity: 0.8;
}
}

& .control-arrow.control-next {
Expand All @@ -130,7 +135,12 @@ export const CarouselContainer = styled(Carousel)`
top: unset;
bottom: -1.5rem;
right: 9rem;
opacity: 1;
background-image: url("/img/arrow.svg") !important;

&:hover {
opacity: 0.8;
}
}

& .control-next::before,
Expand Down
118 changes: 118 additions & 0 deletions src/pages/Lore/Lore.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
import styled from "styled-components";

import { PageContent } from "~/components/app";
import { ApproachSection } from "./ApproachSection";
import {
Ball,
MOBILE_MAX_WIDTH,
SPACING_192,
SPACING_512,
SPACING_700,
LiquidDistortion,
} from "~/components/common";
import { useWindowDimensions } from "~/hooks/windowDimensions";
import TextSection from "./TextSection";
import Cone from "~/assets/cone.png";
import HoopTop from "~/assets/hoop-top.png";
import HoopBottom from "~/assets/hoop-bottom.png";

const StyledApproachSection = styled(ApproachSection)`
padding: "3rem 0";
`;

const HeroDivider = styled.div`
position: absolute;
width: 100%;
bottom: 0;
z-index: 100;
display: flex;
flex-direction: column;
align-items: center;
top: ${SPACING_192};

@media screen and (max-width: ${MOBILE_MAX_WIDTH}) {
top: 22rem;
}
`;

const SBall = styled(Ball)`
top: 21rem;

@media screen and (max-width: ${MOBILE_MAX_WIDTH}) {
top: 14rem;
width: 6rem;
}
`;

const MobileTitleContainer = styled.div`
transform: rotate(3deg);
`;

const BackgroundContainer = styled.div`
position: relative;
width: ${SPACING_512};
height: ${SPACING_700};
right: 12rem;
top: 20rem;

@media screen and (max-width: ${MOBILE_MAX_WIDTH}) {
width: 25.6rem;
height: 35rem;
right: 11rem;
top: 12rem;
}
`;

const SCone = styled.img`
position: absolute;

@media screen and (max-width: ${MOBILE_MAX_WIDTH}) {
width: 30rem;
}
`;

const SHoop = styled(SCone)`
z-index: 10;
`;

export function Lore() {
const { isMobile, isTablet } = useWindowDimensions();

return (
<PageContent>
<HeroDivider>
{!isMobile && (
<>
<LiquidDistortion
text="WOND3RLAND IS NOT A PLACE,"
fontSize={isTablet ? 90 : undefined}
/>
<LiquidDistortion
text="IT'S A FEELING WITHIN, A PROCESS."
fontSize={isTablet ? 90 : undefined}
/>
</>
)}

{isMobile && (
<MobileTitleContainer>
<LiquidDistortion text="WOND3RLAND" fontSize={65} />
<LiquidDistortion text="IS NOT A PLACE," fontSize={65} />
<LiquidDistortion text="IT'S A FEELING WITHIN," fontSize={65} />
<LiquidDistortion text="A PROCESS." fontSize={65} />
</MobileTitleContainer>
)}
</HeroDivider>
<BackgroundContainer>
<SCone src={HoopTop} alt="starts background" />
<SCone src={Cone} alt="starts background" />
<SBall />
<SHoop src={HoopBottom} alt="starts background" />
</BackgroundContainer>

<TextSection />

<StyledApproachSection />
</PageContent>
);
}
1 change: 1 addition & 0 deletions src/pages/Lore/TextSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const LoreSection = styled(Section)`
width: calc(${PAGE_MAX_WIDTH} + 13rem);
max-width: 100%;
grid-gap: 4.6rem;
margin-top: 12rem;

@media screen and (max-width: 1400px) {
flex-direction: column;
Expand Down
97 changes: 1 addition & 96 deletions src/pages/Lore/index.tsx
Original file line number Diff line number Diff line change
@@ -1,96 +1 @@
import styled from "styled-components";

import { PageContent } from "~/components/app";
import { ApproachSection } from "./ApproachSection";
import {
Ball,
MOBILE_MAX_WIDTH,
SPACING_128,
SPACING_192,
SPACING_512,
SPACING_700,
LiquidDistortion,
} from "~/components/common";
import { useWindowDimensions } from "~/hooks/windowDimensions";
import CONE from "~/assets/Cono_bola.png";
import TextSection from "./TextSection";

const StyledApproachSection = styled(ApproachSection)`
padding: "3rem 0";
`;

const SCone = styled.img`
width: ${SPACING_512};
height: ${SPACING_700};
margin-right: 15%;
margin-top: ${SPACING_128};

@media screen and (max-width: ${MOBILE_MAX_WIDTH}) {
width: 25.6rem;
height: 35rem;
margin-left: -25%;
margin-top: 8rem;
}
`;

const HeroDivider = styled.div`
position: absolute;
width: 100%;
bottom: 0;
z-index: 10;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
top: ${SPACING_192};

@media screen and (max-width: ${MOBILE_MAX_WIDTH}) {
top: -12rem;
}
`;

const SBall = styled(Ball)`
margin-top: -7rem;

@media screen and (max-width: ${MOBILE_MAX_WIDTH}) {
width: 6rem;
margin-top: -14rem;
}
`;

const MobileTitleContainer = styled.div`
transform: rotate(3deg);
`;

export function Lore() {
const { isMobile } = useWindowDimensions();

return (
<PageContent>
<SBall />

<HeroDivider>
{!isMobile && (
<>
<LiquidDistortion text="WOND3RLAND IS NOT A PLACE," />
<LiquidDistortion text="IT'S A FEELING WITHIN, A PROCESS." />
</>
)}

{isMobile && (
<MobileTitleContainer>
<LiquidDistortion text="WOND3RLAND" fontSize={65} />
<LiquidDistortion text="IS NOT A PLACE," fontSize={65} />
<LiquidDistortion text="IT'S A FEELING WITHIN," fontSize={65} />
<LiquidDistortion text="A PROCESS." fontSize={65} />
</MobileTitleContainer>
)}
</HeroDivider>
<SCone src={CONE} alt="starts background" />

<TextSection />

<StyledApproachSection />
</PageContent>
);
}
export * from "./Lore";