-
-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an optional web UI interface for Martin, including docker-based cross-compilation support. The UI itself is a placeholder with a logo, but will grow in subsequent PRs. This was branched off of #1142 to address the PR feedback from @nyurik . --------- Co-authored-by: Yuri Astrakhan <[email protected]> Co-authored-by: Tomer Ronen <[email protected]> Co-authored-by: tomeronen <[email protected]>
- Loading branch information
1 parent
adb9a4a
commit 7f18b6b
Showing
33 changed files
with
3,786 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[build] | ||
pre-build = [ | ||
# install nodejs and npm to compile static web resources | ||
# note that architecture could be the same as the container, not $CROSS_DEB_ARCH | ||
# Need to use a fairly old Node.js version to support the old underlying docker image | ||
"curl -fsSL https://deb.nodesource.com/setup_16.x -o nodesource_setup.sh", | ||
"bash nodesource_setup.sh", | ||
"apt-get install -y nodejs", | ||
"node -v", | ||
# Using old NPM, so must ensure correct access | ||
"mkdir -p /.npm", | ||
"chown -R 1001:127 /.npm", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module.exports = { | ||
root: true, | ||
env: { browser: true, es2020: true }, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:react-hooks/recommended', | ||
], | ||
ignorePatterns: ['dist', '.eslintrc.cjs'], | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['react-refresh'], | ||
rules: { | ||
'react-refresh/only-export-components': [ | ||
'warn', | ||
{ allowConstantExport: true }, | ||
], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Martin Web UI | ||
|
||
A web interface for previewing tiles served by Martin. | ||
|
||
### Run locally | ||
|
||
To run just the web interface | ||
|
||
```bash | ||
npm i | ||
npm run dev | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<link rel="icon" type="image/x-icon" href="/_/assets/favicon.ico"> | ||
<meta property="og:url" content="https://maplibre.org"/> | ||
<meta property="og:title" content="Martin — vector tiles server"/> | ||
<meta property="og:description" | ||
content="Blazing fast and lightweight PostGIS, MBtiles and PMtiles tile server, tile generation, and mbtiles tooling."/> | ||
<meta property="og:image" content="/martin.png"/> | ||
<meta name="msapplication-TileColor" content="#ffffff"> | ||
<meta name="msapplication-TileImage" content="/_/assets/favicons/ms-icon-144x144.png"> | ||
<meta name="theme-color" content="#ffffff"> | ||
<title>Martin — vector tiles server</title> | ||
</head> | ||
<body> | ||
<noscript> | ||
You need to enable JavaScript to run this app. | ||
</noscript> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.