fix: favicon and background image serving

This commit is contained in:
Nicolas Meienberger
2025-11-07 19:26:37 +01:00
parent 885ae02b18
commit c32eb0831f
14 changed files with 32 additions and 1 deletions

View File

@@ -27,7 +27,7 @@ export function AuthLayout({ title, description, children }: AuthLayoutProps) {
</div> </div>
<div <div
className="hidden lg:block lg:flex-1 dither-xl bg-cover bg-center" className="hidden lg:block lg:flex-1 dither-xl bg-cover bg-center"
style={{ backgroundImage: "url(/background.jpg)" }} style={{ backgroundImage: "url(/images/background.jpg)" }}
/> />
</div> </div>
); );

View File

@@ -41,6 +41,12 @@ export function Layout({ children }: { children: React.ReactNode }) {
<head> <head>
<meta charSet="utf-8" /> <meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<link rel="icon" type="image/png" href="/images/favicon/favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/svg+xml" href="/images/favicon/favicon.svg" />
<link rel="shortcut icon" href="/images/favicon/favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="/images/favicon/apple-touch-icon.png" />
<meta name="apple-mobile-web-app-title" content="Ironmount" />
<link rel="manifest" href="/images/favicon/site.webmanifest" />
<Meta /> <Meta />
<Links /> <Links />
</head> </head>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -0,0 +1,21 @@
{
"name": "Ironmount",
"short_name": "Ironmount",
"icons": [
{
"src": "/images/favicon/web-app-manifest-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "/images/favicon/web-app-manifest-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
],
"theme_color": "#1b1b1b",
"background_color": "#1b1b1b",
"display": "standalone"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -42,6 +42,7 @@ const app = new Hono()
.route("/api/v1/repositories", repositoriesController.use(requireAuth)) .route("/api/v1/repositories", repositoriesController.use(requireAuth))
.route("/api/v1/backups", backupScheduleController.use(requireAuth)) .route("/api/v1/backups", backupScheduleController.use(requireAuth))
.get("/assets/*", serveStatic({ root: "./assets/frontend" })) .get("/assets/*", serveStatic({ root: "./assets/frontend" }))
.get("/images/*", serveStatic({ root: "./assets/frontend" }))
.get("*", serveStatic({ path: "./assets/frontend/index.html" })); .get("*", serveStatic({ path: "./assets/frontend/index.html" }));
app.get("/api/v1/openapi.json", generalDescriptor(app)); app.get("/api/v1/openapi.json", generalDescriptor(app));

BIN
assets/im-favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
assets/im.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB