Skip to content

Commit

Permalink
change favicon + add manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
iiiii7d committed Jan 2, 2024
1 parent 2bc43ff commit d3a7931
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 3 deletions.
5 changes: 3 additions & 2 deletions build.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/* eslint-disable @typescript-eslint/no-unsafe-call */
import * as esbuild from "esbuild";
import autoprefixer from "autoprefixer";
import postcssPresetEnv from "postcss-preset-env";
import * as esbuild from "esbuild";
import { sassPlugin } from "esbuild-sass-plugin";
import * as fs from "fs";
import * as fse from "fs-extra/esm";
import postcss from "postcss";
import postcssPresetEnv from "postcss-preset-env";

const postcssPlugins = [autoprefixer(), postcssPresetEnv({ stage: 0 })];

Expand Down Expand Up @@ -34,6 +34,7 @@ let ctx = await esbuild.context({
});
if (!fs.existsSync("out")) fs.mkdirSync("out");
fs.copyFileSync("./index.html", "./out/index.html");
fs.copyFileSync("./manifest.json", "./out/manifest.json");
fse.copySync("./media", "./out/media");

if (process.argv[2] == "prod") {
Expand Down
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
<meta name="author" content="MRT Mapping Services" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<link rel="icon" type="image/png" href="./media/map.png" />
<link rel="icon" type="image/png" href="media/map192.png" />
<link rel="manifest" href="manifest.json">

<link rel="stylesheet" href="out.css" />
<script defer src="out.js"></script>
Expand Down
24 changes: 24 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "MRT City Map",
"description": "A detailed map of the Minecart Rapid Transit server, inspired by OpenStreetMap",
"icons": [
{
"src": "/media/map512.png",
"type": "image/png",
"sizes": "512x512"
},
{
"src": "/media/map192.png",
"type": "image/png",
"sizes": "192x192"
}
],
"id": "/",
"start_url": "/",
"background_color": "#ccc",
"display": "minimal-ui",
"scope": "/",
"theme_color": "#ccc",
"shortcuts": [],
"screenshots": []
}
Binary file removed media/map.png
Binary file not shown.
Binary file added media/map192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/map512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d3a7931

Please sign in to comment.