forked from MapComplete/MapComplete
Add docs
This commit is contained in:
parent
1f6c19402b
commit
b55473c750
2 changed files with 106 additions and 27 deletions
29
README.md
29
README.md
|
@ -21,10 +21,7 @@ An explicit non-goal of MapComplete is to modify geometries of ways. Although ad
|
|||
|
||||
# Creating your own theme
|
||||
|
||||
You can create [your own theme too](https://pietervdvn.github.io/MapComplete/customGenerator.html)
|
||||
|
||||
If you have created a new theme and tested it, you can ask to have it included in the main repository. See [Dev](#Dev) for how to do this.
|
||||
|
||||
It is possible to quickly make and distrubute your own theme - [please read the documentation on how to do this](Docs/Making_Your_Own_Theme.md).
|
||||
|
||||
## Examples
|
||||
|
||||
|
@ -107,28 +104,6 @@ A theme has translations into the preset.json (`assets/themes/themename/themenam
|
|||
3. If you notice missing translations in the core of MapComplete, fork this project, open [the file containing all translations](https://github.com/pietervdvn/MapComplete/blob/master/assets/translations.json), add add a language string there
|
||||
4. Send a pull request to update the languages, I'll gladly add it! It doesn't have to be a complete translation from the start ;)
|
||||
|
||||
### Adding your theme to the repository
|
||||
|
||||
Did you make an awesome theme that you want to share with the OpenStreetMap community? Have it included in the main application, which makes it more discoverable.
|
||||
|
||||
In order to include your theme:
|
||||
|
||||
0) Make sure the theme has an English version. This makes it easier for me to understand what is going on. The more other languages, the better of course!
|
||||
1) Fork this repository
|
||||
2) Go to `assets/themes` and create a new directory `yourtheme`
|
||||
3) Create a new file `yourtheme.json`, paste the theme configuration in there. You can find your theme configuration in the customThemeBuilder (the tab with the *Floppy disk* icon)
|
||||
4) Copy all the images into this new directory: external assets can suddenly break and leak privacy
|
||||
- Make sure the license is suitable, preferable a Creative Commons license. Attribution can be added at the bottom of this document
|
||||
- If an SVG version is available, use the SVG version
|
||||
- Make sure all the links in `yourtheme.json` are updated. You can use `./assets/themes/yourtheme/yourimage.svg` instead of the HTML link
|
||||
5) Add your theme to the code base:
|
||||
- Open [AllKnownLayouts.ts](https://github.com/pietervdvn/MapComplete/blob/master/Customizations/AllKnownLayouts.ts)
|
||||
- Add an import statatement, e.g. `import * as yourtheme from "../assets/themes/yourtheme/yourthemes.json";`
|
||||
- Add your theme to the `LayoutList`, by adding a line `FromJSON.LayoutFromJSON(yourtheme)`
|
||||
6) Test your theme: run the project as described [above](#Dev)
|
||||
7) Happy with your theme? Time to open a Pull Request!
|
||||
8) Thanks a lot for improving MapComplete!
|
||||
|
||||
## Architecture
|
||||
|
||||
### High-level overview
|
||||
|
@ -266,4 +241,4 @@ Urinal icon: https://thenounproject.com/term/urinal/1307984/
|
|||
|
||||
24/7 icon: https://www.vecteezy.com/vector-art/1394992-24-7-service-and-support-icon-set
|
||||
|
||||
Translation-icon: https://commons.wikimedia.org/wiki/File:OOjs_UI_icon_language-ltr.svg
|
||||
Translation-icon: https://commons.wikimedia.org/wiki/File:OOjs_UI_icon_language-ltr.svg
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue