some refactoring
This commit is contained in:
parent
3df928ca96
commit
57578d1cd4
24
src/app/components/links.tsx
Normal file
24
src/app/components/links.tsx
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import GithubSvg from "@/components/svg/github-svg";
|
||||||
|
import GitlabSvg from "@/components/svg/gitlab-svg";
|
||||||
|
import Link from "next/link";
|
||||||
|
|
||||||
|
export default function Links() {
|
||||||
|
|
||||||
|
const links = [
|
||||||
|
<Link aria-label="GitHub" href={process.env.NEXT_PUBLIC_GITHUB_URL!} target="_blank">
|
||||||
|
<GithubSvg />
|
||||||
|
</Link>
|
||||||
|
,
|
||||||
|
<Link aria-label="GitLab" href={process.env.NEXT_PUBLIC_GITLAB_URL!} target="_blank">
|
||||||
|
<GitlabSvg />
|
||||||
|
</Link>
|
||||||
|
]
|
||||||
|
|
||||||
|
return (
|
||||||
|
<main className="place-content-center text-center">
|
||||||
|
<div className={`grid grid-cols-${links.length} gap-4`}>
|
||||||
|
{links}
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
)
|
||||||
|
}
|
@ -11,6 +11,6 @@ main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
@apply w-14 h-14 hover:text-cyan-500 hover:animate-bounce
|
@apply w-14 h-14 text-amber-100 hover:text-cyan-500
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,18 +1,9 @@
|
|||||||
import GithubSvg from "@/components/svg/github-svg";
|
import Links from "$components/links";
|
||||||
import GitlabSvg from "@/components/svg/gitlab-svg";
|
|
||||||
import Link from "next/link";
|
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
return (
|
return (
|
||||||
<main className="place-content-center text-center">
|
<main className="place-content-center text-center">
|
||||||
<div className="flex flex-row space-x-4">
|
<Links />
|
||||||
<Link aria-label="GitHub" href={process.env.NEXT_PUBLIC_GITHUB_URL!} target="_blank">
|
|
||||||
<GithubSvg />
|
|
||||||
</Link>
|
|
||||||
<Link aria-label="GitLab" href={process.env.NEXT_PUBLIC_GITLAB_URL!} target="_blank">
|
|
||||||
<GitlabSvg />
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
</main>
|
</main>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
export default function GithubSvg() {
|
export default function GithubSvg() {
|
||||||
return (<svg className="animate-glow" fill="currentColor" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fillRule="evenodd" d="M10 .333A9.911 9.911 0 0 0 6.866 19.65c.5.092.678-.215.678-.477 0-.237-.01-1.017-.014-1.845-2.757.6-3.338-1.169-3.338-1.169a2.627 2.627 0 0 0-1.1-1.451c-.9-.615.07-.6.07-.6a2.084 2.084 0 0 1 1.518 1.021 2.11 2.11 0 0 0 2.884.823c.044-.503.268-.973.63-1.325-2.2-.25-4.516-1.1-4.516-4.9A3.832 3.832 0 0 1 4.7 7.068a3.56 3.56 0 0 1 .095-2.623s.832-.266 2.726 1.016a9.409 9.409 0 0 1 4.962 0c1.89-1.282 2.717-1.016 2.717-1.016.366.83.402 1.768.1 2.623a3.827 3.827 0 0 1 1.02 2.659c0 3.807-2.319 4.644-4.525 4.889a2.366 2.366 0 0 1 .673 1.834c0 1.326-.012 2.394-.012 2.72 0 .263.18.572.681.475A9.911 9.911 0 0 0 10 .333Z" clipRule="evenodd" /></svg>)
|
return (<svg fill="currentColor" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fillRule="evenodd" d="M10 .333A9.911 9.911 0 0 0 6.866 19.65c.5.092.678-.215.678-.477 0-.237-.01-1.017-.014-1.845-2.757.6-3.338-1.169-3.338-1.169a2.627 2.627 0 0 0-1.1-1.451c-.9-.615.07-.6.07-.6a2.084 2.084 0 0 1 1.518 1.021 2.11 2.11 0 0 0 2.884.823c.044-.503.268-.973.63-1.325-2.2-.25-4.516-1.1-4.516-4.9A3.832 3.832 0 0 1 4.7 7.068a3.56 3.56 0 0 1 .095-2.623s.832-.266 2.726 1.016a9.409 9.409 0 0 1 4.962 0c1.89-1.282 2.717-1.016 2.717-1.016.366.83.402 1.768.1 2.623a3.827 3.827 0 0 1 1.02 2.659c0 3.807-2.319 4.644-4.525 4.889a2.366 2.366 0 0 1 .673 1.834c0 1.326-.012 2.394-.012 2.72 0 .263.18.572.681.475A9.911 9.911 0 0 0 10 .333Z" clipRule="evenodd" /></svg>)
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,9 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["./src/*"]
|
"@/*": ["./src/*"],
|
||||||
|
"$components/*": ["./src/app/components/*"],
|
||||||
|
"$lib/*": ["./src/app/lib/*"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||||
|
Loading…
Reference in New Issue
Block a user