From afc45328cfdaa7982d1b21feeb81813401deb567 Mon Sep 17 00:00:00 2001 From: Lewin Kelly Date: Sat, 8 Jul 2023 10:01:50 +0100 Subject: [PATCH] Add light mode, hover effects, and improve colours --- src/global.sass | 31 ++++++++++++++-- src/lib/components/Footer.svelte | 13 ++++++- src/lib/components/Navbar.svelte | 11 ++++-- src/lib/components/Stars.svelte | 4 +- src/routes/+error.svelte | 4 +- src/routes/blog/+page.svelte | 11 +++++- src/routes/index/+page.svelte | 64 +++++++++++++++++++++----------- 7 files changed, 103 insertions(+), 35 deletions(-) diff --git a/src/global.sass b/src/global.sass index f6159a7..7beae04 100644 --- a/src/global.sass +++ b/src/global.sass @@ -1,28 +1,44 @@ @font-face font-family: "Inter" src: url("/Inter.woff2") format("woff2"), url("/Inter.ttf") format("ttf") + font-display: swap @font-face font-family: "Inter" src: url("/InterItalic.woff2") format("woff2"), url("/InterItalic.ttf") format("ttf") font-style: italic + font-display: swap :root, body padding: 0 margin: 0 background: #100f0e color: white + @media (prefers-color-scheme: light) + background: #e6e4e3 + color: black + font-family: "Inter", sans-serif a - @apply transition-colors text-orange-500 + @apply transition-colors text-decoration: none - &:hover - @apply text-orange-300 + &:not(.txt) + @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 border: none border-top: 1px solid #464443 + @media (prefers-color-scheme: light) + border-top: 1px solid #a6a4a3 ::-webkit-scrollbar position: fixed @@ -32,13 +48,22 @@ hr background: none &-thumb border-radius: 0.2rem + background: #282625 &:hover background: #464443 + @media (prefers-color-scheme: light) + background: white + &:hover + background: #a6a4a3 + // Utility classes .bg-a background: #1f1c1d + @media (prefers-color-scheme: light) + background: white + .bg-bg background: #100f0e diff --git a/src/lib/components/Footer.svelte b/src/lib/components/Footer.svelte index 47acf55..3e91489 100644 --- a/src/lib/components/Footer.svelte +++ b/src/lib/components/Footer.svelte @@ -1,4 +1,4 @@ -