Skip to content

Commit d2a5f02

Browse files
committed
[design] 푸터 생성 #2
1 parent 2cc146c commit d2a5f02

File tree

13 files changed

+221
-110
lines changed

13 files changed

+221
-110
lines changed

package-lock.json

+14-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"react": "^18.3.1",
1414
"react-dom": "^18.3.1",
1515
"react-router-dom": "^7.2.0",
16-
"styled-components": "^6.1.13"
16+
"styled-components": "^6.1.13",
17+
"styled-reset": "^4.5.2"
1718
},
1819
"devDependencies": {
1920
"@eslint/js": "^9.17.0",

public/vite.svg

-1
This file was deleted.

src/App.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
import { Routes, Route, BrowserRouter } from "react-router-dom";
2+
import { ThemeProvider } from "styled-components";
23
import MainPage from "./pages/MainPage";
34
import LoginPage from "./pages/LoginPage";
4-
import GlobalStyle from "./GlobalStyle";
5+
import GlobalStyle from "./styles/GlobalStyle";
6+
import theme from "./styles/theme";
57

68
function App() {
79
return (
8-
<>
10+
<ThemeProvider theme={theme}>
911
<GlobalStyle />
1012
<BrowserRouter>
1113
<Routes>
1214
<Route path="/" element={<MainPage />}></Route>
1315
<Route path="/login" element={<LoginPage />}></Route>
1416
</Routes>
1517
</BrowserRouter>
16-
</>
18+
</ThemeProvider>
1719
);
1820
}
1921

src/GlobalStyle.tsx

-29
This file was deleted.

src/assets/components/common/Header.tsx

-50
This file was deleted.

src/assets/react.svg

-1
This file was deleted.

src/assets/style/theme.tsx

-15
This file was deleted.

src/components/common/Footer.tsx

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import styled from "styled-components";
2+
3+
export default function Footer() {
4+
return (
5+
<Container>
6+
<Logo>Drinki G</Logo>
7+
<TextBox>
8+
<Text>
9+
드링키지 | 서울시 서대문구 가재울미래로2, 114동 2102호
10+
<br />
11+
대표 : 위승주 | TEL : 010-6443-0851 | Email : [email protected]
12+
<br />
13+
사업자 번호 : 342-15-02376
14+
</Text>
15+
<Text>ⓒDrinkig. 2025 All rights reserved.</Text>
16+
</TextBox>
17+
</Container>
18+
);
19+
}
20+
21+
const Container = styled.div`
22+
width: 100%;
23+
padding: 3.3rem 72.1rem 2.4rem 7.6rem;
24+
`;
25+
26+
const Logo = styled.p`
27+
${({ theme }) => theme.fonts.Title_1};
28+
color: ${({ theme }) => theme.colors.purple_100};
29+
`;
30+
31+
const TextBox = styled.div`
32+
display: flex;
33+
flex-direction: column;
34+
gap: 2.7rem;
35+
`;
36+
37+
const Text = styled.p`
38+
${({ theme }) => theme.fonts.Body_1};
39+
color: ${({ theme }) => theme.colors.gray_300};
40+
`;

src/components/common/Header.tsx

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import styled from "styled-components";
2+
import { useNavigate } from "react-router-dom";
3+
4+
function Header() {
5+
const navigate = useNavigate();
6+
return (
7+
<Container>
8+
<Content>
9+
<Logo onClick={() => navigate("/")}>Drinki G</Logo>
10+
<Functions>
11+
<Button onClick={() => navigate("/")}>Home</Button>
12+
<Button>Projects</Button>
13+
<Button>Help Center</Button>
14+
<Button onClick={() => navigate("/login")}>Login</Button>
15+
</Functions>
16+
</Content>
17+
</Container>
18+
);
19+
}
20+
21+
const Container = styled.div`
22+
width: 100%;
23+
height: 13.8rem;
24+
`;
25+
26+
const Content = styled.div`
27+
display: flex;
28+
align-items: center;
29+
justify-content: space-between;
30+
height: 7rem;
31+
padding: 4.4rem 7.6rem 0rem 7.6rem;
32+
`;
33+
34+
const Logo = styled.p`
35+
${({ theme }) => theme.fonts.Title_1};
36+
color: ${({ theme }) => theme.colors.purple_100};
37+
cursor: pointer;
38+
`;
39+
40+
const Functions = styled.div`
41+
display: flex;
42+
gap: 6.2rem;
43+
justify-content: flex-end;
44+
`;
45+
46+
const Button = styled.div`
47+
${({ theme }) => theme.fonts.Title_2};
48+
color: ${({ theme }) => theme.colors.white};
49+
cursor: pointer;
50+
`;
51+
52+
export default Header;

src/pages/MainPage.tsx

+15-9
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
11
import styled from "styled-components";
2-
import Header from "../assets/components/common/Header";
2+
import Header from "../components/common/Header";
3+
import Footer from "../components/common/Footer";
34

45
function MainPage() {
56
return (
6-
<Container>
7-
<Header />
8-
<Line />
9-
{/* 이미지 예정 */}
10-
{/* footer 예정 */}
11-
</Container>
7+
<>
8+
<Container>
9+
<Header />
10+
<Line />
11+
{/* 이미지 예정 */}
12+
</Container>
13+
<Footer />
14+
</>
1215
);
1316
}
1417

1518
const Container = styled.div`
1619
width: 100%;
20+
height: 106.2rem;
21+
background-color: ${({ theme }) => theme.colors.black};
1722
`;
23+
1824
const Line = styled.div`
19-
background-color: white;
20-
width: 1440px;
25+
background-color: ${({ theme }) => theme.colors.white};
26+
width: 100%;
2127
height: 1px;
2228
`;
2329

src/styles/GlobalStyle.ts

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import { createGlobalStyle, css } from "styled-components";
2+
import reset from "styled-reset";
3+
4+
export const flexCenter = css`
5+
display: flex;
6+
justify-content: center;
7+
align-items: center;
8+
`;
9+
10+
export const GlobalStyle = createGlobalStyle`
11+
${reset}
12+
13+
:root {
14+
font-family: Avenir;
15+
}
16+
17+
html,body {
18+
width: 100%;
19+
height: 100vh;
20+
margin: 0 auto;
21+
font-size: 62.5%;
22+
-ms-overflow-style: none; /* 인터넷 익스플로러 스크롤바 숨김 */
23+
scrollbar-width: none; /* 파이어폭스 스크롤바 숨김 */
24+
scroll-behavior: smooth;
25+
}
26+
27+
#root::-webkit-scrollbar {
28+
display: none; /* 크롬, 사파리, 오페라, 엣지 스크롤바 숨김 */
29+
}
30+
31+
button {
32+
border: none;
33+
background: none;
34+
font: inherit;
35+
cursor: pointer;
36+
}
37+
`;
38+
39+
export default GlobalStyle;

src/styles/theme.ts

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import { css } from "styled-components";
2+
3+
export const flexCenter = css`
4+
display: flex;
5+
align-items: center;
6+
justify-content: space-between;
7+
`;
8+
9+
const colors = {
10+
purple_100: "#7E13B1",
11+
12+
gray_100: "rgba(0, 0, 0, 0.3)",
13+
gray_200: "#D9D9D9",
14+
gray_300: "#686565",
15+
16+
white: "#fff",
17+
black: "#000",
18+
};
19+
20+
const fonts = {
21+
Title_1: css`
22+
font-family: "Avenir Next";
23+
font-size: 3.125rem;
24+
font-style: normal;
25+
font-weight: 600;
26+
line-height: 140%; /* 4.375rem */
27+
letter-spacing: -0.07813rem;
28+
`,
29+
30+
Title_2: css`
31+
font-family: "Avenir Next";
32+
font-size: 1.875rem;
33+
font-style: normal;
34+
font-weight: 400;
35+
line-height: 140%; /* 2.625rem */
36+
letter-spacing: -0.04688rem;
37+
`,
38+
39+
Body_1: css`
40+
font-family: "Avenir Next";
41+
font-size: 1.25rem;
42+
font-style: normal;
43+
font-weight: 400;
44+
line-height: 140%; /* 1.75rem */
45+
letter-spacing: -0.03125rem;
46+
`,
47+
};
48+
49+
const theme = {
50+
colors,
51+
fonts,
52+
};
53+
54+
export default theme;

0 commit comments

Comments
 (0)