|
| 1 | +export const metadata = { |
| 2 | + title: 'Changelog - Stellar', |
| 3 | + description: 'Page description', |
| 4 | +} |
| 5 | + |
| 6 | +import { getUpdatePosts } from '@/components/mdx/utils' |
| 7 | +import Image from 'next/image' |
| 8 | +import Illustration from '@/public/images/page-illustration.svg' |
| 9 | +import PostItem from './post-item' |
| 10 | +import Cta from '@/components/cta-03' |
| 11 | + |
| 12 | +export default function Changelog() { |
| 13 | + const allUpdates = getUpdatePosts(); |
| 14 | + |
| 15 | + // Sort posts by date |
| 16 | + allUpdates.sort((a, b) => { |
| 17 | + return (new Date(a.metadata.publishedAt) > new Date(b.metadata.publishedAt)) ? -1 : 1 |
| 18 | + }) |
| 19 | + |
| 20 | + return ( |
| 21 | + <> |
| 22 | + |
| 23 | + {/* Content */} |
| 24 | + <section className="relative"> |
| 25 | + |
| 26 | + {/* Radial gradient */} |
| 27 | + <div className="absolute flex items-center justify-center top-0 -translate-y-1/2 left-1/2 -translate-x-1/2 pointer-events-none -z-10 w-[800px] aspect-square" aria-hidden="true"> |
| 28 | + <div className="absolute inset-0 translate-z-0 bg-purple-500 rounded-full blur-[120px] opacity-30"></div> |
| 29 | + <div className="absolute w-64 h-64 translate-z-0 bg-purple-400 rounded-full blur-[80px] opacity-70"></div> |
| 30 | + </div> |
| 31 | + |
| 32 | + {/* Particles animation */} |
| 33 | + <div className="absolute inset-0 h-96 -z-10" aria-hidden="true"> |
| 34 | + <canvas data-particle-animation data-particle-quantity="15"></canvas> |
| 35 | + </div> |
| 36 | + |
| 37 | + {/* Illustration */} |
| 38 | + <div className="md:block absolute left-1/2 -translate-x-1/2 -mt-16 blur-2xl opacity-90 pointer-events-none -z-10" aria-hidden="true"> |
| 39 | + <Image src={Illustration} className="max-w-none" width={1440} height={427} alt="Page Illustration" /> |
| 40 | + </div> |
| 41 | + |
| 42 | + <div className="max-w-6xl mx-auto px-4 sm:px-6"> |
| 43 | + <div className="pt-32 pb-12 md:pt-40 md:pb-20"> |
| 44 | + |
| 45 | + {/* Page header */} |
| 46 | + <div className="text-center pb-12 md:pb-20"> |
| 47 | + <h1 className="h1 bg-clip-text text-transparent bg-linear-to-r from-slate-200/60 via-slate-200 to-slate-200/60 pb-4">What's New</h1> |
| 48 | + <div className="max-w-3xl mx-auto"> |
| 49 | + <p className="text-lg text-slate-400">New updates and improvements to Stellar.</p> |
| 50 | + </div> |
| 51 | + </div> |
| 52 | + |
| 53 | + {/* Content */} |
| 54 | + <div className="max-w-3xl mx-auto"> |
| 55 | + <div className="relative"> |
| 56 | + <div className="absolute h-full top-4 left-[2px] w-0.5 bg-slate-800 [mask-image:linear-gradient(0deg,transparent,var(--color-white)_150px,var(--color-white))] -z-10 overflow-hidden after:absolute after:h-4 after:top-0 after:-translate-y-full after:left-0 after:w-0.5 after:bg-[linear-gradient(180deg,transparent,--theme(--color-purple-500/.65)_25%,--theme(--color-purple-200)_50%,--theme(--color-purple-500/.65)_75%,transparent)] after:animate-shine" aria-hidden="true"></div> |
| 57 | + {allUpdates.map((post, postIndex) => ( |
| 58 | + <PostItem key={postIndex} {...post} /> |
| 59 | + ))} |
| 60 | + </div> |
| 61 | + </div> |
| 62 | + |
| 63 | + {/* Pagination */} |
| 64 | + <div className="max-w-3xl mx-auto"> |
| 65 | + <ul className="flex items-center justify-between mt-12 pl-8 md:pl-48"> |
| 66 | + <li> |
| 67 | + <span className="btn-sm text-slate-700 transition duration-150 ease-in-out group [background:linear-gradient(var(--color-slate-900),var(--color-slate-900))_padding-box,conic-gradient(var(--color-slate-400),var(--color-slate-700)_25%,var(--color-slate-700)_75%,var(--color-slate-400)_100%)_border-box] relative before:absolute before:inset-0 before:bg-slate-800/30 before:rounded-full before:pointer-events-none cursor-not-allowed"> |
| 68 | + <span className="relative inline-flex items-center"> |
| 69 | + <span className="tracking-normal text-slate-700 mr-1"><-</span> Previous Page |
| 70 | + </span> |
| 71 | + </span> |
| 72 | + </li> |
| 73 | + <li> |
| 74 | + <a className="btn-sm text-slate-300 hover:text-white transition duration-150 ease-in-out group [background:linear-gradient(var(--color-slate-900),var(--color-slate-900))_padding-box,conic-gradient(var(--color-slate-400),var(--color-slate-700)_25%,var(--color-slate-700)_75%,var(--color-slate-400)_100%)_border-box] relative before:absolute before:inset-0 before:bg-slate-800/30 before:rounded-full before:pointer-events-none" href="#0"> |
| 75 | + <span className="relative inline-flex items-center"> |
| 76 | + Next Page <span className="tracking-normal text-purple-500 group-hover:translate-x-0.5 transition-transform duration-150 ease-in-out ml-1">-></span> |
| 77 | + </span> |
| 78 | + </a> |
| 79 | + </li> |
| 80 | + </ul> |
| 81 | + </div> |
| 82 | + |
| 83 | + </div> |
| 84 | + </div> |
| 85 | + |
| 86 | + </section> |
| 87 | + |
| 88 | + <Cta /> |
| 89 | + </> |
| 90 | + ) |
| 91 | +} |
0 commit comments