lighthouse

This commit is contained in:
Ivan Dimitrov 2023-11-11 16:39:48 +02:00
parent ad4423a7fa
commit 31a126572b
3 changed files with 5 additions and 5 deletions

View File

@ -1,14 +1,13 @@
"use client"
import Link from "next/link";
import { usePathname } from "next/navigation";
import { ReactNode } from "react";
export default function Navbar() {
const path = usePathname()
const link = (text: ReactNode, href: string) => {
const link = (text: string, href: string) => {
return (
<Link aria-selected={path === href} className="btn" aria-label="Home" href={href}>
<Link data-selected={path === href} className="btn" aria-label={text} href={href}>
{text}
</Link>
)

View File

@ -4,11 +4,12 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
export default function Contact() {
const email = "ivan@idimitrov.dev";
const mailto = `mailto:${email}`
return (
<div className="w-full h-full p-2 grid place-content-center">
<div className="flex flex-row gap-4">
<a href={`mailto:${email}`}><FontAwesomeIcon icon={faEnvelope}/></a>
<a aria-label={mailto} href={mailto}><FontAwesomeIcon icon={faEnvelope} /></a>
</div>
</div>
)

View File

@ -15,6 +15,6 @@ svg {
}
.btn {
@apply bg-gray-900 text-gray-300 hover:bg-gray-700 hover:text-white rounded-md px-3 py-2 text-sm font-medium aria-selected:bg-gray-600
@apply bg-gray-900 text-gray-300 hover:bg-gray-700 hover:text-white rounded-md px-3 py-2 text-sm font-medium data-[selected=true]:bg-gray-600
}