Skip to content

Commit

Permalink
fix: remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan-Gilliam committed May 29, 2024
1 parent 5f83b10 commit dc4c1ec
Show file tree
Hide file tree
Showing 44 changed files with 507 additions and 871 deletions.
80 changes: 48 additions & 32 deletions apps/www/app/(app)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,56 @@ import { cn } from "@/lib/utils"
import { buttonVariants } from "@/components/ui/button"
import { FeaturesSection } from "@/components/animate/feature-card"
import { Announcement } from "@/components/announcement"
import { Icons } from "@/components/icons"
import { FadeIn } from "@/components/fade-in"
import {
PageActions,
PageHeader,
PageHeaderDescription,
PageHeaderHeading,
} from "@/components/page-header"
FramerIcon,
Icons,
TailwindCSSIcon,
TypeScriptIcon,
} from "@/components/icons"
import { PageActions, PageHeader } from "@/components/page-header"
import BgNoiseWrapper from "@/components/texture-wrapper"
import { GradientHeading } from "@/registry/default/ui/gradient-heading"
import { TweetGrid } from "@/registry/default/ui/tweet-grid"

export default function IndexPage() {
return (
// <div className="container relative">
<>
<div className=" isolate min-h-screen overflow-hidden bg-white bg-gradientTopRightLight pb-8 sm:pb-12 md:pb-0">
{/* <BgNoiseWrapper url="/cult-canvas-noise.png"> */}
<BgNoiseWrapper url="/egg-shell-noise.png">
<div className="container relative pt-12">
<PageHeader>
<div className=" isolate min-h-screen overflow-hidden bg-white bg-gradientTopRightLight pb-8 sm:pb-12 md:pb-0">
<BgNoiseWrapper url="/egg-shell-noise.png">
<div className="container relative pt-12">
<PageHeader>
<FadeIn>
<Announcement />
</FadeIn>
<FadeIn>
<GradientHeading
size="xxl"
weight="bold"
className="text-center text-3xl font-bold leading-tight tracking-tighter md:text-5xl lg:leading-[1.1]"
>
Components crafted for Design Engineers
</GradientHeading>
</FadeIn>

<PageHeaderDescription className="md:text-2xl md:font-normal">
Beautifully designed components that you can copy and paste into
your apps. Accessible. Customizable. Open Source.
</PageHeaderDescription>
<FadeIn>
<div className="flex flex-wrap items-center justify-center gap-1 text-center text-lg font-light text-foreground md:text-2xl md:font-normal">
<TailwindCSSIcon
className="h-8 w-8 rounded-full border border-black/10 bg-white p-1"
aria-hidden="true"
/>
<span>Components that you can </span>

<FramerIcon
className="h-6 w-6"
aria-hidden="true"
title="Next.js"
/>
<span>copy and paste into react apps.</span>
<span>Customizable. Open Source. Typed. </span>
<TypeScriptIcon className="h-6 w-6 " aria-hidden="true" />
</div>
</FadeIn>
<FadeIn>
<PageActions>
<Link href="/docs" className={cn(buttonVariants())}>
Get Started
Expand All @@ -53,23 +70,22 @@ export default function IndexPage() {
GitHub
</Link>
</PageActions>
</PageHeader>
</FadeIn>
</PageHeader>

<section className="hidden w-full md:block">
<div className="flex flex-col items-center justify-center overflow-hidden ">
<Suspense>
<TweetGrid tweets={tweets} />
</Suspense>
</div>
</section>
</div>
<section className=" mt-12 hidden w-full rounded-tr-[364px] bg-neutral-900 md:block">
<FeaturesSection />
<section className="hidden w-full md:block">
<div className="flex flex-col items-center justify-center overflow-hidden ">
<Suspense>
<TweetGrid tweets={tweets} />
</Suspense>
</div>
</section>
</BgNoiseWrapper>
{/* <div className="bg-noise" /> */}
</div>
</>
</div>
<section className=" mt-12 hidden w-full rounded-tr-[364px] bg-neutral-900 md:block">
<FeaturesSection />
</section>
</BgNoiseWrapper>
</div>
)
}
IndexPage.theme = "light"
Expand Down
45 changes: 45 additions & 0 deletions apps/www/components/animate/fade-in.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
"use client"

import { createContext, useContext } from "react"
import { motion, useReducedMotion } from "framer-motion"

const FadeInStaggerContext = createContext(false)

const viewport = { once: true, margin: "0px 0px -200px" }

export function FadeIn(props: any) {
let shouldReduceMotion = useReducedMotion()
let isInStaggerGroup = useContext(FadeInStaggerContext)

return (
<motion.div
variants={{
hidden: { opacity: 0, y: shouldReduceMotion ? 0 : 24 },
visible: { opacity: 1, y: 0 },
}}
transition={{ duration: 0.5 }}
{...(isInStaggerGroup
? {}
: {
initial: "hidden",
whileInView: "visible",
viewport,
})}
{...props}
/>
)
}

export function FadeInStagger({ faster = false, ...props }) {
return (
<FadeInStaggerContext.Provider value={true}>
<motion.div
initial="hidden"
whileInView="visible"
viewport={viewport}
transition={{ staggerChildren: faster ? 0.12 : 0.2 }}
{...props}
/>
</FadeInStaggerContext.Provider>
)
}
10 changes: 4 additions & 6 deletions apps/www/components/announcement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,15 @@ import BgNoiseWrapper from "./texture-wrapper"
export function Announcement() {
return (
<Link
href="/docs/changelog"
href="https://www.newcult.co"
className="inline-flex items-center rounded-lg bg-muted px-3 py-1 text-sm font-medium"
// style={{ backgroundImage: "url('/cult-noise.png')" }}
target="_blank"
rel="noreferrer"
>
<div
className="pointer-events-none fixed inset-0 mix-blend-hard-light"
style={{ backgroundImage: "url('/cult-noise.png')" }}
></div>
<Blocks className="h-4 w-4" />{" "}
<Separator className="mx-2 h-4" orientation="vertical" />{" "}
<span>Introducing Cult Components</span>
<span>Introducing Cult Templates</span>
<ArrowRightIcon className="ml-1 h-4 w-4" />
{/* <BgNoiseWrapper> */}
{/* </BgNoiseWrapper> */}
Expand Down
Loading

0 comments on commit dc4c1ec

Please sign in to comment.