Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added public/icons/icon-192x192.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/icon-196x196.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/icon-228x228.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/icon-256x256.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/icon-384x384.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/icon-512x512.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/screenshots/screenshot-faq-wide.avif
Binary file not shown.
Binary file added public/screenshots/screenshot-faq.avif
Binary file not shown.
Binary file added public/screenshots/screenshot-hero-wide.avif
Binary file not shown.
Binary file added public/screenshots/screenshot-hero.avif
Binary file not shown.
Binary file added public/screenshots/screenshot-prepare-wide.avif
Binary file not shown.
Binary file added public/screenshots/screenshot-prepare.avif
Binary file not shown.
79 changes: 68 additions & 11 deletions src/app/manifest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import type { MetadataRoute } from "next";

interface ExtendedScreenshot {
src: string;
sizes?: string;
type?: string;
form_factor?: string;
}

export default function manifest(): MetadataRoute.Manifest {
return {
name: "Papers: by CodeChefVIT",
Expand All @@ -8,21 +15,71 @@ export default function manifest(): MetadataRoute.Manifest {
"Discover previous year question papers created by CodeChef-VIT at Vellore Institute of Technology",
start_url: "/",
display: "standalone",
background_color: "#ffffff",
theme_color: "#000000",
Comment on lines -11 to -12
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if a user uses and prefers light mode? In that case, doesn't #ffffff make more sense?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The background color by default is dark right...
Additionally, by matching with the app's icons's background color, during loading the icon doesnt stick out

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool

background_color: "#10011a",
theme_color: "#10011a",
categories: [
"education",
"reference",
"productivity",
"technology"
],
"shortcuts": [
{
"name": "Upload",
"short_name": "Upload",
"description": "Upload a paper",
"url": "/upload",
"icons": [
{
"src": "/icons/icon-192x192.webp",
"sizes": "192x192",
"type": "image/webp"
}
]
},
],
icons: [
{ src: "/icons/icon-192x192.webp", sizes: "192x192", type: "image/webp", purpose: "maskable" },
{ src: "/icons/icon-196x196.webp", sizes: "196x196", type: "image/webp" },
{ src: "/icons/icon-228x228.webp", sizes: "228x228", type: "image/webp" },
{ src: "/icons/icon-256x256.webp", sizes: "256x256", type: "image/webp" },
{ src: "/icons/icon-384x384.webp", sizes: "384x384", type: "image/webp" },
{ src: "/icons/icon-512x512.webp", sizes: "512x512", type: "image/webp", purpose: "maskable" },
],
screenshots: [
{
src: "/web-app-manifest-192x192.png",
sizes: "192x192",
type: "image/png",
purpose: "maskable",
src: "/screenshots/screenshot-hero.avif",
sizes: "638x1380",
type: "image/avif",
},
{
src: "/web-app-manifest-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
src: "/screenshots/screenshot-prepare.avif",
sizes: "638x1380",
type: "image/avif",
},
],
{
src: "/screenshots/screenshot-faq.avif",
sizes: "638x1380",
type: "image/avif",
},
{
src: "/screenshots/screenshot-hero-wide.avif",
sizes: "2880x1556",
type: "image/avif",
form_factor: "wide",
},
{
src: "/screenshots/screenshot-prepare-wide.avif",
sizes: "2880x1556",
type: "image/avif",
form_factor: "wide",
},
{
src: "/screenshots/screenshot-faq-wide.avif",
sizes: "2880x1556",
type: "image/avif",
form_factor: "wide",
},
] as ExtendedScreenshot[],
};
}