-
Notifications
You must be signed in to change notification settings - Fork 0
feat(frontend): brand assets page #54
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9fcbd9b
feat: brand assets page hero
kemuru 14554dd
feat: add imagedownload, downloadbutton, kleroslogosection, logospack…
kemuru 323a1df
feat: kleros badges, kleros logo, kleros fonts, kleros colors, styled…
kemuru 26e7906
feat: add pnk token section
kemuru 76fbcc2
fix: readd forbuilders arrowlink in query
kemuru 1ba00c0
chore: implement feedback
kemuru File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,97 @@ | ||
import Hero from "@/components/BrandAssets/Hero"; | ||
import KlerosBadgesSection from "@/components/BrandAssets/KlerosBadgesSection"; | ||
import KlerosColorsSection from "@/components/BrandAssets/KlerosColorsSection/index"; | ||
import KlerosFontsSection from "@/components/BrandAssets/KlerosFontsSection"; | ||
import KlerosLogoSection from "@/components/BrandAssets/KlerosLogoSection"; | ||
import LogosPackageSection from "@/components/BrandAssets/LogosPackageSection"; | ||
import PnkTokenSection from "@/components/BrandAssets/PnkTokenSection"; | ||
import StyledImagesSection from "@/components/BrandAssets/StyledImagesSection"; | ||
import { heroQuery, HeroQueryType } from "@/queries/brand-assets/hero"; | ||
import { | ||
klerosBadgesSectionQuery, | ||
KlerosBadgesSectionQueryType, | ||
} from "@/queries/brand-assets/kleros-badges-section"; | ||
import { | ||
klerosColorsSectionQuery, | ||
KlerosColorsSectionQueryType, | ||
} from "@/queries/brand-assets/kleros-colors-section"; | ||
import { | ||
klerosFontsSectionQuery, | ||
KlerosFontsSectionQueryType, | ||
} from "@/queries/brand-assets/kleros-fonts-section"; | ||
import { | ||
klerosLogoSectionQuery, | ||
KlerosLogoSectionQueryType, | ||
} from "@/queries/brand-assets/kleros-logo-section"; | ||
import { | ||
logosPackageSectionQuery, | ||
LogosPackageSectionQueryType, | ||
} from "@/queries/brand-assets/logos-package-section"; | ||
import { | ||
pnkTokenSectionQuery, | ||
PnkTokenSectionQueryType, | ||
} from "@/queries/brand-assets/pnk-token-section"; | ||
import { | ||
styledImagesSectionQuery, | ||
StyledImagesSectionQueryType, | ||
} from "@/queries/brand-assets/styled-images-section"; | ||
import { request } from "@/utils/graphQLClient"; | ||
|
||
const BrandAssets: React.FC = async () => { | ||
const heroData = await request<HeroQueryType>(heroQuery); | ||
const logosPackageData = await request<LogosPackageSectionQueryType>( | ||
logosPackageSectionQuery, | ||
); | ||
const klerosLogoSection = await request<KlerosLogoSectionQueryType>( | ||
klerosLogoSectionQuery, | ||
); | ||
const klerosFontsSection = await request<KlerosFontsSectionQueryType>( | ||
klerosFontsSectionQuery, | ||
); | ||
const klerosColorsSection = await request<KlerosColorsSectionQueryType>( | ||
klerosColorsSectionQuery, | ||
); | ||
const klerosBadgesSection = await request<KlerosBadgesSectionQueryType>( | ||
klerosBadgesSectionQuery, | ||
); | ||
const styledImagesSection = await request<StyledImagesSectionQueryType>( | ||
styledImagesSectionQuery, | ||
); | ||
const pnkTokenSection = | ||
await request<PnkTokenSectionQueryType>(pnkTokenSectionQuery); | ||
|
||
return ( | ||
<> | ||
<Hero {...{ heroData: heroData.brandAssetsPageHero }} /> | ||
<LogosPackageSection | ||
logosPackageData={logosPackageData.brandAssetsPageLogosPackageSection} | ||
/> | ||
<KlerosLogoSection | ||
klerosLogoData={klerosLogoSection.brandAssetsPageKlerosLogoSection} | ||
/> | ||
<KlerosFontsSection | ||
klerosFontsData={klerosFontsSection.brandAssetsPageKlerosFontsSection} | ||
/> | ||
<KlerosColorsSection | ||
klerosColorsData={ | ||
klerosColorsSection.brandAssetsPageKlerosColorsSection | ||
} | ||
/> | ||
<KlerosBadgesSection | ||
klerosBadgesData={ | ||
klerosBadgesSection.brandAssetsPageKlerosBadgesSection | ||
} | ||
/> | ||
<StyledImagesSection | ||
styledImagesData={ | ||
styledImagesSection.brandAssetsPageStyledImagesSection | ||
} | ||
/> | ||
<PnkTokenSection | ||
pnkTokenData={pnkTokenSection.brandAssetsPagePnkTokenSection} | ||
/> | ||
</> | ||
); | ||
}; | ||
|
||
export default BrandAssets; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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,42 @@ | ||
import React from "react"; | ||
|
||
import Image from "next/image"; | ||
import Link from "next/link"; | ||
|
||
import Button from "@/components/Button"; | ||
import { HeroQueryType } from "@/queries/brand-assets/hero"; | ||
|
||
interface IHero { | ||
heroData: HeroQueryType["brandAssetsPageHero"]; | ||
} | ||
|
||
const Hero: React.FC<IHero> = ({ heroData }) => { | ||
return ( | ||
<div className="relative px-6 pb-12 pt-32"> | ||
<div className="space-y-6"> | ||
<h1 className="w-min text-3xl">{heroData.header}</h1> | ||
<p className="text-lg">{heroData.subtitle}</p> | ||
<div> | ||
<Link | ||
href={heroData.button?.link?.url} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
<Button variant="secondary"> | ||
<span>{heroData.button?.text}</span> | ||
</Button> | ||
</Link> | ||
</div> | ||
</div> | ||
<Image | ||
src={heroData.background?.url} | ||
alt="Hero Image Background" | ||
width="1440" | ||
height="835" | ||
className="absolute left-0 top-0 z-[-1] h-full object-cover object-left" | ||
/> | ||
kemuru marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</div> | ||
); | ||
}; | ||
|
||
export default Hero; |
30 changes: 30 additions & 0 deletions
30
frontend/src/components/BrandAssets/KlerosBadgesSection.tsx
This file contains hidden or 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,30 @@ | ||
import { KlerosBadgesSectionQueryType } from "@/queries/brand-assets/kleros-badges-section"; | ||
|
||
import ImageDownload from "../ImageDownload"; | ||
|
||
interface IKlerosBadgesSection { | ||
klerosBadgesData: KlerosBadgesSectionQueryType["brandAssetsPageKlerosBadgesSection"]; | ||
} | ||
|
||
const KlerosBadgesSection: React.FC<IKlerosBadgesSection> = ({ | ||
klerosBadgesData, | ||
}) => { | ||
return ( | ||
<div className="relative space-y-6 bg-background-1 px-6 pb-12 pt-32"> | ||
<h1 className="w-min text-3xl">{klerosBadgesData.header}</h1> | ||
<p className="text-lg text-secondary-text">{klerosBadgesData.subtitle}</p> | ||
<div className="flex flex-row flex-wrap justify-center gap-x-8 gap-y-16"> | ||
{klerosBadgesData.imageDownloads.map((imageDownload) => { | ||
return ( | ||
<ImageDownload | ||
key={imageDownload.image.url} | ||
{...{ imageDownload }} | ||
/> | ||
); | ||
})} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default KlerosBadgesSection; |
20 changes: 20 additions & 0 deletions
20
frontend/src/components/BrandAssets/KlerosColorsSection/ColorCard.tsx
This file contains hidden or 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,20 @@ | ||
import React from "react"; | ||
|
||
interface IColorCard { | ||
name: string; | ||
hexColor: string; | ||
} | ||
|
||
const ColorCard: React.FC<IColorCard> = ({ name, hexColor }) => { | ||
return ( | ||
<div | ||
className="flex h-[200px] w-[380px] flex-col items-center justify-center gap-3 rounded-2xl shadow-md" | ||
style={{ backgroundColor: hexColor }} | ||
> | ||
<span className="text-lg text-white">{name}</span> | ||
<span className="text-white">{hexColor}</span> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ColorCard; |
29 changes: 29 additions & 0 deletions
29
frontend/src/components/BrandAssets/KlerosColorsSection/index.tsx
This file contains hidden or 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,29 @@ | ||
import { KlerosColorsSectionQueryType } from "@/queries/brand-assets/kleros-colors-section"; | ||
|
||
import ColorCard from "./ColorCard"; | ||
|
||
interface IKlerosColorsSection { | ||
klerosColorsData: KlerosColorsSectionQueryType["brandAssetsPageKlerosColorsSection"]; | ||
} | ||
|
||
const KlerosColorsSection: React.FC<IKlerosColorsSection> = ({ | ||
klerosColorsData, | ||
}) => { | ||
return ( | ||
<div className="relative space-y-6 bg-background-2 px-6 pb-12 pt-32"> | ||
<h1 className="w-min text-3xl">{klerosColorsData.header}</h1> | ||
<p className="text-lg text-secondary-text">{klerosColorsData.subtitle}</p> | ||
<div className="flex flex-row flex-wrap justify-center gap-8"> | ||
{klerosColorsData?.colorCards?.map((colorCard) => ( | ||
<ColorCard | ||
key={colorCard.name} | ||
name={colorCard.name} | ||
hexColor={colorCard.hexColor} | ||
/> | ||
))} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default KlerosColorsSection; |
25 changes: 25 additions & 0 deletions
25
frontend/src/components/BrandAssets/KlerosFontsSection.tsx
This file contains hidden or 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,25 @@ | ||
import { KlerosFontsSectionQueryType } from "@/queries/brand-assets/kleros-fonts-section"; | ||
|
||
import CtaCard from "../CtaCard"; | ||
|
||
interface IKlerosFontsSection { | ||
klerosFontsData: KlerosFontsSectionQueryType["brandAssetsPageKlerosFontsSection"]; | ||
} | ||
|
||
const KlerosFontsSection: React.FC<IKlerosFontsSection> = ({ | ||
klerosFontsData, | ||
}) => { | ||
return ( | ||
<div className="relative space-y-6 bg-background-1 px-6 pb-12 pt-32"> | ||
<h1 className="w-min text-3xl">{klerosFontsData.header}</h1> | ||
<CtaCard | ||
key={klerosFontsData.linkCard.title} | ||
title={klerosFontsData.linkCard.title} | ||
description={klerosFontsData.linkCard.subtitle} | ||
arrowLink={klerosFontsData.linkCard.link} | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default KlerosFontsSection; |
This file contains hidden or 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,26 @@ | ||
import { KlerosLogoSectionQueryType } from "@/queries/brand-assets/kleros-logo-section"; | ||
|
||
import ImageDownload from "../ImageDownload"; | ||
|
||
interface IKlerosLogoSection { | ||
klerosLogoData: KlerosLogoSectionQueryType["brandAssetsPageKlerosLogoSection"]; | ||
} | ||
|
||
const KlerosLogoSection: React.FC<IKlerosLogoSection> = ({ | ||
klerosLogoData, | ||
}) => { | ||
return ( | ||
<div className="relative space-y-6 bg-background-1 px-6 pb-12 pt-32"> | ||
<h1 className="w-min text-3xl">{klerosLogoData.header}</h1> | ||
<div className="flex flex-row flex-wrap justify-center gap-x-8 gap-y-16"> | ||
{klerosLogoData.imageDownloads.map((imageDownload) => { | ||
return ( | ||
<ImageDownload key={imageDownload.name} {...{ imageDownload }} /> | ||
); | ||
})} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default KlerosLogoSection; |
41 changes: 41 additions & 0 deletions
41
frontend/src/components/BrandAssets/LogosPackageSection.tsx
This file contains hidden or 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,41 @@ | ||
import Link from "next/link"; | ||
|
||
import { LogosPackageSectionQueryType } from "@/queries/brand-assets/logos-package-section"; | ||
|
||
import Button from "../Button"; | ||
import ExternalLink from "../ExternalLink"; | ||
|
||
interface ILogosPackageSection { | ||
logosPackageData: LogosPackageSectionQueryType["brandAssetsPageLogosPackageSection"]; | ||
} | ||
|
||
const LogosPackageSection: React.FC<ILogosPackageSection> = ({ | ||
logosPackageData, | ||
}) => { | ||
return ( | ||
<div className="relative space-y-6 bg-background-2 px-6 pb-12 pt-32"> | ||
<h1 className="w-min text-3xl">{logosPackageData.header}</h1> | ||
<p className="text-lg text-secondary-text">{logosPackageData.subtitle}</p> | ||
<div> | ||
<Link | ||
href={logosPackageData.button?.link?.url} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
<Button variant="primary"> | ||
<span className="text-background-2"> | ||
{logosPackageData.button?.text} | ||
</span> | ||
</Button> | ||
</Link> | ||
</div> | ||
<ExternalLink | ||
url={logosPackageData.arrowLink.link.url} | ||
text={logosPackageData.arrowLink.text} | ||
className="z-[1] flex-wrap" | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default LogosPackageSection; |
This file contains hidden or 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 { PnkTokenSectionQueryType } from "@/queries/brand-assets/pnk-token-section"; | ||
|
||
import ImageDownload from "../ImageDownload"; | ||
|
||
interface IPnkTokenSection { | ||
pnkTokenData: PnkTokenSectionQueryType["brandAssetsPagePnkTokenSection"]; | ||
} | ||
|
||
const PnkTokenSection: React.FC<IPnkTokenSection> = ({ pnkTokenData }) => { | ||
return ( | ||
<div className="relative space-y-6 bg-background-1 px-6 pb-12 pt-32"> | ||
<h1 className="w-min text-3xl">{pnkTokenData.header}</h1> | ||
<p className="text-lg text-secondary-text">{pnkTokenData.subtitle}</p> | ||
<ImageDownload | ||
key={pnkTokenData.imageDownload.name} | ||
{...{ imageDownload: pnkTokenData.imageDownload }} | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default PnkTokenSection; |
43 changes: 43 additions & 0 deletions
43
frontend/src/components/BrandAssets/StyledImagesSection.tsx
This file contains hidden or 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,43 @@ | ||
import { StyledImagesSectionQueryType } from "@/queries/brand-assets/styled-images-section"; | ||
|
||
import ImageDownload from "../ImageDownload"; | ||
|
||
interface IStyledImagesSection { | ||
styledImagesData: StyledImagesSectionQueryType["brandAssetsPageStyledImagesSection"]; | ||
} | ||
|
||
const StyledImagesSection: React.FC<IStyledImagesSection> = ({ | ||
styledImagesData, | ||
}) => { | ||
return ( | ||
<div className="relative space-y-6 bg-background-2 px-6 pb-12 pt-32"> | ||
<h1 className="w-min text-3xl">{styledImagesData.header}</h1> | ||
<h1 className="w-min text-2xl">{styledImagesData.wallpapersHeader}</h1> | ||
<p className="text-lg text-secondary-text"> | ||
{styledImagesData.wallpapersSubtitle} | ||
</p> | ||
<div className="flex flex-row flex-wrap justify-center gap-x-8 gap-y-16"> | ||
{styledImagesData.wallpapersImageDownloads.map((imageDownload) => { | ||
return ( | ||
<ImageDownload key={imageDownload.name} {...{ imageDownload }} /> | ||
); | ||
})} | ||
</div> | ||
<h2 className="w-min text-2xl"> | ||
{styledImagesData.productMockupsHeader} | ||
</h2> | ||
<p className="text-lg text-secondary-text"> | ||
{styledImagesData.productMockupsSubtitle} | ||
</p> | ||
<div className="flex flex-row flex-wrap justify-center gap-x-8 gap-y-16"> | ||
{styledImagesData.productMockupsImageDownloads.map((imageDownload) => { | ||
return ( | ||
<ImageDownload key={imageDownload.name} {...{ imageDownload }} /> | ||
); | ||
})} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default StyledImagesSection; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.