diff --git a/Logic/PersonalLayersPanel.ts b/Logic/PersonalLayersPanel.ts index 5c673e6..fb8e885 100644 --- a/Logic/PersonalLayersPanel.ts +++ b/Logic/PersonalLayersPanel.ts @@ -51,8 +51,10 @@ export class PersonalLayersPanel extends UIElement { continue; } let icon = layer.icon ?? "./assets/checkmark.svg"; - if (typeof (icon) !== "string") { - icon = icon.GetContent({"id": "node/-1"}).txt ?? "./assets/checkmark.svg"; + let iconUnset = layer.icon ?? ""; + if (layer.icon !== undefined && typeof (layer.icon) !== "string") { + icon = layer.icon.GetContent({"id": "node/-123456"}).txt ?? "./assets/checkmark.svg"; + iconUnset = icon; } let name = layer.name ?? layer.id; @@ -65,10 +67,16 @@ export class PersonalLayersPanel extends UIElement { " ", layer.description !== undefined ? new Combine(["
", layer.description]) : "", ]) + + const iconImage = ``; + const iconUnsetImage = `` + const cb = new CheckBox( - new SubtleButton(icon ?? "./assets/checkmark.svg", content), new SubtleButton( - new FixedUiElement(``).SetStyle("opacity:0.1"), + new FixedUiElement(iconImage).SetStyle(""), + content), + new SubtleButton( + new FixedUiElement(iconUnsetImage).SetStyle("opacity:0.1;"), new Combine(["", content, "" diff --git a/UI/i18n/Translation.ts b/UI/i18n/Translation.ts index ed15631..7980825 100644 --- a/UI/i18n/Translation.ts +++ b/UI/i18n/Translation.ts @@ -93,6 +93,7 @@ export default class Translation extends UIElement { const tr = {}; for (const lng in this.translations) { let txt = this.translations[lng]; + console.log(txt) txt = txt.replace(/\..*/, ""); txt = Utils.EllipsesAfter(txt, 255); tr[lng] = txt; diff --git a/assets/themes/toilets/toilets.json b/assets/themes/toilets/toilets.json index 2c4c961..0b85b52 100644 --- a/assets/themes/toilets/toilets.json +++ b/assets/themes/toilets/toilets.json @@ -59,8 +59,10 @@ "amenity=toilets" ], "description": { - "en": "A publicly accessible toilet or restroom", - "de": "Eine öffentlich zugängliche Toilette" + "render": { + "en": "A publicly accessible toilet or restroom", + "de": "Eine öffentlich zugängliche Toilette" + } } }, { diff --git a/index.css b/index.css index fdb9995..65dd411 100644 --- a/index.css +++ b/index.css @@ -664,9 +664,10 @@ body { .subtle-button img { max-width: 3em; - max-height: 3em; + height: 3em; margin-right: 0.5em; - padding: 0.5em; + padding: 0; + padding-bottom:0.2em; } diff --git a/index.ts b/index.ts index acfd944..26c0285 100644 --- a/index.ts +++ b/index.ts @@ -7,11 +7,10 @@ import {UIEventSource} from "./Logic/UIEventSource"; import * as $ from "jquery"; import {FromJSON} from "./Customizations/JSON/FromJSON"; import {TagRendering} from "./UI/TagRendering"; -import {State} from "./State"; TagRendering.injectFunction(); - +let defaultLayout = "buurtnatuur" // --------------------- Special actions based on the parameters ----------------- // @ts-ignore if (location.href.startsWith("http://buurtnatuur.be")) { @@ -20,6 +19,15 @@ if (location.href.startsWith("http://buurtnatuur.be")) { } +if (location.href.indexOf("buurtnatuur.be") >= 0) { + defaultLayout = "buurtnatuur" +} + +if(location.href.indexOf("pietervdvn.github.io") >= 0){ + defaultLayout = "bookcases" +} + + let testing: UIEventSource; if (location.hostname === "localhost" || location.hostname === "127.0.0.1") { @@ -36,7 +44,7 @@ if (location.hostname === "localhost" || location.hostname === "127.0.0.1") { // ----------------- SELECT THE RIGHT QUESTSET ----------------- -let defaultLayout = "buurtnatuur" + const path = window.location.pathname.split("/").slice(-1)[0]; if (path !== "index.html" && path !== "") {