feat: Add react-sticky-box dependency
``
This commit is contained in:
@@ -38,35 +38,5 @@ export default function ReleaseNotePage({ params }: { params: { version: string
|
||||
);
|
||||
}
|
||||
|
||||
const prevNote = releaseNotes[currentIndex + 1];
|
||||
const nextNote = releaseNotes[currentIndex - 1];
|
||||
|
||||
return (
|
||||
<main className="flex min-h-screen flex-col items-center">
|
||||
<div className='w-full lg:w-1/2 px-5 md:px-10 lg:px-0'>
|
||||
<ReleaseNote data={releaseNote} />
|
||||
<div className="flex flex-col md:flex-row items-center justify-between h-fit px-4 lg:px-0 pb-4 mt-8">
|
||||
{prevNote && (
|
||||
<a href={`/release-notes/${prevNote.version}`} className='mx-auto md:mx-0'>
|
||||
<Button variant="outline" className="flex items-center">
|
||||
<ChevronLeft className="mr-2 h-4 w-4" />
|
||||
Previous ({prevNote.version})
|
||||
</Button>
|
||||
</a>
|
||||
)}
|
||||
<a href="/download" className='mx-auto md:mx-4'>
|
||||
<Button className="mt-4 md:mt-0 w-fit">Download Zen now!</Button>
|
||||
</a>
|
||||
{nextNote && (
|
||||
<a href={`/release-notes/${nextNote.version}`} className="mt-4 mx-auto md:mx-0 md:mt-0">
|
||||
<Button variant="outline" className="flex items-center ">
|
||||
Next ({nextNote.version})
|
||||
<ChevronRight className="ml-2 h-4 w-4" />
|
||||
</Button>
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
return redirect(`/release-notes#${version}`);
|
||||
}
|
||||
|
||||
@@ -2,31 +2,18 @@
|
||||
|
||||
import Footer from "@/components/footer";
|
||||
import { Navigation } from "@/components/navigation";
|
||||
import ReleaseNoteElement from "@/components/release-note";
|
||||
import { releaseNoteIsAlpha, releaseNotes } from "@/lib/release-notes";
|
||||
import Link from "next/link";
|
||||
|
||||
export default function ReleaseNotes() {
|
||||
return (
|
||||
<main className="flex min-h-screen flex-col items-center justify-start">
|
||||
<div className="min-h-screen py-42 flex justify-center flex-col">
|
||||
<div className="min-h-screen py-42 flex justify-center flex-col px-10 lg:px-0 md:w-2/3 lg:w-1/2">
|
||||
<h1 className="text-4xl text-center font-bold mt-24">Release Notes</h1>
|
||||
<div className="grid gap-5 grid-cols-1 md:grid-cols-2 lg:grid-cols-3 mt-10">
|
||||
{releaseNotes.map((releaseNote) => (
|
||||
<a href={`/release-notes/${releaseNote.version}`} className="bg-background relative max-w-64 overflow-hidden rounded-lg border p-5 hover:border-blue-500 transition-all duration-300 hover:-translate-y-1 hover:-translate-x-1" key={releaseNote.version}>
|
||||
<div className="text-md font-medium mb-5">
|
||||
{releaseNote.version}
|
||||
</div>
|
||||
<div className="text-muted-foreground text-sm font-medium">
|
||||
Check out the new features and improvements for {releaseNote.version}
|
||||
</div>
|
||||
{releaseNoteIsAlpha(releaseNote) && (
|
||||
<div className="absolute top-0 right-0 bg-blue-500 text-white text-xs font-medium p-1 rounded-bl-lg">
|
||||
Alpha Release
|
||||
</div>
|
||||
)}
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
{releaseNotes.map((releaseNote) => (
|
||||
<ReleaseNoteElement key={releaseNote.version} data={releaseNote} />
|
||||
))}
|
||||
</div>
|
||||
</main>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user