@@ -6,6 +6,7 @@ import { formatDate } from '../../lib/utils';
6
6
import PostLink from '../common/PostLink' ;
7
7
import SkeletonTexts from '../common/SkeletonTexts' ;
8
8
import Skeleton from '../common/Skeleton' ;
9
+ import media from '../../lib/styles/media' ;
9
10
10
11
const SeriesPostItemBlock = styled . div < { edit ?: boolean } > `
11
12
font-family: 'Spoqa Han Sans', -apple-system, BlinkMacSystemFont,
@@ -35,6 +36,9 @@ const SeriesPostItemBlock = styled.div<{ edit?: boolean }>`
35
36
36
37
& + & {
37
38
margin-top: 4rem;
39
+ ${ media . small } {
40
+ margin-top: 6rem;
41
+ }
38
42
}
39
43
section {
40
44
margin-top: 1rem;
@@ -44,6 +48,12 @@ const SeriesPostItemBlock = styled.div<{ edit?: boolean }>`
44
48
min-width: 0;
45
49
letter-spacing: -0.02em;
46
50
height: 6.25rem;
51
+
52
+ ${ media . small } {
53
+ flex-direction: column;
54
+ height: auto;
55
+ }
56
+
47
57
.post-info {
48
58
flex: 1;
49
59
min-width: 0;
@@ -69,10 +79,22 @@ const SeriesPostItemBlock = styled.div<{ edit?: boolean }>`
69
79
height: 6.25rem;
70
80
object-fit: cover;
71
81
box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.15);
82
+ ${ media . small } {
83
+ width: 100%;
84
+ height: auto;
85
+ }
86
+ &.empty-thumbnail {
87
+ ${ media . small } {
88
+ display: none;
89
+ }
90
+ }
72
91
}
73
92
.date {
74
93
color: ${ palette . gray5 } ;
75
94
font-size: 0.875rem;
95
+ ${ media . small } {
96
+ margin-top: 1rem;
97
+ }
76
98
}
77
99
78
100
${ props =>
@@ -123,7 +145,11 @@ const SeriesPostItem: React.FC<SeriesPostItemProps> = ({
123
145
< img src = { thumbnail || emptyThumbnail } alt = "post-thumbnail" />
124
146
) : (
125
147
< PostLink username = { username } urlSlug = { urlSlug } >
126
- < img src = { thumbnail || emptyThumbnail } alt = "post-thumbnail" />
148
+ < img
149
+ src = { thumbnail || emptyThumbnail }
150
+ alt = "post-thumbnail"
151
+ className = { thumbnail ? '' : 'empty-thumbnail' }
152
+ />
127
153
</ PostLink >
128
154
) }
129
155
< div className = "post-info" >
@@ -165,6 +191,10 @@ const SkeletonBlock = styled(SeriesPostItemBlock)`
165
191
width: 12rem;
166
192
height: 6.25rem;
167
193
margin-right: 1rem;
194
+ ${ media . small } {
195
+ width: 100%;
196
+ height: 320px;
197
+ }
168
198
}
169
199
.post-info {
170
200
p {
0 commit comments