Skip to content

Commit 039d124

Browse files
committed
PWA Support
1 parent dd19de6 commit 039d124

23 files changed

+126
-1
lines changed

public/android-chrome-192x192.png

27.6 KB
Loading

public/android-chrome-512x512.png

117 KB
Loading

public/apple-touch-icon-114x114.png

16.5 KB
Loading

public/apple-touch-icon-120x120.png

17.7 KB
Loading

public/apple-touch-icon-144x144.png

23.5 KB
Loading

public/apple-touch-icon-152x152.png

25.7 KB
Loading

public/apple-touch-icon-57x57.png

5.68 KB
Loading

public/apple-touch-icon-60x60.png

6.11 KB
Loading

public/apple-touch-icon-72x72.png

8.1 KB
Loading

public/apple-touch-icon-76x76.png

8.82 KB
Loading

public/favicon-128.png

19.7 KB
Loading

public/favicon-16x16.png

888 Bytes
Loading

public/favicon-196x196.png

37.7 KB
Loading

public/favicon-32x32.png

2.4 KB
Loading

public/favicon-96x96.png

12.6 KB
Loading

public/manifest.json

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
{
2+
"id": "/",
3+
"name": "Case Customization",
4+
"short_name": "Case Customization",
5+
"description": "Create custom high-quality phone cases in seconds.",
6+
"start_url": "/",
7+
"scope": "/",
8+
"display": "standalone",
9+
"prefer_related_applications": false,
10+
"theme_color": "#222",
11+
"background_color": "#107334",
12+
"icons": [
13+
{
14+
"src": "/android-chrome-192x192.png",
15+
"sizes": "192x192",
16+
"type": "image/png"
17+
},
18+
{
19+
"src": "/android-chrome-512x512.png",
20+
"sizes": "512x512",
21+
"type": "image/png"
22+
},
23+
{
24+
"src": "apple-touch-icon-57x57.png",
25+
"sizes": "57x57",
26+
"type": "image/png"
27+
},
28+
{
29+
"src": "apple-touch-icon-114x114.png",
30+
"sizes": "114x114",
31+
"type": "image/png"
32+
},
33+
{
34+
"src": "apple-touch-icon-72x72.png",
35+
"sizes": "72x72",
36+
"type": "image/png"
37+
},
38+
{
39+
"src": "apple-touch-icon-144x144.png",
40+
"sizes": "144x144",
41+
"type": "image/png"
42+
},
43+
{
44+
"src": "apple-touch-icon-60x60.png",
45+
"sizes": "60x60",
46+
"type": "image/png"
47+
},
48+
{
49+
"src": "apple-touch-icon-120x120.png",
50+
"sizes": "120x120",
51+
"type": "image/png"
52+
},
53+
{
54+
"src": "apple-touch-icon-76x76.png",
55+
"sizes": "76x76",
56+
"type": "image/png"
57+
},
58+
{
59+
"src": "apple-touch-icon-152x152.png",
60+
"sizes": "152x152",
61+
"type": "image/png"
62+
},
63+
{
64+
"src": "favicon-196x196.png",
65+
"sizes": "196x196",
66+
"type": "image/png"
67+
},
68+
{
69+
"src": "favicon-96x96.png",
70+
"sizes": "96x96",
71+
"type": "image/png"
72+
},
73+
{
74+
"src": "favicon-32x32.png",
75+
"sizes": "32x32",
76+
"type": "image/png"
77+
},
78+
{
79+
"src": "favicon-16x16.png",
80+
"sizes": "16x16",
81+
"type": "image/png"
82+
},
83+
{
84+
"src": "favicon-128.png",
85+
"sizes": "128x128",
86+
"type": "image/png"
87+
}
88+
],
89+
"screenshots": [
90+
{
91+
"src": "/wide.png",
92+
"sizes": "1280x832",
93+
"type": "image/gif",
94+
"label": "Case Customization"
95+
},
96+
{
97+
"src": "/wide.png",
98+
"sizes": "1280x832",
99+
"type": "image/gif",
100+
"form_factor": "wide",
101+
"label": "Case Customization"
102+
}
103+
],
104+
"shortcuts": [
105+
{
106+
"name": "Create a Case",
107+
"short_name": "Create a Case",
108+
"description": "Create a custom case in seconds!",
109+
"url": "/configure/upload",
110+
"icons": [
111+
{
112+
"src": "./favicon-96x96.png",
113+
"sizes": "96x96",
114+
"type": "image/png"
115+
}
116+
]
117+
}
118+
]
119+
}

public/mstile-144x144.png

23.5 KB
Loading

public/mstile-150x150.png

61.9 KB
Loading

public/mstile-310x150.png

89.3 KB
Loading

public/mstile-310x310.png

201 KB
Loading

public/mstile-70x70.png

19.7 KB
Loading

public/wide.png

283 KB
Loading

src/lib/utils.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ import { type ClassValue, clsx } from "clsx";
22
import { Metadata } from "next";
33
import { twMerge } from "tailwind-merge";
44

5+
// Utility function to merge class names
56
export function cn(...inputs: ClassValue[]) {
67
return twMerge(clsx(inputs));
78
}
89

10+
// Utility function to format price
911
export const formatPrice = (price: number) => {
1012
const formatter = new Intl.NumberFormat("en-US", {
1113
style: "currency",
@@ -15,16 +17,19 @@ export const formatPrice = (price: number) => {
1517
return formatter.format(price);
1618
};
1719

20+
// Function to construct metadata for the page
1821
export function constructMetadata({
1922
title = "Case Customization",
2023
description = "Create custom high-quality phone cases in seconds",
2124
image = "/thumbnail.png",
2225
icons = "/favicon.ico",
26+
manifest = "/manifest.json",
2327
}: {
2428
title?: string;
2529
description?: string;
2630
image?: string;
2731
icons?: string;
32+
manifest?: string;
2833
} = {}): Metadata {
2934
return {
3035
title,
@@ -41,6 +46,7 @@ export function constructMetadata({
4146
images: [image],
4247
},
4348
icons,
44-
metadataBase: new URL("https://case-customizes.com"),
49+
manifest,
50+
metadataBase: new URL("https://case-customizes.vercel.app"),
4551
};
4652
}

0 commit comments

Comments
 (0)