Add Nord theme option to theme selection dropdown in Navbar.svelte
This commit is contained in:
@@ -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 -->
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user