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

Update font handling in CNA templates #48364

Merged
merged 1 commit into from Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,4 +1,7 @@
import './globals.css'
import { Inter } from 'next/font/google'

const inter = Inter({ subsets: ['latin'] })

export const metadata = {
title: 'Create Next App',
Expand All @@ -8,7 +11,7 @@ export const metadata = {
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>{children}</body>
<body className={inter.className}>{children}</body>
</html>
)
}
27 changes: 8 additions & 19 deletions packages/create-next-app/templates/app-tw/js/app/page.js
@@ -1,7 +1,4 @@
import Image from 'next/image'
import { Inter } from 'next/font/google'

const inter = Inter({ subsets: ['latin'] })

export default function Home() {
return (
Expand Down Expand Up @@ -49,15 +46,13 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`${inter.className} mb-3 text-2xl font-semibold`}>
<h2 className={`mb-3 text-2xl font-semibold`}>
Docs{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p
className={`${inter.className} m-0 max-w-[30ch] text-sm opacity-50`}
>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Find in-depth information about Next.js features and API.
</p>
</a>
Expand All @@ -68,15 +63,13 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`${inter.className} mb-3 text-2xl font-semibold`}>
<h2 className={`mb-3 text-2xl font-semibold`}>
Learn{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p
className={`${inter.className} m-0 max-w-[30ch] text-sm opacity-50`}
>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Learn about Next.js in an interactive course with&nbsp;quizzes!
</p>
</a>
Expand All @@ -87,15 +80,13 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`${inter.className} mb-3 text-2xl font-semibold`}>
<h2 className={`mb-3 text-2xl font-semibold`}>
Templates{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p
className={`${inter.className} m-0 max-w-[30ch] text-sm opacity-50`}
>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Explore the Next.js 13 playground.
</p>
</a>
Expand All @@ -106,15 +97,13 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`${inter.className} mb-3 text-2xl font-semibold`}>
<h2 className={`mb-3 text-2xl font-semibold`}>
Deploy{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p
className={`${inter.className} m-0 max-w-[30ch] text-sm opacity-50`}
>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Instantly deploy your Next.js site to a shareable URL with Vercel.
</p>
</a>
Expand Down
@@ -1,4 +1,7 @@
import './globals.css'
import { Inter } from 'next/font/google'

const inter = Inter({ subsets: ['latin'] })

export const metadata = {
title: 'Create Next App',
Expand All @@ -12,7 +15,7 @@ export default function RootLayout({
}) {
return (
<html lang="en">
<body>{children}</body>
<body className={inter.className}>{children}</body>
</html>
)
}
24 changes: 8 additions & 16 deletions packages/create-next-app/templates/app-tw/ts/app/page.tsx
Expand Up @@ -49,15 +49,13 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`${inter.className} mb-3 text-2xl font-semibold`}>
<h2 className={`mb-3 text-2xl font-semibold`}>
Docs{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p
className={`${inter.className} m-0 max-w-[30ch] text-sm opacity-50`}
>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Find in-depth information about Next.js features and API.
</p>
</a>
Expand All @@ -68,15 +66,13 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`${inter.className} mb-3 text-2xl font-semibold`}>
<h2 className={`mb-3 text-2xl font-semibold`}>
Learn{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p
className={`${inter.className} m-0 max-w-[30ch] text-sm opacity-50`}
>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Learn about Next.js in an interactive course with&nbsp;quizzes!
</p>
</a>
Expand All @@ -87,15 +83,13 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`${inter.className} mb-3 text-2xl font-semibold`}>
<h2 className={`mb-3 text-2xl font-semibold`}>
Templates{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p
className={`${inter.className} m-0 max-w-[30ch] text-sm opacity-50`}
>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Explore the Next.js 13 playground.
</p>
</a>
Expand All @@ -106,15 +100,13 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`${inter.className} mb-3 text-2xl font-semibold`}>
<h2 className={`mb-3 text-2xl font-semibold`}>
Deploy{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p
className={`${inter.className} m-0 max-w-[30ch] text-sm opacity-50`}
>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Instantly deploy your Next.js site to a shareable URL with Vercel.
</p>
</a>
Expand Down
5 changes: 4 additions & 1 deletion packages/create-next-app/templates/app/js/app/layout.js
@@ -1,4 +1,7 @@
import './globals.css'
import { Inter } from 'next/font/google'

const inter = Inter({ subsets: ['latin'] })

export const metadata = {
title: 'Create Next App',
Expand All @@ -8,7 +11,7 @@ export const metadata = {
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>{children}</body>
<body className={inter.className}>{children}</body>
</html>
)
}
23 changes: 8 additions & 15 deletions packages/create-next-app/templates/app/js/app/page.js
@@ -1,9 +1,6 @@
import Image from 'next/image'
import { Inter } from 'next/font/google'
import styles from './page.module.css'

const inter = Inter({ subsets: ['latin'] })

export default function Home() {
return (
<main className={styles.main}>
Expand Down Expand Up @@ -49,12 +46,10 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
<h2 className={inter.className}>
<h2>
Docs <span>-&gt;</span>
</h2>
<p className={inter.className}>
Find in-depth information about Next.js features and API.
</p>
<p>Find in-depth information about Next.js features and API.</p>
</a>

<a
Expand All @@ -63,12 +58,10 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
<h2 className={inter.className}>
<h2>
Learn <span>-&gt;</span>
</h2>
<p className={inter.className}>
Learn about Next.js in an interactive course with&nbsp;quizzes!
</p>
<p>Learn about Next.js in an interactive course with&nbsp;quizzes!</p>
</a>

<a
Expand All @@ -77,10 +70,10 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
<h2 className={inter.className}>
<h2>
Templates <span>-&gt;</span>
</h2>
<p className={inter.className}>Explore the Next.js 13 playground.</p>
<p>Explore the Next.js 13 playground.</p>
</a>

<a
Expand All @@ -89,10 +82,10 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
<h2 className={inter.className}>
<h2>
Deploy <span>-&gt;</span>
</h2>
<p className={inter.className}>
<p>
Instantly deploy your Next.js site to a shareable URL with Vercel.
</p>
</a>
Expand Down
5 changes: 4 additions & 1 deletion packages/create-next-app/templates/app/ts/app/layout.tsx
@@ -1,4 +1,7 @@
import './globals.css'
import { Inter } from 'next/font/google'

const inter = Inter({ subsets: ['latin'] })

export const metadata = {
title: 'Create Next App',
Expand All @@ -12,7 +15,7 @@ export default function RootLayout({
}) {
return (
<html lang="en">
<body>{children}</body>
<body className={inter.className}>{children}</body>
</html>
)
}
23 changes: 8 additions & 15 deletions packages/create-next-app/templates/app/ts/app/page.tsx
@@ -1,9 +1,6 @@
import Image from 'next/image'
import { Inter } from 'next/font/google'
import styles from './page.module.css'

const inter = Inter({ subsets: ['latin'] })

export default function Home() {
return (
<main className={styles.main}>
Expand Down Expand Up @@ -49,12 +46,10 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
<h2 className={inter.className}>
<h2>
Docs <span>-&gt;</span>
</h2>
<p className={inter.className}>
Find in-depth information about Next.js features and API.
</p>
<p>Find in-depth information about Next.js features and API.</p>
</a>

<a
Expand All @@ -63,12 +58,10 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
<h2 className={inter.className}>
<h2>
Learn <span>-&gt;</span>
</h2>
<p className={inter.className}>
Learn about Next.js in an interactive course with&nbsp;quizzes!
</p>
<p>Learn about Next.js in an interactive course with&nbsp;quizzes!</p>
</a>

<a
Expand All @@ -77,10 +70,10 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
<h2 className={inter.className}>
<h2>
Templates <span>-&gt;</span>
</h2>
<p className={inter.className}>Explore the Next.js 13 playground.</p>
<p>Explore the Next.js 13 playground.</p>
</a>

<a
Expand All @@ -89,10 +82,10 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
<h2 className={inter.className}>
<h2>
Deploy <span>-&gt;</span>
</h2>
<p className={inter.className}>
<p>
Instantly deploy your Next.js site to a shareable URL with Vercel.
</p>
</a>
Expand Down