From 20386b7c0b4dfeb0d5364ac5d3419310c61f250a Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Fri, 23 Apr 2021 12:59:09 +0200 Subject: [PATCH] Styling tweaks for speelplekken theme --- Models/Constants.ts | 2 +- Svg.ts | 42 ++-------- assets/layers/slow_roads/slow_roads.json | 14 ++-- assets/themes/speelplekken/speelplekken.json | 6 +- package.json | 2 +- test.html | 84 +++++++++++++++++++- 6 files changed, 97 insertions(+), 53 deletions(-) diff --git a/Models/Constants.ts b/Models/Constants.ts index ffd796a..298531e 100644 --- a/Models/Constants.ts +++ b/Models/Constants.ts @@ -2,7 +2,7 @@ import { Utils } from "../Utils"; export default class Constants { - public static vNumber = "0.6.11"; + public static vNumber = "0.6.11a"; // The user journey states thresholds when a new feature gets unlocked public static userJourney = { diff --git a/Svg.ts b/Svg.ts index ca23326..5388970 100644 --- a/Svg.ts +++ b/Svg.ts @@ -4,41 +4,6 @@ import {FixedUiElement} from "./UI/Base/FixedUiElement"; export default class Svg { - public static Ornament_Horiz_0 = " image/svg+xml " - public static Ornament_Horiz_0_img = Img.AsImageElement(Svg.Ornament_Horiz_0) - public static Ornament_Horiz_0_svg() { return new FixedUiElement(Svg.Ornament_Horiz_0);} - public static Ornament_Horiz_0_ui() { return new FixedUiElement(Svg.Ornament_Horiz_0_img);} - - public static Ornament_Horiz_1 = " image/svg+xml " - public static Ornament_Horiz_1_img = Img.AsImageElement(Svg.Ornament_Horiz_1) - public static Ornament_Horiz_1_svg() { return new FixedUiElement(Svg.Ornament_Horiz_1);} - public static Ornament_Horiz_1_ui() { return new FixedUiElement(Svg.Ornament_Horiz_1_img);} - - public static Ornament_Horiz_2 = " image/svg+xml " - public static Ornament_Horiz_2_img = Img.AsImageElement(Svg.Ornament_Horiz_2) - public static Ornament_Horiz_2_svg() { return new FixedUiElement(Svg.Ornament_Horiz_2);} - public static Ornament_Horiz_2_ui() { return new FixedUiElement(Svg.Ornament_Horiz_2_img);} - - public static Ornament_Horiz_3 = " image/svg+xml " - public static Ornament_Horiz_3_img = Img.AsImageElement(Svg.Ornament_Horiz_3) - public static Ornament_Horiz_3_svg() { return new FixedUiElement(Svg.Ornament_Horiz_3);} - public static Ornament_Horiz_3_ui() { return new FixedUiElement(Svg.Ornament_Horiz_3_img);} - - public static Ornament_Horiz_4 = " image/svg+xml " - public static Ornament_Horiz_4_img = Img.AsImageElement(Svg.Ornament_Horiz_4) - public static Ornament_Horiz_4_svg() { return new FixedUiElement(Svg.Ornament_Horiz_4);} - public static Ornament_Horiz_4_ui() { return new FixedUiElement(Svg.Ornament_Horiz_4_img);} - - public static Ornament_Horiz_5 = " image/svg+xml " - public static Ornament_Horiz_5_img = Img.AsImageElement(Svg.Ornament_Horiz_5) - public static Ornament_Horiz_5_svg() { return new FixedUiElement(Svg.Ornament_Horiz_5);} - public static Ornament_Horiz_5_ui() { return new FixedUiElement(Svg.Ornament_Horiz_5_img);} - - public static Ornament_Horiz_6 = " image/svg+xml " - public static Ornament_Horiz_6_img = Img.AsImageElement(Svg.Ornament_Horiz_6) - public static Ornament_Horiz_6_svg() { return new FixedUiElement(Svg.Ornament_Horiz_6);} - public static Ornament_Horiz_6_ui() { return new FixedUiElement(Svg.Ornament_Horiz_6_img);} - public static SocialImageForeground = " image/svg+xml 010110010011010110010011  010110010011010110010011  " public static SocialImageForeground_img = Img.AsImageElement(Svg.SocialImageForeground) public static SocialImageForeground_svg() { return new FixedUiElement(Svg.SocialImageForeground);} @@ -214,6 +179,11 @@ export default class Svg { public static mapillary_svg() { return new FixedUiElement(Svg.mapillary);} public static mapillary_ui() { return new FixedUiElement(Svg.mapillary_img);} + public static mapillary_black = " image/svg+xml " + public static mapillary_black_img = Img.AsImageElement(Svg.mapillary_black) + public static mapillary_black_svg() { return new FixedUiElement(Svg.mapillary_black);} + public static mapillary_black_ui() { return new FixedUiElement(Svg.mapillary_black_img);} + public static min = " image/svg+xml " public static min_img = Img.AsImageElement(Svg.min) public static min_svg() { return new FixedUiElement(Svg.min);} @@ -349,4 +319,4 @@ export default class Svg { public static wikipedia_svg() { return new FixedUiElement(Svg.wikipedia);} public static wikipedia_ui() { return new FixedUiElement(Svg.wikipedia_img);} -public static All = {"Ornament-Horiz-0.svg": Svg.Ornament_Horiz_0,"Ornament-Horiz-1.svg": Svg.Ornament_Horiz_1,"Ornament-Horiz-2.svg": Svg.Ornament_Horiz_2,"Ornament-Horiz-3.svg": Svg.Ornament_Horiz_3,"Ornament-Horiz-4.svg": Svg.Ornament_Horiz_4,"Ornament-Horiz-5.svg": Svg.Ornament_Horiz_5,"Ornament-Horiz-6.svg": Svg.Ornament_Horiz_6,"SocialImageForeground.svg": Svg.SocialImageForeground,"add.svg": Svg.add,"addSmall.svg": Svg.addSmall,"ampersand.svg": Svg.ampersand,"arrow-left-smooth.svg": Svg.arrow_left_smooth,"arrow-right-smooth.svg": Svg.arrow_right_smooth,"back.svg": Svg.back,"bug.svg": Svg.bug,"camera-plus.svg": Svg.camera_plus,"checkmark.svg": Svg.checkmark,"circle.svg": Svg.circle,"clock.svg": Svg.clock,"close.svg": Svg.close,"compass.svg": Svg.compass,"cross_bottom_right.svg": Svg.cross_bottom_right,"crosshair-blue-center.svg": Svg.crosshair_blue_center,"crosshair-blue.svg": Svg.crosshair_blue,"crosshair.svg": Svg.crosshair,"delete_icon.svg": Svg.delete_icon,"direction.svg": Svg.direction,"direction_gradient.svg": Svg.direction_gradient,"down.svg": Svg.down,"envelope.svg": Svg.envelope,"floppy.svg": Svg.floppy,"gear.svg": Svg.gear,"help.svg": Svg.help,"home.svg": Svg.home,"home_white_bg.svg": Svg.home_white_bg,"josm_logo.svg": Svg.josm_logo,"layers.svg": Svg.layers,"layersAdd.svg": Svg.layersAdd,"logo.svg": Svg.logo,"logout.svg": Svg.logout,"mapcomplete_logo.svg": Svg.mapcomplete_logo,"mapillary.svg": Svg.mapillary,"min.svg": Svg.min,"no_checkmark.svg": Svg.no_checkmark,"or.svg": Svg.or,"osm-copyright.svg": Svg.osm_copyright,"osm-logo-us.svg": Svg.osm_logo_us,"osm-logo.svg": Svg.osm_logo,"pencil.svg": Svg.pencil,"phone.svg": Svg.phone,"pin.svg": Svg.pin,"plus.svg": Svg.plus,"pop-out.svg": Svg.pop_out,"reload.svg": Svg.reload,"ring.svg": Svg.ring,"search.svg": Svg.search,"send_email.svg": Svg.send_email,"share.svg": Svg.share,"square.svg": Svg.square,"star.svg": Svg.star,"star_half.svg": Svg.star_half,"star_outline.svg": Svg.star_outline,"star_outline_half.svg": Svg.star_outline_half,"statistics.svg": Svg.statistics,"translate.svg": Svg.translate,"up.svg": Svg.up,"wikidata.svg": Svg.wikidata,"wikimedia-commons-white.svg": Svg.wikimedia_commons_white,"wikipedia.svg": Svg.wikipedia};} +public static All = {"SocialImageForeground.svg": Svg.SocialImageForeground,"add.svg": Svg.add,"addSmall.svg": Svg.addSmall,"ampersand.svg": Svg.ampersand,"arrow-left-smooth.svg": Svg.arrow_left_smooth,"arrow-right-smooth.svg": Svg.arrow_right_smooth,"back.svg": Svg.back,"bug.svg": Svg.bug,"camera-plus.svg": Svg.camera_plus,"checkmark.svg": Svg.checkmark,"circle.svg": Svg.circle,"clock.svg": Svg.clock,"close.svg": Svg.close,"compass.svg": Svg.compass,"cross_bottom_right.svg": Svg.cross_bottom_right,"crosshair-blue-center.svg": Svg.crosshair_blue_center,"crosshair-blue.svg": Svg.crosshair_blue,"crosshair.svg": Svg.crosshair,"delete_icon.svg": Svg.delete_icon,"direction.svg": Svg.direction,"direction_gradient.svg": Svg.direction_gradient,"down.svg": Svg.down,"envelope.svg": Svg.envelope,"floppy.svg": Svg.floppy,"gear.svg": Svg.gear,"help.svg": Svg.help,"home.svg": Svg.home,"home_white_bg.svg": Svg.home_white_bg,"josm_logo.svg": Svg.josm_logo,"layers.svg": Svg.layers,"layersAdd.svg": Svg.layersAdd,"logo.svg": Svg.logo,"logout.svg": Svg.logout,"mapcomplete_logo.svg": Svg.mapcomplete_logo,"mapillary.svg": Svg.mapillary,"mapillary_black.svg": Svg.mapillary_black,"min.svg": Svg.min,"no_checkmark.svg": Svg.no_checkmark,"or.svg": Svg.or,"osm-copyright.svg": Svg.osm_copyright,"osm-logo-us.svg": Svg.osm_logo_us,"osm-logo.svg": Svg.osm_logo,"pencil.svg": Svg.pencil,"phone.svg": Svg.phone,"pin.svg": Svg.pin,"plus.svg": Svg.plus,"pop-out.svg": Svg.pop_out,"reload.svg": Svg.reload,"ring.svg": Svg.ring,"search.svg": Svg.search,"send_email.svg": Svg.send_email,"share.svg": Svg.share,"square.svg": Svg.square,"star.svg": Svg.star,"star_half.svg": Svg.star_half,"star_outline.svg": Svg.star_outline,"star_outline_half.svg": Svg.star_outline_half,"statistics.svg": Svg.statistics,"translate.svg": Svg.translate,"up.svg": Svg.up,"wikidata.svg": Svg.wikidata,"wikimedia-commons-white.svg": Svg.wikimedia_commons_white,"wikipedia.svg": Svg.wikipedia};} diff --git a/assets/layers/slow_roads/slow_roads.json b/assets/layers/slow_roads/slow_roads.json index 2d84c1f..3a75942 100644 --- a/assets/layers/slow_roads/slow_roads.json +++ b/assets/layers/slow_roads/slow_roads.json @@ -157,7 +157,7 @@ "mappings": [] }, "width": { - "render": "4" + "render": "7" }, "dashArray": { "render": "", @@ -168,19 +168,15 @@ }, { "if": "highway=path", - "then": "10 3" + "then": "0 12" }, { - "if": "highway=footway", - "then": "10 10" - }, - { - "if": "highway=pedestrian", - "then": "10 10" + "if": {"or":["highway=footway","highway=pedestrian"]}, + "then": "12 18" }, { "if": "highway=living_street", - "then": "10 5 3 5" + "then": "12 12 0 12" } ] }, diff --git a/assets/themes/speelplekken/speelplekken.json b/assets/themes/speelplekken/speelplekken.json index 5e7217b..d4e13ab 100644 --- a/assets/themes/speelplekken/speelplekken.json +++ b/assets/themes/speelplekken/speelplekken.json @@ -13,7 +13,7 @@ "nl" ], "maintainer": "MapComplete", - "icon": "./assets/layers/play_forest/icon.svg", + "icon": "./assets/themes/speelplekken/logo.svg", "hideFromOverview": true, "lockLocation": true, "version": "0", @@ -186,7 +186,7 @@ ] }, "width": { - "render": "3" + "render": "9" } } ], @@ -196,4 +196,4 @@ "condition": "_part_of_walking_routes~*" } ] -} \ No newline at end of file +} diff --git a/package.json b/package.json index e41d844..2327fff 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "generate:translations": "ts-node scripts/generateTranslations.ts", "generate:layouts": "ts-node scripts/generateLayouts.ts", "generate:docs": "ts-node scripts/generateDocs.ts && ts-node scripts/generateTaginfoProjectFiles.ts", - "generate:cache:speelplekken": "ts-node scripts/generateCache.ts speelplekken 14 ../pietervdvn.github.io/speelplekken_cache/ 51.20 4.37 51.11 4.51", + "generate:cache:speelplekken": "ts-node scripts/generateCache.ts speelplekken 14 ../pietervdvn.github.io/speelplekken_cache/ 51.22 4.30 51.08 4.55", "generate:layeroverview": "ts-node scripts/generateLayerOverview.ts --no-fail", "generate:licenses": "ts-node scripts/generateLicenseInfo.ts --no-fail", "validate:layeroverview": "ts-node scripts/generateLayerOverview.ts --report", diff --git a/test.html b/test.html index f2975d0..ec8f0b0 100644 --- a/test.html +++ b/test.html @@ -15,10 +15,88 @@ -
'maindiv' not attached
+
'maindiv' not attached
'extradiv' not attached
+ + + + - - + +