aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2023-07-15 20:22:10 -0400
committerAndrew Lee <alee14498@protonmail.com>2023-07-15 20:22:10 -0400
commit8c1cf540c998d554b10282292edeb28b74349297 (patch)
tree1553070a4c5b6a555b96c71a98b4b5406dd87c76
parentf4abb8200e49024311d9fd8f5130ed189e139fe3 (diff)
downloadalure-website-8c1cf540c998d554b10282292edeb28b74349297.tar.gz
alure-website-8c1cf540c998d554b10282292edeb28b74349297.tar.bz2
alure-website-8c1cf540c998d554b10282292edeb28b74349297.zip
Getting ready to properly add travel advisory; Added additional cities
-rw-r--r--app/page.js4
-rw-r--r--app/travel-advisory/countries.json146
-rw-r--r--app/travel-advisory/page.js20
-rw-r--r--components/DateFormatter.js9
-rw-r--r--components/PostPreview.js3
-rw-r--r--package.json1
-rw-r--r--posts/test.md163
-rw-r--r--yarn.lock9
8 files changed, 186 insertions, 169 deletions
diff --git a/app/page.js b/app/page.js
index 188c214..1ff6dab 100644
--- a/app/page.js
+++ b/app/page.js
@@ -7,8 +7,8 @@ export default function Home() {
<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 sm:text-5xl text-2xl">Welcome to the Alure Regions</h1>
- <h2 className="font-light sm:text-3xl text-lg">The official website of the Government of Alure Regions</h2>
+ <h1 className="font-medium md:text-5xl text-2xl">Welcome to the Alure Regions</h1>
+ <h2 className="font-light md:text-3xl text-lg">The official website of the Government of Alure Regions</h2>
</div>
</div>
<ul>
diff --git a/app/travel-advisory/countries.json b/app/travel-advisory/countries.json
new file mode 100644
index 0000000..3fb16d8
--- /dev/null
+++ b/app/travel-advisory/countries.json
@@ -0,0 +1,146 @@
+{
+ "countries": [
+ {
+ "name": "Anatoli",
+ "status": 0,
+ "history": []
+ },
+ {
+ "name": "Auckland",
+ "status": 0,
+ "history": []
+ },
+ {
+ "name": "Aura Regions, The",
+ "status": 0,
+ "history": []
+ },
+ {
+ "name": "Birch Boat Town",
+ "status": 0,
+ "history": []
+ },
+ {
+ "name": "Birch Lodges Community Town",
+ "status": 0,
+ "history": []
+ },
+ {
+ "name": "Country Warp",
+ "status": 0,
+ "history": []
+ },
+ {
+ "name": "Eagle City",
+ "status": 0,
+ "history": []
+ },
+ {
+ "name": "Fegal",
+ "status": 3,
+ "history": [
+ "May 17th 2023: Fegal has border security issues and it has not been solved as of now."
+ ]
+ },
+ {
+ "name": "Halcandra",
+ "status": 0,
+ "history": []
+ },
+ {
+ "name": "Inkytown",
+ "status": 0,
+ "history": []
+ },
+ {
+ "name": "Kemonomimi Republic, The",
+ "status": 1,
+ "history": [
+ "July 15: KR has internal power issues between the President and Govenor. Governor was trying to form a new government under \"KSSR\"."
+ ]
+ },
+ {
+ "name": "Knowle Regions, The",
+ "status": 0,
+ "history": []
+ },
+ {
+ "name": "Lion Land",
+ "status": 0,
+ "history": []
+ },
+ {
+ "name": "Mart's Extraordinarily Sublime State",
+ "status": 0,
+ "history": []
+ },
+ {
+ "name": "Mojave",
+ "status": 0,
+ "history": []
+ },
+ {
+ "name": "Open Republic, The",
+ "status": 0,
+ "history": []
+ },
+ {
+ "name": "PLC",
+ "status": 0,
+ "history": []
+ },
+ {
+ "name": "Plutonia Imperium",
+ "status": 0,
+ "history": []
+ },
+ {
+ "name": "Solstice, The Federal Democracy of",
+ "status": 0,
+ "history": []
+ },
+ {
+ "name": "Southeastern Islands, The",
+ "status": 2,
+ "history": [
+ "July 15: A disease has been going around Foret Quebec",
+ "Foret Quebec has been dealing with environmental issues"
+ ]
+ },
+ {
+ "name": "Sulópolis",
+ "status": 0,
+ "history": []
+ },
+ {
+ "name": "TAY",
+ "status": 0,
+ "history": []
+ },
+ {
+ "name": "Union of Soviet Sovereign Republics",
+ "status": 0,
+ "history": []
+ },
+ {
+ "name": "Veronian Controlled Territories",
+ "status": 0,
+ "history": []
+ },
+ {
+ "name": "Whale City, The Republic of",
+ "status": 0,
+ "history": []
+ },
+ {
+ "name": "Yavno, The Federation of",
+ "status": 0,
+ "history": []
+ },
+ {
+ "name": "You on Kazoo, The Republic of",
+ "status": 0,
+ "history": []
+ }
+ ]
+} \ No newline at end of file
diff --git a/app/travel-advisory/page.js b/app/travel-advisory/page.js
index 8dbd639..5db351c 100644
--- a/app/travel-advisory/page.js
+++ b/app/travel-advisory/page.js
@@ -1,9 +1,17 @@
+import { readFileSync } from "fs";
+
export const metadata = {
title: 'Travel Advisory',
description: 'Information whether its safe to travel to other countries',
}
-export default function TravelAdvisory(){
+export async function getCountries(){
+ const files = readdirSync('./countries.json');
+
+
+}
+
+export default async function TravelAdvisory(){
return (
<main className="flex flex-col">
<div className="bg-center bg-no-repeat bg-[url('/jumbotron.webp')] bg-gray-700 bg-blend-multiply">
@@ -34,11 +42,19 @@ export default function TravelAdvisory(){
</li>
</ul>
</div>
- <div className="sm:px-40 px-10 py-3 bg-blue-800"><h2 className="font-medium text-lg">This page may be inaccurate at times, refer to the Minecraft General Announcements channel for the latest updates</h2></div>
+ <div className="sm:px-40 px-10 py-3 bg-blue-800"><h2 className="font-medium text-lg">This page may be inaccurate at times, refer to the <a href="https://discord.com/channels/277922530973581312/1019705091336446052" className="text-gray-400 hover:text-gray-300">Minecraft General Announcements</a> channel for the latest updates</h2></div>
<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-10 space-y-3 ">
<h1 className="font-medium text-5xl">Country name</h1>
<h2 className="text-lg">Take normal security precautions</h2>
+ <h2 className="font-medium text-3xl">City 1</h2>
+ <h2 className="text-base">Take normal security precautions</h2>
+ <h2 className="font-medium text-3xl">City 2</h2>
+ <h2 className="text-base">Take normal security precautions</h2>
+ <h2 className="font-medium text-3xl">City 3</h2>
+ <h2 className="text-base">Take normal security precautions</h2>
+ <h2 className="font-medium text-3xl">City 4</h2>
+ <h2 className="text-base">Take normal security precautions</h2>
<button className="bg-blue-600 px-4 py-2">Information</button>
</div>
</div>
diff --git a/components/DateFormatter.js b/components/DateFormatter.js
new file mode 100644
index 0000000..11f3bf3
--- /dev/null
+++ b/components/DateFormatter.js
@@ -0,0 +1,9 @@
+
+import { parseISO, format } from 'date-fns'
+
+const DateFormatter = (dateString) => {
+ const date = parseISO(dateString)
+ return <time dateTime={dateString}>{format(date, 'LLLL d, yyyy')}</time>
+}
+
+export default DateFormatter \ No newline at end of file
diff --git a/components/PostPreview.js b/components/PostPreview.js
index 6eca000..083bf2b 100644
--- a/components/PostPreview.js
+++ b/components/PostPreview.js
@@ -1,8 +1,9 @@
import Link from "next/link";
+//import DateFormatter from '@/components/DateFormatter'
export default function PostPreview(props) {
return (
- <div key="post" className="py-2 bg-zinc-800 py-3 px-5 border border-gray-600 rounded-lg space-y-3">
+ <div key="post" className="bg-zinc-800 py-3 px-5 border border-gray-600 rounded-lg space-y-3">
<Link href={`/updates/${props.slug}`}>
<h2 className="font-medium text-2xl hover:underline">{props.title}</h2>
</Link>
diff --git a/package.json b/package.json
index 71c9ddd..6c5bfe3 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,7 @@
},
"dependencies": {
"autoprefixer": "10.4.14",
+ "date-fns": "^2.30.0",
"eslint": "8.44.0",
"eslint-config-next": "13.4.10",
"gray-matter": "^4.0.3",
diff --git a/posts/test.md b/posts/test.md
deleted file mode 100644
index 186a2cb..0000000
--- a/posts/test.md
+++ /dev/null
@@ -1,163 +0,0 @@
----
-title: Markdown Test
-description: Test2
-author: President
-date: '2023-07-15'
----
-An h1 header
-============
-
-Paragraphs are separated by a blank line.
-
-2nd paragraph. *Italic*, **bold**, and `monospace`. Itemized lists
-look like:
-
-* this one
-* that one
-* the other one
-
-Note that --- not considering the asterisk --- the actual text
-content starts at 4-columns in.
-
-> Block quotes are
-> written like so.
->
-> They can span multiple paragraphs,
-> if you like.
-
-Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., "it's all
-in chapters 12--14"). Three dots ... will be converted to an ellipsis.
-Unicode is supported. ☺
-
-
-
-An h2 header
-------------
-
-Here's a numbered list:
-
-1. first item
-2. second item
-3. third item
-
-Note again how the actual text starts at 4 columns in (4 characters
-from the left side). Here's a code sample:
-
- # Let me re-iterate ...
- for i in 1 .. 10 { do-something(i) }
-
-As you probably guessed, indented 4 spaces. By the way, instead of
-indenting the block, you can use delimited blocks, if you like:
-
-~~~
-define foobar() {
- print "Welcome to flavor country!";
-}
-~~~
-
-(which makes copying & pasting easier). You can optionally mark the
-delimited block for Pandoc to syntax highlight it:
-
-~~~python
-import time
-# Quick, count to ten!
-for i in range(10):
- # (but not *too* quick)
- time.sleep(0.5)
- print i
-~~~
-
-
-
-### An h3 header ###
-
-Now a nested list:
-
-1. First, get these ingredients:
-
- * carrots
- * celery
- * lentils
-
-2. Boil some water.
-
-3. Dump everything in the pot and follow
- this algorithm:
-
- find wooden spoon
- uncover pot
- stir
- cover pot
- balance wooden spoon precariously on pot handle
- wait 10 minutes
- goto first step (or shut off burner when done)
-
- Do not bump wooden spoon or it will fall.
-
-Notice again how text always lines up on 4-space indents (including
-that last line which continues item 3 above).
-
-Here's a link to [a website](http://foo.bar), to a [local
-doc](local-doc.html), and to a [section heading in the current
-doc](#an-h2-header). Here's a footnote [^1].
-
-[^1]: Footnote text goes here.
-
-Tables can look like this:
-
-size material color
----- ------------ ------------
-9 leather brown
-10 hemp canvas natural
-11 glass transparent
-
-Table: Shoes, their sizes, and what they're made of
-
-(The above is the caption for the table.) Pandoc also supports
-multi-line tables:
-
--------- -----------------------
-keyword text
--------- -----------------------
-red Sunsets, apples, and
-other red or reddish
-things.
-
-green Leaves, grass, frogs
-and other things it's
-not easy being.
--------- -----------------------
-
-A horizontal rule follows.
-
-***
-
-Here's a definition list:
-
-apples
-: Good for making applesauce.
-oranges
-: Citrus!
-tomatoes
-: There's no "e" in tomatoe.
-
-Again, text is indented 4 spaces. (Put a blank line between each
-term/definition pair to spread things out more.)
-
-Here's a "line block":
-
-| Line one
-| Line too
-| Line tree
-
-and images can be specified like so:
-
-![example image](/jumbotron.webp "An exemplary image")
-
-Inline math equations go in like so: $\omega = d\phi / dt$. Display
-math should get its own line and be put in in double-dollarsigns:
-
-$$I = \int \rho R^{2} dV$$
-
-And note that you can backslash-escape any punctuation characters
-which you wish to be displayed literally, ex.: \`foo\`, \*bar\*, etc.
diff --git a/yarn.lock b/yarn.lock
index 4629236..b735dcd 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -12,7 +12,7 @@
resolved "https://registry.yarnpkg.com/@alloc/quick-lru/-/quick-lru-5.2.0.tgz#7bf68b20c0a350f936915fcae06f58e32007ce30"
integrity sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==
-"@babel/runtime@^7.20.7":
+"@babel/runtime@^7.20.7", "@babel/runtime@^7.21.0":
version "7.22.6"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.6.tgz#57d64b9ae3cff1d67eb067ae117dac087f5bd438"
integrity sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ==
@@ -579,6 +579,13 @@ damerau-levenshtein@^1.0.8:
resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz#b43d286ccbd36bc5b2f7ed41caf2d0aba1f8a6e7"
integrity sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==
+date-fns@^2.30.0:
+ version "2.30.0"
+ resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz#f367e644839ff57894ec6ac480de40cae4b0f4d0"
+ integrity sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==
+ dependencies:
+ "@babel/runtime" "^7.21.0"
+
debug@^3.2.7:
version "3.2.7"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a"