generated from sohamjaiswal/svelte-starter
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(deps-dev): bump @skeletonlabs/skeleton from 1.5.1 to 2.4.0 (#18)
* build(deps-dev): bump @skeletonlabs/skeleton from 1.5.1 to 2.4.0 Bumps [@skeletonlabs/skeleton](https://github.com/skeletonlabs/skeleton) from 1.5.1 to 2.4.0. - [Release notes](https://github.com/skeletonlabs/skeleton/releases) - [Commits](https://github.com/skeletonlabs/skeleton/compare/1.5.1...@skeletonlabs/[email protected]) --- updated-dependencies: - dependency-name: "@skeletonlabs/skeleton" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * feat: migration * fix: migrated toastStores to v2 --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Soham Jaiswal <[email protected]>
- Loading branch information
1 parent
7b086ac
commit 76c40cb
Showing
15 changed files
with
298 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { writable } from 'svelte/store'; | ||
import { browser } from '$app/environment'; | ||
|
||
// Session based theme store. Grabs the current theme from the current body. | ||
export const storeTheme = writable(browser ? document.body.getAttribute('data-theme') ?? '' : 'skeleton'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import type { Actions } from './$types'; | ||
|
||
export const actions: Actions = { | ||
// This action is called when the user clicks the theme button | ||
setTheme: async ({ cookies, request }) => { | ||
const formData = await request.formData(); | ||
const theme = formData.get('theme')?.toString() ?? 'skeleton'; | ||
// Sets the selected theme to the cookie | ||
cookies.set('theme', theme, { path: '/' }); | ||
return { theme }; | ||
} | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.