-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat: Adding nextui pro section on the landing page #4227
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
4 commits
Select commit
Hold shift + click to select a range
79e4752
feat: adding nextui pro section on the landing page
macci001 606712f
chore(nits): nits
macci001 c7cb2e9
Merge branch 'canary' of github.com:nextui-org/nextui into macci001/e…
jrgarciadev 3049e18
fix: remove pro image on mobile
jrgarciadev 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
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,79 @@ | ||
| "use client"; | ||
|
|
||
| import type {ReactNode} from "react"; | ||
| import type {ScrollShadowProps} from "@nextui-org/react"; | ||
|
|
||
| import {Children, cloneElement} from "react"; | ||
| import {ScrollShadow} from "@nextui-org/react"; | ||
| import {cn} from "@nextui-org/react"; | ||
|
|
||
| interface MarqueeProps { | ||
| className?: string; | ||
| reverse?: boolean; | ||
| shadow?: boolean; | ||
| duration?: number; | ||
| pauseOnHover?: boolean; | ||
| vertical?: boolean; | ||
| children?: ReactNode; | ||
| [key: string]: unknown; | ||
| } | ||
|
|
||
| export const Marquee = ({ | ||
| className, | ||
| reverse, | ||
| duration = 40, | ||
| shadow = false, | ||
| pauseOnHover = false, | ||
| vertical = false, | ||
| children, | ||
| ...props | ||
| }: MarqueeProps) => { | ||
| const shadowProps: ScrollShadowProps = { | ||
| isEnabled: shadow, | ||
| offset: -20, | ||
| size: 300, | ||
| orientation: "vertical", | ||
| visibility: "both", | ||
| }; | ||
|
|
||
| const Wrapper = shadow ? ScrollShadow : "div"; | ||
|
|
||
| const componentProps = shadow ? {...props, ...shadowProps} : props; | ||
|
|
||
| return ( | ||
| <Wrapper | ||
| {...componentProps} | ||
| className={cn( | ||
| "flex [--gap:1rem]", | ||
| { | ||
| "w-full": !vertical, | ||
| "overflow-y-hidden": vertical, | ||
| "overflow-x-hidden": !vertical, | ||
| "max-h-[calc(100vh_-_200px)]": vertical, | ||
| }, | ||
| className, | ||
| )} | ||
| style={{ | ||
| // @ts-ignore | ||
| "--duration": `${duration}s`, | ||
| }} | ||
| > | ||
| <div | ||
| className={cn("flex w-max items-stretch gap-[--gap]", { | ||
| "flex-col": vertical, | ||
| "h-full": vertical, | ||
| "animate-scrolling-banner": !vertical, | ||
| "animate-scrolling-banner-vertical": vertical, | ||
| "[animation-direction:reverse]": reverse, | ||
| "hover:[animation-play-state:paused]": pauseOnHover, | ||
| })} | ||
| > | ||
| {Children.map(children, (child) => | ||
| child && typeof child === "object" && "type" in child ? cloneElement(child) : child, | ||
| )} | ||
| </div> | ||
| </Wrapper> | ||
| ); | ||
| }; | ||
|
|
||
| export default Marquee; | ||
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,182 @@ | ||
| "use client"; | ||
|
|
||
| import {Button, Chip} from "@nextui-org/react"; | ||
| import {useEffect, useState} from "react"; | ||
| import {useTheme} from "next-themes"; | ||
|
|
||
| import {sectionWrapper, title, titleWrapper, subtitle} from "../primitives"; | ||
|
|
||
| import Marquee from "./marquee"; | ||
|
|
||
| import {useIsMobile} from "@/hooks/use-media-query"; | ||
|
|
||
| export const NextUIProSection = () => { | ||
| const [mounted, setMounted] = useState(false); | ||
|
|
||
| useEffect(() => { | ||
| setMounted(true); | ||
| }, []); | ||
|
|
||
| const isMobile = useIsMobile(); | ||
| const {theme} = useTheme(); | ||
| const isDarkMode = theme === "dark"; | ||
|
|
||
| let imgSrc: string; | ||
|
|
||
| if (isDarkMode) { | ||
| imgSrc = isMobile | ||
| ? "/images/nextuipro-section-background@mobile.webp" | ||
| : "/images/nextuipro-section-background.webp"; | ||
| } else { | ||
| imgSrc = isMobile | ||
| ? "/images/nextuipro-section-background-light@mobile.webp" | ||
| : "/images/nextuipro-section-background-light.webp"; | ||
| } | ||
|
|
||
| const mobileClassName: string = isDarkMode | ||
| ? "h-full w-full bg-[radial-gradient(at_40%_80%,_rgba(255,255,255,_0)_5%,_rgba(0,0,0,_0.8)_50%,_rgba(0,0,0,1)_100%)]" | ||
| : "h-full w-full bg-[radial-gradient(at_40%_80%,_rgba(0,0,0,_0)_5%,_rgba(255,255,255,_0.8)_50%,_rgba(255,255,255,1)_100%)]"; | ||
|
|
||
| const webClassName: string = isDarkMode | ||
| ? "h-full w-full bg-[radial-gradient(at_80%_50%,_rgba(255,255,255,_0)_20%,_rgba(0,0,0,_0.8)_40%,_rgba(0,0,0,1)_100%)]" | ||
| : "h-full w-full bg-[radial-gradient(at_80%_50%,_rgba(0,0,0,_0)_20%,_rgba(255,255,255,_0.9)_40%,_rgba(255,255,255,1)_100%)]"; | ||
|
|
||
| if (!mounted) return null; | ||
|
|
||
| const CheckmarkIcon = () => ( | ||
| <svg fill="none" height="11" viewBox="0 0 13 11" width="13" xmlns="http://www.w3.org/2000/svg"> | ||
| <path | ||
| d="M1 6.4L4.14286 10L12 1" | ||
| stroke="#006FEE" | ||
| strokeLinecap="round" | ||
| strokeLinejoin="round" | ||
| strokeWidth="2" | ||
| /> | ||
| </svg> | ||
| ); | ||
|
|
||
| return ( | ||
| <section className={sectionWrapper({class: "mt-16 lg:mt-44 overflow-hidden"})}> | ||
| <div className="flex flex-col gap-8 min-h-[480px]"> | ||
| <div className="z-30 flex w-screen h-full flex-col items-start justify-center leading-8 pt-4"> | ||
| <Chip | ||
| classNames={{ | ||
| base: "ml-0.5 transition-colors bg-gradient-to-br from-cyan-600 to-blue-600", | ||
| content: "text-tiny font-semibold", | ||
| }} | ||
| color="primary" | ||
| size="sm" | ||
| > | ||
| PRO | ||
| </Chip> | ||
| <div className={titleWrapper({class: "mt-2 inline md:block"})}> | ||
| <h1 className={title({size: "lg", class: "[text-shadow:_0_3px_0_rgb(0_0_0_/_10%)]"})}> | ||
| Ship | ||
| </h1> | ||
| <h1 | ||
| className={title({ | ||
| size: "lg", | ||
| color: "blue", | ||
| class: "[text-shadow:_0_3px_0_rgb(0_0_0_/_10%)]", | ||
| })} | ||
| > | ||
| faster | ||
| </h1> | ||
| <h1 className={title({size: "lg", class: "[text-shadow:_0_3px_0_rgb(0_0_0_/_10%)]"})}> | ||
| with | ||
| </h1> | ||
| <div className="flex flex-col sm:flex-row"> | ||
| <h1 className={title({size: "lg", class: "[text-shadow:_0_3px_0_rgb(0_0_0_/_10%)]"})}> | ||
| beautiful | ||
| </h1> | ||
| <h1 className={title({size: "lg", class: "[text-shadow:_0_3px_0_rgb(0_0_0_/_10%)]"})}> | ||
| components | ||
| </h1> | ||
| </div> | ||
| </div> | ||
| <p className={subtitle({class: "pr-12 text-foreground-500"})}> | ||
| Premade templates of over 210+ beautiful and responsive components, professionally | ||
| created by the team behind NextUI. | ||
| </p> | ||
| <div className="mt-4 text-foreground-600 font-medium"> | ||
| <div className="flex gap-x-4 items-center"> | ||
| <CheckmarkIcon /> | ||
| 210+ Components | ||
| </div> | ||
| <div className="flex gap-x-4 items-center"> | ||
| <CheckmarkIcon /> | ||
| Lifetime Access | ||
| </div> | ||
| <div className="flex gap-x-4 items-center"> | ||
| <CheckmarkIcon /> | ||
| Free Updates | ||
| </div> | ||
| <div className="flex gap-x-4 items-center"> | ||
| <CheckmarkIcon /> | ||
| Figma Files Included | ||
| </div> | ||
| </div> | ||
| <div className="mt-4"> | ||
| <Button | ||
| as={"a"} | ||
| className="px-6 flex items-center" | ||
| color="primary" | ||
| href="https://nextui.pro?utm_source=nextui.org&utm_medium=nextui-homepage-section" | ||
| rel="noopener noreferrer" | ||
| target="_blank" | ||
| > | ||
| Explore NextUI Pro | ||
| <svg | ||
| fill="none" | ||
| height="21" | ||
| viewBox="0 0 20 21" | ||
| width="20" | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| > | ||
| <path | ||
| d="M12.0254 5.44189L17.0837 10.5002L12.0254 15.5586" | ||
| stroke="white" | ||
| strokeLinecap="round" | ||
| strokeLinejoin="round" | ||
| strokeMiterlimit="10" | ||
| strokeWidth="1.5" | ||
| /> | ||
| <path | ||
| d="M2.91602 10.5H16.941" | ||
| stroke="white" | ||
| strokeLinecap="round" | ||
| strokeLinejoin="round" | ||
| strokeMiterlimit="10" | ||
| strokeWidth="1.5" | ||
| /> | ||
| </svg> | ||
| </Button> | ||
| </div> | ||
| </div> | ||
| <div className="overflow-hidden"> | ||
| <Marquee | ||
| vertical | ||
| className="h-78 hidden md:flex w-screen mt-4 md:absolute md:top-0 md:inset-0 isolate md:max-h-dvh" | ||
| duration={isMobile ? 240 : 60} | ||
| > | ||
| <img | ||
| alt="Hero Background" | ||
| className="w-full" | ||
| height={3255} | ||
| loading="lazy" | ||
| src={imgSrc} | ||
| width={1920} | ||
| /> | ||
|
macci001 marked this conversation as resolved.
|
||
| </Marquee> | ||
| <div className="absolute md:hidden inset-0 pointer-events-none top-0 z-20"> | ||
| <div className={mobileClassName} /> | ||
| </div> | ||
|
|
||
| <div className="absolute hidden md:block md:inset-0 md:pointer-events-none md:top-0 md:z-20"> | ||
| <div className={webClassName} /> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </section> | ||
| ); | ||
| }; | ||
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
BIN
+2.03 MB
apps/docs/public/images/nextuipro-section-background-light@mobile.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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.