mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-01-23 23:51:50 +01:00
Linted code
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
<script lang="ts" setup>
|
||||
import { navColors, type NavColor } from '~~/types'
|
||||
import type { NavColor } from '~~/types'
|
||||
import { navColors } from '~~/types'
|
||||
|
||||
const route = useRoute()
|
||||
const colorMode = useColorMode()
|
||||
|
||||
const colors = computed((): NavColor[] => {
|
||||
const navColor = navColors.find(nav => route.name === nav.name)
|
||||
if (navColor?.colors) return navColor.colors
|
||||
if (navColor?.colors)
|
||||
return navColor.colors
|
||||
|
||||
const fallbackColor = colorMode.value === 'dark' ? '#000000' : '#ffffff'
|
||||
const fallbackGradient = { color: fallbackColor, x: 0, y: 0, radius: 0 }
|
||||
@@ -15,14 +17,14 @@ const colors = computed((): NavColor[] => {
|
||||
|
||||
const backgroundStyle = computed(() => {
|
||||
const gradients = colors.value
|
||||
.map(({ color, radius, x, y }) =>
|
||||
`radial-gradient(circle ${radius}px at ${x}% ${y}%, ${color}4D, transparent)`
|
||||
.map(({ color, radius, x, y }) =>
|
||||
`radial-gradient(circle ${radius}px at ${x}% ${y}%, ${color}4D, transparent)`,
|
||||
)
|
||||
.join(', ')
|
||||
|
||||
|
||||
return {
|
||||
backgroundImage: gradients,
|
||||
backgroundSize: Array(colors.value.length).fill('100% 100%').join(', ')
|
||||
backgroundSize: Array.from({ length: colors.value.length }).fill('100% 100%').join(', '),
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
defineProps({
|
||||
title: {
|
||||
type: Object as PropType<{ en: string; fr: string; es: string }>,
|
||||
type: Object as PropType<{ en: string, fr: string, es: string }>,
|
||||
required: true,
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user