diff --git a/web/app/fonts.ts b/web/app/fonts.ts new file mode 100644 index 00000000..bcdcb16f --- /dev/null +++ b/web/app/fonts.ts @@ -0,0 +1,7 @@ +import { Raleway } from "next/font/google" +export { GeistSans } from "geist/font/sans" +export { GeistMono } from "geist/font/mono" +// import { Inter } from "next/font/google" + +// export const inter = Inter({ subsets: ["latin"] }) +export const raleway = Raleway({ subsets: ["latin"] }) diff --git a/web/app/layout.tsx b/web/app/layout.tsx index 7a526ab8..d2e3d43a 100644 --- a/web/app/layout.tsx +++ b/web/app/layout.tsx @@ -1,19 +1,13 @@ import type { Metadata } from "next" -import { Inter as FontSans } from "next/font/google" import { cn } from "@/lib/utils" import { ThemeProvider } from "@/lib/providers/theme-provider" import "./globals.css" - import { ClerkProviderClient } from "@/components/custom/clerk/clerk-provider-client" import { JotaiProvider } from "@/lib/providers/jotai-provider" import { Toaster } from "@/components/ui/sonner" import { ConfirmProvider } from "@/lib/providers/confirm-provider" import { DeepLinkProvider } from "@/lib/providers/deep-link-provider" - -const fontSans = FontSans({ - subsets: ["latin"], - variable: "--font-sans" -}) +import { GeistMono, GeistSans } from "./fonts" export const metadata: Metadata = { title: "Learn Anything", @@ -29,7 +23,7 @@ export default function RootLayout({ - + diff --git a/web/components/routes/public/Autocomplete.tsx b/web/components/routes/public/Autocomplete.tsx index fae825d5..f17adcbf 100644 --- a/web/components/routes/public/Autocomplete.tsx +++ b/web/components/routes/public/Autocomplete.tsx @@ -103,7 +103,7 @@ export function Autocomplete({ topics = [], onSelect, onInputChange }: Autocompl return ( a.default) @@ -38,10 +40,13 @@ export function PublicHomeRoute() { filter_query={filterQuery} /> -
+
{ return new RegExp(escapedChars.join(".*"), "i") } +export function shuffleArray(array: T[]): T[] { + const shuffled = [...array] + for (let i = shuffled.length - 1; i > 0; i--) { + const j = Math.floor(Math.random() * (i + 1)) + ;[shuffled[i], shuffled[j]] = [shuffled[j], shuffled[i]] + } + return shuffled +} + export * from "./urls" export * from "./slug" export * from "./keyboard" diff --git a/web/package.json b/web/package.json index 61fff4b0..0009e03b 100644 --- a/web/package.json +++ b/web/package.json @@ -69,6 +69,7 @@ "cmdk": "^1.0.0", "date-fns": "^3.6.0", "framer-motion": "^11.5.4", + "geist": "^1.3.1", "jazz-react": "0.7.35-unique.2", "jazz-react-auth-clerk": "0.7.33-new-auth.1", "jazz-tools": "0.7.35-unique.2", diff --git a/web/tailwind.config.ts b/web/tailwind.config.ts index c0309f60..3db76af8 100644 --- a/web/tailwind.config.ts +++ b/web/tailwind.config.ts @@ -79,7 +79,9 @@ const config = { // learn anything custom fontFamily: { - sans: ["var(--font-sans)", ...fontFamily.sans] + // sans: ["var(--font-sans)", ...fontFamily.sans], + sans: ["var(--font-geist-sans)"], + mono: ["var(--font-geist-mono)"] }, backgroundImage: {