Skip to content

Commit

Permalink
feat: font setting
Browse files Browse the repository at this point in the history
  • Loading branch information
eun-hak committed May 6, 2024
1 parent ab8361a commit 0bbd238
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 33 deletions.
Binary file added public/fonts/PretendardVariable.ttf
Binary file not shown.
Binary file added public/fonts/PretendardVariable.woff2
Binary file not shown.
41 changes: 14 additions & 27 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { Inter } from 'next/font/google';
// import { Inter } from 'next/font/google';
import Image from 'next/image';

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

export default function Home() {
return (
<main
className={`flex min-h-screen flex-col items-center justify-between p-24 ${inter.className}`}
>
<main className={`flex min-h-screen flex-col items-center justify-between p-24 `}>
<div className="z-10 max-w-5xl w-full items-center justify-between font-mono text-sm lg:flex">
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
Get started by editing&nbsp;
Expand All @@ -18,10 +16,8 @@ export default function Home() {
className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
By
{' '}
rel="noopener noreferrer">
By{' '}
<Image
src="/vercel.svg"
alt="Vercel Logo"
Expand All @@ -41,7 +37,6 @@ export default function Home() {
alt="Next.js Logo"
width={180}
height={37}
priority
/>
</div>

Expand All @@ -50,11 +45,9 @@ export default function Home() {
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
rel="noopener noreferrer">
<h2 className="mb-3 text-2xl font-semibold">
Docs
{' '}
Docs{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
Expand All @@ -68,11 +61,9 @@ export default function Home() {
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
rel="noopener noreferrer">
<h2 className="mb-3 text-2xl font-semibold">
Learn
{' '}
Learn{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
Expand All @@ -86,16 +77,14 @@ export default function Home() {
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
rel="noopener noreferrer">
<h2 className="mb-3 text-2xl font-semibold">
Templates
{' '}
Templates{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className="m-0 max-w-[30ch] text-sm opacity-50">
<p className="m-0 max-w-[30ch] text-sm opacity-50 text-gray-700">
Discover and deploy boilerplate example Next.js&nbsp;projects.
</p>
</a>
Expand All @@ -104,11 +93,9 @@ export default function Home() {
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
rel="noopener noreferrer">
<h2 className="mb-3 text-2xl font-semibold">
Deploy
{' '}
Deploy{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
Expand Down
34 changes: 28 additions & 6 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@
@tailwind components;
@tailwind utilities;



@font-face {
font-family: 'Pretendard';
src: url('/fonts/PretendardVariable.woff2') format('woff2'),
url('/fonts/PretendardVariable.ttf') format('ttf');
font-weight: normal;
font-style: normal;
font-display: swap;
}

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}



:root {
--foreground-rgb: 0, 0, 0;
--background-start-rgb: 214, 219, 220;
Expand All @@ -18,16 +37,19 @@

body {
color: rgb(var(--foreground-rgb));
background: linear-gradient(
to bottom,
background: linear-gradient(to bottom,
transparent,
rgb(var(--background-end-rgb))
)
rgb(var(--background-start-rgb));
rgb(var(--background-end-rgb))) rgb(var(--background-start-rgb));

}

body {
font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, Roboto,
Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
}

@layer utilities {
.text-balance {
text-wrap: balance;
}
}
}

0 comments on commit 0bbd238

Please sign in to comment.