Refactor/add sponsors section (#2132)

* chore(docs): sponsor structure added

* feat(docs): top sponsors section added
This commit is contained in:
Junior Garcia 2023-12-13 16:25:04 -03:00 committed by GitHub
parent f3d0d6dded
commit e551226ff2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 105 additions and 1 deletions

View File

@ -2,6 +2,6 @@
"typescript.tsdk": "node_modules/typescript/lib",
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
}
}

View File

@ -12,6 +12,7 @@ import {Community} from "@/components/marketing/community";
import {Support} from "@/components/marketing/support";
import landingContent from "@/content/landing";
import {getAllSponsors} from "@/utils/get-all-sponsors";
import {Sponsors} from "@/components/marketing/sponsors";
async function getData() {
try {
@ -33,6 +34,7 @@ export default async function Home() {
<section className="flex flex-col items-center justify-center">
<Hero />
<FeaturesGrid features={landingContent.topFeatures} />
<Sponsors />
<CustomThemes />
<A11yOtb />
<DarkMode />

View File

@ -0,0 +1,43 @@
import {IconSvgProps} from "@/types";
export const RelumeLogo = ({width = 152, height = 56, ...props}: IconSvgProps) => (
<svg fill="none" height={height} width={width} xmlns="http://www.w3.org/2000/svg" {...props}>
<path
clipRule="evenodd"
d="M85.9339 36H89.3899V17.76H85.9339V36ZM61.7117 36H57.8477V18.84H63.9917C68.0477 18.84 70.6157 20.496 70.6157 24.048V24.144C70.6157 26.736 69.1037 28.104 67.0877 28.704L71.6237 36H67.4957L63.3917 29.376H61.7117V36ZM61.7117 21.816V26.736H63.8957C65.8397 26.736 66.8237 25.92 66.8237 24.264V24.168C66.8237 22.416 65.7677 21.816 63.8957 21.816H61.7117ZM84.256 32.04C83.848 34.752 81.688 36.264 78.256 36.264C74.464 36.264 71.704 33.888 71.704 29.88V29.688C71.704 25.728 74.512 23.16 78.16 23.16C81.4 23.16 84.28 25.056 84.28 29.544V30.504H75.232C75.328 32.592 76.456 33.792 78.352 33.792C79.96 33.792 80.752 33.096 80.968 32.04H84.256ZM78.16 25.56C76.6 25.56 75.544 26.592 75.28 28.368H80.896C80.776 26.472 79.816 25.56 78.16 25.56ZM100.005 34.032C99.3565 35.304 98.0845 36.264 96.0205 36.264C93.5725 36.264 91.7485 34.824 91.7485 31.536V23.448H95.2045V31.056C95.2045 32.76 95.9005 33.576 97.3885 33.576C98.8525 33.576 100.005 32.664 100.005 30.816V23.448H103.461V36H100.005V34.032ZM105.82 36H109.3V28.584C109.3 26.88 110.38 26.016 111.724 26.016C112.948 26.016 113.692 26.736 113.692 28.344V36H117.148V28.584C117.148 26.88 118.228 26.016 119.572 26.016C120.82 26.016 121.54 26.736 121.54 28.344V36H124.996V27.96C124.996 24.624 123.196 23.16 120.868 23.16C119.284 23.16 117.652 23.832 116.644 25.344C116.044 23.856 114.796 23.16 113.14 23.16C111.268 23.16 109.924 24.192 109.3 25.368V23.448H105.82V36ZM139.033 32.04C138.625 34.752 136.465 36.264 133.033 36.264C129.241 36.264 126.481 33.888 126.481 29.88V29.688C126.481 25.728 129.289 23.16 132.937 23.16C136.177 23.16 139.057 25.056 139.057 29.544V30.504H130.009C130.105 32.592 131.233 33.792 133.129 33.792C134.737 33.792 135.529 33.096 135.745 32.04H139.033ZM132.937 25.56C131.377 25.56 130.321 26.592 130.057 28.368H135.673C135.553 26.472 134.593 25.56 132.937 25.56Z"
fill="currentColor"
fillRule="evenodd"
/>
<path
clipRule="evenodd"
d="M44.55 19.8666L44.3167 19.45C44.0157 18.9461 43.5912 18.5274 43.0833 18.2333L31.9 11.7833C31.3936 11.4896 30.8188 11.3344 30.2333 11.3333H29.75C29.1646 11.3344 28.5897 11.4896 28.0833 11.7833L16.9 18.25C16.395 18.5421 15.9754 18.9616 15.6833 19.4666L15.45 19.8833C15.1562 20.3897 15.001 20.9645 15 21.55V34.4666C15.001 35.0521 15.1562 35.6269 15.45 36.1333L15.6833 36.55C15.983 37.0492 16.4008 37.467 16.9 37.7666L28.1 44.2166C28.6038 44.5165 29.1804 44.6722 29.7667 44.6666H30.2333C30.8188 44.6656 31.3936 44.5104 31.9 44.2166L43.0833 37.75C43.5934 37.4645 44.0145 37.0434 44.3 36.5333L44.55 36.1166C44.8402 35.6088 44.9951 35.0349 45 34.45V21.5333C44.999 20.9479 44.8438 20.373 44.55 19.8666ZM29.75 14.6666H30.2333L40 20.3L30 26.0666L20 20.3L29.75 14.6666ZM31.6666 40.5L41.4166 34.8666L41.6666 34.45V23.1833L31.6666 28.9666V40.5Z"
fill="black"
fillRule="evenodd"
/>
<path
clipRule="evenodd"
d="M46.9137 17.9476L47.1582 18.3843C47.7078 19.3408 47.998 20.4245 48 21.528V21.5333V34.4624L47.9999 34.4749C47.9908 35.5734 47.6998 36.6512 47.1548 37.605L47.1389 37.6327L46.8919 38.0444C46.3406 39.01 45.5383 39.8088 44.5699 40.3559L33.4053 46.8116L33.4036 46.8127C32.4419 47.3701 31.3503 47.6647 30.2387 47.6666L30.2333 47.6667H29.7784C28.6565 47.6742 27.5535 47.3772 26.5872 46.8074L15.3793 40.3528L15.356 40.3388C14.435 39.7859 13.664 39.015 13.1112 38.094L13.0879 38.0552L12.8418 37.6157C12.2922 36.6592 12.002 35.5755 12 34.472V34.4667V21.5447C12.002 20.4411 12.2922 19.3574 12.8418 18.4008L13.076 17.9827L13.0864 17.9647C13.6414 17.0051 14.4385 16.208 15.3981 15.653L26.578 9.18832L26.5802 9.18707C27.5418 8.62975 28.6332 8.33529 29.7447 8.33332L29.75 8.33331L30.2387 8.33332C31.3496 8.33529 32.4404 8.62943 33.4016 9.18617L33.4053 9.18832L44.5865 15.637C45.536 16.1868 46.3296 16.9697 46.8923 17.9117L46.9137 17.9476ZM31.9 11.7833L43.0833 18.2333C43.2671 18.3397 43.44 18.4624 43.6 18.5996C43.8234 18.7911 44.0219 19.0108 44.1901 19.2535C44.2344 19.3175 44.2766 19.383 44.3167 19.45L44.55 19.8667C44.5917 19.9385 44.6306 20.0118 44.6666 20.0862C44.7941 20.3494 44.8862 20.6277 44.9408 20.9139C44.9797 21.1172 44.9996 21.3246 45 21.5333V34.45C44.9951 35.0349 44.8402 35.6088 44.55 36.1167L44.3 36.5333C44.0145 37.0434 43.5934 37.4645 43.0833 37.75L31.9 44.2167C31.4611 44.4713 30.9707 44.6218 30.4666 44.6581C30.3891 44.6636 30.3113 44.6665 30.2333 44.6667H29.7667C29.3904 44.6702 29.0182 44.6074 28.6666 44.4826C28.4704 44.413 28.2805 44.3241 28.1 44.2167L16.9 37.7667C16.4008 37.467 15.983 37.0492 15.6833 36.55L15.45 36.1333C15.1562 35.6269 15.001 35.0521 15 34.4667V21.55C15.0004 21.3361 15.0213 21.1237 15.0621 20.9155C15.1329 20.5537 15.2635 20.2047 15.45 19.8833L15.6833 19.4667C15.7261 19.3928 15.7715 19.3207 15.8196 19.2506C16.1 18.8416 16.4689 18.4993 16.9 18.25L28.0833 11.7833C28.5897 11.4896 29.1646 11.3344 29.75 11.3333H30.2333C30.8188 11.3344 31.3936 11.4896 31.9 11.7833ZM40 20.3L30.2333 14.6666H29.75L20 20.3L30 26.0666L40 20.3ZM30 22.6036L33.9952 20.2997L29.9927 17.9911L26.001 20.2975L30 22.6036ZM31.6666 28.9666V40.5L41.4166 34.8666L41.6666 34.45V23.1833L31.6666 28.9666ZM38.6666 28.3839L34.6666 30.6972V35.3019L38.6666 32.9908V28.3839Z"
fill="url(#paint0_linear_2298_533)"
fillRule="evenodd"
/>
<path d="M29.75 14.6665H30.2333L40 20.2998L30 26.0665L20 20.2998L29.75 14.6665Z" fill="white" />
<path
d="M41.417 34.8667L31.667 40.5V28.9667L41.667 23.1833V34.45L41.417 34.8667Z"
fill="white"
/>
<defs>
<linearGradient
gradientUnits="userSpaceOnUse"
id="paint0_linear_2298_533"
x1="12"
x2="48.5205"
y1="8.33331"
y2="11.989"
>
<stop stopColor="#FF7448" />
<stop offset="0.5" stopColor="#FF4848" />
<stop offset="1" stopColor="#6248FF" />
</linearGradient>
</defs>
</svg>
);

View File

@ -0,0 +1,59 @@
import {Button, Link} from "@nextui-org/react";
import {sectionWrapper} from "@/components/primitives";
import {RelumeLogo} from "@/components/icons/sponsors";
import {HeartFilledIcon} from "@/components/icons";
import {VercelIcon} from "@/components/icons/social";
import {siteConfig} from "@/config/site";
type Sponsor = {
name: string;
href: string;
logo: React.ReactNode;
};
const sponsors: Sponsor[] = [
{
name: "Relume",
href: "https://library.relume.io/ai-site-builder?via=nextui",
logo: <RelumeLogo className="text-black dark:text-white" />,
},
{
name: "Vercel",
href: "https://www.vercel.com?utm_source=nextui&utm_marketing=oss",
logo: <VercelIcon className="text-black dark:text-white" height={24} />,
},
];
const SponsorItem = ({href, logo}: Sponsor) => {
return (
<Link isExternal className="flex flex-col items-center justify-center" href={href}>
{logo}
</Link>
);
};
export const Sponsors = () => {
return (
<section className={sectionWrapper({class: "text-center mt-24 lg:mt-32"})}>
<h3 className="text-large text-default-500">Supported and backed by</h3>
<div className="w-full flex flex-wrap gap-x-5 gap-y-3 justify-center items-center">
{sponsors.map((sponsor) => (
<SponsorItem key={sponsor.name} {...sponsor} />
))}
<Button
isExternal
as={Link}
className="group text-sm border-dashed font-normal text-default-600 data-[hover=true]:bg-default-100/50"
href={siteConfig.links.sponsor}
startContent={
<HeartFilledIcon className="text-danger group-data-[hover=true]:animate-heartbeat" />
}
variant="bordered"
>
Your Company
</Button>
</div>
</section>
);
};