Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving the Footer #48

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 46 additions & 56 deletions components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,66 +1,56 @@
import Image from 'next/image'
import { useTranslation } from 'hooks/useTranslation'

import { MIDU_LINKS } from '../constants'
import { MiduLink } from '../components/MiduLinks'
export function Footer() {
const i18n = useTranslation()

return (
<footer className="flex flex-center justify-center w-full py-12 mt-8 border-t-2 border-t-black">
<div className="">
<a
className="flex flex-center pr-2 border-dashed border-b-8 border-b-yellow-js hover:border-black"
href="https://midu.dev"
target="_blank"
rel="noreferrer"
>
{i18n.DEVELOPED_BY}
{''}
<picture className="flex flex-center bg-white rounded-full">
<Image
width="92"
height="28"
loading="lazy"
src="https://midu.dev/logo.png"
alt="midudev logo"
/>
</picture>
</a>
<span>&bull;</span>
<a
className="px-1 border-dashed border-b-2 border-b-yellow-js hover:border-black"
href="https://github.com/midudev/vota.dev"
rel="nofollow noreferrer"
target="_blank"
>
GitHub
</a>
<span>&bull;</span>
<a
className="px-1 border-dashed border-b-2 border-b-yellow-js hover:border-black"
href="https://midu.tube"
rel="nofollow noreferrer"
target="_blank"
>
YouTube
</a>
<span>&bull;</span>
<a
className="px-1 border-dashed border-b-2 border-b-yellow-js hover:border-black"
href="https://midu.live"
rel="nofollow noreferrer"
target="_blank"
>
Twitch
</a>
<span>&bull;</span>
<a
className="px-1 border-dashed border-b-2 border-b-yellow-js hover:border-black"
href="https://github.com/midudev/vota.dev/issues/new"
rel="nofollow noreferrer"
target="_blank"
>
{i18n.SUBMIT_SUGGESTION}
</a>
<div className="w-full">
<div className="flex justify-center py-2">
<a
className="flex flex-center pr-2 border-dashed border-b-2 border-b-yellow-js hover:border-black"
href="https://midu.dev"
target="_blank"
rel="noreferrer"
>
{i18n.DEVELOPED_BY}
{''}
</a>
<a
className="flex flex-center pr-2"
href="https://midu.dev"
target="_blank"
rel="noreferrer"
>
<picture className="flex flex-center bg-white rounded-full">
<Image
width="92"
height="28"
loading="lazy"
src="https://midu.dev/logo.png"
alt="midudev logo"
/>
</picture>
</a>
</div>
<div className="flex w-full justify-center">
{MIDU_LINKS.map(({ title, link, icon }) => (
<MiduLink title={title} link={link} icon={icon} key={title} />
))}
</div>
<div className="flex w-full justify-center">
<span>&bull;</span>
<a
className="px-1 border-dashed border-b-2 border-b-yellow-js hover:border-black mx-2"
href="https://github.com/midudev/vota.dev/issues/new"
rel="nofollow noreferrer"
target="_blank"
>
{i18n.SUBMIT_SUGGESTION}
</a>
</div>
</div>
</footer>
)
Expand Down
25 changes: 25 additions & 0 deletions components/MiduLinks.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { ReactElement } from 'react'
import * as SVG from 'components/SVGIcons'

interface MiduLinkProps {
title?: string
link?: string
icon?: ReactElement
}

export const MiduLink = ({ title, link, icon }: MiduLinkProps) => {
return (
<div className="flex">
<span>&bull;</span>
<a
className=" flex px-1 border-dashed border-b-2 border-b-yellow-js hover:border-black"
href={link}
rel="nofollow noreferrer"
target="_blank"
>
{icon || <SVG.Loading className="w-6 h-6 mx-2 animate-spin" />}
{title}
</a>
</div>
)
}
18 changes: 18 additions & 0 deletions constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,21 @@ export const LIST_SVG_ICONS = {
{ iconSvg: <SVG.GoogleCloud />, title: 'Google Cloud', isPng: false },
],
}

export const MIDU_LINKS = [
{
title: 'GitHub',
link: 'https://github.com/midudev/vota.dev',
icon: null, // <SVG.Github className="w-6 h-6 mx-2" />,
},
{
title: 'YouTube',
link: 'https://midu.tube',
icon: null, // <SVG.YouTube className="w-6 h-6 mx-2" />,
},
{
title: 'Twitch',
link: 'https://midu.live',
icon: null, // <SVG.Twitch className="w-6 h-6 mx-2" />,
},
]