mirror of
https://github.com/fmhy/edit.git
synced 2025-10-13 00:01:09 +11:00
hall of the weens
This commit is contained in:
parent
7f35cfa20f
commit
537a5f0635
1 changed files with 15 additions and 3 deletions
|
@ -3,7 +3,7 @@ import { colors } from '@fmhy/colors'
|
||||||
import { useStorage, useStyleTag } from '@vueuse/core'
|
import { useStorage, useStyleTag } from '@vueuse/core'
|
||||||
import { watch, onMounted } from 'vue'
|
import { watch, onMounted } from 'vue'
|
||||||
|
|
||||||
// Add Halloween colors locally
|
// Add Halloween colors
|
||||||
const halloweenColors = {
|
const halloweenColors = {
|
||||||
50: '#fff7ed',
|
50: '#fff7ed',
|
||||||
100: '#ffedd5',
|
100: '#ffedd5',
|
||||||
|
@ -18,7 +18,7 @@ const halloweenColors = {
|
||||||
950: '#431407'
|
950: '#431407'
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extend colors with Halloween theme
|
// hall extend or something
|
||||||
const extendedColors = {
|
const extendedColors = {
|
||||||
...colors,
|
...colors,
|
||||||
halloween: halloweenColors
|
halloween: halloweenColors
|
||||||
|
@ -94,12 +94,18 @@ const updateThemeColor = (colorName: ColorNames) => {
|
||||||
.VPApp, .Layout, .VPContent, .VPHome, .VPHero, #app {
|
.VPApp, .Layout, .VPContent, .VPHome, .VPHero, #app {
|
||||||
background-color: #ffffff !important;
|
background-color: #ffffff !important;
|
||||||
}
|
}
|
||||||
|
.VPHome .VPHero {
|
||||||
|
background-color: #ffffff !important;
|
||||||
|
}
|
||||||
.dark body {
|
.dark body {
|
||||||
background-color: rgb(26, 26, 26) !important;
|
background-color: rgb(26, 26, 26) !important;
|
||||||
}
|
}
|
||||||
.dark .VPApp, .dark .Layout, .dark .VPContent, .dark .VPHome, .dark .VPHero, .dark #app {
|
.dark .VPApp, .dark .Layout, .dark .VPContent, .dark .VPHome, .dark .VPHero, .dark #app {
|
||||||
background-color: rgb(26, 26, 26) !important;
|
background-color: rgb(26, 26, 26) !important;
|
||||||
}
|
}
|
||||||
|
.dark .VPHome .VPHero {
|
||||||
|
background-color: rgb(26, 26, 26) !important;
|
||||||
|
}
|
||||||
` : ''
|
` : ''
|
||||||
|
|
||||||
css.value = `
|
css.value = `
|
||||||
|
@ -124,7 +130,6 @@ const updateThemeColor = (colorName: ColorNames) => {
|
||||||
${nonHalloweenBodyOverride}
|
${nonHalloweenBodyOverride}
|
||||||
`
|
`
|
||||||
|
|
||||||
// Add/remove Halloween theme indicator
|
|
||||||
const htmlElement = document.documentElement
|
const htmlElement = document.documentElement
|
||||||
if (colorName === 'halloween') {
|
if (colorName === 'halloween') {
|
||||||
htmlElement.setAttribute('data-halloween-theme', 'true')
|
htmlElement.setAttribute('data-halloween-theme', 'true')
|
||||||
|
@ -170,6 +175,13 @@ const normalizeColorName = (colorName: string) =>
|
||||||
:title="normalizeColorName(color)"
|
:title="normalizeColorName(color)"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
|
v-if="color === 'halloween'"
|
||||||
|
class="inline-block w-6 h-6 flex items-center justify-center text-lg"
|
||||||
|
>
|
||||||
|
🎃
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
v-else
|
||||||
class="inline-block w-6 h-6 rounded-full"
|
class="inline-block w-6 h-6 rounded-full"
|
||||||
:style="{ backgroundColor: extendedColors[color][500] }"
|
:style="{ backgroundColor: extendedColors[color][500] }"
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue