Skip to content

Commit 2a65c54

Browse files
authored
Fixed layout in LatestArticle.tsx (#973)
1 parent 54ac1a0 commit 2a65c54

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

src/posts/articles/list/LatestArticle.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ const Wrapper = styled.div`
1818
@media ${Device.mobile} {
1919
display: none;
2020
}
21+
a {
22+
display: block;
23+
width: 100%;
24+
height: 100%;
25+
color: inherit;
26+
text-decoration: none;
27+
}
28+
29+
&:hover {
30+
opacity: 0.8;
31+
}
2132
`;
2233

2334
const Sections = styled.div`
@@ -31,6 +42,17 @@ const Sections = styled.div`
3142

3243
const ImageSection = styled.div`
3344
flex: 3;
45+
width: 100%;
46+
height: 100%;
47+
position: relative;
48+
overflow: hidden;
49+
50+
img {
51+
width: 100%;
52+
height: 100%;
53+
object-fit: cover;
54+
object-position: center;
55+
}
3456
`;
3557

3658
const TextSection = styled.div`

0 commit comments

Comments
 (0)