diff --git a/src/UI/RemoveOtherLanguages.ts b/src/UI/RemoveOtherLanguages.ts
index 207a64098..6d2b70773 100644
--- a/src/UI/RemoveOtherLanguages.ts
+++ b/src/UI/RemoveOtherLanguages.ts
@@ -22,6 +22,7 @@ function filterLangs(maindiv) {
continue
}
if (childLang.value === lang) {
+ child.style.display = ""
continue
}
child.parentElement.removeChild(child)
diff --git a/src/UI/SpecialVisualizations.ts b/src/UI/SpecialVisualizations.ts
index 70fe55b7a..95c955053 100644
--- a/src/UI/SpecialVisualizations.ts
+++ b/src/UI/SpecialVisualizations.ts
@@ -1776,6 +1776,11 @@ export default class SpecialVisualizations {
{
name: "mode",
doc: "If `display`, only show the data in tabular and readonly form, ignoring already existing tags. This is used to explicitly show all the tags. If unset or anything else, allow to apply/import on OSM"
+ },
+ {
+ name: "collapsed",
+ defaultValue: "yes",
+ doc: "If the containing accordion should be closed"
}
],
needsUrls: [Constants.linkedDataProxy, "http://www.schema.org"],
@@ -1789,6 +1794,7 @@ export default class SpecialVisualizations {
const key = argument[0] ?? "website"
const useProxy = argument[1] !== "no"
const readonly = argument[3] === "readonly"
+ const isClosed = (arguments[4] ?? "yes") === "yes"
const url = tags
.mapD((tags) => {
diff --git a/src/index.css b/src/index.css
index f6b8a58fc..af8b4a8ee 100644
--- a/src/index.css
+++ b/src/index.css
@@ -17,6 +17,9 @@
* For a custom styling, set 'customCss' in your layoutConfig and overwrite some of these.
*/
+ /* No support for dark mode yet, we disable it to prevent some elements to suddenly toggle */
+ color-scheme: only light;
+
/* Main color of the application: the background and text colours */
--background-color: white;
/* Main text colour. Also styles some elements, such as the 'close popup'-button or 'back-arrow' (in mobile) */
@@ -112,7 +115,7 @@ h1 {
h2 {
font-size: x-large;
margin-top: 0.5em;
- margin-bottom: 0.3em;
+ margin-bottom: 0; /*Disable margin bottom to play nicely with accordeons from flowbite*/
font-weight: bold;
}
@@ -201,6 +204,10 @@ button, .button {
}
+.group > button {
+ padding-right: 1rem !important; /*Flowbite workaround */
+}
+
button.w-full {
margin-left: 0;
}
diff --git a/src/index.ts b/src/index.ts
index 262e06ad9..2bc37a05c 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -52,10 +52,13 @@ async function main() {
])
console.log("The available layers on server are", Array.from(availableLayers))
const state = new ThemeViewState(layout, availableLayers)
+ const target = document.getElementById("maindiv")
+ const childs = Array.from(target.children)
new ThemeViewGUI({
- target: document.getElementById("maindiv"),
+ target,
props: { state },
})
+ childs.forEach(ch => target.removeChild(ch))
Array.from(document.getElementsByClassName("delete-on-load")).forEach((el) => {
el.parentElement.removeChild(el)
})
diff --git a/src/index_theme.ts.template b/src/index_theme.ts.template
index 048a54e12..5627128dd 100644
--- a/src/index_theme.ts.template
+++ b/src/index_theme.ts.template
@@ -46,10 +46,13 @@ async function main() {
MetaTagging.setThemeMetatagging(new ThemeMetaTagging())
// LAYOUT.ADD_LAYERS
const state = new ThemeViewState(new LayoutConfig(
layout), availableLayers)
+ const target = document.getElementById("maindiv")
+ const childs = Array.from(target.children)
new ThemeViewGUI({
- target: document.getElementById("maindiv"),
- props: {state}
+ target,
+ props: { state },
})
+ childs.forEach(ch => target.removeChild(ch))
Array.from(document.getElementsByClassName("delete-on-load")).forEach(el => {
el.parentElement.removeChild(el)
})
diff --git a/theme.html b/theme.html
index 414045fa8..824e219ca 100644
--- a/theme.html
+++ b/theme.html
@@ -13,6 +13,8 @@
+
+