Skip to content

Commit

Permalink
feat: 기타 수정, icon 및 폰트 cdn 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
sap03110 committed Dec 6, 2023
1 parent 8a555c4 commit e0bbfc3
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 41 deletions.
25 changes: 2 additions & 23 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,15 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/react.svg" />
<link rel="icon" type="image/svg+xml" href="/gmarket.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>로켓지송 프론트엔드</title>
<title>G-Magazine</title>
<link
rel="stylesheet"
as="style"
crossorigin="anonymous"
href="https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/static/pretendard-dynamic-subset.min.css"
/>
<link
rel="preload"
as="font"
type="font/woff2"
crossorigin="anonymous"
href="/fonts/GmarketSansBold.woff2"
/>
<link
rel="preload"
as="font"
type="font/woff2"
crossorigin="anonymous"
href="/fonts/GmarketSansMedium.woff2"
/>
<link
rel="preload"
as="font"
type="font/woff2"
crossorigin="anonymous"
href="/fonts/GmarketSansLight.woff2"
/>
</head>
<body>
<div id="root"></div>
Expand Down
Binary file added public/gmarket.ico
Binary file not shown.
Binary file removed public/plus.png
Binary file not shown.
1 change: 0 additions & 1 deletion public/react.svg

This file was deleted.

2 changes: 1 addition & 1 deletion src/apis/magazine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export type GoodsInfo = {
goodsName: string;
goodsPhotoUrl: string;
goodsPrice: number;
goodsSelectedOption: string;
goodsOption: string;
};

export const getGoods = async () => {
Expand Down
1 change: 0 additions & 1 deletion src/components/navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ const Navbar = () => {
const navigate = useNavigate();
const title = useAtomValue(titleAtom);
const [isScrollTop, setIsScrollTop] = useState(true);
console.log(title);

// 상세 네비바 사용
const showTitle = !![
Expand Down
12 changes: 3 additions & 9 deletions src/components/ui/mazagine/SelectPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,13 @@ const SelectPopup = ({ onSelect, onClose }) => {
<div css={popupStyle}>
<div css={popupInnerStyle}>
<div className="popup-header">
<span>매거진 상품 선택</span>
<span>내 구매 목록</span>
<IoMdClose className="close-icon" onClick={onClose} />
</div>
<div className="popup-body">
<ul css={itemInfoListStyle}>
{goods?.map(
({
id,
goodsName,
goodsPhotoUrl,
goodsPrice,
goodsSelectedOption,
}) => {
({ id, goodsName, goodsPhotoUrl, goodsPrice, goodsOption }) => {
const imageUrl = goodsPhotoUrl.split(',')[0];
return (
<li key={id} css={itemInfoWrapStyle}>
Expand All @@ -135,7 +129,7 @@ const SelectPopup = ({ onSelect, onClose }) => {
goodsName,
goodsPhotoUrl: imageUrl,
goodsPrice,
goodsSelectedOption,
goodsOption,
});
}}
>
Expand Down
1 change: 1 addition & 0 deletions src/components/ui/my-page/scrap-sheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const SectionTitle = styled.div`
margin-bottom: 8px;
text-align: center;
padding: 8px 0;
font-family: Gmarket Sans;
`;

const ImageWarp = styled.div`
Expand Down
10 changes: 4 additions & 6 deletions src/pages/magazine/write.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ const MagazineWrite = () => {
goodsPhotoUrl,
goodsName,
goodsPrice = 0,
goodsSelectedOption,
goodsOption,
} = selectedItemData || {};
const isWriteAvailable =
images.length > 0 && content && folder && selectedItemData;
Expand Down Expand Up @@ -330,12 +330,10 @@ const MagazineWrite = () => {
<p className="item-price">
{formatNumber(goodsPrice)}
<span className="item-price-unit"></span>
{goodsSelectedOption && (
<p className="item-option">
선택 옵션 : {goodsSelectedOption}
</p>
)}
</p>
{goodsOption && (
<p className="item-option">선택 옵션 : {goodsOption}</p>
)}
</>
) : (
<p style={{ textAlign: 'center' }}>상품을 선택해 주세요</p>
Expand Down
1 change: 1 addition & 0 deletions src/pages/rank.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ const RankItem = styled.li`
display: flex;
align-items: center;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
font-family: Gmarket Sans;
`;

const UserName = styled.span`
Expand Down
1 change: 1 addition & 0 deletions src/pages/subscribe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const SubscribeItem = styled.li`
display: flex;
align-items: center;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
font-family: Gmarket Sans;
`;

const ProfileImage = styled.img`
Expand Down
23 changes: 23 additions & 0 deletions src/styles/global.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
import { css } from '@emotion/react';

const fontFace = `
@font-face {
font-family: 'GmarketSans';
font-weight: 500;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/webfontworld/gmarket/GmarketSansMedium.woff2') format('woff2'),
url('https://cdn.jsdelivr.net/gh/webfontworld/gmarket/GmarketSansMedium.woff') format('woff'),
url('https://cdn.jsdelivr.net/gh/webfontworld/gmarket/GmarketSansMedium.ttf') format("truetype");
font-display: swap;
}
@font-face {
font-family: 'GmarketSans';
font-weight: 700;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/webfontworld/gmarket/GmarketSansBold.woff2') format('woff2'),
url('https://cdn.jsdelivr.net/gh/webfontworld/gmarket/GmarketSansBold.woff') format('woff'),
url('https://cdn.jsdelivr.net/gh/webfontworld/gmarket/GmarketSansBold.ttf') format("truetype");
font-display: swap;
}
`;

const globalStyle = css`
${fontFace}
body {
color: #111;
font-size: 14px;
Expand Down

0 comments on commit e0bbfc3

Please sign in to comment.