Skip to content

Commit 2108f61

Browse files
Move post link to containing el
1 parent ea2da8f commit 2108f61

File tree

2 files changed

+28
-27
lines changed

2 files changed

+28
-27
lines changed

web/components/GlobalStyles.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export const GlobalStyles = createGlobalStyle`
6565
pre {
6666
font-family: 'Courier Prime', monospace;
6767
}
68+
6869
@media screen and (max-width: 600px) {
6970
body {
7071
font-size: 80%;

web/pages/index.js

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ const ListItem = styled.li`
1212
padding: 7px 10px;
1313
font-size: 1.75em;
1414
border: 1px solid var(--primary-darker);
15+
&:hover {
16+
cursor: pointer;
17+
background-color: ${({ theme }) => theme.secondaryColor};
18+
}
1519
`
1620
const ListItemLink = styled.a`
1721
font-family: 'Fjalla One', sans-serif;
1822
font-weight: 400;
1923
font-size: .75em;
20-
&:hover {
21-
cursor: pointer;
22-
color: ${({ theme }) => theme.primaryColor};
23-
}
2424
`
2525
const TagListItem = styled.li`
2626
display: inline-block;
@@ -150,30 +150,30 @@ function Index({
150150
title,
151151
tags
152152
}) => (
153-
<ListItem key={_id}>
154-
<Link
155-
href='/posts/[slug]'
156-
as={`/posts/${slug.current}`}
157-
>
153+
<Link
154+
href='/posts/[slug]'
155+
as={`/posts/${slug.current}`}
156+
>
157+
<ListItem key={_id}>
158158
<ListItemLink>{title}</ListItemLink>
159-
</Link>
160-
<DescP>{description}</DescP>
161-
<DateP>
162-
{manual_pub_date
163-
? moment.utc(manual_pub_date).format("LL")
164-
: moment.utc(_createdAt).format("LL")
165-
}
166-
</DateP>
167-
<ul>
168-
{sortObjProperties(tags, 'name').map(tag => {
169-
return (
170-
<TagListItem key={tag._id}>
171-
{tag.name}
172-
</TagListItem>
173-
)
174-
})}
175-
</ul>
176-
</ListItem>
159+
<DescP>{description}</DescP>
160+
<DateP>
161+
{manual_pub_date
162+
? moment.utc(manual_pub_date).format("LL")
163+
: moment.utc(_createdAt).format("LL")
164+
}
165+
</DateP>
166+
<ul>
167+
{sortObjProperties(tags, 'name').map(tag => {
168+
return (
169+
<TagListItem key={tag._id}>
170+
{tag.name}
171+
</TagListItem>
172+
)
173+
})}
174+
</ul>
175+
</ListItem>
176+
</Link>
177177
)
178178
)}
179179
</Layout>

0 commit comments

Comments
 (0)