diff --git a/app/layout.tsx b/app/layout.tsx index 8e2dae5e..dc7cfa4f 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -54,6 +54,12 @@ export const metadata: Metadata = { title: "Prabhupāda Says", statusBarStyle: "default", }, + // Home Screen / tab icons. The apple-touch-icon is what iOS uses for the + // installed PWA (the prerequisite for Web Push on iPhone/iPad). + icons: { + icon: "/icon-192.png", + apple: "/apple-icon.png", + }, ...ogDefault(), }; diff --git a/app/manifest.ts b/app/manifest.ts new file mode 100644 index 00000000..efd7e85b --- /dev/null +++ b/app/manifest.ts @@ -0,0 +1,30 @@ +import type { MetadataRoute } from "next"; + +/** + * Web App Manifest — makes the site installable as a standalone PWA. This is + * what lets iOS (16.4+) deliver Web Push: notifications only work once the + * site is added to the Home Screen and launched standalone. Next serves this + * at /manifest.webmanifest and links it automatically. + */ +export default function manifest(): MetadataRoute.Manifest { + return { + name: "Prabhupāda Says", + short_name: "Prabhupāda", + description: + "Browse the books and teachings of His Divine Grace A.C. Bhaktivedanta Swami Prabhupāda", + start_url: "/", + display: "standalone", + background_color: "#fdf7ee", + theme_color: "#fdf7ee", + icons: [ + { src: "/icon-192.png", sizes: "192x192", type: "image/png" }, + { src: "/icon-512.png", sizes: "512x512", type: "image/png" }, + { + src: "/icon-512.png", + sizes: "512x512", + type: "image/png", + purpose: "maskable", + }, + ], + }; +} diff --git a/public/apple-icon.png b/public/apple-icon.png new file mode 100644 index 00000000..5f54072e Binary files /dev/null and b/public/apple-icon.png differ diff --git a/public/icon-192.png b/public/icon-192.png new file mode 100644 index 00000000..a7637f69 Binary files /dev/null and b/public/icon-192.png differ diff --git a/public/icon-512.png b/public/icon-512.png new file mode 100644 index 00000000..b229debf Binary files /dev/null and b/public/icon-512.png differ