diff --git a/README.md b/README.md index 83dbafe..44d5084 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,11 @@ A Revival description must include a "---" line between a short overview and the "name": "Mercury", "date": "2023-07-09 01:58 PM", "clients": [2013], - "rating": 5 + "rating": { + "website": 5, + "community": 5, + "clients": 5, + "overall": 5 + } } ``` diff --git a/pages/index/finobe.md b/pages/index/finobe.md index f294a40..7216e6e 100644 --- a/pages/index/finobe.md +++ b/pages/index/finobe.md @@ -3,7 +3,12 @@ "name": "Finobe", "date": "2023-07-09 01:58 PM", "clients": [2012, 2016], - "rating": 4 + "rating": { + "website": 4, + "community": 4, + "clients": 4, + "overall": 4 + } } ``` diff --git a/pages/index/goodblox.md b/pages/index/goodblox.md index ad18028..5ea2d61 100644 --- a/pages/index/goodblox.md +++ b/pages/index/goodblox.md @@ -3,7 +3,12 @@ "name": "Goodblox", "date": "2023-07-09 01:58 PM", "clients": [2009], - "rating": 4.5 + "rating": { + "website": 4.5, + "community": 4.5, + "clients": 4.5, + "overall": 4.5 + } } ``` diff --git a/pages/index/hamblox.md b/pages/index/hamblox.md index fa1eed5..337b982 100644 --- a/pages/index/hamblox.md +++ b/pages/index/hamblox.md @@ -3,7 +3,12 @@ "name": "Hamblox", "date": "2023-07-09 01:58 PM", "clients": [2015], - "rating": 3.7 + "rating": { + "website": 3.7, + "community": 3.7, + "clients": 3.7, + "overall": 3.7 + } } ``` diff --git a/pages/index/idk18.md b/pages/index/idk18.md index 1d980db..249874b 100644 --- a/pages/index/idk18.md +++ b/pages/index/idk18.md @@ -3,7 +3,12 @@ "name": "idk18", "date": "2023-07-09 01:58 PM", "clients": [2018], - "rating": 1.7 + "rating": { + "website": 1.7, + "community": 1.7, + "clients": 1.7, + "overall": 1.7 + } } ``` diff --git a/pages/index/kapish.md b/pages/index/kapish.md index b27fe5e..254a195 100644 --- a/pages/index/kapish.md +++ b/pages/index/kapish.md @@ -1,13 +1,18 @@ ```json { - "name": "kapish", + "name": "Kapish", "date": "2023-07-09 01:58 PM", "clients": [2014, 2016], - "rating": 2.3 + "rating": { + "website": 2.3, + "community": 2.3, + "clients": 2.3, + "overall": 2.3 + } } ``` -kapish is a revival +Kapish is a revival --- diff --git a/pages/index/krypton.md b/pages/index/krypton.md index 5824ede..e5b3955 100644 --- a/pages/index/krypton.md +++ b/pages/index/krypton.md @@ -3,7 +3,12 @@ "name": "Krypton", "date": "2023-07-09 01:58 PM", "clients": [2011], - "rating": 4.7 + "rating": { + "website": 4.7, + "community": 4.7, + "clients": 4.7, + "overall": 4.7 + } } ``` diff --git a/pages/index/mercury.md b/pages/index/mercury.md index b6ff337..7aa463e 100644 --- a/pages/index/mercury.md +++ b/pages/index/mercury.md @@ -3,7 +3,12 @@ "name": "Mercury", "date": "2023-07-09 01:58 PM", "clients": [2013], - "rating": 5 + "rating": { + "website": 5, + "community": 5, + "clients": 5, + "overall": 5 + } } ``` diff --git a/pages/index/meteorite.md b/pages/index/meteorite.md index 0d18dd3..a05f995 100644 --- a/pages/index/meteorite.md +++ b/pages/index/meteorite.md @@ -3,7 +3,12 @@ "name": "Meteorite", "date": "2023-07-09 01:58 PM", "clients": [2016, 2020], - "rating": 2.7 + "rating": { + "website": 2.7, + "community": 2.7, + "clients": 2.7, + "overall": 2.7 + } } ``` diff --git a/pages/index/rawblox.md b/pages/index/rawblox.md index 9401cef..fc8782b 100644 --- a/pages/index/rawblox.md +++ b/pages/index/rawblox.md @@ -3,7 +3,12 @@ "name": "Rawblox", "date": "2023-07-09 01:58 PM", "clients": [2017], - "rating": 1 + "rating": { + "website": 1, + "community": 1, + "clients": 1, + "overall": 1 + } } ``` diff --git a/pages/index/tadah.md b/pages/index/tadah.md index a68637e..ae5ec08 100644 --- a/pages/index/tadah.md +++ b/pages/index/tadah.md @@ -3,7 +3,12 @@ "name": "Tadah", "date": "2023-07-09 01:58 PM", "clients": [2010, 2012, 2014, 2016], - "rating": 3.5 + "rating": { + "website": 3.5, + "community": 3.5, + "clients": 3.5, + "overall": 3.5 + } } ``` diff --git a/pages/pages.js b/pages/pages.js index 1bc8cb5..93838d8 100644 --- a/pages/pages.js +++ b/pages/pages.js @@ -37,7 +37,7 @@ allMdFiles.forEach(file => { // Get json data from the top of the file const [json, content] = md - .match(/^```json[\s\S]*({[\s\S]+})[\s\S]*```\n*([\s\S]+)$/) + .match(/^```json[\s\S]*?({[\s\S]+})[\s\S]*```\n*([\s\S]+)$/) .slice(1, 3) let obj diff --git a/src/routes/index/+page.svelte b/src/routes/index/+page.svelte index 32b8956..d0fa6a5 100644 --- a/src/routes/index/+page.svelte +++ b/src/routes/index/+page.svelte @@ -48,7 +48,8 @@ {@html revival.overview} -
+
+ Rating:
diff --git a/src/routes/index/+page.ts b/src/routes/index/+page.ts index cb08636..41ef591 100644 --- a/src/routes/index/+page.ts +++ b/src/routes/index/+page.ts @@ -11,7 +11,7 @@ export async function load() { name, date, clients, - rating, + rating: rating.overall, overview, path: path.match(/(\w+)\.json/)?.[1], } diff --git a/src/routes/revival/[revival]/+page.server.ts b/src/routes/revival/[revival]/+page.server.ts index 4bfcc33..cdd5bdb 100644 --- a/src/routes/revival/[revival]/+page.server.ts +++ b/src/routes/revival/[revival]/+page.server.ts @@ -5,7 +5,13 @@ export async function load({ params }) { let name: string, date: Date, clients: number[], - rating: number, + rating: { + website: number + community: number + development: number + clients: number + overall: number + }, html: string try { diff --git a/src/routes/revival/[revival]/+page.svelte b/src/routes/revival/[revival]/+page.svelte index 72ab7db..3fd10ed 100644 --- a/src/routes/revival/[revival]/+page.svelte +++ b/src/routes/revival/[revival]/+page.svelte @@ -11,6 +11,8 @@ }) export let data + + const ratingCategories: { [k: string]: number } = data.rating @@ -32,14 +34,25 @@
-
- {@html data.html} -
+
+
+ {@html data.html} +
-
- Rating: - -
+

Rating

+ + + {#each Object.keys(ratingCategories) as category} + + + + + {/each} +
+ {category.charAt(0).toUpperCase() + + category.slice(1)} +
+