Skip to content
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

feat: add option to use Geist Sans instead of Inter #1821

Merged
merged 11 commits into from
May 7, 2024
5 changes: 5 additions & 0 deletions .changeset/curly-windows-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-t3-app": minor
---

change default font from Inter to Geist Sans
4 changes: 2 additions & 2 deletions cli/src/installers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { dbContainerInstaller } from "./dbContainer.js";
import { drizzleInstaller } from "./drizzle.js";
import { dynamicEslintInstaller } from "./eslint.js";

// Turning this into a const allows the list to be iterated over for programatically creating prompt options
// Should increase extensability in the future
// Turning this into a const allows the list to be iterated over for programmatically creating prompt options
// Should increase extensibility in the future
export const availablePackages = [
"nextAuth",
"prisma",
Expand Down
1 change: 1 addition & 0 deletions cli/template/base/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const config = {
locales: ["en"],
defaultLocale: "en",
},
transpilePackages: ["geist"],
kakeWasTaken marked this conversation as resolved.
Show resolved Hide resolved
};

export default config;
1 change: 1 addition & 0 deletions cli/template/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"dependencies": {
"@t3-oss/env-nextjs": "^0.10.1",
"geist": "^1.3.0",
"next": "^14.2.1",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand Down
3 changes: 1 addition & 2 deletions cli/template/extras/config/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { type Config } from "tailwindcss";
import { fontFamily } from "tailwindcss/defaultTheme";

export default {
content: ["./src/**/*.tsx"],
theme: {
extend: {
fontFamily: {
sans: ["var(--font-sans)", ...fontFamily.sans],
kakeWasTaken marked this conversation as resolved.
Show resolved Hide resolved
sans: ["var(--font-geist-sans)"],
},
},
},
Expand Down
8 changes: 2 additions & 6 deletions cli/template/extras/src/app/layout/base.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import "~/styles/globals.css";

import { Inter } from "next/font/google";

const inter = Inter({
subsets: ["latin"],
});
import { GeistSans } from "geist/font/sans";

export const metadata = {
title: "Create T3 App",
Expand All @@ -19,7 +15,7 @@ export default function RootLayout({
}) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
<body className={GeistSans.className}>{children}</body>
</html>
);
}
11 changes: 3 additions & 8 deletions cli/template/extras/src/app/layout/with-trpc-tw.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import "~/styles/globals.css";

import { Inter } from "next/font/google";
import { GeistSans } from "geist/font/sans";

import { TRPCReactProvider } from "~/trpc/react";

const inter = Inter({
subsets: ["latin"],
variable: "--font-sans",
});

export const metadata = {
title: "Create T3 App",
description: "Generated by create-t3-app",
Expand All @@ -21,8 +16,8 @@ export default function RootLayout({
children: React.ReactNode;
}) {
return (
<html lang="en">
<body className={`font-sans ${inter.variable}`}>
<html lang="en" className={`${GeistSans.variable}`}>
<body>
<TRPCReactProvider>{children}</TRPCReactProvider>
</body>
</html>
Expand Down
8 changes: 2 additions & 6 deletions cli/template/extras/src/app/layout/with-trpc.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import "~/styles/globals.css";

import { Inter } from "next/font/google";
import { GeistSans } from "geist/font/sans";

import { TRPCReactProvider } from "~/trpc/react";

const inter = Inter({
subsets: ["latin"],
});

export const metadata = {
title: "Create T3 App",
description: "Generated by create-t3-app",
Expand All @@ -21,7 +17,7 @@ export default function RootLayout({
}) {
return (
<html lang="en">
<body className={inter.className}>
<body className={GeistSans.className}>
<TRPCReactProvider>{children}</TRPCReactProvider>
</body>
</html>
Expand Down
11 changes: 3 additions & 8 deletions cli/template/extras/src/app/layout/with-tw.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import "~/styles/globals.css";

import { Inter } from "next/font/google";

const inter = Inter({
subsets: ["latin"],
variable: "--font-sans",
});
import { GeistSans } from "geist/font/sans";

export const metadata = {
title: "Create T3 App",
Expand All @@ -19,8 +14,8 @@ export default function RootLayout({
children: React.ReactNode;
}) {
return (
<html lang="en">
<body className={`font-sans ${inter.variable}`}>{children}</body>
<html lang="en" className={`${GeistSans.variable}`}>
<body>{children}</body>
</html>
);
}
8 changes: 2 additions & 6 deletions cli/template/extras/src/pages/_app/base.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import { GeistSans } from "geist/font/sans";
import { type AppType } from "next/dist/shared/lib/utils";
import { Inter } from "next/font/google";

import "~/styles/globals.css";

const inter = Inter({
subsets: ["latin"],
});

const MyApp: AppType = ({ Component, pageProps }) => {
return (
<main className={inter.className}>
<main className={GeistSans.className}>
<Component {...pageProps} />
</main>
);
Expand Down
9 changes: 2 additions & 7 deletions cli/template/extras/src/pages/_app/with-auth-trpc-tw.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
import { GeistSans } from "geist/font/sans";
import { type Session } from "next-auth";
import { SessionProvider } from "next-auth/react";
import { type AppType } from "next/app";
import { Inter } from "next/font/google";

import { api } from "~/utils/api";

import "~/styles/globals.css";

const inter = Inter({
subsets: ["latin"],
variable: "--font-sans",
});

const MyApp: AppType<{ session: Session | null }> = ({
Component,
pageProps: { session, ...pageProps },
}) => {
return (
<SessionProvider session={session}>
<main className={`font-sans ${inter.variable}`}>
<main className={GeistSans.className}>
<Component {...pageProps} />
</main>
</SessionProvider>
Expand Down
8 changes: 2 additions & 6 deletions cli/template/extras/src/pages/_app/with-auth-trpc.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
import { GeistSans } from "geist/font/sans";
import { type Session } from "next-auth";
import { SessionProvider } from "next-auth/react";
import { type AppType } from "next/app";
import { Inter } from "next/font/google";

import { api } from "~/utils/api";

import "~/styles/globals.css";

const inter = Inter({
subsets: ["latin"],
});

const MyApp: AppType<{ session: Session | null }> = ({
Component,
pageProps: { session, ...pageProps },
}) => {
return (
<SessionProvider session={session}>
<main className={inter.className}>
<main className={GeistSans.className}>
<Component {...pageProps} />
</main>
</SessionProvider>
Expand Down
9 changes: 2 additions & 7 deletions cli/template/extras/src/pages/_app/with-auth-tw.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
import { GeistSans } from "geist/font/sans";
import { type Session } from "next-auth";
import { SessionProvider } from "next-auth/react";
import { type AppType } from "next/app";
import { Inter } from "next/font/google";

import "~/styles/globals.css";

const inter = Inter({
subsets: ["latin"],
variable: "--font-sans",
});

const MyApp: AppType<{ session: Session | null }> = ({
Component,
pageProps: { session, ...pageProps },
}) => {
return (
<SessionProvider session={session}>
<main className={`font-sans ${inter.variable}`}>
<main className={GeistSans.className}>
<Component {...pageProps} />
</main>
</SessionProvider>
Expand Down
8 changes: 2 additions & 6 deletions cli/template/extras/src/pages/_app/with-auth.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
import { GeistSans } from "geist/font/sans";
import { type Session } from "next-auth";
import { SessionProvider } from "next-auth/react";
import { type AppType } from "next/app";
import { Inter } from "next/font/google";

import "~/styles/globals.css";

const inter = Inter({
subsets: ["latin"],
});

const MyApp: AppType<{ session: Session | null }> = ({
Component,
pageProps: { session, ...pageProps },
}) => {
return (
<SessionProvider session={session}>
<main className={inter.className}>
<main className={GeistSans.className}>
<Component {...pageProps} />
</main>
</SessionProvider>
Expand Down
8 changes: 2 additions & 6 deletions cli/template/extras/src/pages/_app/with-trpc-tw.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import { GeistSans } from "geist/font/sans";
import { type AppType } from "next/app";
import { Inter } from "next/font/google";

import { api } from "~/utils/api";

import "~/styles/globals.css";

const inter = Inter({
subsets: ["latin"],
variable: "--font-sans",
});
const MyApp: AppType = ({ Component, pageProps }) => {
return (
<main className={`font-sans ${inter.variable}`}>
<main className={GeistSans.className}>
<Component {...pageProps} />
</main>
);
Expand Down
8 changes: 2 additions & 6 deletions cli/template/extras/src/pages/_app/with-trpc.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import { GeistSans } from "geist/font/sans";
import { type AppType } from "next/app";
import { Inter } from "next/font/google";

import { api } from "~/utils/api";

import "~/styles/globals.css";

const inter = Inter({
subsets: ["latin"],
});

const MyApp: AppType = ({ Component, pageProps }) => {
return (
<main className={inter.className}>
<main className={GeistSans.className}>
<Component {...pageProps} />
</main>
);
Expand Down
9 changes: 2 additions & 7 deletions cli/template/extras/src/pages/_app/with-tw.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import { GeistSans } from "geist/font/sans";
import { type AppType } from "next/app";
import { Inter } from "next/font/google";

import "~/styles/globals.css";

const inter = Inter({
subsets: ["latin"],
variable: "--font-sans",
});

const MyApp: AppType = ({ Component, pageProps }) => {
return (
<main className={`font-sans ${inter.variable}`}>
<main className={GeistSans.className}>
<Component {...pageProps} />
</main>
);
Expand Down
2 changes: 1 addition & 1 deletion upgrade/src/app/api/og/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,6 @@
});

// Object.fromEntries is typed as returning any *sigh*
// eslint-disable-next-line @typescript-eslint/no-unsafe-return

return Object.fromEntries(await Promise.all(promises));

Check failure on line 135 in upgrade/src/app/api/og/route.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint

Unsafe return of an `any` typed value
}
2 changes: 1 addition & 1 deletion www/src/components/landingPage/ClipboardSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default function ClipboardSelect() {
<div className="flex items-center gap-2">
<Menu as="div">
<div className="relative">
<Menu.Button className="relative flex cursor-pointer items-center justify-center rounded-lg border bg-t3-purple-200/50 p-2 text-left focus:outline-none hover:bg-t3-purple-200/75 dark:border-t3-purple-200/20 dark:bg-t3-purple-200/10 dark:hover:border-t3-purple-200/50 sm:text-sm">
<Menu.Button className="relative flex cursor-pointer items-center justify-center rounded-lg border bg-t3-purple-200/50 p-2 text-left hover:bg-t3-purple-200/75 focus:outline-none dark:border-t3-purple-200/20 dark:bg-t3-purple-200/10 dark:hover:border-t3-purple-200/50 sm:text-sm">
<svg
className={`h-[1em] w-[1em] ${coolDown && "hidden"}`}
xmlns="http:https://www.w3.org/2000/svg"
Expand Down
2 changes: 1 addition & 1 deletion www/src/components/landingPage/stack/card.astro
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const { title, href } = Astro.props;
href={href}
target="_blank"
rel="noopener noreferrer"
class="h-full rounded-md before:absolute before:inset-0 before:content-[''] focus:no-underline hover:no-underline active:no-underline"
class="h-full rounded-md before:absolute before:inset-0 before:content-[''] hover:no-underline focus:no-underline active:no-underline"
>
{title}
</a>
Expand Down
2 changes: 1 addition & 1 deletion www/src/components/navigation/LanguageSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function LanguageSelect({ language }: LanguageSelectProps) {
<div className="flex items-center gap-2">
<Listbox value={language} onChange={handleSelect}>
<div className="relative">
<Listbox.Button className="relative flex cursor-pointer items-center justify-center rounded-lg border bg-t3-purple-200/50 p-2 text-left focus:outline-none hover:bg-t3-purple-200/75 dark:border-t3-purple-200/20 dark:bg-t3-purple-200/10 dark:hover:border-t3-purple-200/50 sm:text-sm">
<Listbox.Button className="relative flex cursor-pointer items-center justify-center rounded-lg border bg-t3-purple-200/50 p-2 text-left hover:bg-t3-purple-200/75 focus:outline-none dark:border-t3-purple-200/20 dark:bg-t3-purple-200/10 dark:hover:border-t3-purple-200/50 sm:text-sm">
<svg
viewBox="0 0 88.6 77.3"
className="h-6 w-6 text-slate-900 dark:text-t3-purple-100"
Expand Down
Loading