add minimal info for PWA
This commit is contained in:
parent
dd24fda35b
commit
3533ea4dfe
90
rice-box.go
90
rice-box.go
File diff suppressed because one or more lines are too long
BIN
static/img/icon.png
Normal file
BIN
static/img/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
|
@ -296,6 +296,10 @@ var bootstrap = function() {
|
|||
createWebSocketConnection();
|
||||
addListeners();
|
||||
documentHashHandler();
|
||||
|
||||
if ("serviceWorker" in navigator) {
|
||||
navigator.serviceWorker.register("/static/service_worker.js");
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
|
|
17
static/manifest.json
Normal file
17
static/manifest.json
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"short_name": "RWM",
|
||||
"name": "Remote i3-wm",
|
||||
"theme_color": "#1e3650",
|
||||
"background_color": "#ffffff",
|
||||
"display": "fullscreen",
|
||||
"Scope": "/",
|
||||
"orientation": "portrait",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/static/img/icon.png",
|
||||
"type": "image/png",
|
||||
"sizes": "96x96"
|
||||
}
|
||||
],
|
||||
"start_url": "/"
|
||||
}
|
3
static/service_worker.js
Normal file
3
static/service_worker.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
self.addEventListener("install", (e) => {
|
||||
console.log("[Service Worker] Install");
|
||||
});
|
|
@ -6,6 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
|
||||
<link rel="stylesheet" href="/static/bootstrap.min.css" type="text/css">
|
||||
<link rel="stylesheet" href="/static/main.css" type="text/css">
|
||||
<link rel="manifest" href="/static/manifest.json">
|
||||
<link rel="icon" type="image/png" href="/static/img/icon.png">
|
||||
<title>Remote i3-wm</title>
|
||||
</head>
|
||||
<body>
|
||||
|
|
Loading…
Reference in a new issue