-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d1199a4
commit e5d24e6
Showing
4 changed files
with
113 additions
and
112 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { ActionIcon, Anchor, Box, Group, Text } from '@mantine/core'; | ||
|
||
import { LanguageSwitcher } from '@/components/LanguageSwitcher'; | ||
import classes from '@/styles/components/v2/Footer.module.css'; | ||
import { Discord } from '@icons-pack/react-simple-icons'; | ||
import Link from 'next/link'; | ||
import React from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
interface FooterProps { | ||
links: { link: string; translation: string }[]; | ||
style?: React.CSSProperties; | ||
} | ||
|
||
export default function Footer({ links, style }: FooterProps) { | ||
const { t } = useTranslation(); | ||
|
||
const items = links.map((link) => ( | ||
<Anchor component={Link} c="dimmed" key={link.translation} href={link.link} size="sm"> | ||
{t(`links.${link.translation}`)} | ||
</Anchor> | ||
)); | ||
|
||
return ( | ||
<Box className={classes.root} style={style}> | ||
<Box className={classes.container}> | ||
<Text style={{ fontSize: '14px' }} c="dimmed" variant="text" className={classes.copyright}> | ||
{t('copyright', { year: new Date().getFullYear() })} | ||
</Text> | ||
<Group className={classes.links}> | ||
{items} | ||
<ActionIcon | ||
component={Link} | ||
href="http://go.buildtheearth.net/dc" | ||
variant="transparent" | ||
aria-label="Discord" | ||
target="_blank" | ||
> | ||
<Discord /> | ||
</ActionIcon> | ||
<LanguageSwitcher className={classes.language} /> | ||
</Group> | ||
<Anchor<'a'> | ||
style={{ fontSize: '14px' }} | ||
c="dimmed" | ||
variant="text" | ||
className={classes.copyright2} | ||
> | ||
{t('copyright', { year: new Date().getFullYear() })} | ||
</Anchor> | ||
</Box> | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
.root { | ||
border-top: 1px solid light-dark(var(--mantine-color-gray-2), var(--mantine-color-dark-5)); | ||
|
||
width: 100vw; | ||
} | ||
|
||
.container { | ||
display: flex; | ||
align-items: center; | ||
margin-left: calc(4 * var(--mantine-spacing-xl)); | ||
margin-right: calc(4 * var(--mantine-spacing-xl)); | ||
padding: var(--mantine-spacing-xs) 0px; | ||
justify-content: space-between; | ||
height: 100%; | ||
|
||
@media (max-width: $mantine-breakpoint-md) { | ||
margin-left: calc(var(--mantine-spacing-lg)); | ||
margin-right: calc(var(--mantine-spacing-lg)); | ||
flex-direction: column; | ||
} | ||
} | ||
|
||
.links { | ||
|
||
@media (max-width: $mantine-breakpoint-md) { | ||
width: 100%; | ||
} | ||
} | ||
|
||
.language { | ||
@media (max-width: $mantine-breakpoint-md) { | ||
width: 100%; | ||
} | ||
} | ||
|
||
.copyright { | ||
@media (max-width: $mantine-breakpoint-md) { | ||
display: none; | ||
} | ||
} | ||
.copyright2 { | ||
display: none; | ||
@media (max-width: $mantine-breakpoint-md) { | ||
display: inherit; | ||
margin-top: var(--mantine-spacing-sm); | ||
width: 100%; | ||
text-align: center; | ||
font-size: x-small !important; | ||
} | ||
} |