Skip to content

Commit

Permalink
Refactor(header): align text with content
Browse files Browse the repository at this point in the history
  • Loading branch information
withSang committed Nov 16, 2023
1 parent 11af812 commit 53584a6
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 15 deletions.
19 changes: 17 additions & 2 deletions src/components/organisms/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
import { Col, Flex, Layout, Row, Typography } from "antd";
import { css } from "@emotion/react";

import { SNSHomepage, SNSInstagram, SNSLinkedin, SNSYoutube } from "@/assets";

const { Title, Paragraph, Text } = Typography;
const { Footer } = Layout;

const FooterTitle = () => <Title level={5}>사단법인 뉴웨이즈(NEWWAYS)</Title>;
const FooterTitle = () => (
<Title
level={5}
css={css`
margin: 0;
`}
>
사단법인 뉴웨이즈(NEWWAYS)
</Title>
);

const FooterDescription = () => (
<Flex vertical align="start" gap={0}>
Expand Down Expand Up @@ -54,7 +64,12 @@ const FooterLinks = () => (
);

const NewwaysFooter = () => (
<Footer style={{ textAlign: "start" }}>
<Footer
css={css`
text-align: start;
padding: 28px 0 60px 0;
`}
>
<Row justify="center">
<Col span={16}>
<Flex vertical align="start" gap="large">
Expand Down
6 changes: 5 additions & 1 deletion src/components/organisms/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import { NewWaysLogo } from "@/assets";
const { Header } = Layout;

const NewwaysHeader = () => (
<Header>
<Header
css={css`
padding: 0;
`}
>
<Row
justify="center"
align="stretch"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/components/pages/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// page 컴포넌트를 모아놓은 파일
export { default as Test } from "./Test";
export { default as LocalCouncilReport } from "./LocalCouncilReport";
24 changes: 15 additions & 9 deletions src/components/templates/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { Layout, ConfigProvider, theme } from "antd";
import { Col, ConfigProvider, Layout, Row, theme } from "antd";
import { Header, Footer } from "@/components/organisms";

const { Content } = Layout;
Expand All @@ -17,11 +17,13 @@ const NewwaysLayout = ({ children }: Props) => {
<ConfigProvider
theme={{
token: {
// 기본 폰트는 Pretendard로 설정합니다.
fontFamily:
"Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'",
},
components: {
Layout: {
// Header, Content, Footer의 배경색을 설정합니다.
headerBg: "#F0F0F0",
bodyBg: "#00E9A1",
footerBg: "#F0F0F0",
Expand All @@ -31,14 +33,18 @@ const NewwaysLayout = ({ children }: Props) => {
>
<Layout className="layout">
<Header />
<Content style={{ padding: "0 50px" }}>
<div
className="site-layout-content"
style={{ background: colorBgContainer }}
>
{children}
</div>
</Content>
<Row justify="center">
<Col span={16}>
<Content style={{ padding: "0" }}>
<div
className="site-layout-content"
style={{ background: colorBgContainer }}
>
{children}
</div>
</Content>
</Col>
</Row>
<Footer />
</Layout>
</ConfigProvider>
Expand Down
6 changes: 4 additions & 2 deletions src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ import {
createRoutesFromElements,
Route,
} from "react-router-dom";
import { Test } from "@/components/pages";
import { LocalCouncilReport } from "@/components/pages";

const router = createBrowserRouter(
createRoutesFromElements([<Route path="/" element={<Test />} />]),
createRoutesFromElements([
<Route path="/" element={<LocalCouncilReport />} />,
]),
);

export default router;

0 comments on commit 53584a6

Please sign in to comment.