Skip to content
Snippets Groups Projects
Commit d90f4bf0 authored by Alexander Schoch's avatar Alexander Schoch
Browse files

remove ugly margin on eventCard, optimize board images

parent 970baf52
No related branches found
No related tags found
No related merge requests found
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import Image from "next/image";
import { Avatar, Button, Paper, Text, useMantineTheme } from "@mantine/core"; import { Avatar, Button, Paper, Text, useMantineTheme } from "@mantine/core";
...@@ -28,7 +29,24 @@ export default function BoardMemberCard({ entry }) { ...@@ -28,7 +29,24 @@ export default function BoardMemberCard({ entry }) {
shadow="sm" shadow="sm"
> >
<div> <div>
<Avatar src={entry.image} size={120} radius={20} mx="auto" /> <div
style={{
width: "120px",
height: "120px",
borderRadius: "1rem",
margin: "auto",
overflow: "hidden",
}}
>
<Image
src={entry.image}
width={0}
height={0}
sizes="100vw"
style={{ width: "30rem", maxWidth: "100%", height: "auto" }}
alt={entry.name}
/>
</div>
<Text ta="center" fz="lg" weight={500} mt="md"> <Text ta="center" fz="lg" weight={500} mt="md">
{entry.name} {entry.name}
</Text> </Text>
......
...@@ -153,7 +153,7 @@ export default function EventCard({ ...@@ -153,7 +153,7 @@ export default function EventCard({
</div> </div>
<div> <div>
{!event.isStammtisch && ( {!event.isStammtisch && (
<Group style={{ verticalAlign: "middle", marginTop: "20px" }} grow> <Group mt="xl" style={{ verticalAlign: "middle" }} grow>
{event.signUp ? ( {event.signUp ? (
<Button <Button
href={event.signUp} href={event.signUp}
...@@ -185,28 +185,26 @@ export default function EventCard({ ...@@ -185,28 +185,26 @@ export default function EventCard({
)} )}
</Group> </Group>
)} )}
<Group grow mt="md" style={{ verticalAlign: "middle" }}> {hasAccess(session, true) && (
{hasAccess(session, true) && ( <Group grow mt="md" style={{ verticalAlign: "middle" }}>
<> <Button
leftIcon={<Icon icon={ICONS.EDIT} color={accentColor} />}
variant="light"
onClick={() => editEvent(event)}
>
{t("editEvent")}
</Button>
{!event.isStammtisch && (
<Button <Button
leftIcon={<Icon icon={ICONS.EDIT} color={accentColor} />} leftIcon={<Icon icon={ICONS.LIST} color={accentColor} />}
variant="light" variant="light"
onClick={() => editEvent(event)} onClick={() => viewSignUps(event)}
> >
{t("editEvent")} {t("viewParticipants")}
</Button> </Button>
{!event.isStammtisch && ( )}
<Button </Group>
leftIcon={<Icon icon={ICONS.LIST} color={accentColor} />} )}
variant="light"
onClick={() => viewSignUps(event)}
>
{t("viewParticipants")}
</Button>
)}
</>
)}
</Group>
</div> </div>
</Card> </Card>
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment