Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
f6ae562
Initialize project using Create React App
KimByeongHwa Nov 25, 2023
785318b
init: 프로젝트 생성
KimByeongHwa Nov 25, 2023
4e20408
feat: ThemeProvider 적용
KimByeongHwa Nov 25, 2023
d3d867e
feat: 헤더 기본 UI 완성
KimByeongHwa Nov 25, 2023
cbf1d63
feat: Footer UI 완성
KimByeongHwa Nov 25, 2023
e9b8959
style: Footer 좌우 여백 수정
KimByeongHwa Nov 25, 2023
ca1ae94
feat: Footer SNS 로고 클릭 시 이동 기능 추가
KimByeongHwa Nov 25, 2023
060324d
feat: 상단 프로필 영역 구현
KimByeongHwa Nov 25, 2023
9bd974e
refactor: 컴포넌트 폴더 구조 수정
KimByeongHwa Nov 26, 2023
62fdab9
refactor: interface 모듈화
KimByeongHwa Nov 26, 2023
16f3335
refactor: interface 모듈화
KimByeongHwa Nov 26, 2023
22d56f3
feat: Card 컴포넌트 완성
KimByeongHwa Nov 26, 2023
19d5708
feat: 하단 카드 영역 구현
KimByeongHwa Nov 26, 2023
f9e6b84
Initialize project using Create React App
KimByeongHwa Nov 25, 2023
6ce6aa6
init: 프로젝트 생성
KimByeongHwa Nov 25, 2023
be5e43a
feat: ThemeProvider 적용
KimByeongHwa Nov 25, 2023
95fe95e
feat: 헤더 기본 UI 완성
KimByeongHwa Nov 25, 2023
f145fb2
feat: Footer UI 완성
KimByeongHwa Nov 25, 2023
9fc1d64
style: Footer 좌우 여백 수정
KimByeongHwa Nov 25, 2023
b67e2ec
feat: Footer SNS 로고 클릭 시 이동 기능 추가
KimByeongHwa Nov 25, 2023
502f613
feat: 상단 프로필 영역 구현
KimByeongHwa Nov 25, 2023
3db1e18
refactor: 컴포넌트 폴더 구조 수정
KimByeongHwa Nov 26, 2023
b66cab3
refactor: interface 모듈화
KimByeongHwa Nov 26, 2023
b3bee1d
refactor: interface 모듈화
KimByeongHwa Nov 26, 2023
d7e139b
feat: Card 컴포넌트 완성
KimByeongHwa Nov 26, 2023
7644221
feat: 하단 카드 영역 구현
KimByeongHwa Nov 26, 2023
d9f0b84
feat: Card 컴포넌트 링크 기능 추가
KimByeongHwa Nov 26, 2023
63e60be
chore: commit history 동기화
KimByeongHwa Nov 26, 2023
1c93396
Merge branch 'codeit-bootcamp-frontend:main' into part2-김병화-week6
KimByeongHwa Nov 30, 2023
70234fc
refactor: 6주차 코드리뷰 반영
KimByeongHwa Nov 30, 2023
6e83b99
feat: react-router-dom 설치 및 router 세팅
KimByeongHwa Nov 30, 2023
f029853
feat: 폴더 링크 유무에 따른 조건부 렌더링 기능 구현
KimByeongHwa Nov 30, 2023
bb307cf
feat: Shared -> Folder 컴포넌트 name 및 path 수정
KimByeongHwa Nov 30, 2023
e758b6e
feat: 검색창 input width 수정을 통한 클릭성 개선
KimByeongHwa Nov 30, 2023
0f67aa4
fix: Folder -> Shared 컴포넌트 name 및 path 복구
KimByeongHwa Nov 30, 2023
0b83b9e
fix: Folder -> Shared 컴포넌트 name 및 path 복구
KimByeongHwa Nov 30, 2023
60d4502
feat: Header 컴포넌트 분리
KimByeongHwa Nov 30, 2023
47729ea
feat: Home, Folder 페이지 컴포넌트 라우팅 추가
KimByeongHwa Nov 30, 2023
e1d8839
styles: max-width 설정
KimByeongHwa Dec 1, 2023
44267ec
style: width % 수정
KimByeongHwa Dec 1, 2023
245ae64
chore: .gitignore 파일 수정_todo.txt 파일 추가
KimByeongHwa Dec 1, 2023
90a2cbc
feat: 검색바 컴포넌트(SearchBar.tsx) 제작
KimByeongHwa Dec 1, 2023
6cfd755
chore: 폴더 구조 및 파일명 변경
KimByeongHwa Dec 2, 2023
b735c5c
feat: folder 페이지 및 컴포넌트 뼈대 생성
KimByeongHwa Dec 2, 2023
5a243b1
feat: AddLinkSection 제작(extending styled 관련 문제)
KimByeongHwa Dec 4, 2023
04469f6
feat: theme colors purple 추가
KimByeongHwa Dec 4, 2023
cc90f60
feat: TagBlock 컴포넌트 제작
KimByeongHwa Dec 4, 2023
9860e40
fix: Transient props 사용을 통한 warning 메세지 해결
KimByeongHwa Dec 5, 2023
c758d4e
fix: SearchBar 컴포넌트 모든 속성 transient props 적용
KimByeongHwa Dec 5, 2023
3f95586
feat: FolderCard 컴포넌트 제작
KimByeongHwa Dec 6, 2023
3a3b1ed
feat: FolderCard 컴포넌트 time 관련 함수 구현
KimByeongHwa Dec 6, 2023
57c495c
chore: 변수명, 컴포넌트명 변경
KimByeongHwa Dec 6, 2023
751cfbf
feat: folder 페이지 구현 중(todo-FolderBlock 클릭 시 id에 따른 api 호출 함수 제작)
KimByeongHwa Dec 7, 2023
7c3d824
feat: 폴더 선택에 따른 FolderBlock 색상 및FolderTitle 내용 변경 기능 구현
KimByeongHwa Dec 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

todo.txt
70 changes: 70 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Getting Started with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.

The page will reload when you make changes.\
You may also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `npm run eject`

**Note: this is a one-way operation. Once you `eject`, you can't go back!**

If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.

You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).

### Code Splitting

This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)

### Analyzing the Bundle Size

This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)

### Making a Progressive Web App

This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)

### Advanced Configuration

This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)

### Deployment

This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)

### `npm run build` fails to minify

This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
46 changes: 46 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"name": "weekly-part2",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "6",
"react-scripts": "5.0.1",
"styled-components": "^6.1.1",
"styled-reset": "^4.5.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@types/styled-components": "^5.1.32",
"@typescript-eslint/parser": "^6.12.0",
"typescript": "^5.3.2"
}
}
Binary file added public/images/add.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/facebook-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/instagram-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/kebab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/link.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/pen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/search-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/share.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/trash-can.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/twitter-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/youtube-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
rel="stylesheet"
type="text/css"
href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css"
/>
<title>Linkbrary</title>
</head>
<body>
<div id="root"></div>
</body>
</html>
76 changes: 76 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import { useState, useEffect } from 'react';
import styled from 'styled-components';
import reset from 'styled-reset';
import { createGlobalStyle, ThemeProvider } from 'styled-components';
import theme from './styles/theme';
import Header from './components/layouts/common/Header';
import Footer from './components/layouts/common/Footer';
import { Outlet } from 'react-router-dom';
import { User } from './utils/interfaces';

const Container = styled.div`
display: flex;
flex-direction: column;
min-height: 100vh;
`;

const GlobalStyle = createGlobalStyle`
${reset}

*{
box-sizing: border-box;
font-family: 'Pretendard';
}

html{
font-size: 10px;
}

body{
font-size: 1.4rem;
font-family: 'Pretendard';
}

a {
text-decoration: none;
}
`;

const ContentsWrapper = styled.div`
flex: 1;
`;

function App() {
const [user, setUser] = useState<User | null>(null);

const getUser = async () => {
try {
const res = await fetch('https://bootcamp-api.codeit.kr/api/sample/user');
const data = await res.json();
return data;
} catch (error) {
console.log(error);
}
};

useEffect(() => {
getUser().then((data) => {
setUser(data);
});
}, []);

return (
<Container>
<ThemeProvider theme={theme}>
<GlobalStyle />
<Header email={user?.email} profileImageSource={user?.profileImageSource} />
<ContentsWrapper>
<Outlet />
</ContentsWrapper>
<Footer />
</ThemeProvider>
</Container>
);
}

export default App;
82 changes: 82 additions & 0 deletions src/components/layouts/common/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import styled from 'styled-components';

const Container = styled.div`
background-color: ${({ theme }) => theme.colors.black};
width: 100%;
height: 160px;
`;

const Wrapper = styled.div`
width: 80%;
max-width: 1650px;
font-family: 'Abel';
font-size: 1.6rem;
font-weight: 400;
color: ${({ theme }) => theme.colors.gray100};
padding-top: 3.2rem;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
`;

const CopyRight = styled.div``;

const NavLinks = styled.div``;

const NavLink = styled.a`
cursor: pointer;

& + & {
margin-left: 3rem;
}
`;

const SNS = styled.div`
display: flex;
align-items: center;
justify-content: center;
`;

const SNSLogoWrapper = styled.a`
display: flex;
align-items: center;
justify-content: center;
width: 2rem;
height: 2rem;
cursor: pointer;

& + & {
margin-left: 1rem;
}
`;

function Footer() {
return (
<Container>
<Wrapper>
<CopyRight>©codeit - 2023</CopyRight>
<NavLinks>
<NavLink>Privacy Policy</NavLink>
<NavLink>FAQ</NavLink>
</NavLinks>
<SNS>
<SNSLogoWrapper href='https://www.facebook.com/' target='_blank'>
<img src='/images/facebook-icon.png' alt='facebook-icon' />
</SNSLogoWrapper>
<SNSLogoWrapper href='https://www.twitter.com/' target='_blank'>
<img src='/images/twitter-icon.png' alt='twitter-icon' />
</SNSLogoWrapper>
<SNSLogoWrapper href='https://www.youtube.com/' target='_blank'>
<img src='/images/youtube-icon.png' alt='youtube-icon' />
</SNSLogoWrapper>
<SNSLogoWrapper href='https://www.instagram.com/' target='_blank'>
<img src='/images/instagram-icon.png' alt='instagram-icon' />
</SNSLogoWrapper>
</SNS>
</Wrapper>
</Container>
);
}

export default Footer;
77 changes: 77 additions & 0 deletions src/components/layouts/common/Header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import styled from 'styled-components';
import GradationButton from '../../molecules/GradationButton';
import { HeaderProps } from '../../../utils/interfaces';

const Container = styled.div`
width: 100%;
height: 93px;
margin: auto;
background-color: ${({ theme }) => theme.colors.skyblue};
position: relative;
top: 0;
display: flex;
align-items: center;
justify-content: center;
`;

const Wrapper = styled.div`
width: 80%;
max-width: 1520px;
height: 54px;
display: flex;
justify-content: space-between;
align-items: center;
`;

const Logo = styled.a`
cursor: pointer;
color: ${({ theme }) => theme.colors.primary};
font-size: 2.4rem;
font-weight: 900;
`;

const UserInfo = styled.div`
display: flex;
align-items: center;
justify-content: space-between;
`;

const ImgWrapper = styled.div`
width: 2.8rem;
height: 2.8rem;
border-radius: 70%;
overflow: hidden;
`;

const UserProfileImg = styled.img`
width: 100%;
height: 100%;
object-fit: cover;
`;

const UserEmail = styled.div`
cursor: pointer;
margin-left: 1rem;
`;

function Header({ email, profileImageSource }: HeaderProps) {
return (
<Container>
<Wrapper>
<Logo href='/'>Linkbrary</Logo>
{email ? (
<UserInfo>
<ImgWrapper>
<UserProfileImg src={profileImageSource} alt='profile-img' />
</ImgWrapper>
<UserEmail>{email}</UserEmail>
</UserInfo>
) : (
<GradationButton width='12.8rem'>로그인</GradationButton>
)}
</Wrapper>
</Container>
);
}

export default Header;
Loading