Skip to content
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

[Design] 홈페이지 디자인 수정 #55

Merged
merged 2 commits into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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