-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5주차] diaMEtes 미션 제출합니다. #7
Closed
Closed
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
0722d1d
[Set] create-next-app
seondal e7aa6c5
chore : 폴더 구조 변경
heeeesoo 718b2ef
feat : footer 기능
heeeesoo 26cb3e0
feat : footer에 router 추가
heeeesoo 86f634d
test : home 페이지에 movie api 적용해보기
heeeesoo b6bd0be
feat : nowPlayingMovies api data 불러오기 테스트
heeeesoo e2b5931
feat : nowPlaying에 movie image 추가
heeeesoo cbe7100
feat : home 페이지에 top rated movie list 추가
heeeesoo d889118
feat : popular movie 홈페이지에 추가
heeeesoo eab70b3
chore : home 페이지 스타일 수정
heeeesoo 1d51cca
feat : home 페이지 중간 바 추가
heeeesoo 208ff67
feat : header 추가
heeeesoo 88bc19d
fix : 화면 상단 맞추기
heeeesoo 9d574c0
fix : 사진 배경으로 옮김
heeeesoo 2af09da
Merge pull request #1 from diaFEtes/heeeesoo
heeeesoo 52bf317
feat : get top rated movies
seondal b7750ac
feat : 검색페이지 -> 상세페이지 연결
seondal dd7bfa4
feat : 상세페이지 구현
seondal 9d65c0c
refact : search 페이지 getServerSideProps()
seondal da0101b
refact : movies api
seondal 137a270
refact : home 페이지 getServerSideProps 방식 변경
seondal 8a14858
refact : 폴더 구조 변경 & fix : 푸터 새로고침시 스타일 적용 안되는 오류 수정
seondal b39d18b
del : 불필요한 import 삭제
seondal 9e44cd5
del Layout.tsx
seondal a5f5075
fix : 로고 화면에서 푸터가 보이는 현상 제거
seondal 86a466b
refact : styled-component 전부 삭제 -> <style jsx/> 형식으로 변경
seondal 133e534
style : Layout style 설정
seondal ca96436
edit : footer styled-components 삭제
seondal 190afad
Feat : 메인페이지 -> 영화 상세 페이지 연결
seondal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[ | ||
{ | ||
"id":0, | ||
"name":"Home", | ||
"alt":"home" | ||
}, | ||
{ | ||
"id":1, | ||
"name":"Search", | ||
"alt":"search" | ||
}, | ||
{ | ||
"id":2, | ||
"name":"Comingsoon", | ||
"alt":"comingsoon" | ||
}, | ||
{ | ||
"id":3, | ||
"name":"Downloads", | ||
"alt":"downloads" | ||
}, | ||
{ | ||
"id":4, | ||
"name":"More", | ||
"alt":"more" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 헉 이렇게 json 파일로 만들어 두는 방식 진짜 깔끔하네요!!... |
||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import styled from 'styled-components'; | ||
import FooterItem from './FooterItem'; | ||
import FooterInfo from "../../assets/FooterInfo.json" | ||
import { useRouter } from "next/router"; | ||
|
||
export default function Footer(){ | ||
const router = useRouter(); | ||
const footerInfo = FooterInfo; | ||
|
||
return( | ||
<Container> | ||
{ | ||
footerInfo.map((f)=>{ | ||
const select = router.pathname === '/'+f.alt; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 오 이부분 어떻게 해야할지 고민이 많았는데 간단히 해결하셨군요!! 능력자 |
||
return ( | ||
<FooterItem | ||
key={f.id} | ||
alt={f.alt} | ||
name={f.name} | ||
selected = {select} | ||
/> | ||
) | ||
}) | ||
} | ||
</Container> | ||
); | ||
}; | ||
|
||
const Container = styled.div` | ||
position : fixed; | ||
|
||
// 중앙 정렬 | ||
left: 50%; | ||
transform: translate(-50%, 0); | ||
|
||
bottom: 0; | ||
|
||
width: 375px; | ||
height: 48px; | ||
|
||
display: flex; | ||
justify-content: space-evenly; | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { IFooter } from "../../interfaces/interface" | ||
import Image from 'next/image'; | ||
import styled from 'styled-components'; | ||
import { useRouter } from "next/router"; | ||
import { useEffect, useState } from "react"; | ||
|
||
export default function FooterItem({alt,name,selected}:IFooter){ | ||
let src = ''; | ||
if (selected){ | ||
src = '/img/Footer/'+name+'.png' | ||
}else{ | ||
src = '/img/Footer/'+name+'-2.png' | ||
} | ||
|
||
return ( | ||
<Container> | ||
<StyledButton select = {selected}> | ||
<Image | ||
alt={alt} | ||
src={src} | ||
width={25} | ||
height={25} | ||
/> | ||
<StyledFont> | ||
{name} | ||
</StyledFont> | ||
</StyledButton> | ||
</Container> | ||
) | ||
} | ||
|
||
const Container = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
` | ||
|
||
const StyledFont = styled.div` | ||
font-size: 8.2px; | ||
` | ||
|
||
const StyledButton = styled.button<{select : boolean}>` | ||
border: 0; | ||
outline: 0; | ||
background: black; | ||
color: #8C8787; | ||
color: ${ | ||
({select}) => (select? 'white' : '#8C8787') | ||
} | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export interface IFooter{ | ||
alt: string; | ||
name: string; | ||
selected: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,20 @@ | ||
import Footer from "../../components/common/Footer" | ||
import styled from 'styled-components' | ||
|
||
export default function Home(){ | ||
return ( | ||
<> | ||
<Container> | ||
home | ||
</> | ||
<Footer/> | ||
</Container> | ||
) | ||
}; | ||
}; | ||
|
||
const Container = styled.div` | ||
background: blue; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width: 375px; | ||
|
||
` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오.. JSON으로 저장해서 불러오는거 진짜 좋은 거 같아요 다음번에 참고해야겠습니다.
저희는 react-icon으로 일일이 불러와서 사용했어요!