feat: convert app to PWA with offline support and service worker
This commit is contained in:
@@ -40,6 +40,12 @@ export default function RootLayout({
|
||||
<html lang="en" className="dark" suppressHydrationWarning>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
||||
<meta name="apple-mobile-web-app-title" content="Kit" />
|
||||
<meta name="format-detection" content="telephone=no" />
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<meta name="theme-color" content="#8b5cf6" />
|
||||
{isProd && umamiScript && umamiId && (
|
||||
<script defer src={umamiScript} data-website-id={umamiId}></script>
|
||||
)}
|
||||
|
||||
29
app/manifest.ts
Normal file
29
app/manifest.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { MetadataRoute } from 'next';
|
||||
|
||||
export const dynamic = 'force-static';
|
||||
|
||||
export default function manifest(): MetadataRoute.Manifest {
|
||||
return {
|
||||
name: 'Kit - Creative Toolkit',
|
||||
short_name: 'Kit',
|
||||
description: 'A curated collection of creative and utility tools for developers and creators.',
|
||||
start_url: '/',
|
||||
display: 'standalone',
|
||||
background_color: '#0a0a0f',
|
||||
theme_color: '#8b5cf6',
|
||||
icons: [
|
||||
{
|
||||
src: '/icon.png',
|
||||
sizes: '512x512',
|
||||
type: 'image/png',
|
||||
purpose: 'any',
|
||||
},
|
||||
{
|
||||
src: '/icon.png',
|
||||
sizes: '512x512',
|
||||
type: 'image/png',
|
||||
purpose: 'maskable',
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user