Skip to content

Commit 1068e48

Browse files
Make publications list look better on mobile
1 parent b9aae40 commit 1068e48

1 file changed

Lines changed: 26 additions & 24 deletions

File tree

src/pages/publications/Publication.tsx

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,20 @@ export function Publication({ data }: { data: PublicationData }) {
1717
return (
1818
<Card p={"md"}>
1919
<Group wrap="nowrap" align="top">
20-
<AspectRatio ratio={3 / 2} w={200}>
20+
<AspectRatio ratio={3 / 2} w={200} visibleFrom="sm">
2121
<Image
2222
src={data.thumbnail}
2323
alt="Publication Image"
2424
fallbackSrc="https://placehold.co/600x400?text=Placeholder"
2525
/>
2626
</AspectRatio>
2727
<Stack flex={1}>
28-
<Title order={3} size={"md"}>
29-
{data.title}
30-
</Title>
28+
<Group justify="space-between" align="top">
29+
<Title order={3} flex={1} size={"md"}>
30+
{data.title}
31+
</Title>
32+
<Text>{data.year}</Text>
33+
</Group>
3134
<Text>
3235
{data.authors.map((author, idx) => (
3336
<Fragment key={author + idx}>
@@ -43,28 +46,27 @@ export function Publication({ data }: { data: PublicationData }) {
4346
))}
4447
</Text>
4548
<Text c="dimmed">{data.venue}</Text>
46-
<Group>
47-
{data.pdf && (
48-
<a href={data.pdf} target="_blank">
49-
PDF
50-
</a>
51-
)}
52-
{data.bib && (
53-
<a href={data.bib} target="_blank">
54-
BibTeX
55-
</a>
56-
)}
57-
{data.code && (
58-
<a href={data.code} target="_blank">
59-
Code
60-
</a>
61-
)}
49+
<Group justify="space-between">
50+
<Group>
51+
{data.pdf && (
52+
<a href={data.pdf} target="_blank">
53+
PDF
54+
</a>
55+
)}
56+
{data.bib && (
57+
<a href={data.bib} target="_blank">
58+
BibTeX
59+
</a>
60+
)}
61+
{data.code && (
62+
<a href={data.code} target="_blank">
63+
Code
64+
</a>
65+
)}
66+
</Group>
67+
<Text>{data.type}</Text>
6268
</Group>
6369
</Stack>
64-
<Stack align="end" justify="space-between">
65-
<Text>{data.year}</Text>
66-
<Text>{data.type}</Text>
67-
</Stack>
6870
</Group>
6971
</Card>
7072
);

0 commit comments

Comments
 (0)