diff --git a/bun.lockb b/bun.lockb
index a9cddb0..c37748d 100755
Binary files a/bun.lockb and b/bun.lockb differ
diff --git a/components.json b/components.json
index d158417..97caaf1 100644
--- a/components.json
+++ b/components.json
@@ -14,7 +14,6 @@
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
- "lib": "@/lib",
- "hooks": "@/hooks"
+ "magicui": "@/components/magicui"
}
}
\ No newline at end of file
diff --git a/package.json b/package.json
index a0ec4e0..537f861 100644
--- a/package.json
+++ b/package.json
@@ -9,6 +9,7 @@
"db:migrate": "drizzle-kit migrate",
"db:push": "drizzle-kit push",
"db:studio": "drizzle-kit studio",
+ "dev:turbo": "NODE_ENV=development next dev -p 3002 --turbo & local-ssl-proxy --config ./ssl-proxy.json",
"dev": "NODE_ENV=development next dev -p 3002 & local-ssl-proxy --config ./ssl-proxy.json",
"dev:plain": "next dev",
"lint": "next lint",
@@ -65,6 +66,7 @@
"date-fns": "^4.0.0",
"drizzle-orm": "^0.33.0",
"embla-carousel-react": "^8.3.0",
+ "framer-motion": "^11.5.4",
"geist": "^1.3.1",
"http-status-codes": "^2.3.0",
"input-otp": "^1.2.4",
diff --git a/src/app/(site)/layout.tsx b/src/app/(site)/layout.tsx
index 7a5573b..5cbcd7d 100644
--- a/src/app/(site)/layout.tsx
+++ b/src/app/(site)/layout.tsx
@@ -1,4 +1,3 @@
-"use client";
import React from "react";
import { SessionProvider } from "next-auth/react";
diff --git a/src/components/magicui/bento-grid.tsx b/src/components/magicui/bento-grid.tsx
new file mode 100644
index 0000000..342a957
--- /dev/null
+++ b/src/components/magicui/bento-grid.tsx
@@ -0,0 +1,79 @@
+import { ReactNode } from "react";
+import { ArrowRightIcon } from "@radix-ui/react-icons";
+
+import { cn } from "@/lib/utils";
+import { Button } from "@/components/ui/button";
+
+const BentoGrid = ({
+ children,
+ className,
+}: {
+ children: ReactNode;
+ className?: string;
+}) => {
+ return (
+
+ {children}
+
+ );
+};
+
+const BentoCard = ({
+ name,
+ className,
+ background,
+ Icon,
+ description,
+ href,
+ cta,
+}: {
+ name: string;
+ className: string;
+ background: ReactNode;
+ Icon: any;
+ description: string;
+ href: string;
+ cta: string;
+}) => (
+
+
{background}
+
+
+
+ {name}
+
+
{description}
+
+
+
+
+
+);
+
+export { BentoCard, BentoGrid };
diff --git a/src/components/magicui/blur-in.tsx b/src/components/magicui/blur-in.tsx
new file mode 100644
index 0000000..8014883
--- /dev/null
+++ b/src/components/magicui/blur-in.tsx
@@ -0,0 +1,39 @@
+"use client";
+
+import { motion } from "framer-motion";
+
+import { cn } from "@/lib/utils";
+
+interface BlurIntProps {
+ word: string;
+ className?: string;
+ variant?: {
+ hidden: { filter: string; opacity: number };
+ visible: { filter: string; opacity: number };
+ };
+ duration?: number;
+}
+const BlurIn = ({ word, className, variant, duration = 1 }: BlurIntProps) => {
+ const defaultVariants = {
+ hidden: { filter: "blur(10px)", opacity: 0 },
+ visible: { filter: "blur(0px)", opacity: 1 },
+ };
+ const combinedVariants = variant || defaultVariants;
+
+ return (
+
+ {word}
+
+ );
+};
+
+export default BlurIn;
diff --git a/src/components/trending-images.tsx b/src/components/trending-images.tsx
index 4fb6aa6..a38d4d7 100644
--- a/src/components/trending-images.tsx
+++ b/src/components/trending-images.tsx
@@ -1,29 +1,41 @@
-"use client";
+import { BellIcon } from "@radix-ui/react-icons";
-import { useState } from "react";
+import { BentoCard, BentoGrid } from "@/components/magicui/bento-grid";
+import { api } from "@/trpc/server";
-import { api } from "@/trpc/react";
-import Image from "next/image";
+const createGridCard = (
+ key: string,
+ url: string,
+ title: string,
+ description: string,
+ tags: string[],
+) => {
+ const value = {
+ Icon: BellIcon,
+ name: title,
+ description: description,
+ href: "/",
+ cta: "Learn more",
+ background:
,
+ className: "col-span-1 row-start-1 row-end-4",
+ };
-export function TrendingImages() {
- const [latestImages] = api.image.getTrending.useSuspenseQuery();
+ return ;
+};
+export async function TrendingImages() {
+ const latestImages = await api.image.getTrending();
return (
-
- {latestImages ? (
- latestImages.map((image) => (
-
- //

- ))
- ) : (
-
No images yet.
+
+ {latestImages.map((image) =>
+ createGridCard(
+ image.id,
+ image.url,
+ image.title ?? "",
+ image.description ?? "",
+ image.tags ?? [],
+ ),
)}
-
+
);
}
diff --git a/src/lib/utils.ts b/src/lib/utils.ts
index bd0c391..d084cca 100644
--- a/src/lib/utils.ts
+++ b/src/lib/utils.ts
@@ -1,4 +1,4 @@
-import { clsx, type ClassValue } from "clsx"
+import { type ClassValue, clsx } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
diff --git a/src/styles/globals.css b/src/styles/globals.css
index 89b55f8..89f6093 100644
--- a/src/styles/globals.css
+++ b/src/styles/globals.css
@@ -1,6 +1,7 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
+
@layer base {
:root {
--background: 0 0% 100%;
@@ -22,13 +23,14 @@
--border: 240 5.9% 90%;
--input: 240 5.9% 90%;
--ring: 240 10% 3.9%;
+ --radius: 0.5rem;
--chart-1: 12 76% 61%;
--chart-2: 173 58% 39%;
--chart-3: 197 37% 24%;
--chart-4: 43 74% 66%;
--chart-5: 27 87% 67%;
- --radius: 0.5rem
}
+
.dark {
--background: 240 10% 3.9%;
--foreground: 0 0% 98%;
@@ -53,9 +55,10 @@
--chart-2: 160 60% 45%;
--chart-3: 30 80% 55%;
--chart-4: 280 65% 60%;
- --chart-5: 340 75% 55%
+ --chart-5: 340 75% 55%;
}
}
+
@layer base {
* {
@apply border-border;
@@ -63,4 +66,4 @@
body {
@apply bg-background text-foreground;
}
-}
+}
\ No newline at end of file
diff --git a/tailwind.config.ts b/tailwind.config.ts
index b104d0f..84287e8 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -1,26 +1,29 @@
-import { type Config } from "tailwindcss";
+import type { Config } from "tailwindcss"
-export default {
+const config = {
darkMode: ["class"],
- content: ["./src/**/*.tsx"],
+ content: [
+ './pages/**/*.{ts,tsx}',
+ './components/**/*.{ts,tsx}',
+ './app/**/*.{ts,tsx}',
+ './src/**/*.{ts,tsx}',
+ ],
+ prefix: "",
theme: {
- extend: {
- borderRadius: {
- lg: "var(--radius)",
- md: "calc(var(--radius) - 2px)",
- sm: "calc(var(--radius) - 4px)",
+ container: {
+ center: true,
+ padding: "2rem",
+ screens: {
+ "2xl": "1400px",
},
+ },
+ extend: {
colors: {
+ border: "hsl(var(--border))",
+ input: "hsl(var(--input))",
+ ring: "hsl(var(--ring))",
background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))",
- card: {
- DEFAULT: "hsl(var(--card))",
- foreground: "hsl(var(--card-foreground))",
- },
- popover: {
- DEFAULT: "hsl(var(--popover))",
- foreground: "hsl(var(--popover-foreground))",
- },
primary: {
DEFAULT: "hsl(var(--primary))",
foreground: "hsl(var(--primary-foreground))",
@@ -29,6 +32,10 @@ export default {
DEFAULT: "hsl(var(--secondary))",
foreground: "hsl(var(--secondary-foreground))",
},
+ destructive: {
+ DEFAULT: "hsl(var(--destructive))",
+ foreground: "hsl(var(--destructive-foreground))",
+ },
muted: {
DEFAULT: "hsl(var(--muted))",
foreground: "hsl(var(--muted-foreground))",
@@ -37,37 +44,28 @@ export default {
DEFAULT: "hsl(var(--accent))",
foreground: "hsl(var(--accent-foreground))",
},
- destructive: {
- DEFAULT: "hsl(var(--destructive))",
- foreground: "hsl(var(--destructive-foreground))",
+ popover: {
+ DEFAULT: "hsl(var(--popover))",
+ foreground: "hsl(var(--popover-foreground))",
},
- border: "hsl(var(--border))",
- input: "hsl(var(--input))",
- ring: "hsl(var(--ring))",
- chart: {
- "1": "hsl(var(--chart-1))",
- "2": "hsl(var(--chart-2))",
- "3": "hsl(var(--chart-3))",
- "4": "hsl(var(--chart-4))",
- "5": "hsl(var(--chart-5))",
+ card: {
+ DEFAULT: "hsl(var(--card))",
+ foreground: "hsl(var(--card-foreground))",
},
},
+ borderRadius: {
+ lg: "var(--radius)",
+ md: "calc(var(--radius) - 2px)",
+ sm: "calc(var(--radius) - 4px)",
+ },
keyframes: {
"accordion-down": {
- from: {
- height: "0",
- },
- to: {
- height: "var(--radix-accordion-content-height)",
- },
+ from: { height: "0" },
+ to: { height: "var(--radix-accordion-content-height)" },
},
"accordion-up": {
- from: {
- height: "var(--radix-accordion-content-height)",
- },
- to: {
- height: "0",
- },
+ from: { height: "var(--radix-accordion-content-height)" },
+ to: { height: "0" },
},
},
animation: {
@@ -77,4 +75,6 @@ export default {
},
},
plugins: [require("tailwindcss-animate")],
-} satisfies Config;
+} satisfies Config
+
+export default config
\ No newline at end of file