Add rating categories for each revival: Website, Community, Clients, and Overall

This commit is contained in:
Lewin Kelly 2023-07-09 15:04:34 +01:00
parent beca0d5e14
commit 0dcdf009b8
No known key found for this signature in database
GPG Key ID: C103AD9C84014FD7
16 changed files with 99 additions and 24 deletions

View File

@ -20,6 +20,11 @@ A Revival description must include a "---" line between a short overview and the
"name": "Mercury", "name": "Mercury",
"date": "2023-07-09 01:58 PM", "date": "2023-07-09 01:58 PM",
"clients": [2013], "clients": [2013],
"rating": 5 "rating": {
"website": 5,
"community": 5,
"clients": 5,
"overall": 5
}
} }
``` ```

View File

@ -3,7 +3,12 @@
"name": "Finobe", "name": "Finobe",
"date": "2023-07-09 01:58 PM", "date": "2023-07-09 01:58 PM",
"clients": [2012, 2016], "clients": [2012, 2016],
"rating": 4 "rating": {
"website": 4,
"community": 4,
"clients": 4,
"overall": 4
}
} }
``` ```

View File

@ -3,7 +3,12 @@
"name": "Goodblox", "name": "Goodblox",
"date": "2023-07-09 01:58 PM", "date": "2023-07-09 01:58 PM",
"clients": [2009], "clients": [2009],
"rating": 4.5 "rating": {
"website": 4.5,
"community": 4.5,
"clients": 4.5,
"overall": 4.5
}
} }
``` ```

View File

@ -3,7 +3,12 @@
"name": "Hamblox", "name": "Hamblox",
"date": "2023-07-09 01:58 PM", "date": "2023-07-09 01:58 PM",
"clients": [2015], "clients": [2015],
"rating": 3.7 "rating": {
"website": 3.7,
"community": 3.7,
"clients": 3.7,
"overall": 3.7
}
} }
``` ```

View File

@ -3,7 +3,12 @@
"name": "idk18", "name": "idk18",
"date": "2023-07-09 01:58 PM", "date": "2023-07-09 01:58 PM",
"clients": [2018], "clients": [2018],
"rating": 1.7 "rating": {
"website": 1.7,
"community": 1.7,
"clients": 1.7,
"overall": 1.7
}
} }
``` ```

View File

@ -1,13 +1,18 @@
```json ```json
{ {
"name": "kapish", "name": "Kapish",
"date": "2023-07-09 01:58 PM", "date": "2023-07-09 01:58 PM",
"clients": [2014, 2016], "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
--- ---

View File

@ -3,7 +3,12 @@
"name": "Krypton", "name": "Krypton",
"date": "2023-07-09 01:58 PM", "date": "2023-07-09 01:58 PM",
"clients": [2011], "clients": [2011],
"rating": 4.7 "rating": {
"website": 4.7,
"community": 4.7,
"clients": 4.7,
"overall": 4.7
}
} }
``` ```

View File

@ -3,7 +3,12 @@
"name": "Mercury", "name": "Mercury",
"date": "2023-07-09 01:58 PM", "date": "2023-07-09 01:58 PM",
"clients": [2013], "clients": [2013],
"rating": 5 "rating": {
"website": 5,
"community": 5,
"clients": 5,
"overall": 5
}
} }
``` ```

View File

@ -3,7 +3,12 @@
"name": "Meteorite", "name": "Meteorite",
"date": "2023-07-09 01:58 PM", "date": "2023-07-09 01:58 PM",
"clients": [2016, 2020], "clients": [2016, 2020],
"rating": 2.7 "rating": {
"website": 2.7,
"community": 2.7,
"clients": 2.7,
"overall": 2.7
}
} }
``` ```

View File

@ -3,7 +3,12 @@
"name": "Rawblox", "name": "Rawblox",
"date": "2023-07-09 01:58 PM", "date": "2023-07-09 01:58 PM",
"clients": [2017], "clients": [2017],
"rating": 1 "rating": {
"website": 1,
"community": 1,
"clients": 1,
"overall": 1
}
} }
``` ```

View File

@ -3,7 +3,12 @@
"name": "Tadah", "name": "Tadah",
"date": "2023-07-09 01:58 PM", "date": "2023-07-09 01:58 PM",
"clients": [2010, 2012, 2014, 2016], "clients": [2010, 2012, 2014, 2016],
"rating": 3.5 "rating": {
"website": 3.5,
"community": 3.5,
"clients": 3.5,
"overall": 3.5
}
} }
``` ```

View File

@ -37,7 +37,7 @@ allMdFiles.forEach(file => {
// Get json data from the top of the file // Get json data from the top of the file
const [json, content] = md 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) .slice(1, 3)
let obj let obj

View File

@ -48,7 +48,8 @@
{@html revival.overview} {@html revival.overview}
</div> </div>
<div class="mt-a ms-a"> <div class="mt-a ms-a flex">
<span class="me-2">Rating:</span>
<Stars rating={revival.rating} /> <Stars rating={revival.rating} />
</div> </div>
</a> </a>

View File

@ -11,7 +11,7 @@ export async function load() {
name, name,
date, date,
clients, clients,
rating, rating: rating.overall,
overview, overview,
path: path.match(/(\w+)\.json/)?.[1], path: path.match(/(\w+)\.json/)?.[1],
} }

View File

@ -5,7 +5,13 @@ export async function load({ params }) {
let name: string, let name: string,
date: Date, date: Date,
clients: number[], clients: number[],
rating: number, rating: {
website: number
community: number
development: number
clients: number
overall: number
},
html: string html: string
try { try {

View File

@ -11,6 +11,8 @@
}) })
export let data export let data
const ratingCategories: { [k: string]: number } = data.rating
</script> </script>
<svelte:head> <svelte:head>
@ -32,14 +34,25 @@
<hr class="mb-8 mt-3" /> <hr class="mb-8 mt-3" />
<div class="text-justify mb-10"> <article>
{@html data.html} <div class="mb-10 text-justify">
</div> {@html data.html}
</div>
<div class="flex"> <h1>Rating</h1>
<span class="me-2">Rating:</span>
<Stars rating={data.rating} /> <table>
</div> {#each Object.keys(ratingCategories) as category}
<tr>
<td class="pe-6">
{category.charAt(0).toUpperCase() +
category.slice(1)}
</td>
<Stars rating={ratingCategories[category]} />
</tr>
{/each}
</table>
</article>
</div> </div>
</div> </div>
</article> </article>