Skip to content

Commit

Permalink
fix: 일부 스타일 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Doeunnkimm committed Aug 18, 2024
1 parent 118c7ad commit 3150888
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 7 deletions.
3 changes: 1 addition & 2 deletions apps/tech-blog/pages/_temp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import { Badge } from '@sambad/sds/components';
import { colors } from '@sambad/sds/theme';
import { RenderArticleBase } from '@/../utils/RenderArticleBase';

# 디프만 1등 하기

{RenderArticleBase({
title: '디프만 1등 하기',
tags: ['Web', '테스트', '뱃지'],
writer: '김테스터',
role: 'Frontend Developer',
Expand Down
5 changes: 4 additions & 1 deletion apps/tech-blog/pages/index.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { SummaryCard } from '@/../components';
import { articles } from '@/../constants';

# Welcome to Nextra Hello, world!
<img
src="https://resources-fe.toss.im/image-optimize/width=2048,quality=75/https%3A%2F%2Fstatic.toss.im%2Fassets%2Fpayments%2Fcontents%2Ftoss-tech-banner2_.png"
style={{ borderRadius: '8px' }}
/>

<div>
{articles.map((ariticle) => (
Expand Down
3 changes: 1 addition & 2 deletions apps/tech-blog/pages/web/test.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import { Badge } from '@sambad/sds/components';
import { colors } from '@sambad/sds/theme';
import { RenderArticleBase } from '@/../utils/RenderArticleBase';

# 디프만 1등 하기

{RenderArticleBase({
title: '디프만 1등 하기',
tags: ['Web', '테스트', '뱃지'],
writer: '김테스터',
role: 'Frontend Developer',
Expand Down
14 changes: 14 additions & 0 deletions apps/tech-blog/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,17 @@ h1 {
img {
margin: 0 !important;
}

/* NOTE: 블로그 최대너비 오버라이드 하여 커스텀 */
.nx-prose {
max-width: 90ch !important;
}

/* NOTE: article 영역 padding-top 오버라이드 하여 커스텀 */
article {
padding-top: 2rem !important;
}

article > h1:first-child {
display: none;
}
8 changes: 6 additions & 2 deletions apps/tech-blog/utils/RenderArticleBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Fragment } from 'react';
import { generateDate } from './generateDate';

export interface RenderArticleBase {
title: string;
tags: string[];
writer: string;
role: 'Frontend Developer' | 'Server Developer' | 'Designer';
Expand All @@ -15,13 +16,16 @@ export interface RenderArticleBase {
}

export const RenderArticleBase = (props: RenderArticleBase) => {
const { tags, writer, role, date, thumbnail } = props;
const { title, tags, writer, role, date, thumbnail } = props;

return (
<Fragment>
<div css={imageCss}>
<Image src={thumbnail} alt="thumbnail" layout="responsive" width={700} height={358} />
</div>
<Txt as="h1" typography="heading1" style={{ fontSize: '48px' }}>
{title}
</Txt>
<div css={badgeContainers}>
{tags.map((tag) => (
<Badge key={tag} color={colors.grey300}>
Expand All @@ -43,7 +47,7 @@ export const RenderArticleBase = (props: RenderArticleBase) => {

const badgeContainers = css({
display: 'flex',
marginBottom: size['2xs'],
margin: `${size['2xs']} 0`,

'& > * + *': {
marginLeft: size['7xs'],
Expand Down

0 comments on commit 3150888

Please sign in to comment.