diff --git a/apps/bear/public/pwa/splash/apple-splash-1125x2436.png b/apps/bear/public/pwa/splash/apple-splash-1125x2436.png new file mode 100644 index 0000000..7c0143b Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-1125x2436.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-1170x2532.png b/apps/bear/public/pwa/splash/apple-splash-1170x2532.png new file mode 100644 index 0000000..a34c792 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-1170x2532.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-1179x2556.png b/apps/bear/public/pwa/splash/apple-splash-1179x2556.png new file mode 100644 index 0000000..ef400b9 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-1179x2556.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-1206x2622.png b/apps/bear/public/pwa/splash/apple-splash-1206x2622.png new file mode 100644 index 0000000..dbd6713 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-1206x2622.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-1242x2688.png b/apps/bear/public/pwa/splash/apple-splash-1242x2688.png new file mode 100644 index 0000000..51370fd Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-1242x2688.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-1260x2736.png b/apps/bear/public/pwa/splash/apple-splash-1260x2736.png new file mode 100644 index 0000000..c0ec4ed Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-1260x2736.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-1284x2778.png b/apps/bear/public/pwa/splash/apple-splash-1284x2778.png new file mode 100644 index 0000000..be3ca46 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-1284x2778.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-1290x2796.png b/apps/bear/public/pwa/splash/apple-splash-1290x2796.png new file mode 100644 index 0000000..c103303 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-1290x2796.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-1320x2868.png b/apps/bear/public/pwa/splash/apple-splash-1320x2868.png new file mode 100644 index 0000000..dadb397 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-1320x2868.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-1334x750.png b/apps/bear/public/pwa/splash/apple-splash-1334x750.png new file mode 100644 index 0000000..2973473 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-1334x750.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-1488x2266.png b/apps/bear/public/pwa/splash/apple-splash-1488x2266.png new file mode 100644 index 0000000..ce11cba Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-1488x2266.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-1536x2048.png b/apps/bear/public/pwa/splash/apple-splash-1536x2048.png new file mode 100644 index 0000000..e8a5a60 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-1536x2048.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-1620x2160.png b/apps/bear/public/pwa/splash/apple-splash-1620x2160.png new file mode 100644 index 0000000..952ca38 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-1620x2160.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-1640x2360.png b/apps/bear/public/pwa/splash/apple-splash-1640x2360.png new file mode 100644 index 0000000..f6cd3bb Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-1640x2360.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-1668x2224.png b/apps/bear/public/pwa/splash/apple-splash-1668x2224.png new file mode 100644 index 0000000..9fd9385 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-1668x2224.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-1668x2388.png b/apps/bear/public/pwa/splash/apple-splash-1668x2388.png new file mode 100644 index 0000000..4a2e793 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-1668x2388.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-1668x2420.png b/apps/bear/public/pwa/splash/apple-splash-1668x2420.png new file mode 100644 index 0000000..2c27d8f Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-1668x2420.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-1792x828.png b/apps/bear/public/pwa/splash/apple-splash-1792x828.png new file mode 100644 index 0000000..4593268 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-1792x828.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-2048x1536.png b/apps/bear/public/pwa/splash/apple-splash-2048x1536.png new file mode 100644 index 0000000..7a3c851 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-2048x1536.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-2048x2732.png b/apps/bear/public/pwa/splash/apple-splash-2048x2732.png new file mode 100644 index 0000000..e3deaf6 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-2048x2732.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-2064x2752.png b/apps/bear/public/pwa/splash/apple-splash-2064x2752.png new file mode 100644 index 0000000..0374f05 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-2064x2752.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-2160x1620.png b/apps/bear/public/pwa/splash/apple-splash-2160x1620.png new file mode 100644 index 0000000..1f13b9a Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-2160x1620.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-2224x1668.png b/apps/bear/public/pwa/splash/apple-splash-2224x1668.png new file mode 100644 index 0000000..e8a5f5e Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-2224x1668.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-2266x1488.png b/apps/bear/public/pwa/splash/apple-splash-2266x1488.png new file mode 100644 index 0000000..af119ff Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-2266x1488.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-2360x1640.png b/apps/bear/public/pwa/splash/apple-splash-2360x1640.png new file mode 100644 index 0000000..5dc29c6 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-2360x1640.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-2388x1668.png b/apps/bear/public/pwa/splash/apple-splash-2388x1668.png new file mode 100644 index 0000000..2931d94 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-2388x1668.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-2420x1668.png b/apps/bear/public/pwa/splash/apple-splash-2420x1668.png new file mode 100644 index 0000000..1797aa0 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-2420x1668.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-2436x1125.png b/apps/bear/public/pwa/splash/apple-splash-2436x1125.png new file mode 100644 index 0000000..574b9fe Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-2436x1125.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-2532x1170.png b/apps/bear/public/pwa/splash/apple-splash-2532x1170.png new file mode 100644 index 0000000..f5a0ae6 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-2532x1170.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-2556x1179.png b/apps/bear/public/pwa/splash/apple-splash-2556x1179.png new file mode 100644 index 0000000..3344c75 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-2556x1179.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-2622x1206.png b/apps/bear/public/pwa/splash/apple-splash-2622x1206.png new file mode 100644 index 0000000..259e2f6 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-2622x1206.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-2688x1242.png b/apps/bear/public/pwa/splash/apple-splash-2688x1242.png new file mode 100644 index 0000000..d8eb081 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-2688x1242.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-2732x2048.png b/apps/bear/public/pwa/splash/apple-splash-2732x2048.png new file mode 100644 index 0000000..4831d37 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-2732x2048.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-2736x1260.png b/apps/bear/public/pwa/splash/apple-splash-2736x1260.png new file mode 100644 index 0000000..e9d141e Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-2736x1260.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-2752x2064.png b/apps/bear/public/pwa/splash/apple-splash-2752x2064.png new file mode 100644 index 0000000..2ea80e5 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-2752x2064.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-2778x1284.png b/apps/bear/public/pwa/splash/apple-splash-2778x1284.png new file mode 100644 index 0000000..3a45d02 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-2778x1284.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-2796x1290.png b/apps/bear/public/pwa/splash/apple-splash-2796x1290.png new file mode 100644 index 0000000..05169b4 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-2796x1290.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-2868x1320.png b/apps/bear/public/pwa/splash/apple-splash-2868x1320.png new file mode 100644 index 0000000..ef3c6f9 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-2868x1320.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-750x1334.png b/apps/bear/public/pwa/splash/apple-splash-750x1334.png new file mode 100644 index 0000000..11099fb Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-750x1334.png differ diff --git a/apps/bear/public/pwa/splash/apple-splash-828x1792.png b/apps/bear/public/pwa/splash/apple-splash-828x1792.png new file mode 100644 index 0000000..e50fc82 Binary files /dev/null and b/apps/bear/public/pwa/splash/apple-splash-828x1792.png differ diff --git a/apps/bear/src/configs/seo.ts b/apps/bear/src/configs/seo.ts index 7ba7a36..a5feb12 100644 --- a/apps/bear/src/configs/seo.ts +++ b/apps/bear/src/configs/seo.ts @@ -1,12 +1,17 @@ +import { APPLE_WEB_APP } from '@lumina/market/server'; import type { Metadata } from 'next'; import { clientEnv } from '../env'; import { i18n } from '../i18n'; -/** The root metadata: the brand as the title template, and absolute URLs from the site address. */ +/** + * The root metadata: the brand as the title template, absolute URLs from the site address, and + * iOS's splash screens. + */ export function rootMetadata(): Metadata { const name = i18n.t('app.name'); return { + ...APPLE_WEB_APP, metadataBase: new URL(clientEnv.NEXT_PUBLIC_SITE_URL), title: { default: name, template: `%s · ${name}` }, description: i18n.t('app.description'), diff --git a/apps/bull/public/pwa/splash/apple-splash-1125x2436.png b/apps/bull/public/pwa/splash/apple-splash-1125x2436.png new file mode 100644 index 0000000..7c0143b Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-1125x2436.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-1170x2532.png b/apps/bull/public/pwa/splash/apple-splash-1170x2532.png new file mode 100644 index 0000000..a34c792 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-1170x2532.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-1179x2556.png b/apps/bull/public/pwa/splash/apple-splash-1179x2556.png new file mode 100644 index 0000000..ef400b9 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-1179x2556.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-1206x2622.png b/apps/bull/public/pwa/splash/apple-splash-1206x2622.png new file mode 100644 index 0000000..dbd6713 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-1206x2622.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-1242x2688.png b/apps/bull/public/pwa/splash/apple-splash-1242x2688.png new file mode 100644 index 0000000..51370fd Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-1242x2688.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-1260x2736.png b/apps/bull/public/pwa/splash/apple-splash-1260x2736.png new file mode 100644 index 0000000..c0ec4ed Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-1260x2736.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-1284x2778.png b/apps/bull/public/pwa/splash/apple-splash-1284x2778.png new file mode 100644 index 0000000..be3ca46 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-1284x2778.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-1290x2796.png b/apps/bull/public/pwa/splash/apple-splash-1290x2796.png new file mode 100644 index 0000000..c103303 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-1290x2796.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-1320x2868.png b/apps/bull/public/pwa/splash/apple-splash-1320x2868.png new file mode 100644 index 0000000..dadb397 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-1320x2868.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-1334x750.png b/apps/bull/public/pwa/splash/apple-splash-1334x750.png new file mode 100644 index 0000000..2973473 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-1334x750.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-1488x2266.png b/apps/bull/public/pwa/splash/apple-splash-1488x2266.png new file mode 100644 index 0000000..ce11cba Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-1488x2266.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-1536x2048.png b/apps/bull/public/pwa/splash/apple-splash-1536x2048.png new file mode 100644 index 0000000..e8a5a60 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-1536x2048.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-1620x2160.png b/apps/bull/public/pwa/splash/apple-splash-1620x2160.png new file mode 100644 index 0000000..952ca38 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-1620x2160.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-1640x2360.png b/apps/bull/public/pwa/splash/apple-splash-1640x2360.png new file mode 100644 index 0000000..f6cd3bb Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-1640x2360.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-1668x2224.png b/apps/bull/public/pwa/splash/apple-splash-1668x2224.png new file mode 100644 index 0000000..9fd9385 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-1668x2224.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-1668x2388.png b/apps/bull/public/pwa/splash/apple-splash-1668x2388.png new file mode 100644 index 0000000..4a2e793 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-1668x2388.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-1668x2420.png b/apps/bull/public/pwa/splash/apple-splash-1668x2420.png new file mode 100644 index 0000000..2c27d8f Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-1668x2420.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-1792x828.png b/apps/bull/public/pwa/splash/apple-splash-1792x828.png new file mode 100644 index 0000000..4593268 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-1792x828.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-2048x1536.png b/apps/bull/public/pwa/splash/apple-splash-2048x1536.png new file mode 100644 index 0000000..7a3c851 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-2048x1536.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-2048x2732.png b/apps/bull/public/pwa/splash/apple-splash-2048x2732.png new file mode 100644 index 0000000..e3deaf6 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-2048x2732.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-2064x2752.png b/apps/bull/public/pwa/splash/apple-splash-2064x2752.png new file mode 100644 index 0000000..0374f05 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-2064x2752.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-2160x1620.png b/apps/bull/public/pwa/splash/apple-splash-2160x1620.png new file mode 100644 index 0000000..1f13b9a Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-2160x1620.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-2224x1668.png b/apps/bull/public/pwa/splash/apple-splash-2224x1668.png new file mode 100644 index 0000000..e8a5f5e Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-2224x1668.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-2266x1488.png b/apps/bull/public/pwa/splash/apple-splash-2266x1488.png new file mode 100644 index 0000000..af119ff Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-2266x1488.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-2360x1640.png b/apps/bull/public/pwa/splash/apple-splash-2360x1640.png new file mode 100644 index 0000000..5dc29c6 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-2360x1640.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-2388x1668.png b/apps/bull/public/pwa/splash/apple-splash-2388x1668.png new file mode 100644 index 0000000..2931d94 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-2388x1668.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-2420x1668.png b/apps/bull/public/pwa/splash/apple-splash-2420x1668.png new file mode 100644 index 0000000..1797aa0 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-2420x1668.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-2436x1125.png b/apps/bull/public/pwa/splash/apple-splash-2436x1125.png new file mode 100644 index 0000000..574b9fe Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-2436x1125.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-2532x1170.png b/apps/bull/public/pwa/splash/apple-splash-2532x1170.png new file mode 100644 index 0000000..f5a0ae6 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-2532x1170.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-2556x1179.png b/apps/bull/public/pwa/splash/apple-splash-2556x1179.png new file mode 100644 index 0000000..3344c75 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-2556x1179.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-2622x1206.png b/apps/bull/public/pwa/splash/apple-splash-2622x1206.png new file mode 100644 index 0000000..259e2f6 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-2622x1206.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-2688x1242.png b/apps/bull/public/pwa/splash/apple-splash-2688x1242.png new file mode 100644 index 0000000..d8eb081 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-2688x1242.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-2732x2048.png b/apps/bull/public/pwa/splash/apple-splash-2732x2048.png new file mode 100644 index 0000000..4831d37 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-2732x2048.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-2736x1260.png b/apps/bull/public/pwa/splash/apple-splash-2736x1260.png new file mode 100644 index 0000000..e9d141e Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-2736x1260.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-2752x2064.png b/apps/bull/public/pwa/splash/apple-splash-2752x2064.png new file mode 100644 index 0000000..2ea80e5 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-2752x2064.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-2778x1284.png b/apps/bull/public/pwa/splash/apple-splash-2778x1284.png new file mode 100644 index 0000000..3a45d02 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-2778x1284.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-2796x1290.png b/apps/bull/public/pwa/splash/apple-splash-2796x1290.png new file mode 100644 index 0000000..05169b4 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-2796x1290.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-2868x1320.png b/apps/bull/public/pwa/splash/apple-splash-2868x1320.png new file mode 100644 index 0000000..ef3c6f9 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-2868x1320.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-750x1334.png b/apps/bull/public/pwa/splash/apple-splash-750x1334.png new file mode 100644 index 0000000..11099fb Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-750x1334.png differ diff --git a/apps/bull/public/pwa/splash/apple-splash-828x1792.png b/apps/bull/public/pwa/splash/apple-splash-828x1792.png new file mode 100644 index 0000000..e50fc82 Binary files /dev/null and b/apps/bull/public/pwa/splash/apple-splash-828x1792.png differ diff --git a/apps/bull/src/configs/seo.ts b/apps/bull/src/configs/seo.ts index 7ba7a36..a5feb12 100644 --- a/apps/bull/src/configs/seo.ts +++ b/apps/bull/src/configs/seo.ts @@ -1,12 +1,17 @@ +import { APPLE_WEB_APP } from '@lumina/market/server'; import type { Metadata } from 'next'; import { clientEnv } from '../env'; import { i18n } from '../i18n'; -/** The root metadata: the brand as the title template, and absolute URLs from the site address. */ +/** + * The root metadata: the brand as the title template, absolute URLs from the site address, and + * iOS's splash screens. + */ export function rootMetadata(): Metadata { const name = i18n.t('app.name'); return { + ...APPLE_WEB_APP, metadataBase: new URL(clientEnv.NEXT_PUBLIC_SITE_URL), title: { default: name, template: `%s · ${name}` }, description: i18n.t('app.description'), diff --git a/packages/libs/src/pwa/constants.ts b/packages/libs/src/pwa/constants.ts index e29488f..801b319 100644 --- a/packages/libs/src/pwa/constants.ts +++ b/packages/libs/src/pwa/constants.ts @@ -1,4 +1,4 @@ -import type { InstallState, ServiceWorkerConfig } from './types'; +import type { AppleDevice, InstallState, ServiceWorkerConfig } from './types'; /** Fixed: browsers check this URL for updates, so it is never renamed or removed. */ export const SERVICE_WORKER_URL = '/sw.js'; @@ -45,3 +45,34 @@ export const SERVER_INSTALL_STATE: InstallState = { isIOS: false, isStandalone: false, }; + +/** Where each app's `public/` keeps the iOS startup images, written by `tools/generate-splash-screens.ts`. */ +export const APPLE_SPLASH_DIR = '/pwa/splash'; + +/** + * Each distinct iOS screen: CSS width and height in portrait, and the pixel ratio. Apple no longer + * publishes a size table: add a new size from the device's spec page (pixels divided by the ratio), + * then run the generator again. + */ +export const APPLE_DEVICES: readonly AppleDevice[] = [ + { width: 440, height: 956, ratio: 3 }, // iPhone 16 Pro Max, 17 Pro Max, 18 Pro Max + { width: 430, height: 932, ratio: 3 }, // iPhone 14 Pro Max, 15 Plus, 15 Pro Max, 16 Plus + { width: 428, height: 926, ratio: 3 }, // iPhone 12 Pro Max, 13 Pro Max, 14 Plus + { width: 420, height: 912, ratio: 3 }, // iPhone Air + { width: 414, height: 896, ratio: 3 }, // iPhone XS Max, 11 Pro Max + { width: 414, height: 896, ratio: 2 }, // iPhone XR, 11 + { width: 402, height: 874, ratio: 3 }, // iPhone 16 Pro, 17, 17 Pro, 18 Pro + { width: 393, height: 852, ratio: 3 }, // iPhone 14 Pro, 15, 15 Pro, 16 + { width: 390, height: 844, ratio: 3 }, // iPhone 12, 12 Pro, 13, 13 Pro, 14, 16e, 17e + { width: 375, height: 812, ratio: 3 }, // iPhone X, XS, 11 Pro, 12 mini, 13 mini + { width: 375, height: 667, ratio: 2 }, // iPhone 8, SE 2nd and 3rd gen + { width: 1032, height: 1376, ratio: 2 }, // iPad Pro 13" (M4, M5) + { width: 1024, height: 1366, ratio: 2 }, // iPad Pro 12.9", iPad Air 13" + { width: 834, height: 1210, ratio: 2 }, // iPad Pro 11" (M4, M5) + { width: 834, height: 1194, ratio: 2 }, // iPad Pro 11" (1st to 4th gen) + { width: 834, height: 1112, ratio: 2 }, // iPad Air 10.5", iPad Pro 10.5" + { width: 820, height: 1180, ratio: 2 }, // iPad Air 10.9" and 11", iPad 10th gen, iPad (A16) + { width: 810, height: 1080, ratio: 2 }, // iPad 10.2" (7th to 9th gen) + { width: 768, height: 1024, ratio: 2 }, // iPad 9.7", iPad mini 5 + { width: 744, height: 1133, ratio: 2 }, // iPad mini 6, iPad mini (A17 Pro) +]; diff --git a/packages/libs/src/pwa/index.ts b/packages/libs/src/pwa/index.ts index d78eec3..36f3a31 100644 --- a/packages/libs/src/pwa/index.ts +++ b/packages/libs/src/pwa/index.ts @@ -9,7 +9,9 @@ export { subscribeInstallState, } from './install'; export { configureServiceWorker, registerServiceWorker } from './pwa'; +export { APPLE_STARTUP_IMAGES } from './splash-screens'; export type { + AppleStartupImage, InstallOutcome, InstallState, ServiceWorkerConfig, diff --git a/packages/libs/src/pwa/splash-screens.ts b/packages/libs/src/pwa/splash-screens.ts new file mode 100644 index 0000000..6be19ce --- /dev/null +++ b/packages/libs/src/pwa/splash-screens.ts @@ -0,0 +1,46 @@ +import { APPLE_DEVICES, APPLE_SPLASH_DIR } from './constants'; +import type { AppleDevice, AppleStartupImage } from './types'; + +// device-height only where width and ratio don't identify the screen (the 834px iPads): on iOS +// 27.0.1 a query that tests it never matches (WebKit bug 326500). +function needsHeight({ width, ratio }: AppleDevice): boolean { + return ( + APPLE_DEVICES.filter( + (device) => device.width === width && device.ratio === ratio, + ).length > 1 + ); +} + +function toStartupImage( + device: AppleDevice, + orientation: 'portrait' | 'landscape', +): AppleStartupImage { + const { width, height, ratio } = device; + // In landscape the image turns, but device-width and device-height keep their portrait values. + const [pixelWidth, pixelHeight] = + orientation === 'portrait' + ? [width * ratio, height * ratio] + : [height * ratio, width * ratio]; + const media = [ + `(device-width: ${width}px)`, + ...(needsHeight(device) ? [`(device-height: ${height}px)`] : []), + `(-webkit-device-pixel-ratio: ${ratio})`, + `(orientation: ${orientation})`, + ].join(' and '); + return { + url: `${APPLE_SPLASH_DIR}/apple-splash-${pixelWidth}x${pixelHeight}.png`, + media, + width: pixelWidth, + height: pixelHeight, + }; +} + +/** + * A portrait and a landscape startup image per iOS screen. iOS shows the one whose `media` matches + * the device, and a blank screen when none does (Display Zoom, Split View). + */ +export const APPLE_STARTUP_IMAGES: readonly AppleStartupImage[] = + APPLE_DEVICES.flatMap((device) => [ + toStartupImage(device, 'portrait'), + toStartupImage(device, 'landscape'), + ]); diff --git a/packages/libs/src/pwa/types.ts b/packages/libs/src/pwa/types.ts index f2e9370..af6835b 100644 --- a/packages/libs/src/pwa/types.ts +++ b/packages/libs/src/pwa/types.ts @@ -63,3 +63,24 @@ export type InstallState = { /** How the browser's install dialog ended; `unavailable` when it couldn't be opened. */ export type InstallOutcome = 'accepted' | 'dismissed' | 'unavailable'; + +/** One iOS screen size, in CSS pixels, portrait. */ +export type AppleDevice = { + /** `device-width`. */ + width: number; + /** `device-height`. */ + height: number; + /** `-webkit-device-pixel-ratio`. */ + ratio: number; +}; + +/** One iOS startup image: Next.js's `appleWebApp.startupImage` takes `{ url, media }`; the generator also needs the pixel size. */ +export type AppleStartupImage = { + /** Such as '/pwa/splash/apple-splash-1290x2796.png'. */ + url: string; + /** The device width, pixel ratio, and orientation it matches; the height only where those don't identify the screen. */ + media: string; + /** Image pixels. */ + width: number; + height: number; +}; diff --git a/platforms/market/src/app/manifest/apple-web-app.ts b/platforms/market/src/app/manifest/apple-web-app.ts new file mode 100644 index 0000000..69f329f --- /dev/null +++ b/platforms/market/src/app/manifest/apple-web-app.ts @@ -0,0 +1,17 @@ +import { APPLE_STARTUP_IMAGES } from '@lumina/libs/pwa'; +import type { Metadata } from 'next'; + +/** + * iOS's part of the root metadata in both apps: a startup image per screen, written by + * `tools/generate-splash-screens.ts` on the manifest's background, so iOS and Android open on the + * same splash. iOS shows the images only with `apple-mobile-web-app-capable`, which Next.js 15 and + * later no longer render for `capable` (it renders `mobile-web-app-capable`), so `other` adds it. + */ +export const APPLE_WEB_APP = { + appleWebApp: { + capable: true, + statusBarStyle: 'default', + startupImage: APPLE_STARTUP_IMAGES.map(({ url, media }) => ({ url, media })), + }, + other: { 'apple-mobile-web-app-capable': 'yes' }, +} satisfies Metadata; diff --git a/platforms/market/src/app/manifest/server.ts b/platforms/market/src/app/manifest/server.ts index f834304..282d749 100644 --- a/platforms/market/src/app/manifest/server.ts +++ b/platforms/market/src/app/manifest/server.ts @@ -1,4 +1,5 @@ import 'server-only'; +export { APPLE_WEB_APP } from './apple-web-app'; export { buildManifest } from './build-manifest'; export type { ManifestArgs } from './types'; diff --git a/platforms/market/src/server.ts b/platforms/market/src/server.ts index c68f871..dbd69e3 100644 --- a/platforms/market/src/server.ts +++ b/platforms/market/src/server.ts @@ -3,7 +3,7 @@ import 'server-only'; // Public server-only API, exposed as the `/server` subpath. index.ts never imports this file. // Server reads carry no session, and only the landing reads data on the server (0070). export { readOnServer } from './app/error-boundaries/server'; -export { buildManifest } from './app/manifest/server'; +export { APPLE_WEB_APP, buildManifest } from './app/manifest/server'; export type { ManifestArgs } from './app/manifest/server'; export { faqJsonLd, landingMetadata } from './app/seo/server'; export type { FaqJsonLdItem, LandingMetadataArgs } from './app/seo/server'; diff --git a/tools/generate-splash-screens.ts b/tools/generate-splash-screens.ts new file mode 100644 index 0000000..b6cae9c --- /dev/null +++ b/tools/generate-splash-screens.ts @@ -0,0 +1,60 @@ +// Writes the iOS startup images (the pwa lib's APPLE_STARTUP_IMAGES) into each app's public/: the +// app's 512px icon centered on the manifest's background, as Android draws its splash. +// +// pnpm exec jiti tools/generate-splash-screens.ts apps/bull apps/bear +// +// Run it again and commit the images when an app's icon, MANIFEST_BACKGROUND_COLOR, or APPLE_DEVICES +// changes. ImageResponse ships with Next.js, so no dependency is added. +import { mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; +import path from 'node:path'; +import { ImageResponse } from 'next/og'; +import { createElement } from 'react'; + +import { APPLE_SPLASH_DIR } from '../packages/libs/src/pwa/constants'; +import { APPLE_STARTUP_IMAGES } from '../packages/libs/src/pwa/splash-screens'; +import { MANIFEST_BACKGROUND_COLOR } from '../platforms/market/src/app/manifest/constants'; + +const ICON = 'pwa/icon-512.png'; + +async function writeSplashScreens(appDir: string): Promise { + const publicDir = path.resolve(appDir, 'public'); + const icon = `data:image/png;base64,${readFileSync(path.join(publicDir, ICON)).toString('base64')}`; + // Starts empty, so a size removed from APPLE_DEVICES leaves no image behind. + const splashDir = path.join(publicDir, APPLE_SPLASH_DIR); + rmSync(splashDir, { recursive: true, force: true }); + mkdirSync(splashDir, { recursive: true }); + + for (const { url, width, height } of APPLE_STARTUP_IMAGES) { + const size = Math.round(Math.min(width, height) / 4); + const page = createElement( + 'div', + { + style: { + width: '100%', + height: '100%', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + background: MANIFEST_BACKGROUND_COLOR, + }, + }, + createElement('img', { src: icon, width: size, height: size }), + ); + const image = new ImageResponse(page, { width, height }); + writeFileSync(path.join(publicDir, url), Buffer.from(await image.arrayBuffer())); + } + console.log(`${appDir}: ${APPLE_STARTUP_IMAGES.length} startup images in public${APPLE_SPLASH_DIR}`); +} + +async function main(): Promise { + const appDirs = process.argv.slice(2); + if (appDirs.length === 0) { + throw new Error('Usage: pnpm exec jiti tools/generate-splash-screens.ts apps/...'); + } + for (const appDir of appDirs) await writeSplashScreens(appDir); +} + +main().catch((error: unknown) => { + console.error(error); + process.exitCode = 1; +});