Skip to content

Commit 7b29dad

Browse files
committed
refactor : 카테고리, 태그 목록 페이지 썸네일 이미지 관련 수정
- 모든 포스트 페이지와 동일한 스타일 적용
1 parent 93601cd commit 7b29dad

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

src/templates/category.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ const CategoryTemplate: React.FC<CategoryTemplateProps> = ({
9797
{/* 썸네일 이미지 - 클릭 가능 */}
9898
<Link
9999
to={post.fields.slug}
100-
className="md:w-80 w-full h-48 md:h-auto flex-shrink-0 overflow-hidden block"
100+
className="md:w-96 w-full aspect-video flex-shrink-0 overflow-hidden block rounded-lg"
101101
>
102102
{thumbnail ? (
103103
<GatsbyImage
104104
image={thumbnail}
105105
alt={title}
106-
className="w-full h-full object-cover group-hover:scale-105 transition-transform duration-200"
106+
className="w-full h-full object-cover object-center group-hover:scale-105 transition-transform duration-200"
107107
/>
108108
) : (
109109
<div className="w-full h-full bg-muted flex items-center justify-center">
@@ -225,12 +225,7 @@ export const pageQuery = graphql`
225225
tags
226226
thumbnail {
227227
childImageSharp {
228-
gatsbyImageData(
229-
width: 300
230-
height: 200
231-
placeholder: BLURRED
232-
formats: [AUTO, WEBP, AVIF]
233-
)
228+
gatsbyImageData(placeholder: BLURRED, formats: [AUTO, WEBP, AVIF])
234229
}
235230
}
236231
}

src/templates/tag.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ const TagTemplate: React.FC<TagTemplateProps> = ({
9595
{/* 썸네일 이미지 - 클릭 가능 */}
9696
<Link
9797
to={post.fields.slug}
98-
className="md:w-80 w-full h-48 md:h-auto flex-shrink-0 overflow-hidden block"
98+
className="md:w-96 w-full aspect-video flex-shrink-0 overflow-hidden block rounded-lg"
9999
>
100100
{thumbnail ? (
101101
<GatsbyImage
102102
image={thumbnail}
103103
alt={title}
104-
className="w-full h-full object-cover group-hover:scale-105 transition-transform duration-200"
104+
className="w-full h-full object-cover object-center group-hover:scale-105 transition-transform duration-200"
105105
/>
106106
) : (
107107
<div className="w-full h-full bg-muted flex items-center justify-center">
@@ -226,12 +226,7 @@ export const pageQuery = graphql`
226226
tags
227227
thumbnail {
228228
childImageSharp {
229-
gatsbyImageData(
230-
width: 300
231-
height: 200
232-
placeholder: BLURRED
233-
formats: [AUTO, WEBP, AVIF]
234-
)
229+
gatsbyImageData(placeholder: BLURRED, formats: [AUTO, WEBP, AVIF])
235230
}
236231
}
237232
}

0 commit comments

Comments
 (0)