refactor some pages
This commit is contained in:
parent
a9a1d5ed1b
commit
df74cb16c8
@ -1,5 +1,18 @@
|
|||||||
import Cases from "$components/cases";
|
import Link from "next/link";
|
||||||
|
import { getCases } from "$lib/content";
|
||||||
|
|
||||||
const CasesPage = () => <Cases />
|
const CasesPage = () =>
|
||||||
|
<div className="p-20 w-full h-full flex flex-col gap-4 overflow-y-scroll">
|
||||||
|
{getCases().filter(c => !c.data.draft).sort((a, b) => Number(b.data.z) - Number(a.data.z)).map((c) => c.data).map((d) =>
|
||||||
|
<div key={d.slug} className="w-full lg:w-3/4 mx-auto h-max flex justify-center rounded-lg border-2">
|
||||||
|
<div className="gradient w-full">
|
||||||
|
<Link className="btn flex flex-col w-full text-center" href={d.slug}>
|
||||||
|
<span className="text-lg px-6">{d.title}</span>
|
||||||
|
<span>{d.date}</span>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
export default CasesPage
|
export default CasesPage
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
import Link from "next/link";
|
|
||||||
import { getCases } from "$lib/content";
|
|
||||||
|
|
||||||
const Cases = () =>
|
|
||||||
<div className="p-20 w-full h-full flex flex-col gap-4 overflow-y-scroll">
|
|
||||||
{getCases().filter(c => !c.data.draft).sort((a, b) => Number(b.data.z) - Number(a.data.z)).map((c) => c.data).map((d) =>
|
|
||||||
<div key={d.slug} className="w-full lg:w-3/4 mx-auto h-max flex justify-center rounded-lg border-2">
|
|
||||||
<div className="gradient w-full">
|
|
||||||
<Link className="btn flex flex-col w-full text-center" href={d.slug}>
|
|
||||||
<span className="text-lg px-6">{d.title}</span>
|
|
||||||
<span>{d.date}</span>
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
export default Cases;
|
|
@ -1,17 +0,0 @@
|
|||||||
import { faGithub, faGitlab } from "@fortawesome/free-brands-svg-icons";
|
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
||||||
import Link from "next/link";
|
|
||||||
|
|
||||||
const Links = () =>
|
|
||||||
<div className="grid w-full h-full place-content-center">
|
|
||||||
<div className={"grid grid-cols-2 gap-4 place-content-center"}>
|
|
||||||
<Link aria-label="GitHub" href={process.env.NEXT_PUBLIC_GITHUB_URL || ""} target="_blank">
|
|
||||||
<FontAwesomeIcon className="w-14 h-14" icon={faGithub} />
|
|
||||||
</Link>
|
|
||||||
<Link aria-label="GitLab" href={process.env.NEXT_PUBLIC_GITLAB_URL || ""} target="_blank">
|
|
||||||
<FontAwesomeIcon className="w-14 h-14" icon={faGitlab} />
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
export default Links
|
|
@ -1,5 +1,17 @@
|
|||||||
import Links from "$components/links";
|
import { faGithub, faGitlab } from "@fortawesome/free-brands-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
import Link from "next/link";
|
||||||
|
|
||||||
const Home = () => <Links />
|
const Home = () =>
|
||||||
|
<div className="grid w-full h-full place-content-center">
|
||||||
|
<div className={"grid grid-cols-2 gap-4 place-content-center"}>
|
||||||
|
<Link aria-label="GitHub" href={process.env.NEXT_PUBLIC_GITHUB_URL || ""} target="_blank">
|
||||||
|
<FontAwesomeIcon className="w-14 h-14" icon={faGithub} />
|
||||||
|
</Link>
|
||||||
|
<Link aria-label="GitLab" href={process.env.NEXT_PUBLIC_GITLAB_URL || ""} target="_blank">
|
||||||
|
<FontAwesomeIcon className="w-14 h-14" icon={faGitlab} />
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
export default Home;
|
export default Home;
|
||||||
|
Loading…
Reference in New Issue
Block a user