Add Nord theme option to theme selection dropdown in Navbar.svelte

This commit is contained in:
Sean Morley
2024-04-17 00:20:56 +00:00
parent 5efb2912c0
commit f0eb5441f0
4 changed files with 13 additions and 4 deletions

View File

@@ -2,8 +2,8 @@
export let data;
import Footer from "$lib/components/Footer.svelte";
import Navbar from "$lib/components/Navbar.svelte";
import type { SubmitFunction } from "@sveltejs/kit";
import "../app.css";
// only show footer if scrolled to the bottom
</script>
<!-- passes the user object to the navbar component -->

View File

@@ -31,7 +31,7 @@ export const actions: Actions = {
setTheme: async ( { url, cookies }) => {
const theme = url.searchParams.get("theme");
// change the theme only if it is one of the allowed themes
if (theme && ["light", "dark", "night", "retro", "forest"].includes(theme)) {
if (theme && ["light", "dark", "night", "retro", "forest", "nord"].includes(theme)) {
cookies.set("colortheme", theme, {
path: "/",
maxAge: 60 * 60 * 24 * 365,