mirror of
https://github.com/morten-olsen/morten-olsen.github.io.git
synced 2026-02-08 01:46:28 +01:00
rewrite
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
import type { ManifestOptions } from 'vite-plugin-pwa'
|
||||
|
||||
import { icons } from '@/assets/images/icons.js'
|
||||
import { data } from '@/data/data.js'
|
||||
import { icons } from '~/assets/images/images.icons';
|
||||
import { data } from '~/data/data';
|
||||
|
||||
export async function GET() {
|
||||
const [maskableIcon] = icons.pngs.filter(
|
||||
(icon) => icon.size === '512x512' && icon.src.includes('png')
|
||||
)
|
||||
const nonMaskableIcons = icons.pngs.filter((icon) => icon !== maskableIcon)
|
||||
const basics = data.profile.basics
|
||||
const { profile } = data;
|
||||
|
||||
const manifest: Partial<ManifestOptions> = {
|
||||
name: basics.name,
|
||||
short_name: basics.name,
|
||||
description: basics.tagline,
|
||||
name: profile.name,
|
||||
short_name: profile.name,
|
||||
// description: basics.tagline,
|
||||
theme_color: '#30E130',
|
||||
background_color: data.site.theme,
|
||||
// background_color: data.site.theme,
|
||||
start_url: '/',
|
||||
display: 'minimal-ui',
|
||||
icons: [
|
||||
@@ -26,13 +26,13 @@ export async function GET() {
|
||||
})),
|
||||
...(maskableIcon
|
||||
? [
|
||||
{
|
||||
src: maskableIcon.src,
|
||||
sizes: maskableIcon.size,
|
||||
type: 'image/png',
|
||||
purpose: 'maskable'
|
||||
}
|
||||
]
|
||||
{
|
||||
src: maskableIcon.src,
|
||||
sizes: maskableIcon.size,
|
||||
type: 'image/png',
|
||||
purpose: 'maskable'
|
||||
}
|
||||
]
|
||||
: [])
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user