Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

반응형웹 적용 #18

Merged
merged 20 commits into from
Feb 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d9f1620
Design: media theme 생성
kimyouknow Feb 7, 2023
c4a9b74
Design: media의 breakpoints에 xLarge속성 추가
kimyouknow Feb 8, 2023
6b57bd2
Design: 반응형웹에서 사용할 css variable 설정
kimyouknow Feb 8, 2023
e6acef7
Design: markdownStyle 스타일 수정
kimyouknow Feb 8, 2023
14bf51a
Design: About페이지 css variable적용
kimyouknow Feb 8, 2023
d186ccc
Design: 404페이지 css variable적용
kimyouknow Feb 8, 2023
53955a9
Design: Layout페이지 css variable적용
kimyouknow Feb 8, 2023
34d600a
Design: PostList페이지에 css variable적용
kimyouknow Feb 8, 2023
7dba14e
Rename: PostDetail관련 스타일 파일 합치기
kimyouknow Feb 8, 2023
c031568
Design: Bio컴포넌트 css variable적용
kimyouknow Feb 8, 2023
891249d
Design: CategoryHeader컴포넌트 css variable적용
kimyouknow Feb 8, 2023
c720859
Design: Footer컴포넌트에 css variable적용
kimyouknow Feb 8, 2023
6b39146
Chore: MainInfo컴포넌트 제거
kimyouknow Feb 8, 2023
3f28261
Design: GNB컴포넌트에 css variable적용
kimyouknow Feb 8, 2023
858a269
Fix: Image 컴포넌트 이미지가 찌그러지는 버그 수정
kimyouknow Feb 8, 2023
2505461
Fix: Bio 이미지 사이즈, description의 간격 수정
kimyouknow Feb 8, 2023
0085668
Design: Image컴포넌트에 css variable적용
kimyouknow Feb 8, 2023
d899bac
Chore: media theme 사용법 주석 작성
kimyouknow Feb 8, 2023
b8bb4da
Feat: viewport 메타 태그 설정
kimyouknow Feb 8, 2023
14eb4f9
Docs: 리드미 최신화
kimyouknow Feb 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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@

### 추가

- [ ] : 반응형 웹
- [x] : 반응형 웹
- [x] : read time
- [ ] : 반응 및 조회수 표시
- [ ] : 검색 기능
- [ ] : 카테고리 검색
- [x] : 카테고리 검색
- [ ] : 시리즈 검색
- [ ] : 이전 포스트 , 다음 포스트, 최신포스트
- [x] : 맞춤법 검사 자동화 -> vscode-hanspell extension으로 필요할 때마다 사용
3 changes: 2 additions & 1 deletion src/Layout/Layout.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import styled from '@emotion/styled'
export const Container = styled.div`
display: flex;
flex-direction: column;
padding-top: 100px;
width: 100%;
padding-top: var(--padding-xl);
color: var(--color-text);
background-color: var(--color-background);
`
9 changes: 6 additions & 3 deletions src/components/Bio/Bio.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ export const Info = styled.div`

export const Author = styled.h3``

export const Desc = styled.div``
export const Desc = styled.div`
${({ theme: { typography } }) => typography.textBase}
line-height: 1.4;
`

export const Socials = styled.ul`
display: flex;
Expand All @@ -31,7 +34,7 @@ export const Socials = styled.ul`
}
}
a > svg {
width: 18px;
height: 18px;
width: var(--icon-small);
height: var(--icon-small);
}
`
2 changes: 1 addition & 1 deletion src/components/Bio/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const Bio = () => {
}
return (
<S.Container>
<Image src="profile-image.png" isCircle />
<Image src="profile-image.png" isCircle size="l" />
<S.Info>
<S.Author>{author}</S.Author>
<S.Desc>{description}</S.Desc>
Expand Down
6 changes: 3 additions & 3 deletions src/components/CategoryHeader/CategoryHeader.style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Link } from 'gatsby'
import { ReactNode } from 'react'

export const Container = styled.div`
width: 768px;
width: var(--main-content-width);
padding: 1rem;
margin: 0 auto;
color: var(--color-heading-text);
Expand All @@ -27,13 +27,13 @@ interface GatsbyLinkProps extends CategoryItemProps {
export const CategoryList = styled.div`
display: flex;
flex-wrap: wrap;
gap: var(--space-m);
`

export const CategoryItem = styled(({ active, ...props }: GatsbyLinkProps) => <Link {...props} />)`
cursor: pointer;
margin-right: 12px;
border-radius: 8px;
padding: 0 6px;
padding: 0 var(--space-s);
${({ theme: { typography } }) => typography.linkSmall}

color: var(--color-text);
Expand Down
7 changes: 4 additions & 3 deletions src/components/Common/Image/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { useMemo } from 'react'
import { GatsbyImageDataType } from '@/types/gatsby.type'

const ImageSizeMap = {
s: '32px',
m: '64px',
l: ' 128px',
s: 'var(--icon-medium)',
m: 'var(--icon-large)',
l: 'var(--icon-xLarge)',
}

type ImageSize = keyof typeof ImageSizeMap
Expand Down Expand Up @@ -65,6 +65,7 @@ const SImage = styled((props: GatsbyImgProps) => <GatsbyImage {...props} />)`
border-radius: ${({ isCircle }) => isCircle && '50%'};
&.gatsby-image-wrapper {
z-index: 0; // IOS에서 border-radius 적용안되는 버그 해결
min-width: ${({ size }) => size && ImageSizeMap[size]};
}
`

Expand Down
7 changes: 4 additions & 3 deletions src/components/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ const Footer = () => {
export default Footer

const Container = styled.footer`
margin-top: 32px;
padding: 40px 0;
margin-top: var(--padding-s);
padding: var(--padding-s) 0;
text-align: center;
font-size: 11pt;
border-top: 1px solid var(--color-background-secondary);
${({ theme: { typography } }) => typography.textBase}
`
9 changes: 5 additions & 4 deletions src/components/GlobalNavigation/GlobalNavigation.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import styled from '@emotion/styled'
import { Link } from 'gatsby'

export const Container = styled.header<{ isHidden: boolean }>`
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
Expand All @@ -13,8 +14,8 @@ export const Container = styled.header<{ isHidden: boolean }>`
padding: 1rem 2rem;
backdrop-filter: blur(5px);
transition: top 0.5s, opacity 0.5s;
z-index: 999;
width: 100vw;
z-index: var(--z-index-top);

${({ theme: { typography } }) => typography.linkMedium};

color: var(--color-text);
Expand All @@ -36,8 +37,8 @@ export const NavLinks = styled.nav`
export const NavLink = styled(Link)``

export const ThemeSwitchButton = styled.button`
width: 24px;
height: 24px;
width: var(--icon-medium);
height: var(--icon-medium);
> svg {
width: 100%;
height: 100%;
Expand Down
7 changes: 0 additions & 7 deletions src/components/MainInfo/MainInfo.style.ts

This file was deleted.

14 changes: 0 additions & 14 deletions src/components/MainInfo/index.tsx

This file was deleted.

68 changes: 0 additions & 68 deletions src/components/PostDetail/PostBody/PostBody.style.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/PostDetail/PostBody/PostContent.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as S from './PostBody.style'
import * as S from '../PostDetail.style'

export interface PostContentProps {
html: string
Expand Down
2 changes: 1 addition & 1 deletion src/components/PostDetail/PostBody/TableOfContent.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as S from './PostBody.style'
import * as S from '../PostDetail.style'

export interface TableOfContentProps {
tableOfContents: string
Expand Down
6 changes: 3 additions & 3 deletions src/components/PostDetail/PostBody/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as S from './PostBody.style'
import * as S from '../PostDetail.style'
import PostContent from './PostContent'
import TableOfContent from './TableOfContent'

Expand All @@ -10,10 +10,10 @@ interface PostBodyProps {
// 문자열 형태의 HTML 코드를 출력하는 것도 dangerouslySetInnerHTML 속성을 통해 간단하게 구현이 가능
const PostBody = ({ tableOfContents, html }: PostBodyProps) => {
return (
<S.Container>
<S.Body>
<TableOfContent tableOfContents={tableOfContents} />
<PostContent html={html} />
</S.Container>
</S.Body>
)
}

Expand Down
Loading