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

[FE] feat: 폰트 추가 #672

Merged
merged 2 commits into from
Sep 21, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions frontend/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
<link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png" />
<link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-icon-180x180.png" />
<link
rel="preload"
as="font"
crossorigin
href="https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/static/pretendard.css"
onload="this.onload=null; this.rel='stylesheet'"
/>
<title>펀잇</title>
</head>
<body>
Expand Down
14 changes: 14 additions & 0 deletions frontend/src/styles/font.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { css } from 'styled-components';

const fonts = css`
body,
button,
input,
textarea {
font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto,
'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Apple Color Emoji',
'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
}
`;

export default fonts;
4 changes: 4 additions & 0 deletions frontend/src/styles/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { createGlobalStyle } from 'styled-components';

import fonts from './font';

const GlobalStyle = createGlobalStyle`
${fonts}

#root {
position: absolute;
top: 0;
Expand Down