Fix revival links and show un-reviewed revivals as such on their review pages

This commit is contained in:
Lewin Kelly 2023-07-19 17:24:33 +01:00
parent c096f59913
commit e368722b9f
No known key found for this signature in database
GPG Key ID: C103AD9C84014FD7
3 changed files with 32 additions and 26 deletions

View File

@ -43,6 +43,7 @@
<hr class="mb-4 mt-3" /> <hr class="mb-4 mt-3" />
{#if data.rating}
<div class="content pt-0.01 text-justify"> <div class="content pt-0.01 text-justify">
<div class="post mb-10"> <div class="post mb-10">
<svelte:component this={data.content} /> <svelte:component this={data.content} />
@ -61,12 +62,19 @@
</td> </td>
<td class:pt-4={category == "overall"}> <td class:pt-4={category == "overall"}>
<Stars <Stars
rating={ratingCategories[category]} /> rating={ratingCategories[
category
]} />
</td> </td>
</tr> </tr>
{/each} {/each}
</table> </table>
</div> </div>
{:else}
<h2 class="font-300 text-center tracking-wide">
This revival has not yet been reviewed. Watch this space!
</h2>
{/if}
</div> </div>
</div> </div>
</article> </article>

View File

@ -10,8 +10,6 @@ export async function load({ params }) {
throw error(404, "Revival not found") throw error(404, "Revival not found")
} }
if (!data.metadata.rating) throw error(404, "Revival not found")
let revivals = await (await loadParent()).revivals let revivals = await (await loadParent()).revivals
// remove the current revival from the list // remove the current revival from the list

View File

@ -36,7 +36,7 @@
<div class="grid gap-4 md:grid-cols-2 xl:grid-cols-3"> <div class="grid gap-4 md:grid-cols-2 xl:grid-cols-3">
{#each revivals as revival} {#each revivals as revival}
<a <a
href={revival.rating ? `/revival/${revival.path}` : "/"} href="/revival/{revival.path}"
class="txt bg-#1f1c1d @light:bg-white rounded-2 class="txt bg-#1f1c1d @light:bg-white rounded-2
@light:text-black box-border flex flex-col p-5 text-white @light:text-black box-border flex flex-col p-5 text-white
{revival?.rating ? 'card transition hover:shadow-xl' : 'pointer-events-none'}"> {revival?.rating ? 'card transition hover:shadow-xl' : 'pointer-events-none'}">