diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2023-07-17 17:26:18 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2023-07-17 17:26:18 -0400 |
| commit | b04689353ff2e9daca2c9fb2ab8cd5a0b7309f93 (patch) | |
| tree | 4b36300c9e1a98b15a3c51fcdfcd05f48c56353b /app | |
| parent | ddbe4fa61425f6a871a23238ce15a0929e201e6e (diff) | |
| download | alure-website-b04689353ff2e9daca2c9fb2ab8cd5a0b7309f93.tar.gz alure-website-b04689353ff2e9daca2c9fb2ab8cd5a0b7309f93.tar.bz2 alure-website-b04689353ff2e9daca2c9fb2ab8cd5a0b7309f93.zip | |
New page; Post now sorts by dates
Diffstat (limited to 'app')
| -rw-r--r-- | app/page.js | 16 | ||||
| -rw-r--r-- | app/services/page.js | 38 | ||||
| -rw-r--r-- | app/updates/[slug]/page.js | 14 |
3 files changed, 62 insertions, 6 deletions
diff --git a/app/page.js b/app/page.js index ec05d34..60f5965 100644 --- a/app/page.js +++ b/app/page.js @@ -1,8 +1,16 @@ +import getPostMetadata from "@/components/updates/getPostMetadata"; +import PostPreview from "@/components/updates/PostPreview"; +import Link from "next/link"; + export const metadata = { title: 'Home - Government of Alure Regions', description: 'The official website of the Government of Alure Regions', } export default function Home() { + const postMetadata = getPostMetadata(); + const postPreviews = postMetadata.slice(0,3).map((post) => ( + <PostPreview key={post.slug} {...post} /> + )); return ( <main className="flex flex-col"> <div className="bg-center bg-no-repeat bg-[url('/jumbotron.webp')] bg-gray-500 bg-blend-multiply"> @@ -51,10 +59,12 @@ export default function Home() { </ul> <div className="sm:px-40 px-10 py-3 space-y-3"> <h1 className="text-2xl font-medium" id="about">About Alure Regions</h1> - <p>Founded in July 2023, the goal of Alure Regions is to have more freedom on our regions.</p> - <p>Originally Alee Isle Regions then formed to become Southeastern Islands and then split from it.</p> - <p>We strife on trying to become stronger and better, as small regions.</p> + <p>Alure Regions was founded in July 2023 with the goal of achieving greater autonomy in our regions.</p> + <p>Originally known as Alee Isle Regions, we later became Southeastern Islands before branching out on our own.</p> + <p>We are committed to continuous improvement and growth as small regions.</p> <h1 className="text-2xl font-medium">Latest Updates</h1> + <div className="grid grid-cols-1 md:grid-cols-3 gap-4">{postPreviews}</div> + <Link href="/updates"><p className="text-blue-500 hover:text-blue-300 pt-2">View more</p></Link> </div> </main> ) diff --git a/app/services/page.js b/app/services/page.js index 3e0044d..c91b92e 100644 --- a/app/services/page.js +++ b/app/services/page.js @@ -2,13 +2,49 @@ import Header from "@/components/Header"; export const metadata = { title: 'Services', - description: 'Information whether its safe to travel to other countries', + description: 'Local services that we have here in Alure Regions', } export default function Services() { return ( <main className="flex flex-col"> <Header title={metadata.title} description={metadata.description} /> + <div> + <ul> + <li> + <div className="bg-center bg-no-repeat bg-[url('/regions/alee-isle.webp')] bg-gray-600 bg-blend-multiply"> + <div className="sm:px-40 px-10 py-14 space-y-2"> + <h1 className="font-medium sm:text-4xl text-3xl">Alure Post</h1> + <h2 className="text-xl">Local and international postal service</h2> + </div> + </div> + </li> + <li> + <div className="bg-center bg-no-repeat bg-[url('/regions/alee-isle.webp')] bg-gray-600 bg-blend-multiply"> + <div className="sm:px-40 px-10 py-14 space-y-2"> + <h1 className="font-medium sm:text-4xl text-3xl">ExploreAlure</h1> + <h2 className="text-xl">Tourism service</h2> + </div> + </div> + </li> + <li> + <div className="bg-center bg-no-repeat bg-[url('/regions/alee-isle.webp')] bg-gray-600 bg-blend-multiply"> + <div className="sm:px-40 px-10 py-14 space-y-2"> + <h1 className="font-medium sm:text-4xl text-3xl">MinePot</h1> + <h2 className="text-xl">International restaurant</h2> + </div> + </div> + </li> + <li> + <div className="bg-center bg-no-repeat bg-[url('/regions/alee-isle.webp')] bg-gray-600 bg-blend-multiply"> + <div className="sm:px-40 px-10 py-14 space-y-2"> + <h1 className="font-medium sm:text-4xl text-3xl">Intel Computer Shop</h1> + <h2 className="text-xl">International computer shop</h2> + </div> + </div> + </li> + </ul> + </div> </main> ) } diff --git a/app/updates/[slug]/page.js b/app/updates/[slug]/page.js index aa0ef9b..d91440e 100644 --- a/app/updates/[slug]/page.js +++ b/app/updates/[slug]/page.js @@ -11,6 +11,16 @@ const getPostContent = (slug) => { return matter(content); } +export function generateMetadata(props) { + const slug = props.params.slug; + const post = getPostContent(slug); + + return { + title: post.data.title, + description: post.data.description + } +} + export const generateStaticParams = async () => { const posts = getPostMetadata(); return posts.map((post) => ({ @@ -26,12 +36,12 @@ export default function PostPage(props) { <div className="bg-center bg-no-repeat bg-[url('/jumbotron.webp')] bg-gray-700 bg-blend-multiply"> <div className="sm:px-40 px-10 max-w-screen-xl text-left py-24 lg:py-10 space-y-3"> <h1 className="font-medium text-4xl">{post.data.title}</h1> - <h2 className="text-sm">{post.data.author} | {DateFormatter(post.data.date)}</h2> + <span className="text-sm">{post.data.author} | {DateFormatter(post.data.date)}</span> <h2 className="font-light text-lg">{post.data.description}</h2> </div> </div> <div className="md:px-80 px-20 mx-auto p-6 bg-zinc-800"> - <article className="prose lg-prose-xl prose-invert"> + <article className="prose lg-prose-xl prose-invert prose-headings:font-medium"> <Markdown>{post.content}</Markdown> </article> </div> |
