브랜드 컬러 설정 추가 v1.5.36

This commit is contained in:
2026-06-02 15:39:08 +09:00
parent 1bcd2f6898
commit 093d09c8bf
17 changed files with 472 additions and 10 deletions

17
app.vue
View File

@@ -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>