From c4c55a93bc6af8b15f45225169758e08ff1b13cd Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 17 Jul 2023 20:42:50 -0400 Subject: Initial rewrite --- app/favicon.ico | Bin 0 -> 25931 bytes app/globals.css | 19 ++++ app/layout.js | 33 +++++++ app/not-found.js | 11 +++ app/page.js | 71 ++++++++++++++ app/services/page.js | 50 ++++++++++ app/travel-advisory/countries.json | 195 +++++++++++++++++++++++++++++++++++++ app/travel-advisory/page.js | 39 ++++++++ app/updates/[slug]/page.js | 50 ++++++++++ app/updates/page.js | 23 +++++ 10 files changed, 491 insertions(+) create mode 100644 app/favicon.ico create mode 100644 app/globals.css create mode 100644 app/layout.js create mode 100644 app/not-found.js create mode 100644 app/page.js create mode 100644 app/services/page.js create mode 100644 app/travel-advisory/countries.json create mode 100644 app/travel-advisory/page.js create mode 100644 app/updates/[slug]/page.js create mode 100644 app/updates/page.js (limited to 'app') diff --git a/app/favicon.ico b/app/favicon.ico new file mode 100644 index 0000000..718d6fe Binary files /dev/null and b/app/favicon.ico differ 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 ( + + +
+ aircs.racing ↗ +
+ + + {children} +
+

Southeastern Islands is a fictional country made for the bits & Bytes Minecraft Server

+

This website is proudly written using Next.JS and Tailwind CSS

+
+ + + ) +} 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 ( +
+

404

+

The page you are looking for does not exist.

+

Head back to the homepage

+
+ ) +} 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) => ( + + )); + return ( +
+
+
+

Welcome to Southeastern Islands

+

The official website of the Government of Southeastern Islands

+
+
+
    +
  • +
    +
    +

    Swamp Island

    + Leader: Alee +

    Capital of Southeastern Islands and the original home of MinePot

    +
    +
    +
  • +
  • +
    +
    +

    Nexus Underground

    + Vacant +

    Home to MinePot Barton Centre and athletics

    +
    +
    +
  • +
  • +
    +
    +

    Longhorn Hills

    + Leader: Raina +

    A city that floats in the sky

    +
    +
    +
  • +
  • +
    +
    +

    Foret Quebec

    + Leader: Idk837384 +

    Where all things tech-related lie

    +
    +
    +
  • +
+
+

About Southeastern Islands

+

Southeastern Islands was founded in July 2023 with the goal of achieving greater autonomy in our regions.

+

Originally known as Alee Isle Regions, we later became Southeastern Islands before branching out on our own.

+

We are committed to continuous improvement and growth as small regions.

+

Latest Updates

+
{postPreviews}
+

View more

+
+
+ ) +} 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 ( +
+
+
+
    +
  • +
    +
    +

    Alure Post

    +

    Local and international postal service

    +
    +
    +
  • +
  • +
    +
    +

    ExploreAlure

    +

    Tourism service

    +
    +
    +
  • +
  • +
    +
    +

    MinePot

    +

    International restaurant

    +
    +
    +
  • +
  • +
    +
    +

    Intel Computer Shop

    +

    International computer shop

    +
    +
    +
  • +
+
+
+ ) +} 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 ( +
+
+
+

Legend

+
    +
  • +

    Take normal security precautions

    +

    Take similar precautions to those you would take in Southeastern Islands.

    +
  • +
  • +

    Exercise a high degree of caution

    +

    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.

    +

    IMPORTANT: 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.

    +
  • +
  • +

    Avoid non-essential travel

    +

    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.

    +
  • +
  • +

    Avoid all travel

    +

    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.

    +
  • +
+
+

WARNING! This page may be inaccurate at times, refer to the Minecraft General Announcements channel for the latest updates

+ +
+ ) +} 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 ( +
+
+
+

{post.data.title}

+ {post.data.author} | {DateFormatter(post.data.date)} +

{post.data.description}

+
+
+
+
+ {post.content} +
+
+
+ ) +} 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) => ( + + )); + return ( +
+
+
+
{postPreviews}
+
+
+ ) +} -- cgit v1.2.3