Fix some styling issues and add example posts and revivals to fix build issues

This commit is contained in:
Lewin Kelly 2023-07-19 17:16:54 +01:00
parent c81b285382
commit 9a44ad2358
No known key found for this signature in database
GPG Key ID: C103AD9C84014FD7
7 changed files with 29 additions and 6 deletions

6
pages/blog/welcome.md Normal file
View File

@ -0,0 +1,6 @@
---
title: Welcome!
date: 2023-07-19 05:08 PM
---
Welcome to the Revival Archive!

View File

@ -1,7 +1,8 @@
---
# Save as /pages/blog/{whatever}.md
# Try not to have spaces in the filename
title: Second blog post
title: Second blog post # Two posts shouldn't have the same title
# Date will show as "Not yet published" if omitted
date: 2023-07-09 11:40 AM # Must be in any valid JS date format
# updated: 2023-07-12 05:52 AM

View File

@ -1,7 +1,8 @@
---
# Save as /pages/revivals/{whatever}.md
# Try not to have spaces in the filename
name: Mercury
name: Mercury # Two revivals shouldn't have the same name
date: 2023-07-09 01:58 PM # Must be in any valid JS date format
logo: mercury.svg # Optional, stored in /static/logos/{whatever}
clients: # Optional, list of client years available

11
pages/revivals/mercury.md Normal file
View File

@ -0,0 +1,11 @@
---
# Save as /pages/revivals/{whatever}.md
name: Mercury
logo: mercury.svg
clients:
- 2013
overview: |
Example revival
---

View File

@ -10,7 +10,7 @@
</svelte:head>
<div class="xl:max-w-300 flex flex-col xl:flex-row">
<article class="max-w-180 pt-8">
<article class="xl:w-180 pt-8">
<div class="-ms-4">
<a href="/blog" class="hover:text-#888">← Back to blog</a>
<div class="ms-4">

View File

@ -4,7 +4,10 @@
export let data
const reviews = data.reviews
// Filter only revivals with reviews and ratings
.filter(revival => revival.rating)
// Sort by non-defunct revivals first, then by rating
.sort((a, b) => (a.defunct ? 1 : 0) - (b.defunct ? 1 : 0))
.sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime())
</script>

View File

@ -17,9 +17,10 @@
export let data
const revivals = data.revivals.sort(
(a, b) => (b?.rating?.overall || 0) - (a?.rating?.overall || 0)
)
const revivals = data.revivals
// Sort by non-defunct revivals first, then by rating
.sort((a, b) => (a.defunct ? 1 : 0) - (b.defunct ? 1 : 0))
.sort((a, b) => (b?.rating?.overall || 0) - (a?.rating?.overall || 0))
</script>
<svelte:head>