diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/favicon.ico | bin | 0 -> 25931 bytes | |||
| -rw-r--r-- | app/globals.css | 19 | ||||
| -rw-r--r-- | app/layout.js | 33 | ||||
| -rw-r--r-- | app/not-found.js | 11 | ||||
| -rw-r--r-- | app/page.js | 71 | ||||
| -rw-r--r-- | app/services/page.js | 50 | ||||
| -rw-r--r-- | app/travel-advisory/countries.json | 195 | ||||
| -rw-r--r-- | app/travel-advisory/page.js | 39 | ||||
| -rw-r--r-- | app/updates/[slug]/page.js | 50 | ||||
| -rw-r--r-- | app/updates/page.js | 23 |
10 files changed, 491 insertions, 0 deletions
diff --git a/app/favicon.ico b/app/favicon.ico Binary files differnew file mode 100644 index 0000000..718d6fe --- /dev/null +++ b/app/favicon.ico diff --git a/app/globals.css b/app/globals.css new file mode 100644 index 0000000..e76e819 --- /dev/null +++ b/app/globals.css @@ -0,0 +1,19 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +:root { + --foreground-rgb: 255, 255, 255; + --background-start-rgb: 0, 0, 0; + --background-end-rgb: 0, 0, 0; +} + +body { + color: rgb(var(--foreground-rgb)); + background: linear-gradient( + to bottom, + transparent, + rgb(var(--background-end-rgb)) + ) + rgb(var(--background-start-rgb)); +} diff --git a/app/layout.js b/app/layout.js new file mode 100644 index 0000000..d357551 --- /dev/null +++ b/app/layout.js @@ -0,0 +1,33 @@ +import './globals.css' +import { Exo } from 'next/font/google' +import Navbar from "@/components/Navbar"; +import PSA from "@/components/PSA"; + +const exo = Exo({ subsets: ['latin'] }) + +export const metadata = { + title: { + template: '%s - Government of Southeastern Islands', + default: 'Government of Southeastern Islands' + }, + description: 'The official website of the Government of Southeastern Islands', +} + +export default function RootLayout({ children }) { + return ( + <html lang="en"> + <body className={exo.className}> + <div className="sm:px-10 px-5 py-0.5 font-medium space-x-3 text-right"> + <a href="https://aircs.racing" className="transition duration-150 ease-out hover:ease-in md:hover:text-red-500">aircs.racing ↗</a> + </div> + <PSA/> + <Navbar/> + {children} + <footer className="flex flex-col text-center py-3 space-y-2 bg-blue-950 text-light text-sm sm:text-base px-5 sm:px-0"> + <p>Southeastern Islands is a fictional country made for the bits & Bytes Minecraft Server</p> + <p>This website is proudly written using Next.JS and Tailwind CSS</p> + </footer> + </body> + </html> + ) +} diff --git a/app/not-found.js b/app/not-found.js new file mode 100644 index 0000000..4046e54 --- /dev/null +++ b/app/not-found.js @@ -0,0 +1,11 @@ +import Link from "next/link"; + +export default function NotFound() { + return ( + <main className="flex flex-col justify-center context-center text-center p-2"> + <h1 className="text-2xl font-bold">404</h1> + <h1 className="text-2xl font-bold">The page you are looking for does not exist.</h1> + <Link href='/'><p className="text-cyan-600 hover:text-cyan-500">Head back to the homepage</p></Link> + </main> + ) +} diff --git a/app/page.js b/app/page.js new file mode 100644 index 0000000..b518096 --- /dev/null +++ b/app/page.js @@ -0,0 +1,71 @@ +import getPostMetadata from "@/components/updates/getPostMetadata"; +import PostPreview from "@/components/updates/PostPreview"; +import Link from "next/link"; + +export const metadata = { + title: 'Home - Government of Southeastern Islands', + description: 'The official website of the Government of Southeastern Islands', +} +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"> + <div className="px-4 mx-auto max-w-screen-xl text-center py-24 lg:py-56 space-y-3"> + <h1 className="font-medium md:text-5xl text-4xl">Welcome to Southeastern Islands</h1> + <h2 className="font-light md:text-3xl text-xl">The official website of the Government of Southeastern Islands</h2> + </div> + </div> + <ul> + <li> + <div className="bg-center bg-no-repeat bg-[url('/cantons/swampisland.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-5xl text-3xl">Swamp Island</h1> + <span>Leader: Alee</span> + <h2 className="text-lg">Capital of Southeastern Islands and the original home of MinePot</h2> + </div> + </div> + </li> + <li> + <div className="bg-center bg-no-repeat bg-[url('/regions/breadcroust.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-5xl text-3xl">Nexus Underground</h1> + <span>Vacant</span> + <h2 className="text-lg">Home to MinePot Barton Centre and athletics</h2> + </div> + </div> + </li> + <li> + <div className="bg-center bg-no-repeat bg-[url('/regions/skycity.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-5xl text-3xl">Longhorn Hills</h1> + <span>Leader: Raina</span> + <h2 className="text-lg">A city that floats in the sky</h2> + </div> + </div> + </li> + <li> + <div className="bg-center bg-no-repeat bg-[url('/regions/silicon-valley.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-5xl text-3xl">Foret Quebec</h1> + <span>Leader: Idk837384</span> + <h2 className="text-lg">Where all things tech-related lie</h2> + </div> + </div> + </li> + </ul> + <div className="sm:px-40 px-10 py-3 space-y-3"> + <h1 className="text-2xl font-medium" id="about">About Southeastern Islands</h1> + <p>Southeastern Islands 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 new file mode 100644 index 0000000..e33059a --- /dev/null +++ b/app/services/page.js @@ -0,0 +1,50 @@ +import Header from "@/components/Header"; + +export const metadata = { + title: 'Services', + description: 'Local services that we have here in Southeastern Islands', +} + +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/travel-advisory/countries.json b/app/travel-advisory/countries.json new file mode 100644 index 0000000..7cd95aa --- /dev/null +++ b/app/travel-advisory/countries.json @@ -0,0 +1,195 @@ +{ + "countries": [ + { + "name": "Alure Regions", + "danger": 0, + "image": "/countries/alureregions.webp", + "settlements": [], + "history": [] + }, + { + "name": "Anatoli", + "danger": 0, + "image": "/countries/anatoli.webp", + "settlements": [], + "history": [] + }, + { + "name": "Auckland", + "danger": 0, + "image": "/countries/auckland.webp", + "settlements": [], + "history": [] + }, + { + "name": "Aura Regions", + "danger": 0, + "image": "/countries/auraregions.webp", + "settlements": [], + "history": [] + }, + { + "name": "Birch Boat Town", + "danger": 0, + "image": "/countries/birchboattown.webp", + "settlements": [], + "history": [] + }, + { + "name": "Birch Lodges Community Town", + "danger": 0, + "image": "/countries/birchlodges.webp", + "settlements": [], + "history": [] + }, + { + "name": "Country Warp", + "danger": 0, + "image": "/countries/countrywarp.webp", + "settlements": [], + "history": [] + }, + { + "name": "Eagle City", + "danger": 0, + "image": "/countries/eaglecity.webp", + "settlements": [], + "history": [] + }, + { + "name": "Fegal", + "danger": 3, + "image": "/countries/fegal.webp", + "settlements": [], + "history": [ + "May 17th, 2023: Fegal has border security issues and it has not been solved as of now." + ] + }, + { + "name": "Halcandra", + "danger": 0, + "image": "/countries/halcandra.webp", + "settlements": [], + "history": [] + }, + { + "name": "Inkytown", + "danger": 0, + "image": "/countries/inkytown.webp", + "settlements": [], + "history": [] + }, + { + "name": "Kemonomimi Republic", + "danger": 0, + "image": "/countries/kemonomimi.webp", + "settlements": [], + "history": [] + }, + { + "name": "Knowle Regions", + "danger": 0, + "image": "/countries/knowleregions.webp", + "settlements": [], + "history": [] + }, + { + "name": "Lion Land", + "danger": 0, + "image": "/countries/lionland.webp", + "settlements": [], + "history": [] + }, + { + "name": "Mart's Extraordinarily Sublime State", + "danger": 0, + "image": "/countries/mess.webp", + "settlements": [], + "history": [] + }, + { + "name": "Mojave", + "danger": 0, + "image": "/countries/mojave.webp", + "settlements": [], + "history": [] + }, + { + "name": "Open Republic", + "danger": 0, + "image": "/countries/openrepublic.webp", + "settlements": [], + "history": [] + }, + { + "name": "PLC", + "danger": 0, + "image": "/countries/plc.webp", + "settlements": [], + "history": [] + }, + { + "name": "Plutonia Imperium", + "danger": 0, + "image": "/countries/plutoniaimperium.webp", + "settlements": [], + "history": [] + }, + { + "name": "The Federal Democracy of Solstice", + "danger": 0, + "image": "/countries/solstice.webp", + "settlements": [], + "history": [] + }, + { + "name": "Sulópolis", + "danger": 0, + "image": "/countries/sulopolis.webp", + "settlements": [], + "history": [] + }, + { + "name": "TAY", + "danger": 0, + "image": "/countries/tay.webp", + "settlements": [], + "history": [] + }, + { + "name": "Union of Soviet Sovereign Republics", + "danger": 0, + "image": "/countries/ussr.webp", + "settlements": [], + "history": [] + }, + { + "name": "Veronian Controlled Territories", + "danger": 0, + "image": "/countries/vct.webp", + "settlements": [], + "history": [] + }, + { + "name": "The Republic of Whale City", + "danger": 0, + "image": "/countries/whalecity.webp", + "settlements": [], + "history": [] + }, + { + "name": "The Federation of Yavno", + "danger": 0, + "image": "/countries/yavno.webp", + "settlements": [], + "history": [] + }, + { + "name": "The Republic of You on Kazoo", + "danger": 0, + "image": "/countries/youonkazoo.webp", + "settlements": [], + "history": [] + } + ] +} diff --git a/app/travel-advisory/page.js b/app/travel-advisory/page.js new file mode 100644 index 0000000..0c55d20 --- /dev/null +++ b/app/travel-advisory/page.js @@ -0,0 +1,39 @@ +import ListCountries from "@/components/travel-advisory/ListCountries"; +import Header from "@/components/Header"; + +export const metadata = { + title: 'Travel Advisory', + description: 'Information whether its safe to travel to other countries', +} + +export default async function TravelAdvisory(){ + return ( + <main className="flex flex-col"> + <Header title={metadata.title} description={metadata.description} /> + <div> + <h1 className="p-5 sm:px-40 px-10 text-3xl" id="legend">Legend</h1> + <ul> + <li className="p-6 sm:px-40 px-10 bg-green-950"> + <p className="font-medium text-lg">Take normal security precautions</p> + <p>Take similar precautions to those you would take in Southeastern Islands.</p> + </li> + <li className="p-6 sm:px-40 px-10 bg-yellow-700"> + <p className="font-medium text-lg">Exercise a high degree of caution</p> + <p>There are certain safety and security concerns or the situation could change quickly. Be very cautious at all times, monitor local media and follow the instructions of local authorities.</p> + <p><b className="font-semibold"> IMPORTANT:</b> The two levels below are official Government of Southeastern Islands Travel Advisories and are issued when the safety and security of Alurians travelling or living in the country or region may be at risk.</p> + </li> + <li className="p-6 sm:px-40 px-10 bg-orange-700"> + <p className="font-medium text-lg">Avoid non-essential travel</p> + <p>Your safety and security could be at risk. You should think about your need to travel to this country, territory or region based on family or business requirements, knowledge of or familiarity with the region, and other factors. If you are already there, think about whether you really need to be there. If you do not need to be there, you should think about leaving.</p> + </li> + <li className="p-6 sm:px-40 px-10 bg-red-950"> + <p className="font-medium text-lg">Avoid all travel</p> + <p>You should not travel to this country, territory or region. Your personal safety and security are at great risk. If you are already there, you should think about leaving if it is safe to do so.</p> + </li> + </ul> + </div> + <div className="sm:px-40 px-10 py-3 bg-blue-800"><h2 className="font-medium text-lg"><b className="font-bold">WARNING!</b> This page may be inaccurate at times, refer to the <a href="https://discord.com/channels/277922530973581312/1019705091336446052" className="transition ease-in-out transition-200 text-blue-300 hover:text-blue-200 active:text-blue-500">Minecraft General Announcements</a> channel for the latest updates</h2></div> + <ListCountries /> + </main> + ) +} diff --git a/app/updates/[slug]/page.js b/app/updates/[slug]/page.js new file mode 100644 index 0000000..d91440e --- /dev/null +++ b/app/updates/[slug]/page.js @@ -0,0 +1,50 @@ +import {readFileSync} from "fs"; +import Markdown from "markdown-to-jsx" +import matter from "gray-matter"; +import getPostMetadata from "@/components/updates/getPostMetadata"; +import DateFormatter from "@/components/updates/DateFormatter"; + +const getPostContent = (slug) => { + const folder = "posts/"; + const file = `${folder}${slug}.md`; + const content = readFileSync(file, "utf-8"); + 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) => ({ + slug: post.slug, + })) +} + +export default function PostPage(props) { + const slug = props.params.slug; + const post = getPostContent(slug); + return ( + <main> + <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> + <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 prose-headings:font-medium"> + <Markdown>{post.content}</Markdown> + </article> + </div> + </main> + ) +} diff --git a/app/updates/page.js b/app/updates/page.js new file mode 100644 index 0000000..ad27f22 --- /dev/null +++ b/app/updates/page.js @@ -0,0 +1,23 @@ +import getPostMetadata from "@/components/updates/getPostMetadata"; +import PostPreview from "@/components/updates/PostPreview"; +import Header from "@/components/Header"; + +export const metadata = { + title: 'Updates', + description: 'Follow the latest updates from the Government of Southeastern Islands', +} + +export default function Updates() { + const postMetadata = getPostMetadata(); + const postPreviews = postMetadata.map((post) => ( + <PostPreview key={post.slug} {...post} /> + )); + return ( + <main className="flex flex-col"> + <Header title={metadata.title} description={metadata.description} /> + <div className="lg:px-60 px-2 py-3"> + <div className="px-10 grid grid-cols-1 md:grid-cols-2 gap-4">{postPreviews}</div> + </div> + </main> + ) +} |
