From ad239b230fd57233f377266dd68b15011136bbaa Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 10 Oct 2023 13:27:56 +0200 Subject: [PATCH] Themes: add guidepost theme --- assets/themes/guideposts/guideposts.json | 14 ++++++++++++++ src/Models/ThemeConfig/LayoutConfig.ts | 3 +++ 2 files changed, 17 insertions(+) create mode 100644 assets/themes/guideposts/guideposts.json diff --git a/assets/themes/guideposts/guideposts.json b/assets/themes/guideposts/guideposts.json new file mode 100644 index 0000000000..30a857b7be --- /dev/null +++ b/assets/themes/guideposts/guideposts.json @@ -0,0 +1,14 @@ +{ + "id": "guideposts", + "title": { + "en": "Guideposts" + }, + "description": { + "en": "Guideposts (also known as fingerposts or finger posts) are often found along official hiking, cycling, skiing or horseback riding routes to indicate the directions to different destinations. Additionally, they are often named after a region or place and show the altitude.\n\nThe position of a signpost can be used by a hiker/biker/rider/skier as a confirmation of the current position, especially if they use a printed map without a GPS receiver. " + }, + "icon": "./assets/layers/guidepost/guidepost.svg", + "startZoom": 2, + "layers": [ + "guidepost" + ] +} diff --git a/src/Models/ThemeConfig/LayoutConfig.ts b/src/Models/ThemeConfig/LayoutConfig.ts index 9781734dd8..3a88dc569d 100644 --- a/src/Models/ThemeConfig/LayoutConfig.ts +++ b/src/Models/ThemeConfig/LayoutConfig.ts @@ -94,6 +94,9 @@ export default class LayoutConfig implements LayoutInformation { } const context = this.id this.credits = json.credits + if(!json.title){ + throw `The theme ${json.id} does not have a title defined.` + } this.language = json.mustHaveLanguage ?? Object.keys(json.title) this.usedImages = Array.from( new ExtractImages(official, undefined)