-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(HomePage): add HomepageFeatures2 and OurSponsors section (#6)
Co-authored-by: Zig Blathazar <[email protected]>
- Loading branch information
1 parent
013b3d0
commit 6e56061
Showing
11 changed files
with
276 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
import clsx from "clsx"; | ||
import Heading from "@theme/Heading"; | ||
import styles from "./styles.module.css"; | ||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | ||
import { | ||
faCode, | ||
faLock, | ||
IconDefinition, | ||
} from "@fortawesome/free-solid-svg-icons"; | ||
import { faNpm } from "@fortawesome/free-brands-svg-icons"; | ||
|
||
type FeatureItem = { | ||
title: string; | ||
Svg: IconDefinition; | ||
description: JSX.Element; | ||
}; | ||
|
||
const FeatureList: FeatureItem[] = [ | ||
{ | ||
title: "Easy to use", | ||
Svg: faCode, | ||
description: ( | ||
<> | ||
You don't need to be an expert to use Tonion toolkit. All fo our tools | ||
are readable and well documented. | ||
</> | ||
), | ||
}, | ||
{ | ||
title: "Accessible from NPM (Soon)", | ||
Svg: faNpm, | ||
description: ( | ||
<> | ||
Tonion offers a robust CLI tool for managing/building Tact and TON | ||
projects. Tonion CLI is accessible from NPM. | ||
</> | ||
), | ||
}, | ||
{ | ||
title: "Secure", | ||
Svg: faLock, | ||
description: ( | ||
<>All Tonion contract and tools are strongly tested on each change!</> | ||
), | ||
}, | ||
, | ||
{ | ||
title: "Secure", | ||
Svg: faLock, | ||
description: ( | ||
<>All Tonion contract and tools are strongly tested on each change!</> | ||
), | ||
}, | ||
, | ||
{ | ||
title: "Secure", | ||
Svg: faLock, | ||
description: ( | ||
<>All Tonion contract and tools are strongly tested on each change!</> | ||
), | ||
}, | ||
, | ||
{ | ||
title: "Secure", | ||
Svg: faLock, | ||
description: ( | ||
<>All Tonion contract and tools are strongly tested on each change!</> | ||
), | ||
}, | ||
]; | ||
|
||
function Feature({ title, Svg, description }: FeatureItem) { | ||
return ( | ||
<div className={clsx("col col--6")}> | ||
<div className="text--left padding-horiz--md"> | ||
<div className="bg-secondary-100 rounded-full w-[50px] h-[50px] p-4 mb-5"> | ||
<FontAwesomeIcon icon={Svg} className="text-secondary-600 size-5 " /> | ||
</div> | ||
|
||
<Heading as="h3">{title}</Heading> | ||
<p>{description}</p> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default function HomepageFeatures2(): JSX.Element { | ||
return ( | ||
<section className={clsx(styles.features, "m-auto")}> | ||
<div className="container m-auto justify-center"> | ||
<div className="md:max-w-[320px] w-full mx-auto justify-center"> | ||
<h2 className="text-center "> Features you'll love</h2> | ||
<p className="text-gray-500"> | ||
A responsive documentation template built for everyone who wants to | ||
create a plugin. | ||
</p> | ||
</div> | ||
<div className="row"> | ||
|
||
|
||
{FeatureList.map((props, idx) => ( | ||
<Feature key={idx} {...props} /> | ||
))} | ||
</div> | ||
</div> | ||
</section> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.features { | ||
display: flex; | ||
align-items: center; | ||
padding: 2rem 0; | ||
width: 60%; | ||
} | ||
|
||
.featureSvg { | ||
height: 200px; | ||
width: 200px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
export default function OurSponsors(): JSX.Element { | ||
return( | ||
<div className="max-w-3xl mx-auto px-5 my-10"> | ||
<div className="flex flex-col justify-center"> | ||
<div className="text-center"> | ||
<h2 className="font-semibold text-3xl">Our Sponsors</h2> | ||
<p className="max-w-md mx-auto mt-2 text-gray-500"> | ||
We are thankful to each and every company sponsored our plugin which | ||
helped us to continue working on it. | ||
</p> | ||
</div> | ||
<div className="flex flex-wrap items-center justify-center gap-10 mt-2 md:justify-around"> | ||
<div className="text-gray-400 ">Logo</div> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,50 @@ | ||
import React from "react"; | ||
import React, { useEffect } from "react"; | ||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | ||
import { IconDefinition } from "@fortawesome/free-solid-svg-icons"; | ||
import clsx from "clsx"; | ||
|
||
import { Tooltip } from "react-tooltip"; | ||
|
||
type TagItem = { | ||
title: string; | ||
svg?: IconDefinition; | ||
className?: string; | ||
title: string; | ||
svg?: IconDefinition; | ||
className?: string; | ||
onClick?: React.MouseEventHandler<HTMLButtonElement>; | ||
}; | ||
|
||
export default function Tag({title, svg, className}: TagItem) { | ||
return ( | ||
<div className={clsx("flex justify-left items-left", className)}> | ||
<div className="flex items-center gap-4 button button--lg bg-secondary-100 text-secondary-700 rounded-[20px] hover:text-secondary-900"> | ||
<span className="my-auto text-left whitespace-nowrap overflow-hidden overflow-ellipsis "> | ||
{title} | ||
</span> | ||
{svg && <FontAwesomeIcon icon={svg} />} | ||
</div> | ||
</div> | ||
); | ||
|
||
export default function Tag(tag: TagItem) { | ||
return ( | ||
<div className={clsx("flex justify-left items-left", tag.className)}> | ||
<div className="flex items-center gap-4 button button--lg bg-secondary-100 text-secondary-700 rounded-[20px] hover:text-secondary-700"> | ||
<span className="my-auto text-left whitespace-nowrap overflow-hidden overflow-ellipsis "> | ||
{tag.title} | ||
</span> | ||
{tag.svg && tag.onClick ? ( | ||
<> | ||
<button | ||
onClick={tag.onClick} | ||
className="bg-transparent border-none" | ||
data-tooltip-id="my-tooltip" | ||
> | ||
<FontAwesomeIcon | ||
icon={tag.svg} | ||
className="size-4 text-secondary-700 hover:text-secondary-900" | ||
/> | ||
</button> | ||
<Tooltip | ||
id="my-tooltip" | ||
delayHide={500} | ||
delayShow={100} | ||
place="top" | ||
className="!rounded-2xl !text-sm !py-1 !px-2" | ||
events={["click"]} | ||
> | ||
Copied! | ||
</Tooltip> | ||
</> | ||
) : ( | ||
tag.svg && <FontAwesomeIcon icon={tag.svg} className="ml-2" /> | ||
)} | ||
</div> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.