Skip to content

Commit 0e4d309

Browse files
nalves599José Fonseca
and
José Fonseca
committed
Add manifest for PWA support
Co-authored-by: José Fonseca <[email protected]>
1 parent d0d6eaf commit 0e4d309

File tree

10 files changed

+43
-5
lines changed

10 files changed

+43
-5
lines changed

public/web-app-manifest-192x192.png

5.99 KB
Loading

public/web-app-manifest-512x512.png

20.8 KB
Loading

src/app/apple-icon.png

5.56 KB
Loading

src/app/favicon.ico

14.7 KB
Binary file not shown.

src/app/icon.png

2.95 KB
Loading

src/app/icon.svg

+3
Loading

src/app/layout.tsx

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
1-
import type { Metadata } from "next";
1+
import type { Metadata, Viewport } from "next";
22
import { Montserrat } from "next/font/google";
33
import "@/styles/globals.css";
44
import AuthProvider from "@/context/AuthProvider";
55

66
const montserrat = Montserrat({ subsets: ["latin"] });
77

88
export const metadata: Metadata = {
9-
title: "SINFO WebApp",
10-
description: "SINFO WebApp",
9+
title: "SINFO Web App",
10+
description: "SINFO Web App",
11+
};
12+
13+
export const viewport: Viewport = {
14+
width: "device-width",
15+
initialScale: 1,
16+
maximumScale: 1,
17+
userScalable: true,
18+
viewportFit: "cover",
1119
};
1220

1321
export default async function RootLayout({

src/app/login/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default function Login() {
2222
});
2323

2424
return (
25-
<div className="h-screen bg-sinfo-primary flex flex-col">
25+
<div className="min-h-dvh bg-sinfo-primary flex flex-col pb-safe">
2626
<Image
2727
className="w-48 mx-auto pt-8"
2828
src={sinfoLogo}

src/app/manifest.ts

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import type { MetadataRoute } from "next";
2+
3+
export default function manifest(): MetadataRoute.Manifest {
4+
return {
5+
name: "SINFO - Web App",
6+
short_name: "SINFO",
7+
description: "SINFO Web Application",
8+
start_url: "/",
9+
display: "standalone",
10+
background_color: "#323363", // SINFO Primary
11+
theme_color: "#323363", // SINFO Primary
12+
icons: [
13+
{
14+
src: "/web-app-manifest-192x192.png",
15+
sizes: "192x192",
16+
type: "image/png",
17+
purpose: "maskable",
18+
},
19+
{
20+
src: "/web-app-manifest-512x512.png",
21+
sizes: "512x512",
22+
type: "image/png",
23+
purpose: "maskable",
24+
},
25+
],
26+
};
27+
}

src/components/BottomNavbar/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default async function BottomNavbar() {
2222
if (!user) return <></>;
2323

2424
return (
25-
<div className="sticky z-10 bottom-0 left-0 right-0 bg-sinfo-primary">
25+
<div className="sticky z-10 bottom-0 left-0 right-0 bg-sinfo-primary pb-safe">
2626
<div className="relative container mx-auto flex h-navbar flex-row">
2727
{navbarItemKeysByRole[convertToAppRole(user.role)].map((k) => (
2828
<NavbarItem key={k} name={k} />

0 commit comments

Comments
 (0)