feat(pwa): add lightweight manifest support

This commit is contained in:
nxtkofi 2026-05-15 19:41:49 +02:00
parent 57483625ec
commit 0b749350d8
5 changed files with 52 additions and 0 deletions

View file

@ -0,0 +1,4 @@
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="512" height="512" rx="112" fill="#09090B" />
<path d="M146 370V142H312C360 142 392 174 392 220C392 260 366 286 330 294L398 370H313L252 302H214V370H146ZM214 228H303C320 228 331 216 331 200C331 184 320 172 303 172H214V228Z" fill="#FFFFFF"/>
</svg>

After

Width:  |  Height:  |  Size: 363 B

4
public/pwa/icon.svg Normal file
View file

@ -0,0 +1,4 @@
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="512" height="512" rx="112" fill="#09090B" />
<path d="M146 370V142H312C360 142 392 174 392 220C392 260 366 286 330 294L398 370H313L252 302H214V370H146ZM214 228H303C320 228 331 216 331 200C331 184 320 172 303 172H214V228Z" fill="#FFFFFF"/>
</svg>

After

Width:  |  Height:  |  Size: 363 B

View file

@ -0,0 +1,5 @@
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="512" height="512" rx="128" fill="#09090B" />
<rect x="96" y="96" width="320" height="320" rx="80" fill="#09090B" />
<path d="M168 344V168H286C330 168 360 196 360 236C360 268 341 290 313 299L370 344H301L252 295H230V344H168ZM230 231H289C304 231 314 221 314 205C314 190 304 180 289 180H230V231Z" fill="#FFFFFF"/>
</svg>

After

Width:  |  Height:  |  Size: 436 B

View file

@ -14,6 +14,17 @@ const geistMono = Geist_Mono({ subsets: ['latin'], variable: '--font-mono' });
export const metadata: Metadata = { export const metadata: Metadata = {
title: 'SaaS Template', title: 'SaaS Template',
description: 'Create SaaS in a day!', description: 'Create SaaS in a day!',
applicationName: 'SaaS Template',
appleWebApp: {
capable: true,
title: 'SaaS Template',
statusBarStyle: 'default',
},
icons: {
icon: [{ url: '/pwa/icon.svg', sizes: 'any', type: 'image/svg+xml' }],
apple: [{ url: '/pwa/apple-touch-icon.svg', sizes: 'any', type: 'image/svg+xml' }],
other: [{ rel: 'mask-icon', url: '/pwa/maskable-icon.svg' }],
},
}; };
export default async function RootLayout({ export default async function RootLayout({

28
src/app/manifest.ts Normal file
View file

@ -0,0 +1,28 @@
import type { MetadataRoute } from 'next';
export default function manifest(): MetadataRoute.Manifest {
return {
name: 'SaaS Template',
short_name: 'SaaS',
description: 'Create SaaS in a day!',
start_url: '/',
scope: '/',
display: 'standalone',
background_color: '#ffffff',
theme_color: '#09090b',
icons: [
{
src: '/pwa/icon.svg',
sizes: 'any',
type: 'image/svg+xml',
purpose: 'any',
},
{
src: '/pwa/maskable-icon.svg',
sizes: 'any',
type: 'image/svg+xml',
purpose: 'maskable',
},
],
};
}