feat: custom error page (#178)
Co-authored-by: Daniel Roe <daniel@roe.dev>
This commit is contained in:
parent
b8cadca717
commit
3b92b27cc8
6 changed files with 106 additions and 42 deletions
16
composables/page-header.ts
Normal file
16
composables/page-header.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { APP_NAME } from '~/constants'
|
||||
|
||||
const isDev = process.dev
|
||||
const isPreview = window.location.hostname.includes('deploy-preview')
|
||||
|
||||
export function usePageHeader() {
|
||||
useHead({
|
||||
titleTemplate: title => `${title ? `${title} | ` : ''}${APP_NAME}${isDev ? ' (dev)' : isPreview ? ' (preview)' : ''}`,
|
||||
link: [
|
||||
{ rel: 'icon', type: 'image/svg+png', href: isDev || isPreview ? '/favicon-dev.png' : '/favicon.png' },
|
||||
],
|
||||
})
|
||||
|
||||
// eslint-disable-next-line no-unused-expressions
|
||||
isDark.value
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue