브랜드 컬러 설정 추가 v1.5.36
This commit is contained in:
17
app.vue
17
app.vue
@@ -1,14 +1,21 @@
|
||||
<script setup>
|
||||
import { DEFAULT_BRAND_COLOR, normalizeBrandColor } from './lib/brand-color.js'
|
||||
|
||||
const { data: appSiteSettings } = await useFetch('/api/site-settings', {
|
||||
key: 'site-settings-public',
|
||||
default: () => ({
|
||||
title: 'sori.studio',
|
||||
faviconUrl: '',
|
||||
logoUrl: '',
|
||||
logoText: '井'
|
||||
logoText: '井',
|
||||
brandColor: DEFAULT_BRAND_COLOR
|
||||
})
|
||||
})
|
||||
|
||||
const siteAccentStyle = computed(() => ({
|
||||
'--site-accent': normalizeBrandColor(appSiteSettings.value?.brandColor || DEFAULT_BRAND_COLOR)
|
||||
}))
|
||||
|
||||
useHead(() => ({
|
||||
titleTemplate: (titleChunk) => titleChunk
|
||||
? `${titleChunk} · ${appSiteSettings.value.title}`
|
||||
@@ -26,7 +33,9 @@ useHead(() => ({
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NuxtLayout>
|
||||
<NuxtPage />
|
||||
</NuxtLayout>
|
||||
<div class="site-app" :style="siteAccentStyle">
|
||||
<NuxtLayout>
|
||||
<NuxtPage />
|
||||
</NuxtLayout>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user