Skip to content

Commit

Permalink
feat: 메인페이지 폰트 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
danah-kim committed Nov 20, 2024
1 parent 9df951d commit c6005e9
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 0 deletions.
Binary file added public/fonts/Paperlogy-4Regular.woff2
Binary file not shown.
Binary file added public/fonts/Paperlogy-5Medium.woff2
Binary file not shown.
Binary file added public/fonts/Paperlogy-7Bold.woff2
Binary file not shown.
Binary file added public/fonts/Paperlogy-8ExtraBold.woff2
Binary file not shown.
22 changes: 22 additions & 0 deletions src/components/utils/GlobalStyle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,27 @@ function GlobalStyle() {
}

const StyledGlobal = styled.style`
@font-face {
font-family: "Paperlogy";
font-weight: 800;
src: url("/fonts/Paperlogy-8ExtraBold.woff2") format("woff");
}
@font-face {
font-family: "Paperlogy";
font-weight: 700;
src: url("/fonts/Paperlogy-7Bold.woff2") format("woff");
}
@font-face {
font-family: "Paperlogy";
font-weight: 500;
src: url("/fonts/Paperlogy-5Medium.woff2") format("woff");
}
@font-face {
font-family: "Paperlogy";
font-weight: 400;
src: url("/fonts/Paperlogy-4Regular.woff2") format("woff");
}
html,
body {
height: 100%;
Expand All @@ -20,6 +41,7 @@ const StyledGlobal = styled.style`
}
}) => mainText};
}
#root {
display: flex;
flex-direction: column;
Expand Down
3 changes: 3 additions & 0 deletions src/fonts.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare module "*.woff2";
declare module "*.ttf";
declare module "*.woff";
1 change: 1 addition & 0 deletions src/pages/_components/Intro/Intro.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const StyledIntro = styled.section`
justify-content: space-between;
align-items: center;
gap: ${({ theme: { spacing } }) => `${spacing(4)}px`};
font-family: "Paperlogy";
@media (max-width: ${({ theme: { breakpoints } }) => `${breakpoints.sm}px`}) {
flex-direction: column;
Expand Down
1 change: 1 addition & 0 deletions vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default defineConfig({
include: "**/*.svg"
})
],
assetsInclude: ["**/*.woff2"],
resolve: {
alias: [
{
Expand Down

0 comments on commit c6005e9

Please sign in to comment.