-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
196 additions
and
180 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,6 @@ index.es.js | |
index.umd.js | ||
types | ||
vue-toastify-* | ||
|
||
# Local Netlify folder | ||
.netlify |
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 |
---|---|---|
@@ -1,13 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" data-theme="emerald"> | ||
<head> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
<script> | ||
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { | ||
document.documentElement.dataset.theme = 'halloween'; | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
</html> |
Large diffs are not rendered by default.
Oops, something went wrong.
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,27 @@ | ||
<template> | ||
<AppToggle v-model="isDark" label="Dark theme" /> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent, ref, watch } from 'vue'; | ||
import AppToggle from './AppToggle.vue'; | ||
export default defineComponent({ | ||
name: 'AppThemeToggle', | ||
components: { AppToggle }, | ||
setup: () => { | ||
const isDark = ref(window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches); | ||
watch( | ||
isDark, | ||
value => document.documentElement.dataset.theme = value ? 'halloween' : 'emerald' | ||
); | ||
return { | ||
isDark | ||
}; | ||
} | ||
}); | ||
</script> |
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 |
---|---|---|
@@ -1,9 +1,13 @@ | ||
/** | ||
* @type {import('@types/tailwindcss').TailwindConfig} | ||
* @type {import("@types/tailwindcss").TailwindConfig} | ||
*/ | ||
module.exports = { | ||
content: ['**/*.html', './src/**/*.{ts,tsx,vue}'], | ||
darkMode: "class", | ||
content: ["**/*.html", "./src/**/*.{ts,tsx,vue}"], | ||
plugins: [ | ||
require("daisyui"), | ||
] | ||
} | ||
require("daisyui") | ||
], | ||
daisyui: { | ||
themes: ['emerald', 'halloween'] | ||
} | ||
}; |