Files
sori.studio/app.vue
zenn 16343b62c7 HTML 문서 페이지 뒤로가기 근본 수정 및 페이지 이동 로딩 피드백 추가
- /pages/:slug HTML 문서 페이지 클라이언트 소프트 이동을 전체 페이지 이동으로 전환하는 글로벌 미들웨어 추가
- app.vue에 브랜드 컬러 기반 NuxtLoadingIndicator 상단 진행바 추가로 이동 로딩 피드백 제공
- v1.10.33

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-03 18:27:32 +09:00

43 lines
1.0 KiB
Vue

<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: '井',
brandColor: DEFAULT_BRAND_COLOR
})
})
const siteAccentColor = computed(() => normalizeBrandColor(appSiteSettings.value?.brandColor || DEFAULT_BRAND_COLOR))
const siteAccentStyle = computed(() => ({
'--site-accent': siteAccentColor.value
}))
useHead(() => ({
titleTemplate: (titleChunk) => titleChunk || appSiteSettings.value.title,
link: appSiteSettings.value.faviconUrl
? [
{
rel: 'icon',
type: 'image/png',
href: appSiteSettings.value.faviconUrl
}
]
: []
}))
</script>
<template>
<div class="site-app" :style="siteAccentStyle">
<NuxtLoadingIndicator :color="siteAccentColor" :height="3" :throttle="80" :duration="5000" />
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</div>
</template>