Skip to content

Commit

Permalink
Merge pull request #55 from Nubblee/feature/mainPage-39
Browse files Browse the repository at this point in the history
[�Design] 홈페이지 디자인 수정
  • Loading branch information
jizerozz authored Sep 21, 2024
2 parents fd212a1 + 9db6282 commit 68287c8
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 15 deletions.
1 change: 1 addition & 0 deletions src/components/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const SwiperContainer = styled.div`
background-color: ${colors.mainGray};
border-radius: 10px;
box-shadow: 0px 5px 5px -3px rgba(255, 255, 255, 0.5);
padding-top: 16px;
.swiper-pagination {
bottom: 10px !important;
Expand Down
8 changes: 4 additions & 4 deletions src/components/BestContents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ const BestContents = () => {
}

const Container = styled.div`
width: 344px;
height: 181px;
width: 280px;
height: 160px;
background-color: ${colors.mainGray};
border-radius: 10px;
box-shadow: 0px 5px 5px -3px rgba(255, 255, 255, 0.5);
Expand All @@ -60,7 +60,7 @@ const Container = styled.div`
.title {
color: ${colors.primaryBlue};
font-size: ${fontSize.xl};
font-size: ${fontSize.lg};
font-weight: ${fontWeight.semiBold};
margin-bottom: 22px;
}
Expand All @@ -69,7 +69,7 @@ const Ranking = styled.div`
.list-container {
display: flex;
justify-content: space-between;
font-size: ${fontSize.lg};
font-size: ${fontSize.sm};
font-weight: ${fontWeight.semiBold};
margin-bottom: 18px;
Expand Down
27 changes: 16 additions & 11 deletions src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Banner from '@components/Banner'
import colors from '@/constants/color'
import { fontSize, fontWeight } from '@/constants/font'
import { useNavigate } from 'react-router-dom'
import { useAuthStore } from '@/stores/authStore'

const postData = [
{
Expand Down Expand Up @@ -66,6 +67,7 @@ const postData = [
]

const Home: React.FC = () => {
const { isLogin } = useAuthStore()
const navigate = useNavigate()
return (
<Container>
Expand All @@ -77,14 +79,16 @@ const Home: React.FC = () => {
<div>코딩테스트</div>
<div>스터디</div>
</div>
<button
className="write-btn"
onClick={() => {
navigate('/write')
}}
>
+ 글쓰기
</button>
{isLogin && (
<button
className="write-btn"
onClick={() => {
navigate('/write')
}}
>
+ 글쓰기
</button>
)}
</div>
<div className="category">
<div>Lv.0</div>
Expand Down Expand Up @@ -123,7 +127,7 @@ const Container = styled.div`
width: 100%;
height: 100%;
background-color: ${colors.bgBlack};
max-width: 1280px;
max-width: 1080px;
margin: 20px auto;
`
const ContentContainer = styled.div`
Expand All @@ -137,8 +141,9 @@ const PostContainer = styled.div`
border-right: 1px solid ${colors.white};
.newest-posts {
max-height: 800px;
overflow-y: scroll;
padding-right: 60px;
max-height: 80%;
overflow-y: auto;
}
.menu {
Expand Down
1 change: 1 addition & 0 deletions src/styles/GlobalStyles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ const GlobalStyles = () => (
height: 100%;
width: 100%;
overflow-y: auto;
background-color: ${colors.bgBlack};
}
`}
/>
Expand Down

0 comments on commit 68287c8

Please sign in to comment.