forked from ELowry/StadiaIcons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webmanifest.js
103 lines (97 loc) · 2.4 KB
/
webmanifest.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
const functions = require('firebase-functions');
module.exports = function(info, errors)
{
if (Object.keys(errors).length === 0 && info.isValid)
{
return `{
"name": "` + info.fullName + `",
"short_name": "` + info.shortName + `",
"lang": "en-US",
"start_url": "` + info.shortcutUrl + `",
"scope": "/` + info.uid + `/",
"display": "standalone",
"theme_color": "#202124",
"icons": [
{
"src": "` + info.images.image128 + `",
"type": "image/png",
"sizes": "128x128",
"purpose": "any maskable"
},
{
"src": "` + info.images.image192 + `",
"type": "image/png",
"sizes": "192x192",
"purpose": "any"
},
{
"src": "` + info.images.image512 + `",
"type": "image/png",
"sizes": "512x512",
"purpose": "any"
},
{
"src": "` + info.images.image + `",
"type": "image/png",
"sizes": "1024x1024",
"purpose": "any"
},
{
"src": "` + info.images.webp + `",
"type": "image/webp",
"sizes": "1024x1024",
"purpose": "any"
},
{
"src": "` + info.images.icon + `",
"type": "image/x-icon",
"sizes": "256x256 128x128 64x64 48x48 32x32 16x16"
}
],
"background_color": "#202124",
"related_applications": [
{
"platform": "play",
"id": "com.google.stadia.android",
"url": "https://play.google.com/store/apps/details?id=com.google.stadia.android"
}
],
"prefer_related_applications": false
}`;
}
var output = require('./license.js') + `
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>StadiaIcons – Error 404 ?></title>
<meta name="description" content="There was an error loading this page: error 404, Page Not Found">
<meta name="author" content="Eric Lowry">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<link rel="stylesheet" href="/style.css">
</head>
<body>
<script>`;
if (Object.keys(errors).length === 0)
{
output += '0';
}
else{
output+= 'console.log(' + JSON.stringify(errors) + ')';
}
output += `</script>
<main>
<section class="forced">
<div>
<h1>Error 404: Page Not Found</h1>
<p><a href="/">Click Here</a> to return to the home page.</p>
</div>
</section>
</main>
<footer>
<p>Copyright © 2020 Eric Lowry. Licensed under <a href="/LICENSE.txt">AGPL 3.0</a>.</p>
<p>Follow <a href="https://github.com/ELowry/StadiaIcons/" target="_blank" rel="noreferrer noopener">StadiaIcons on GitHub</a></p>
</footer>
</body>
</html>`;
return output;
}