From 8c1cf540c998d554b10282292edeb28b74349297 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sat, 15 Jul 2023 20:22:10 -0400 Subject: Getting ready to properly add travel advisory; Added additional cities --- app/page.js | 4 +- app/travel-advisory/countries.json | 146 +++++++++++++++++++++++++++++++++ app/travel-advisory/page.js | 20 ++++- components/DateFormatter.js | 9 ++ components/PostPreview.js | 3 +- package.json | 1 + posts/test.md | 163 ------------------------------------- yarn.lock | 9 +- 8 files changed, 186 insertions(+), 169 deletions(-) create mode 100644 app/travel-advisory/countries.json create mode 100644 components/DateFormatter.js delete mode 100644 posts/test.md 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() {
-

Welcome to the Alure Regions

-

The official website of the Government of Alure Regions

+

Welcome to the Alure Regions

+

The official website of the Government of Alure Regions

-

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

+

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

Country name

Take normal security precautions

+

City 1

+

Take normal security precautions

+

City 2

+

Take normal security precautions

+

City 3

+

Take normal security precautions

+

City 4

+

Take normal security precautions

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

{props.title}

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" -- cgit v1.2.3