diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2023-07-16 00:38:39 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2023-07-16 00:38:39 -0400 |
| commit | 8fbaca0d8ec9dc1323facb7f4c0029e32cfe5223 (patch) | |
| tree | aa70287f852525a93d9c25f357b077e85f0e9765 | |
| parent | 8c1cf540c998d554b10282292edeb28b74349297 (diff) | |
| download | alure-website-8fbaca0d8ec9dc1323facb7f4c0029e32cfe5223.tar.gz alure-website-8fbaca0d8ec9dc1323facb7f4c0029e32cfe5223.tar.bz2 alure-website-8fbaca0d8ec9dc1323facb7f4c0029e32cfe5223.zip | |
Working travel advisor*
| -rw-r--r-- | app/travel-advisory/countries.json | 371 | ||||
| -rw-r--r-- | app/travel-advisory/page.js | 62 |
2 files changed, 416 insertions, 17 deletions
diff --git a/app/travel-advisory/countries.json b/app/travel-advisory/countries.json index 3fb16d8..7d031c1 100644 --- a/app/travel-advisory/countries.json +++ b/app/travel-advisory/countries.json @@ -3,41 +3,103 @@ { "name": "Anatoli", "status": 0, + "image": "", + "settlements": [ + { + "name": "Anatoli City", + "status": 0 + }, + { + "name": "Wairua", + "status": 0 + }, + { + "name": "Vremya", + "status": 0 + } + ], "history": [] }, { "name": "Auckland", "status": 0, + "image": "", + "settlements": [ + { + "name": "Settlement 1", + "status": 0 + } + ], "history": [] }, { "name": "Aura Regions, The", "status": 0, + "image": "", + "settlements": [ + { + "name": "Baxford", + "status": 0 + }, + { + "name": "Energy Cove", + "status": 0 + }, + { + "name": "Motley Island", + "status": 0 + }, + { + "name": "Treasure Island", + "status": 0 + } + + ], "history": [] }, { "name": "Birch Boat Town", "status": 0, + "image": "", + "settlements": [], "history": [] }, { "name": "Birch Lodges Community Town", "status": 0, + "image": "", + "settlements": [], "history": [] }, { "name": "Country Warp", "status": 0, + "image": "", + "settlements": [ + { + "name": "Settlement 1", + "status": 0 + } + ], "history": [] }, { "name": "Eagle City", "status": 0, + "image": "", + "settlements": [], "history": [] }, { "name": "Fegal", "status": 3, + "image": "", + "settlements": [ + { + "name": "Settlement 1", + "status": 0 + } + ], "history": [ "May 17th 2023: Fegal has border security issues and it has not been solved as of now." ] @@ -45,16 +107,80 @@ { "name": "Halcandra", "status": 0, + "image": "", + "settlements": [ + { + "name": "Settlement 1", + "status": 0 + } + ], "history": [] }, { "name": "Inkytown", "status": 0, + "image": "", + "settlements": [], "history": [] }, { "name": "Kemonomimi Republic, The", "status": 1, + "image": "", + "settlements": [ + { + "name": "Melanie City", + "status": 0 + }, + { + "name": "Shishiro", + "status": 0 + }, + { + "name": "Koinu", + "status": 0 + }, + { + "name": "Akiyama", + "status": 0 + }, + { + "name": "Elysia", + "status": 0 + }, + { + "name": "Sakamoto", + "status": 0 + }, + { + "name": "Tsumugi", + "status": 0 + }, + { + "name": "Inugake", + "status": 0 + }, + { + "name": "Amatsuka", + "status": 0 + }, + { + "name": "Calliope", + "status": 0 + }, + { + "name": "Rocco Town", + "status": 0 + }, + { + "name": "Imari", + "status": 0 + }, + { + "name": "Kessoku Island", + "status": 0 + } + ], "history": [ "July 15: KR has internal power issues between the President and Govenor. Governor was trying to form a new government under \"KSSR\"." ] @@ -62,85 +188,322 @@ { "name": "Knowle Regions, The", "status": 0, + "image": "", + "settlements": [ + { + "name": "Settlement 1", + "status": 0 + } + ], "history": [] }, { "name": "Lion Land", "status": 0, + "image": "", + "settlements": [ + { + "name": "Settlement 1", + "status": 0 + } + ], "history": [] }, { "name": "Mart's Extraordinarily Sublime State", "status": 0, + "image": "", + "settlements": [ + { + "name": "Settlement 1", + "status": 0 + } + ], "history": [] }, { "name": "Mojave", "status": 0, + "image": "", + "settlements": [ + { + "name": "Hebrith", + "status": 0 + }, + { + "name": "Symbelton", + "status": 0 + }, + { + "name": "Wetlands", + "status": 0 + } + ], "history": [] }, { "name": "Open Republic, The", "status": 0, + "image": "", + "settlements": [ + { + "name": "New Clygro Town", + "status": 0 + }, + { + "name": "New Clygro City", + "status": 0 + }, + { + "name": "New Clygro Town Industrial Estate", + "status": 0 + }, + { + "name": "Westvalley", + "status": 0 + }, + { + "name": "North Coastal Town", + "status": 0 + }, + { + "name": "Old Village", + "status": 0 + }, + { + "name": "Red Island City", + "status": 0 + }, + { + "name": "Pink Island", + "status": 0 + }, + { + "name": "Blue Island", + "status": 0 + }, + { + "name": "Purple Island", + "status": 0 + }, + { + "name": "Yellowtown", + "status": 0 + }, + { + "name": "Delancy", + "status": 0 + }, + { + "name": "Bordertown", + "status": 0 + }, + { + "name": "Small Village", + "status": 0 + }, + { + "name": "Murmur Town", + "status": 0 + } + ], "history": [] }, { "name": "PLC", "status": 0, + "image": "", + "settlements": [ + { + "name": "Settlement 1", + "status": 0 + } + ], "history": [] }, { "name": "Plutonia Imperium", "status": 0, + "image": "", + "settlements": [ + { + "name": "Settlement 1", + "status": 0 + } + ], "history": [] }, { "name": "Solstice, The Federal Democracy of", "status": 0, + "image": "", + "settlements": [ + { + "name": "Firefly", + "status": 0 + }, + { + "name": "Szki Lanes", + "status": 0 + }, + { + "name": "Prehevil", + "status": 0 + } + ], "history": [] }, { "name": "Southeastern Islands, The", "status": 2, + "image": "", + "settlements": [ + { + "name": "Swamp Island", + "status": 0 + }, + { + "name": "Forêt Québec", + "status": 3 + }, + { + "name": "Longhorn Hills", + "status": 0 + }, + { + "name": "Nexus Underground", + "status": 0 + } + ], "history": [ - "July 15: A disease has been going around Foret Quebec", - "Foret Quebec has been dealing with environmental issues" + "July 15: A disease has been going around Forêt Québec, we have decided to put border control in the exit of Alure Regions to SEI" ] }, { "name": "Sulópolis", "status": 0, + "image": "", + "settlements": [ + { + "name": "Settlement 1", + "status": 0 + } + ], "history": [] }, - { + { "name": "TAY", "status": 0, + "image": "", + "settlements": [ + { + "name": "Victor's Interesting City", + "status": 0 + }, + { + "name": "Rogueport", + "status": 0 + }, + { + "name": "Seven Eleven Rainforest", + "status": 0 + }, + { + "name": "Palinode", + "status": 0 + }, + { + "name": "Midcity", + "status": 0 + }, + { + "name": "Scion of Linda", + "status": 0 + }, + { + "name": "Jeremy Forest", + "status": 0 + }, + { + "name": "The Eternal Canteloupe", + "status": 0 + }, + { + "name": "September Sands", + "status": 0 + }, + { + "name": "Belindan Slopes", + "status": 0 + }, + { + "name": "Turing Town", + "status": 0 + }, + { + "name": "Bell Tower", + "status": 0 + }, + { + "name": "Szloch-by-sea", + "status": 0 + } + ], "history": [] }, { "name": "Union of Soviet Sovereign Republics", "status": 0, + "image": "", + "settlements": [ + { + "name": "Settlement 1", + "status": 0 + } + ], "history": [] }, { "name": "Veronian Controlled Territories", "status": 0, + "image": "", + "settlements": [ + { + "name": "Settlement 1", + "status": 0 + } + ], "history": [] }, { "name": "Whale City, The Republic of", "status": 0, + "image": "", + "settlements": [], "history": [] }, { "name": "Yavno, The Federation of", "status": 0, + "settlements": [ + { + "name": "Settlement 1", + "status": 0 + } + ], "history": [] }, { "name": "You on Kazoo, The Republic of", "status": 0, + "image": "", + "settlements": [ + { + "name": "Settlement 1", + "status": 0 + } + ], "history": [] } ] -}
\ No newline at end of file +} diff --git a/app/travel-advisory/page.js b/app/travel-advisory/page.js index 5db351c..f1442aa 100644 --- a/app/travel-advisory/page.js +++ b/app/travel-advisory/page.js @@ -1,4 +1,4 @@ -import { readFileSync } from "fs"; +import countriesData from './countries.json' assert { type: 'json' }; export const metadata = { title: 'Travel Advisory', @@ -6,12 +6,53 @@ export const metadata = { } export async function getCountries(){ - const files = readdirSync('./countries.json'); + const countries = countriesData.countries; + return countries.map((country) => { + let dangerLevel; + switch (country.status) { + case 0: + dangerLevel = "Take normal security precautions" + break; + case 1: + dangerLevel = "Exercise a high degree of caution" + break; + case 2: + dangerLevel = "Avoid non-essential travel" + break; + case 3: + dangerLevel = "Avoid all travel" + break; + } + return ( + <div key="countries" + 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">{dangerLevel}</h2> + <div className="flex flex-row space-x-3"> + <button className="bg-blue-600 px-4 py-2">Information</button> + <button className="hidden bg-blue-600 px-4 py-2 settlements">View settlements</button> + <div className="hidden settlements-active:visible"> + <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> + </div> + </div> + </div> + </div> + ) + }) } export default async function TravelAdvisory(){ + const countries = await getCountries(); return ( <main className="flex flex-col"> <div className="bg-center bg-no-repeat bg-[url('/jumbotron.webp')] bg-gray-700 bg-blend-multiply"> @@ -43,21 +84,16 @@ export default async function TravelAdvisory(){ </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 <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 "> + { /*<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> + <div className="flex flex-row space-x-3"> <button className="bg-blue-600 px-4 py-2">Information</button> + </div> </div> - </div> + </div> */ } + {countries} </main> ) } |
