-
Notifications
You must be signed in to change notification settings - Fork 18
[김수영] sprint11 #130
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
Merged
GANGYIKIM
merged 15 commits into
codeit-bootcamp-frontend:Next-김수영
from
swim-kim:Next-김수영-sprint11
Nov 11, 2024
The head ref may contain hidden characters: "Next-\uAE40\uC218\uC601-sprint11"
Merged
[김수영] sprint11 #130
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
9f15d4f
feat: 폴더구조 수정, header 추가
c19c9d4
feat:베스트게시글 ui
924f174
feat: 게시물리스트 ui
6861cff
feat:전체게시물 불러오기
977828a
feat:게시물 검색
82b1114
style:반응형
b58c07f
fix:github branch-config
c27fd92
feat:add board 페이지
815fbaa
feat:detail페이지
6e7f34e
feat:댓글불러옴
ab49dd4
feat: api Response type 추가
20dee5e
Merge branch 'Next-김수영' of https://github.com/codeit-bootcamp-fronten…
swim-kim 5be4dc0
feat:sign in, sign up 페이지
swim-kim 930014d
feat:main page ui
swim-kim b08ebf2
feat: 메인페이지 접근 설정
swim-kim 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
This file contains hidden or 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,11 +1,183 @@ | ||
import styled from "styled-components"; | ||
import Image from 'next/image'; | ||
|
||
export const MainWrapper = styled.div` | ||
width: 100%; | ||
height: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
`; | ||
|
||
export const MainContainer = styled.div` | ||
max-width: 1200px; | ||
margin-top: 138px; | ||
`; | ||
|
||
export const SectionContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
gap: 138px; | ||
@media (max-width: 1199px){ | ||
max-width:696px; | ||
} | ||
`; | ||
|
||
export const Banner = styled.section` | ||
display: flex; | ||
width: 100%; | ||
height: 540px; | ||
background: #cfe5ff; | ||
align-items: flex-end; | ||
justify-content: center; | ||
flex-shrink: 0; | ||
|
||
@media (max-width: 1199px) { | ||
height: 771px; | ||
} | ||
`; | ||
|
||
export const BannerWrap = styled.div` | ||
display: inline-flex; | ||
align-items: center; | ||
gap: 7px; | ||
|
||
@media (max-width: 1199px) { | ||
flex-direction: column; | ||
gap: 100px; | ||
width: 744px; | ||
height: 100%; | ||
} | ||
`; | ||
|
||
export const BannerImg = styled(Image)` | ||
width: 746px; | ||
height: 340px; | ||
|
||
@media (max-width: 1199px) { | ||
width: 100%; | ||
height: 340px; | ||
} | ||
`; | ||
|
||
export const BannerTextBox = styled.div` | ||
height: 100%; | ||
display: flex; | ||
padding-bottom: 60px; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: flex-start; | ||
gap: 32px; | ||
|
||
@media (max-width: 1199px) { | ||
align-items: center; | ||
text-align: center; | ||
padding-bottom: 40px; | ||
} | ||
`; | ||
|
||
export const BannerText = styled.h1` | ||
color: #374151; | ||
margin: 0; | ||
font-size: 40px; | ||
font-weight: 700; | ||
line-height: 140%; | ||
|
||
@media (max-width: 767px) { | ||
font-size: 32px; | ||
} | ||
`; | ||
|
||
export const ItemsButton = styled.a` | ||
display: flex; | ||
height: 56px; | ||
padding: 16px 124px; | ||
justify-content: center; | ||
align-items: center; | ||
border-radius: 40px; | ||
background: #3692ff; | ||
color: #f9fafb; | ||
font-size: 20px; | ||
font-weight: 600; | ||
text-decoration: none; | ||
|
||
@media (max-width: 767px) { | ||
padding: 12px 71px; | ||
font-size: 18px; | ||
} | ||
`; | ||
|
||
export const Section = styled.section` | ||
width: 100%; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
`; | ||
|
||
export const SectionWrap = styled.div` | ||
max-width: 1200px; | ||
width: 100%; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
gap: 64px; | ||
|
||
@media (max-width: 1199px) { | ||
max-width: 696px; | ||
flex-direction: column; | ||
gap: 24px; | ||
} | ||
`; | ||
|
||
export const SectionTextBox = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
gap: 32px; | ||
justify-content: center; | ||
align-items: flex-start; | ||
|
||
@media (max-width: 1199px) { | ||
align-items: center; | ||
margin: 0; | ||
text-align: center; | ||
} | ||
`; | ||
|
||
export const SectionText = styled.h3` | ||
color: #374151; | ||
font-size: 40px; | ||
font-weight: 700; | ||
line-height: 140%; | ||
|
||
@media (max-width: 767px) { | ||
font-size: 24px; | ||
} | ||
`; | ||
|
||
export const SectionTextDetail = styled.p` | ||
color: #374151; | ||
font-size: 24px; | ||
font-weight: 500; | ||
line-height: 32px; | ||
|
||
@media (max-width: 1199px) { | ||
font-size: 19px; | ||
line-height: 26px; | ||
} | ||
|
||
@media (max-width: 767px) { | ||
font-size: 16px; | ||
} | ||
`; | ||
|
||
export const Tag = styled.p` | ||
color: #3692ff; | ||
font-size: 18px; | ||
font-weight: 700; | ||
line-height: 26px; | ||
|
||
@media (max-width: 767px) { | ||
font-size: 16px; | ||
} | ||
`; |
This file contains hidden or 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,18 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const AuthContainer = styled.div` | ||
width: 100%; | ||
display: flex; | ||
justify-content: center; | ||
`; | ||
|
||
|
||
export const HomeButton = styled.div` | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
`; | ||
|
||
export const PandaLogo = styled.img` | ||
width: 396px; | ||
`; |
This file contains hidden or 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
This file contains hidden or 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.
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 hidden or 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,35 @@ | ||
import React from 'react'; | ||
import * as S from './Styled'; | ||
import Link from 'next/link'; | ||
import FacebookIcon from '@/components/common/images/ic_facebook.png'; | ||
import TwitterIcon from '@/components/common/images/ic_twitter.png'; | ||
import InstagramIcon from '@/components/common/images/ic_instagram.png'; | ||
import YoutubeIcon from '@/components/common/images/ic_youtube.png'; | ||
export default function Footer() { | ||
return ( | ||
<S.Footer> | ||
<S.FooterWrap> | ||
<span>©codeit - 2024</span> | ||
<S.FooterCenter> | ||
<S.FooterLink href="/privacy">Privacy Policy</S.FooterLink> | ||
<S.FooterLink href="/faq">FAQ</S.FooterLink> | ||
</S.FooterCenter> | ||
<S.SnsWrap> | ||
<Link href="https://www.facebook.com/"> | ||
<S.SnsIcon src={FacebookIcon} alt="Facebook" width={18}/> | ||
</Link> | ||
<Link href="https://x.com/"> | ||
<S.SnsIcon src={TwitterIcon} alt="Twitter" width={18}/> | ||
</Link> | ||
<Link href="https://youtube.com"> | ||
<S.SnsIcon src={YoutubeIcon} alt="YouTube" width={18}/> | ||
</Link> | ||
<Link href="https://instagram.com"> | ||
<S.SnsIcon src={InstagramIcon} alt="Instagram" width={18}/> | ||
</Link> | ||
</S.SnsWrap> | ||
</S.FooterWrap> | ||
</S.Footer> | ||
); | ||
} | ||
|
This file contains hidden or 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,4 +1,4 @@ | ||||||
import React from 'react'; | ||||||
import React , { useEffect, useState }from 'react'; | ||||||
import Link from 'next/link'; | ||||||
import { useRouter } from 'next/router'; | ||||||
import PandaLogo from '../common/images/pandalogo.png'; | ||||||
|
@@ -7,8 +7,18 @@ import * as HS from './Styled'; | |||||
|
||||||
|
||||||
export default function Header() { | ||||||
const [isLogin, setIsLogin] = useState(false); | ||||||
const router = useRouter(); | ||||||
|
||||||
const handleOnClick = () => { | ||||||
router.push('/sign/in') | ||||||
} | ||||||
useEffect(()=>{ | ||||||
const accessToken = localStorage.getItem('accessToken') | ||||||
setIsLogin(!accessToken); | ||||||
}) | ||||||
|
||||||
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. P1:
Suggested change
|
||||||
|
||||||
return ( | ||||||
<HS.Header> | ||||||
<HS.HeaderContainer> | ||||||
|
@@ -29,7 +39,8 @@ export default function Header() { | |||||
</Link> | ||||||
</HS.NavContainer> | ||||||
</HS.HeaderWrap> | ||||||
<HS.ProfileImg src={ProfileImg} alt="프로필 이미지" /> | ||||||
{isLogin ? (<HS.LoginButton onClick={handleOnClick}>로그인</HS.LoginButton>): | ||||||
(<HS.ProfileImg src={ProfileImg} alt="프로필 이미지" />)} | ||||||
</HS.HeaderContainer> | ||||||
</HS.Header> | ||||||
); | ||||||
|
Oops, something went wrong.
Oops, something went wrong.
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.
P3:
아래 코드도 동일동작합니다~
signUpData 매개변수 객체 자체를 쓰는 일이 없으니 아래처럼 받아서 사용하시는게 가독성 측면에서 더 좋을 것 같습니다~