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

wip: 🚧 フォントを追加した。 #68

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/web/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { FC, ReactNode } from 'react';
import { Footer } from '@/components/Footer/Footer';
import { Header } from '@/components/Header/Header';
import { AppProvider } from '@/providers';
import { shipporiMinchoB1 } from '@/styles/tokens/fonts';
import '@/styles/globals.css';

type RootLayoutProps = {
Expand All @@ -17,7 +18,7 @@ const RootLayout: FC<RootLayoutProps> = ({ children }) => (
<html lang="ja" suppressHydrationWarning>
<head />
<body
className={`flex min-h-screen flex-col bg-keyplate-2 scrollbar-thin scrollbar-track-transparent scrollbar-thumb-keyplate-6 scrollbar-thumb-rounded-full hover:scrollbar-thumb-keyplate-7`}
className={`${shipporiMinchoB1.variable} flex min-h-screen flex-col bg-keyplate-2 scrollbar-thin scrollbar-track-transparent scrollbar-thumb-keyplate-6 scrollbar-thumb-rounded-full hover:scrollbar-thumb-keyplate-7`}
>
{/* Refer: https://vercel.com/docs/concepts/analytics/quickstart */}
<Analytics />
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const Home: FC = () => {
<div className="flex min-h-screen flex-col items-center justify-center gap-4 text-keyplate-12">
<article className="flex max-w-2xl flex-col gap-4 p-6">
<h1 className="my-6 text-5xl font-bold text-keyplate-12">ACMEへようこそ!</h1>
<section>
<section className="font-sans">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
Expand Down
10 changes: 10 additions & 0 deletions apps/web/src/styles/tokens/fonts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Shippori_Mincho_B1 } from 'next/font/google';

// For more information about how to use Google Fonts with Tailwind CSS, check out:
// Refer: https://nextjs.org/docs/app/building-your-application/optimizing/fonts#with-tailwind-css

export const shipporiMinchoB1 = Shippori_Mincho_B1({
weight: ['400', '700'],
subsets: ['latin', 'latin-ext'],
variable: '--font-shippori-mincho-b1',
});
6 changes: 4 additions & 2 deletions apps/web/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import type { Config } from 'tailwindcss';
import tailwindAnimate from 'tailwindcss-animate';
// import defaultTheme from 'tailwindcss/defaultTheme';
import { createThemes } from 'tw-colors';

// NOTE: スエイリアスを使うとTailwindが読み込んでくれなくなる
// NOTE: パスエイリアスを使うとTailwindが読み込んでくれなくなる
import { coreColors } from './src/styles/tokens/colors/core';
import { darkColors } from './src/styles/tokens/colors/dark';
import { lightColors } from './src/styles/tokens/colors/light';
Expand Down Expand Up @@ -114,6 +113,9 @@ const config: Config = {
],
small: '0.75rem',
},
fontFamily: {
sans: ['var(--font-shippori-mincho-b1)'],
},
lineHeight: {
medium: '1.55',
},
Expand Down