1
0
mirror of https://github.com/XFox111/my-website.git synced 2026-04-22 07:28:01 +03:00

init: First version

This commit is contained in:
2024-08-19 23:08:50 +00:00
commit 3ec7d9a722
134 changed files with 17088 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
import links from "@/_data/links";
import Link from "next/link";
import React from "react";
import cls from "./NavigationLinks.module.scss";
const navLinks: { text: string, href: string; }[] =
[
{ text: "Home", href: "/" },
{ text: "My skills", href: "/#skills" },
{ text: "Projects", href: "/#projects" },
{ text: "About", href: "/#about" },
{ text: "Contacts", href: "/#contacts" }
];
const NavigationLinks: React.FC<NavigationLinksProps> = ({ links: linkProps, ...props }) => (
<nav role="navigation" { ...props } className={ `${cls.navigation} ${props.className}` }>
{ navLinks.map((i, index) =>
<Link key={ index } { ...linkProps }
href={ i.href }
className={ `${cls.link} ${linkProps?.className ?? ""}` }>
{ i.text }
<i />
</Link>
) }
{ links.blog &&
<Link { ...linkProps } className={ `${cls.link} ${linkProps?.className ?? ""}` }
href={ links.blog } target="_blank">
Blog
<i />
</Link>
}
</nav>
);
export default NavigationLinks;
export type NavigationLinksProps = React.HTMLAttributes<HTMLDivElement> & {
links?: Omit<React.HTMLAttributes<HTMLAnchorElement>, "href">;
};