Skip to content

Commit

Permalink
refactor: refactor font family using styled componenet
Browse files Browse the repository at this point in the history
  • Loading branch information
junglesub committed Jul 30, 2024
1 parent aa9c1d2 commit 6bf8111
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 22 deletions.
12 changes: 4 additions & 8 deletions src/components/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import headerLogo from "../assets/header-logo.svg";
import googleLogo from "../assets/googlelogo.svg";
import kakaoLogo from "../assets/kakaologo.svg";
import { serverRootUrl } from "../constants";
import { pretendard, timesNewRoman } from "../styles/fonts";

function Header() {
const [openModal, setOpenModal] = useState("initial");
Expand Down Expand Up @@ -233,17 +234,15 @@ const HeaderModalLoginText = {
}
`,
title: styled.div`
font-family: TimesNewRoman, "Times New Roman", Times, Baskerville, Georgia,
serif;
${timesNewRoman}
font-size: 18px;
font-weight: bold;
font-style: italic;
text-transform: uppercase;
margin-bottom: 13px;
`,
text: styled.div`
font-family: TimesNewRoman, "Times New Roman", Times, Baskerville, Georgia,
serif;
${timesNewRoman}
font-size: 12px;
text-transform: uppercase;
margin-bottom: 25px;
Expand All @@ -252,11 +251,8 @@ const HeaderModalLoginText = {

const HeaderModalLoginBtn = {
root: styled.div`
${pretendard}
color: black;
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;
font-size: 12px;
font-weight: 600; // Semi Bold
`,
Expand Down
6 changes: 2 additions & 4 deletions src/components/Home/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from "react";
import styled from "styled-components";

import FooterLogoImg from "../../assets/footer-logo.svg";
import { pretendard } from "../../styles/fonts";

function Footer() {
return (
Expand Down Expand Up @@ -31,10 +32,7 @@ function Footer() {
export default Footer;

const FooterComp = styled.div`
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;
${pretendard}
`;

const FooterArea = {
Expand Down
6 changes: 2 additions & 4 deletions src/components/Home/HomeUnreg.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import MainHomeComp2_1 from "./MainHomeComp2_1";
import MainHomeComp3 from "./MainHomeComp3";
import MainHomeComp4 from "./MainHomeComp4";
import Footer from "./Footer";
import { pretendard } from "../../styles/fonts";

function HomeUnreg() {
const [videoLoadedComplete, setVideoLoadedComplete] = useState(false);
Expand Down Expand Up @@ -287,10 +288,7 @@ const MainFeatureComp = {
}
`,
subtext: styled.div`
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;
${pretendard}
font-weight: medium;
font-size: 24px;
display: flex;
Expand Down
9 changes: 3 additions & 6 deletions src/components/Home/MainHomeComp4.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import "slick-carousel/slick/slick-theme.css";
import LeftArrowImg from "../../assets/MainHome/Section4/LeftArrow.svg";
import RightArrowImg from "../../assets/MainHome/Section4/RightArrow.svg";
import styled from "styled-components";
import { pretendard, timesNewRoman } from "../../styles/fonts";

function MainHomeComp4() {
var settings = {
Expand Down Expand Up @@ -88,14 +89,10 @@ const MainHomeComp4Style = styled.div`

const SliderStyle = {
card: styled.div`
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;
${pretendard}
`,
number: styled.div`
font-family: TimesNewRoman, "Times New Roman", Times, Baskerville, Georgia,
serif;
${timesNewRoman}
font-size: 48px;
padding: 36.5px;
`,
Expand Down

0 comments on commit 6bf8111

Please sign in to comment.