Skip to content

Commit b4287b9

Browse files
fhirschmannclaude
andcommitted
feat: PWA support with web app manifest and neon app icon
Adds an embedded manifest.json and a self-contained cyberpunk SVG icon so the interface can be added to phone home screens with proper name, icon and standalone display (fullscreen on iOS via the apple meta tags). Manifest and icon are exempt from the password middleware because browsers fetch the manifest without cookies. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 4c90ff4 commit b4287b9

5 files changed

Lines changed: 53 additions & 2 deletions

File tree

‎html/appicon.svg‎

Lines changed: 27 additions & 0 deletions
Loading

‎html/management.html‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,18 @@
1111
<meta charset="utf-8">
1212
<meta name="viewport" content="width=device-width, initial-scale=1">
1313
<meta name="theme-color" content="#05070d">
14+
<link rel="manifest" href="/manifest.json">
15+
<meta name="mobile-web-app-capable" content="yes">
16+
<meta name="apple-mobile-web-app-capable" content="yes">
17+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
1418
<link rel="preconnect" href="https://cdnjs.cloudflare.com">
1519
<link rel="preconnect" href="https://fonts.googleapis.com">
1620
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
1721
<link rel="stylesheet"
1822
href="https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&family=Rajdhani:wght@400;500;600;700&family=Share+Tech+Mono&display=swap">
1923
<link rel="icon" type="image/svg+xml" href="/logo.svg">
2024
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
21-
<link rel="apple-touch-icon" href="/logo">
25+
<link rel="apple-touch-icon" href="/appicon.svg">
2226
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css">
2327
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.16/themes/default/style.min.css" />
2428
<link rel="stylesheet"

‎html/manifest.json‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "LEO INDUSTRIES AT-1",
3+
"short_name": "Leoino",
4+
"description": "ESPuino based RFID audio player",
5+
"start_url": "/",
6+
"display": "standalone",
7+
"background_color": "#05070d",
8+
"theme_color": "#05070d",
9+
"icons": [
10+
{
11+
"src": "/appicon.svg",
12+
"sizes": "any",
13+
"type": "image/svg+xml",
14+
"purpose": "any"
15+
}
16+
]
17+
}

‎processHtml.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
BINARY_FILES = [
2929
Path("management.html"),
3030
Path("accesspoint.html"),
31+
Path("manifest.json"),
32+
Path("appicon.svg"),
3133
Path("logo.svg"),
3234
Path("js/i18next.min.js"),
3335
Path("js/i18nextHttpBackend.min.js"),

‎src/Web.cpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,8 @@ void webserverStart(void) {
526526
return next();
527527
}
528528
const String &url = request->url();
529-
if (url.equals("/login") || url.equals("/logo") || url.equals("/favicon.ico")) {
529+
if (url.equals("/login") || url.equals("/logo") || url.equals("/logo.svg") || url.equals("/favicon.ico") || url.equals("/manifest.json") || url.equals("/appicon.svg")) {
530+
// manifest/icon: the browser fetches the web-app-manifest without cookies
530531
return next();
531532
}
532533
if (Web_IsAuthenticated(request)) {

0 commit comments

Comments
 (0)