Add light mode, hover effects, and improve colours
This commit is contained in:
parent
f0529c0cb0
commit
afc45328cf
|
|
@ -1,28 +1,44 @@
|
||||||
@font-face
|
@font-face
|
||||||
font-family: "Inter"
|
font-family: "Inter"
|
||||||
src: url("/Inter.woff2") format("woff2"), url("/Inter.ttf") format("ttf")
|
src: url("/Inter.woff2") format("woff2"), url("/Inter.ttf") format("ttf")
|
||||||
|
font-display: swap
|
||||||
|
|
||||||
@font-face
|
@font-face
|
||||||
font-family: "Inter"
|
font-family: "Inter"
|
||||||
src: url("/InterItalic.woff2") format("woff2"), url("/InterItalic.ttf") format("ttf")
|
src: url("/InterItalic.woff2") format("woff2"), url("/InterItalic.ttf") format("ttf")
|
||||||
font-style: italic
|
font-style: italic
|
||||||
|
font-display: swap
|
||||||
|
|
||||||
:root, body
|
:root, body
|
||||||
padding: 0
|
padding: 0
|
||||||
margin: 0
|
margin: 0
|
||||||
background: #100f0e
|
background: #100f0e
|
||||||
color: white
|
color: white
|
||||||
|
@media (prefers-color-scheme: light)
|
||||||
|
background: #e6e4e3
|
||||||
|
color: black
|
||||||
|
|
||||||
font-family: "Inter", sans-serif
|
font-family: "Inter", sans-serif
|
||||||
|
|
||||||
a
|
a
|
||||||
@apply transition-colors text-orange-500
|
@apply transition-colors
|
||||||
text-decoration: none
|
text-decoration: none
|
||||||
&:hover
|
&:not(.txt)
|
||||||
@apply text-orange-300
|
@apply text-orange-500
|
||||||
|
&:hover
|
||||||
|
@apply text-orange-300
|
||||||
|
@media (prefers-color-scheme: light)
|
||||||
|
@apply text-orange-700
|
||||||
|
.txt
|
||||||
|
@apply text-white
|
||||||
|
&:hover
|
||||||
|
@apply text-#aaa
|
||||||
|
|
||||||
hr
|
hr
|
||||||
border: none
|
border: none
|
||||||
border-top: 1px solid #464443
|
border-top: 1px solid #464443
|
||||||
|
@media (prefers-color-scheme: light)
|
||||||
|
border-top: 1px solid #a6a4a3
|
||||||
|
|
||||||
::-webkit-scrollbar
|
::-webkit-scrollbar
|
||||||
position: fixed
|
position: fixed
|
||||||
|
|
@ -32,13 +48,22 @@ hr
|
||||||
background: none
|
background: none
|
||||||
&-thumb
|
&-thumb
|
||||||
border-radius: 0.2rem
|
border-radius: 0.2rem
|
||||||
|
|
||||||
background: #282625
|
background: #282625
|
||||||
&:hover
|
&:hover
|
||||||
background: #464443
|
background: #464443
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: light)
|
||||||
|
background: white
|
||||||
|
&:hover
|
||||||
|
background: #a6a4a3
|
||||||
|
|
||||||
// Utility classes
|
// Utility classes
|
||||||
|
|
||||||
.bg-a
|
.bg-a
|
||||||
background: #1f1c1d
|
background: #1f1c1d
|
||||||
|
@media (prefers-color-scheme: light)
|
||||||
|
background: white
|
||||||
|
|
||||||
.bg-bg
|
.bg-bg
|
||||||
background: #100f0e
|
background: #100f0e
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<footer class="mt-a p-5 pt-12 text-center text-#8c8b8a">
|
<footer class="mt-a p-5 pt-12 text-center text-#8c8b8a @light:text-#4c4b4a">
|
||||||
<a href="/" class="pe-1.5">Revival Archive</a>
|
<a href="/" class="pe-1.5">Revival Archive</a>
|
||||||
2023-2023
|
2023-2023
|
||||||
<nav class="text-white mt-5 mb-4">
|
<nav class="text-white mt-5 mb-4">
|
||||||
|
|
@ -11,10 +11,19 @@
|
||||||
<style lang="sass">
|
<style lang="sass">
|
||||||
nav
|
nav
|
||||||
color: #8c8b8a
|
color: #8c8b8a
|
||||||
|
@media (prefers-color-scheme: light)
|
||||||
|
color: #4c4b4a
|
||||||
a
|
a
|
||||||
|
text-decoration: none
|
||||||
|
|
||||||
color: white
|
color: white
|
||||||
&:hover
|
&:hover
|
||||||
color: #aaa
|
color: #aaa
|
||||||
text-decoration: none
|
|
||||||
|
@media (prefers-color-scheme: light)
|
||||||
|
color: black
|
||||||
|
&:hover
|
||||||
|
color: #888
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="bg-#282625 px-6">
|
<div class="bg-#282625 @light:bg-white px-6">
|
||||||
<span class="inline-block pt-3 pb-3">
|
<span class="inline-block pt-3 pb-3">
|
||||||
<a href="/" class="text-light hover:text-#aaa text-xl font-light mb-5">
|
<a href="/" class="txt text-white @light:text-black hover:text-#aaa text-xl font-light mb-5">
|
||||||
Revival Archive
|
Revival Archive
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -16,8 +16,13 @@
|
||||||
|
|
||||||
<style lang="sass">
|
<style lang="sass">
|
||||||
.navlink
|
.navlink
|
||||||
@apply no-underline text-white px-2 me-1 rounded-1 transition
|
@apply no-underline px-2 me-1 rounded-1 transition
|
||||||
font-size: 0.9rem
|
font-size: 0.9rem
|
||||||
|
|
||||||
|
color: white
|
||||||
|
@media (prefers-color-scheme: light)
|
||||||
|
color: black
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
@apply text-#aaa
|
@apply text-#aaa
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,9 @@
|
||||||
<style lang="sass">
|
<style lang="sass">
|
||||||
div
|
div
|
||||||
// Fill each star with a gradient based on the rating
|
// Fill each star with a gradient based on the rating
|
||||||
background: linear-gradient( to right, #f1c40f var(--rating), #f1c40f var(--rating), #7f7d7c var(--rating), #7f7d7c var(--rating), #7f7d7c)
|
background: linear-gradient(to right, #f1c40f var(--rating), #4f4d4c var(--rating))
|
||||||
|
@media (prefers-color-scheme: light)
|
||||||
|
background: linear-gradient(to right, #f1c40f var(--rating), #bfbdbc var(--rating))
|
||||||
|
|
||||||
// APply a mask to hide the gradient outside the star
|
// APply a mask to hide the gradient outside the star
|
||||||
-webkit-mask: url(/star.svg) no-repeat
|
-webkit-mask: url(/star.svg) no-repeat
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<div class="flex flex-col justify-center items-center h-72vh">
|
<div class="flex flex-col justify-center items-center h-72vh">
|
||||||
<div class="bg-a p-8 px-22 rounded-4 light-text text-center">
|
<div class="bg-a p-8 px-22 rounded-4 text-center">
|
||||||
<h1 class="light-text m-0 mb-5 text-2.2rem">Error {$page.status}</h1>
|
<h1 class="m-0 mb-5 text-2.2rem">Error {$page.status}</h1>
|
||||||
{$page.error?.message}
|
{$page.error?.message}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,10 @@
|
||||||
<h1>Posts</h1>
|
<h1>Posts</h1>
|
||||||
|
|
||||||
{#each data.posts as post}
|
{#each data.posts as post}
|
||||||
<a href="/blog/{post.path}" class="text-white hover:text-#aaa">
|
<a href="/blog/{post.path}" class="txt text-white @light:text-dark
|
||||||
<article class="bg-a py-3 px-6 rounded-5 mb-4">
|
hover:text-#ccc @light:hover:text-#555 block bg-a rounded-3
|
||||||
|
transition durition-500 hover:shadow-xl box-border">
|
||||||
|
<article class="py-3 px-6 mb-4">
|
||||||
<h2 class="my-2">{post.title}</h2>
|
<h2 class="my-2">{post.title}</h2>
|
||||||
<p class="my-2">
|
<p class="my-2">
|
||||||
Published {new Date(post.date).toLocaleDateString("en-GB", {
|
Published {new Date(post.date).toLocaleDateString("en-GB", {
|
||||||
|
|
@ -24,3 +26,8 @@
|
||||||
</article>
|
</article>
|
||||||
</a>
|
</a>
|
||||||
{/each}
|
{/each}
|
||||||
|
|
||||||
|
<style lang="sass">
|
||||||
|
a:hover
|
||||||
|
transform: translateY(-0.15rem)
|
||||||
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,24 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
const years: { [k: number]: string } = {
|
const years: { [k: number]: string } = {
|
||||||
2009: "bg-red-600",
|
2008: "bg-pink-700",
|
||||||
|
2009: "bg-rose-400 text-black",
|
||||||
|
2010: "bg-red-600",
|
||||||
2011: "bg-orange-500 text-black",
|
2011: "bg-orange-500 text-black",
|
||||||
2012: "bg-yellow-500 text-black",
|
2012: "bg-yellow-500 text-black",
|
||||||
2013: "bg-green-600",
|
2013: "bg-lime-500 text-black",
|
||||||
2014: "bg-teal-600",
|
2014: "bg-emerald-600 text-black",
|
||||||
2016: "bg-blue-600",
|
2015: "bg-cyan-600 text-black",
|
||||||
2018: "bg-indigo-600",
|
2016: "bg-blue-600 ",
|
||||||
2020: "bg-purple-600",
|
2017: "bg-indigo-600",
|
||||||
|
2018: "bg-violet-400 text-black",
|
||||||
|
2019: "bg-purple-600",
|
||||||
|
2020: "bg-slate-600",
|
||||||
}
|
}
|
||||||
|
|
||||||
const revivals = [
|
const revivals = [
|
||||||
{
|
{
|
||||||
name: "Mercury",
|
name: "Mercury",
|
||||||
years: [2013],
|
years: [2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020],
|
||||||
rating: 5,
|
rating: 5,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -24,31 +29,31 @@
|
||||||
{
|
{
|
||||||
name: "Finobe",
|
name: "Finobe",
|
||||||
years: [2012, 2016],
|
years: [2012, 2016],
|
||||||
rating: 4.5
|
rating: 4.5,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Meteorite",
|
name: "Meteorite",
|
||||||
years: [2016, 2020],
|
years: [2016, 2020],
|
||||||
rating: 2.65,
|
rating: 2.65,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Tadah",
|
||||||
|
years: [2010, 2012, 2014, 2016],
|
||||||
|
rating: 3.5,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "Krypton",
|
name: "Krypton",
|
||||||
years: [2011],
|
years: [2011],
|
||||||
rating: 4.65,
|
rating: 4.65,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Tadah",
|
name: "Hamblox",
|
||||||
years: [2014],
|
years: [2015],
|
||||||
rating: 3.5,
|
rating: 4.65,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Kapish",
|
name: "Rawblox",
|
||||||
years: [2014],
|
years: [2017],
|
||||||
rating: 2.35,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Fobe",
|
|
||||||
years: [2016],
|
|
||||||
rating: 1,
|
rating: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -56,6 +61,11 @@
|
||||||
years: [2018],
|
years: [2018],
|
||||||
rating: 1.65,
|
rating: 1.65,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Kapish",
|
||||||
|
years: [2014, 2016],
|
||||||
|
rating: 2.35,
|
||||||
|
},
|
||||||
]
|
]
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -67,12 +77,17 @@
|
||||||
|
|
||||||
<div class="grid md:grid-cols-2 xl:grid-cols-3 gap-4">
|
<div class="grid md:grid-cols-2 xl:grid-cols-3 gap-4">
|
||||||
{#each revivals as revival}
|
{#each revivals as revival}
|
||||||
<div class="bg-#1f1c1d p-5 rounded-2 flex flex-col">
|
<a
|
||||||
|
href="/index"
|
||||||
|
class="txt bg-#1f1c1d @light:bg-white p-5 rounded-2 flex flex-col
|
||||||
|
card transition durition-500 hover:shadow-xl box-border
|
||||||
|
text-white @light:text-black">
|
||||||
<h2 class="m-0 mb-1">{revival.name}</h2>
|
<h2 class="m-0 mb-1">{revival.name}</h2>
|
||||||
<div>
|
<div class="text-white flex flex-wrap">
|
||||||
{#each revival.years as year}
|
{#each revival.years as year}
|
||||||
<span
|
<span
|
||||||
class="rounded-full {years[year]} px-2 py-0.5 text-sm me-2">
|
class="{years[year]}
|
||||||
|
rounded-full px-2 py-0.5 my-1 text-sm me-2">
|
||||||
{year}
|
{year}
|
||||||
</span>
|
</span>
|
||||||
{/each}
|
{/each}
|
||||||
|
|
@ -84,6 +99,11 @@
|
||||||
<div class="mt-a ms-a">
|
<div class="mt-a ms-a">
|
||||||
<Stars rating={revival.rating} />
|
<Stars rating={revival.rating} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</a>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<style lang="sass">
|
||||||
|
.card:hover
|
||||||
|
transform: translateY(-0.3rem)
|
||||||
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue