show structure at example edit

This commit is contained in:
2020-09-03 10:51:32 +02:00
parent 19d3e38dcb
commit 197cc6199c
3 changed files with 4 additions and 3 deletions

View File

@@ -72,6 +72,9 @@ def edit_example(example, sense):
return result
divs.append(h("div.flex.five.example-component", {}, [h("div.one-fifth", {}, "Struktura:"),
h("div.three-fifth", {}, example.inner.other_attributes["structureName"])]))
for idx, component in enumerate(example.components):
role_txt = component.role if component.role is not None else "none"
color_class = ".example-component-" + role_txt