Newer
Older
import { useRouter } from "next/router";
import Image from "next/image";
import {
ActionIcon,
Grid,
MediaQuery,
Space,
useMantineTheme,
} from "@mantine/core";
import { Icon, ICONS } from "vseth-canine-ui";
import { getAccentColor } from "../utilities/colors";
import content from "../content/texts.json";
import tux from "../public/images/tux.png";
export default function Header() {
const { locale } = useRouter();
<div
style={{
height: "calc(100vh - 112px)",
display: "flex",
flexDirection: "column",
justifyContent: "space-evenly",
}}
>
<Grid style={{ display: "flex", alignItems: "center" }}>
<Grid.Col xs={12} md={6}>
<div>
<Image
src={
theme.colorScheme === "dark"
? "https://static.vseth.ethz.ch/assets/vseth-0522-thealt/logo-inv.svg"
: "/images/logo.svg"
}
width={0}
height={0}
sizes="100vw"
style={{ width: "30rem", maxWidth: "100%", height: "auto" }}
alt="TheAlternative Logo "
/>
<Space h="xl" />
<Space h="xl" />
{content.topSection.map((entry, i) => (
<div key={i}>
<p>{parse(entry[locale || "en"])}</p>
<Space h="xs" />
</div>
))}
</div>
<MediaQuery smallerThan="md" styles={{ display: "none" }}>
<Grid.Col md={6}>
<Image
src={tux}
width={0}
height={0}
sizes="100vw"
style={{ width: "100%", height: "auto" }}
alt="Tux, the Linux Mascot"
/>
</Grid.Col>
</MediaQuery>
</Grid>
<a href="#events">
<ActionIcon
style={{ marginLeft: "auto", marginRight: "auto" }}
size="3rem"
>
<Icon icon={ICONS.DOWN} color={getAccentColor(theme)} size="2rem" />
</ActionIcon>
</a>
</div>